| Both sides previous revisionPrevious revision | |
| arduino:2dplotter [2026/09/26 09:45] – [Redesign Considerations] tony | arduino:2dplotter [2026/09/26 21:09] (current) – tony |
|---|
| |
| ---- | ---- |
| ====== Construction ====== | ===== Construction ===== |
| ===== X and Y Axis ===== | ==== X and Y Axis ==== |
| I have a number of old CD/DVD drives and chose to use [[:electronic:equipment:cdrom:gd8000|Hitachi GD-8000]] drives as I had two of them, which allows me to have identical mechanisms for the X and Y axes. | I have a number of old CD/DVD drives and chose to use [[:electronic:equipment:cdrom:gd8000|Hitachi GD-8000]] drives as I had two of them, which allows me to have identical mechanisms for the X and Y axes. |
| |
| {{:arduino:2dplotter:p7139113a.jpg?800|Two sleds mounted at right angles to form X and Y axes}} | {{:arduino:2dplotter:p7139113a.jpg?800|Two sleds mounted at right angles to form X and Y axes}} |
| |
| ===== Attaching the Arduino ===== | ==== Attaching the Arduino ==== |
| The X and Y stepper motors each have four wires, their limit switches have two wires each. The limit switches are normally open ("NO" contacts) and need to provide a low signal (0 V) when the carriage reaches it's furthest travel and closes the switch. So one side of each switch is connected to a ground line (GND), and the other is brought out to a connector to attach the Arduino. Continuing with the recycling theme, I used a 34 pin "IDE" to edge connector adapter from an old 5¼" floppy disk drive. This has two rows of 17 pins, the bottom row are usually all connected together and grounded, but in this application they can be ignored. The top 17 are sufficient for connecting our two axes and a pen raising mechanism (yet to be designed!). The PCB edge connector is easy to solder wires to. | The X and Y stepper motors each have four wires, their limit switches have two wires each. The limit switches are normally open ("NO" contacts) and need to provide a low signal (0 V) when the carriage reaches it's furthest travel and closes the switch. So one side of each switch is connected to a ground line (GND), and the other is brought out to a connector to attach the Arduino. Continuing with the recycling theme, I used a 34 pin "IDE" to edge connector adapter from an old 5¼" floppy disk drive. This has two rows of 17 pins, the bottom row are usually all connected together and grounded, but in this application they can be ignored. The top 17 are sufficient for connecting our two axes and a pen raising mechanism (yet to be designed!). The PCB edge connector is easy to solder wires to. |
| |
| </HTML> | </HTML> |
| |
| ===== Drawing platform ===== | ==== Drawing platform ==== |
| The drawing platform is fixed to DVD drive's old laser mount on the horizontal sled, and the plotting pen will be attached to the laser mount on the vertical sled. | The drawing platform is fixed to DVD drive's old laser mount on the horizontal sled, and the plotting pen will be attached to the laser mount on the vertical sled. |
| |
| |{{arduino:2dplotter:p7179146a.jpg?400|Parts for wood platform}}|{{arduino:2dplotter:p7179145a.jpg?400|Assembled wooden platform (view from underneath).}}| | |{{arduino:2dplotter:p7179146a.jpg?400|Parts for wood platform}}|{{arduino:2dplotter:p7179145a.jpg?400|Assembled wooden platform (view from underneath).}}| |
| |
| ===== Drawing pen ===== | ==== Drawing pen ==== |
| ==== Fixed pen holder ==== | === Fixed pen holder === |
| For testing purposes, a temporary fixed (no raising mechanism) pen holder was constructed from Meccano pieces: | For testing purposes, a temporary fixed (no raising mechanism) pen holder was constructed from Meccano pieces: |
| |
| {{arduino:2dplotter:p7215796a.jpg?200|2D Plotter test output.}} | {{arduino:2dplotter:p7215796a.jpg?200|2D Plotter test output.}} |
| |
| ==== Pen moving mechanism ==== | === Pen moving mechanism === |
| As expected, construction of a pen raising/lowering mechanism requires a bit of work. We need something fairly light as it must be carried by the lower Y-axis CD sled and it extends out across the plotter bed so exerts leverage on the sled too. The Arduino controller firmware expects to have stepper motors on all three axes, so that seemed to be the first choice for the pen lower/raise mechanism (effectively the Z-axis of this plotter). I looked at using a lightweight CD sled from a laptop DVD drive - it has a very small (ie lightweight) stepper motor and a lightweight frame to hold it. But in trying to connect leads to the motor I broke one of the phase winding connections, so decided it was too fiddly to persevere with. | As expected, construction of a pen raising/lowering mechanism requires a bit of work. We need something fairly light as it must be carried by the lower Y-axis CD sled and it extends out across the plotter bed so exerts leverage on the sled too. The Arduino controller firmware expects to have stepper motors on all three axes, so that seemed to be the first choice for the pen lower/raise mechanism (effectively the Z-axis of this plotter). I looked at using a lightweight CD sled from a laptop DVD drive - it has a very small (ie lightweight) stepper motor and a lightweight frame to hold it. But in trying to connect leads to the motor I broke one of the phase winding connections, so decided it was too fiddly to persevere with. |
| |
| |
| ---- | ---- |
| ====== Software and firmware ====== | ===== Software and firmware ===== |
| |
| The plotter hardware needs some way to receive instructions of what to draw, and turn those into plotter movements. //G-code// is often used as the instruction set, and //Grbl// software running on an Arduino is often used to interpret those instructions and convert them to movement of the plotter. The G-code interpreter software for the Arduino is burnt into its erasable memory so is considered to be firmware. | The plotter hardware needs some way to receive instructions of what to draw, and turn those into plotter movements. //G-code// is often used as the instruction set, and //Grbl// software running on an Arduino is often used to interpret those instructions and convert them to movement of the plotter. The G-code interpreter software for the Arduino is burnt into its erasable memory so is considered to be firmware. |
| Traditionally this sort of minimal plotter is set up to receive G-code commands from a 'sender' program | Traditionally this sort of minimal plotter is set up to receive G-code commands from a 'sender' program |
| |
| ===== Firmware ===== | ==== Firmware ==== |
| |
| //Grbl// has many clever features and takes up most of the resources of an Arduino Uno, there are other G-code interpreters like //Mini_CNC_Arduino_Plotter// (simpler) and //Not_grbl// (simpler and faster). | //Grbl// has many clever features and takes up most of the resources of an Arduino Uno, there are other G-code interpreters like //Mini_CNC_Arduino_Plotter// (simpler) and //Not_grbl// (simpler and faster). |
| One interesting fact emerged, there are different interpretations/implementations of the time parameter of the pause/dwell command "G4 Pxxx". Some use the parameter to specify the delay in milliseconds, others use it to mean a delay in seconds! eg the command //G4 P180// will cause some g-code interpreters to dwell for 3 minutes, whereas others will take it to mean dwell for 180 milliseconds. I am inclined to implement it as a delay in seconds when the parameter is specified with a decimal point (eg //G4 P0.500//) and interpret it as milliseconds when specified as an integer (eg //G4 P500//). | One interesting fact emerged, there are different interpretations/implementations of the time parameter of the pause/dwell command "G4 Pxxx". Some use the parameter to specify the delay in milliseconds, others use it to mean a delay in seconds! eg the command //G4 P180// will cause some g-code interpreters to dwell for 3 minutes, whereas others will take it to mean dwell for 180 milliseconds. I am inclined to implement it as a delay in seconds when the parameter is specified with a decimal point (eg //G4 P0.500//) and interpret it as milliseconds when specified as an integer (eg //G4 P500//). |
| |
| ===== Sender software ===== | ==== Sender software ==== |
| |
| We can communicate with the //Grbl// software on the plotter's Arduino controller through the Arduino IDE serial console, but for non-trivial drawing, we need something that can send complete lists of instructions - a 'sender' program such as //bCNC// or //UGS//. | We can communicate with the //Grbl// software on the plotter's Arduino controller through the Arduino IDE serial console, but for non-trivial drawing, we need something that can send complete lists of instructions - a 'sender' program such as //bCNC// or //UGS//. |
| |
| \\ | \\ |
| ====== Conclusions ====== | ===== Conclusions ===== |
| ===== Redesign considerations ===== | ==== Redesign considerations ==== |
| It would have been more useful to have the limit switches detect the zer0 location on each axis, rather than the limit of travel, as the most common requirement, is to home the carriages back to the origin (0,0) as you might not be entirely sure where the carriages end up after a plot run, especially while still debugging software/firmware! Of course if the hardware isn't forgiving when you hit the end-stops (ie it does physical damage), you need limit switches at both ends of each axis. | It would have been more useful to have the limit switches detect the zer0 location on each axis, rather than the limit of travel, as the most common requirement, is to home the carriages back to the origin (0,0) as you might not be entirely sure where the carriages end up after a plot run, especially while still debugging software/firmware! Of course if the hardware isn't forgiving when you hit the end-stops (ie it does physical damage), you need limit switches at both ends of each axis. |
| |