Reprap-Host
Reprap-Host
I finally got the reprap host to actually run on my system! I still don’t know which version of Java it’s using since I have eight installed. Finally, in desperation I copied j3d-org-java3d-all.jar to all the lib\ext folders I could find. Crude but effective!
Now I need to figure out what kind of information it sends to the firmware. All I know now is it’s a 16 byte packet with an address showing which board is to react. I want my Arduino to know how to handle each packet.
I’m hoping Zach will be back from vacation soon and maybe I can get his firmware to work! Hint, Zach, hint!
Too cold today to work on the repstrap which is out in the barn for reconstructive surgery so here’s a video from: youTube with x and y axes turning. Shows the xml reader printing lines. The last line is diagonal so the x and y steppers will be traveling at different speeds to arrive at the end point at the same time.
This was in response to Zach Hoeken on the RepRap forum.
http://forums.reprap.org/read.php?13,5128
To make the gui in Processing, I used someone elses library (SpringGUI by Philipp Seifried) which then of course I had to learn how he did what. Kind of tedious, after using an ide that did all that for you, but just a lot of cut and paste mostly. In processing (Slice_Dice_xml_reader), the file called Setup has all that in it.
I’m using some code Dr.Higgs wrote in vb that takes an stl file and slices it to make layer paths which are just xyz coordinates stored in an xml file. I have Processing read the file and store all the xyz values in arrays then convert them to steps put them in a string ending in a line feed and shoot it off to the Arduino. CNC uses a 255 char max length packet so I picked that and added a * followed by a kinda sorta crc and end the packet with a linefeed. I plan to rewrite it all to use it for cnc later.
The timing of the xyz steppers was using millisecond timing but after looking at you code I thought I’d change it to Microseconds which is what I’m working on as we speak.
The code for the Arduino is pretty simple. It continuously listens for serial comms and reads the temp. (when I have an extruder. remmed out now) The arduino reads chars till it sees the linefeed and then parses the string. It gets xyz steps, extruder on/off, heater on/off pwm%, and feedrate(cnc uses 1 to 22. I can only get to 8 in/min). When it finishes drawing a line it sends an ACK back to Processing for the next line.
I make all three steppers step in different directions at differing speeds by using Breshenham line drawing like they do with plotters. It’s really linear interpolation. In the Arudino code (xyz_gcode_interpreter) look at the linear_interpolation file. If you send step info for all three motors it will choose the largest number of steps to move and calculate how often to move the other two so that they all get finished at the same time. With reprap I send z steps separate from xy since it will only change between layers.
I’ll use a second Arduino, when I need one, but will have the first one be the master and control the second which will control the extruders, heaters, and fans. I’ll use software serial to talk to it on two pins not dedicated to serial (like 0 and 1).
I’ve spent the last few weeks with my new obsession. Not the repstrap the software and firmware to download 3D solids to the Arduino http://www.arduino.cc/ from Processing http://processing.org/.
My original thought was to send the xyz data from the xml file that Slice and Dice produced. There were too many communication problems. Then I did some research into g-code that cnc machines use and decided to make a g-code parser for the arduino. It’s not real g-code, more of a subset with extentions, but it could be rewritten into a real g-code parser and, if I ever try to make a cnc machine, that’s what I’ll do. The firmware for the Arduino is also available.
Want to see the Processing program? Here you go. Source code for Processing 0125 is available for download at: http://www.freewebs.com/adub/
Processing is an open source programming language and IDE but to use the source code you will have to download it. The executable also available as a little larger download. It contains the executable for Windows, OSX, and Linux as is standard for Processing.
Through rambling for today! :)
Slice & Dice xml Reader
It’s a mess, I know! I’ll clean it all up in my next life.
The two drawings on the notebook paper were the first and second attempts at drawing a rectangle with diagonals. I think it was a little off on the first one at the top. The one below is better. The lines don’t quite match up but the carpenter’s pencil is just held on with some wire bread ties!
I was very excited by the second one!
First numerically controlled drawing.