What happens when you combine a love of laser cutters with a love of cool 70′s toys and an Arduino? An ‘Etch A Sketch’ controlled laser cutter of course! I always wondered… what if I could control my laser cutter just like drawing lines on an ‘Etch A Sketch’?
Over here at Just Add Sharks, we’re celebrating International Arduino Day by dusting down one of the ideas we had a very long time ago! We present to you the ‘Etch A Sketch’ controlled laser cutter!
Using our Blacknose Laser Cutter we bypassed the control board to drive the laser tube and stepper motors, an Arduino Pro Mini controller was patched into the machine’s wiring using the existing connectors to interface with the Leetro controller. Safety is important, using the existing wiring meant that the laser won’t actually fire unless the water pump is running and the lid is closed. The laser power is hard coded and it can be set to either cut through the material or just make a mark on the material surface just like an Etch A Sketch!
The handheld Etch A Sketch controller is custom built from laser ply and stained red with Mahogany wood dye. The screen is a layer of baking paper to give it a frosted plastic look. The dials are rotary encoders with quadrature output, the knobs are laser cut then glued onto the shaft of each encoder. The back of the Etch A Sketch was closed with more layers of stained laser ply, the final piece has 6 layers of ply and is 18mm thick.
The schematic above shows the connections we made into the control system. The onward items like the stepper motors or laser tubes have not been drawn because they were not modified and use all the existing wiring. The Arduino pro mini works as the controller. The analogue input pins are configured for use as general IO to provide the additional number of inputs required from the rotary encoders. The pulses for the stepper motor drivers are provided by the Timer 1 PWM hardware module. The laser module power is controlled by Timer 3.
The software is relatively simple. When the machine is turned on the laser will attempt to drive to the zero position. Both X and Y axis are driven until they hit the end stops. Once both axis are pressed against the limits, the controller moves the axis forward again until they no longer press the switches, this is the Zero/Datum position. From this known position the controller moves the laser head to a ‘Home’ position which is a fixed distance from the zero spot.
When the laser has reached the Home position it is ready to run. The stepper motor drivers require far more pulses than the rotary encoders provide. If it was left with a one to one relationship you would need to turn the dial a dozen times to get noticeable movement on the axis. The software detects rotation on the dials and creates stepper motor pulses for a set period of time, this scales up the number of output steps for each input.
The laser driver has its PWM input permanently set, the laser only turns on when the enable line is pulled low. As long as the laser is only turned on while the axis are moving, we eliminate the burning problems from keeping the laser in the same place. If the laser is run back and forth over the same area it will cut deeper and in the end that would cause a fire. Hopefully common sense on the part of the operator will prevail.
The source code to accompany this project can be downloaded here: EtchaSketchLaser.zip