Go Down

Topic: Convert serial x y data to parallel (Read 3 times) previous topic - next topic


I constructed an xy plotter and use Processing to send mouse data serially to the Arduino, then to Easydrivers, and then to the steppers. It works fine except that being serial, I can send an "x" or a "y", but not both simultaneously. The result is that only one stepper can be moving at a time. So, I can't make a diagonal line easily or make any move that requires both steppers to move at the same time as in a circle for example. I am thinking about using a shift register to store the x and y data and feed it as parallel data allowing the plotter to move both steppers at the same time. The speed of transfer is not important at all. The thought is that a shift register conversion after the Arduino could be stored, if needed, and then fed to the Easydriver chips. I would appreciate any thoughts or suggestions about the possibility of this approach. 


An X Y plotter is rather similar to a CNC machine. They use a simple language called Gcode,so if you want to go to coordinates 17 and 22 then you would send:-
G2 X 17 Y 22 (carriage return)
So the arduino doesn't command the motors until it sees the carriage return and knows the command is complete.


Thanks Grumpy_Mike and I am not sure if you are suggesting that I use the G code language or that I should be looking at how I am using the code to send the data and incorporate some sort of packet command. Any clarification would help.


What have you got running on the Arduino - your own software or something bundled with Processing?

If you can send very small increments to the Arduino, then you could "draw" the diagonal line in the Processing and send very small movement steps to the Arduino along the diagonal line. Same goes for circle arcs and so on.


I have my own Arduino code and processing is generating the xy mouse movement and sending it to the Arduino. But, my problem is understanding how to make the packets small as you have described. Since the Processing is sending the xy data, I assume that I  can "package" the data in small pairs but I am not sure hoe. Thanks for the insight!

Go Up