Introduction: $100 Mural Drawing Robot (also Works As a Giant Etch-a-sketch)
What I love about robots is that you can make a thing that makes other things. So meta! It uses gcode draw any picture you like, or you can drive it around like an etch-a-sketch. You can scale this robot up to almost any size. The version in the photograph is my smallest model. I've built three of these now, the largest of which was 3m*2m. This particular robot costs $150 in parts and, if assembled correctly, can be up & running in about 20 minutes.
You can now buy this robot as a kit on the Drawbot's official page.
Step 1: How Does It Work?
The basic trick of this robot is high school trigonometry.
If you know the distance between the steppers and you know the length of the strings then you can calculate the XY position of the pen. If you know the XY position of the pen and the distance between the steppers you can find the length of the strings. From there you can figure out how much the strings have to change to move from one place to another and then you can draw lines and curves.
The rest is boring tricky stuff, nice but not vital. There's some code to make sure you can't draw outside the drawing area, and some code uses trapezoidal motion interpolation to draw accurate pictures faster.
Step 2: Parts
1 - Arduino Duemilanove 328 or better: $30
2 - NEMA17 stepper motors: $30
1 - Adafruit motor shield: $20
1 - 12v2a power supply: $15
1 - USB cable: $1
2 - Bobbins: $0.50 for a three-pack
You will also need some tape and your computer. A pen to draw with is good, but a whiteboard or blackboard is even better (easier to erase)
I sell these parts as a kit to fund other robotic development. http://www.westcoastkits.com/
Step 3: Assembly
- Attach the Adafruit shield to the Arduino as in the picture.
- Wire the 12v2a power supply to the Adafruit shield. Use a multimeter to make sure you don't wire it backwards!
- Wire the steppers to each end of the Adafruit shield. If your colors are different, consult your NEMA17 documentation. The first coil should go in M1 & M3, the second to M2 and M4.
- Plug in the USB and connect to your computer.
- wind a lot of thread onto each bobbin.
- Put the bobbins on the stepper motor shafts. You may need a bit of tape wrapped around the shaft to give it a tight fit. Make sure the thread on the bobbin hangs off the right hand side of each shaft.
- Mount the steppers to the L (top left) and R (top right) corners of your drawing area. They should both be the same height off the floor.
- Put a slip knot into the ends of the thread, and put both slip knots around your drawing pen. I made a 3D printed holder but a piece of cardboard and some tape will work, too.
- Measure the distance W between the shafts. W = R-L
- Measure the distance H between the top and bottom of the drawing area. The top is considered to be line LR, not the top of your paper/white board.
- Wind the bobbins until your pen is at O. O is in the middle of the drawing area, or (W/2,H/2). If your pen starts too high or too low your picture will be warped like a frown or a smile. If you start too far one side your picture will be slanted. (In a future version I will be able to auto-center the drawbot.)
Step 4: Arduino Code & Testing
- Download and install Arduino.
- Download the Github Drawbot files.
- Open Arduino and edit the drawbot_code/drawbot_code.ino file to match your configuration. Change X_SEPARATION to be your W value. Change LIMYMAX to be half your H value. Change LIMYMIN to be -(half your H value). The code is helpfully commented and there's an FAQ in Github if you have any other issues.
- Upload the drawbot_code/drawbot_code.ino file to your arduino.
- Open the serial window. It should say "== HELLO WORLD ==" and then give you instructions.
Type "G00 X5;" and your pen should move right. If it moves left, your motors are backwards. You can change this in the config.
Type "G00 Y-5;" and your pen should move down. If it moves up, your bobbins are backwards or your wiring is reversed.You can change this in the config.
Type "G00 X0 Y0;" to return to center.
Hooray! Your drawbot is working. You can now draw complex pictures one instruction at a time.
Drawing pictures one command at a time is a pain! That's not automated or robotic or easier at all.
Shake your fists at the sky and yell: I NEED MORE POWER! (go on, if anyone asks you can blame me.)
Step 6: Java Automation
ZAP, I give you more power!
./java/DrawbotGUI.jar will run a java app that will send one line of gcode at a time to the drawbot. this will automate your large drawing challenges. Several gcode samples have been included in ./gcode/
Step 7: Feeling Generous?
We have a be nice policy.
Please be positive and constructive.