Introduction: Drawing Plotter
Welcome to my Instructable!
Thanks for everyone who voted for me in the contests!
Here I'll show you how to make 2 axis, gcode controlled drawing plotter.
I've already made a delta 3D printer which is awesome, the only thing that wasn't made by me was the Arduino program. This program was very long and complicated, so I've downloaded it from the Internet. I've started to think if I am able to also make it myself. But why should I start with something so hard, firstly let's make something easier - Plotter!
Step 1: Parts
Here are the parts you should have to make my drawing plotter.
- 6mm aluminium pipes (more in step 2),
- 3m of GT2 belt,
- 3D printed parts,
- screws and nuts (3x M2 12mm, 14x M3 20mm, 6x M4 12mm).
- 3 stepper motors (28BYJ-48, 5V DC) with drivers (ULN2003),
- microservo (Tower Pro 9g),
- 16x2 LCD with I2C converter,
- SD card reader,
- DC 5,5x2,1mm plug and socket,
- 5V 2A DC charger,
- PCB parts (more in step 4),
- wires, goldpins, heat-shrink tubing.
Arduino programmer or Arduino UNO board (only to upload program).
Screwdriver, soldering iron, marker, scissors etc.
Step 2: 3D Printing
Firstly let's print all the parts that I've made in Fision 360.
You can download the .stl files below.
Step 3: Belts and Pipes Cutting
Now you need to have 6mm aluminium pipes, of which you can make plotter frame.
I bought 5x 1m long pipes for 0.80$ each in a DIY store, and 3m of GT2 belt on the internet for 9$. Now cut the pipes so you will have 2x 53cm long, 2x 38cm long, 2x 28cm long and one 58cm long.
Than cut the belt - 3 times 2cm pieces, 1 64cm and 2 115cm long.
Step 4: PCB and Electronics
Now I prefer to make a PCB (Printed Circuit Board). The other way to control this plotter is to use Arduino board, but it won't match the SD card module, there won't be enough power supply pins ant they will be away from each other so you will have to use a ridiculous amount of cables.
You can find more about making PCB's here.
Eagle files - schematic and board available to download below.
Than solder all the electronics parts (layout on the photos):
- ATMega328P (with Arduino bootloader),
- 28 pin socket for your ATMega,
- 3x 10kΩ resistors (SMD version),
- capitators: 3x 100nF, 2x 22pF, 1x 10nF,
- 16MHz crystal,
- 10uH coil,
Now make all the cables needed to connect your board with stepper motor drivers and plug them in (photos).
Step 5: Wires
The next thing you should do is to make motors and servo cables longer.
First X axis motor wires are long enough - motor will be close to microcontroller. Second X axis motor will be placed on the other side of plotter, it's cables should be 53cm long.
Y axis motor will be moving across all X axis so his cables should be longer than it - 60cm will do the work.
Servo will move across all X axis and all Y axis, so it's cables should be longer than these two together - 90cm will be good.
Remember not to mix them, the order must be the same.
Step 6: Display
Now it's time to make your display working. It will be connected to your main control unit with 4 cables (+, -, SDA, SCL). Solder them to I2C converter. GND wire (white on my photo) should go further to buttons, which opposite endings connect, using cables, to PCB.
Cables lenght actually doesn't matter, my are 15cm long so display isn't very close to control unit.
At the bottom of LCD panel stick 2 small parts which will hold it in right place. Make sure that screws or nuts didn't block the pipe.
The third photo shows cable endings, there is one very important thing:
order of LCD cables starts with -, + but ends with +, -.
Step 7: Stepper Motors & Servo
Start with sticking GT2 pulleys top with their bottom. Add M2 nuts and screw them to stepper motors. Than stick together 2 servo holding parts (3rd photo), add part which will hold marker. Screw servo to it.
Make sure that servo handle rotated fully right makes the same angle as shown on the fifth photo.
Step 8: Assembling the Frame
Makig plotter frame is very simple, just follow the pictures and assemble it.
Put nuts into holes in 3D printed parts and screw it with aluminium pipes. Some Y axis parts require using glue (look at the photos)
Step 9: Microcontroller and LCD
Mount on the longest pipe from the left microcontroller, and LCD with first cable chain segment next to it. Put all the remaining wires into chain, put it on it's place and plug wires to main control board.
Step 10: Charger
To power up plotter you can use charger from an old phone or buy it for like $10.
It must be 5V and minimally 1,5A DC charger (I recommend using 2A).
This chargers usually have micro usb cable, just cut off the end and solder 5,5x2,1 plug. Red charger wire (+5V) to inside of the plug and black (-) wire to outside.
Step 11: Arduino Program
Now let's focus on Arduino program.
The first important thing is to check your's LCD I2C adress. Every I2C device have it's own number and to check it you will need special program called I2C scanner. Connect LCD to Arduino board or plotter PCB and upload it. Device adress will be printed on serial monitor. Than replace original 0x27 with your adress in 7th line of code.
Install LCD_I2C library on Arduino IDE:
- Go to Arduino installation directory (usuallly: C:\Program Files (x86)\arduino\libraries),
- Change LiquidCrystal name to something else (f.e. Old_LCD),
- Open Arduino IDE,
- Go to Sketch - Import Library - Add library,
- Select new downloaded LiquidCrystal library and click 'Open'.
Upload main program to plotter.
All files can be found on original Arduino website or downloaded below.
Step 12: Making G-Codes
To making Gcodes I'm using tha latest version of Inkscape. It's free and can be downloaded from original Inkscape website.
How to make them:
- Open Inkscape and draw or write something,
- Go to Extensions - Gcodetools - Orientation points,
- Select 3 points mode and click apply,
- Go to Extensions - Gcodetools - Tools library,
- Select cylinder and click apply,
- Using text tool (F8 key) change tool diameter to 0,
- Select your drawing and go to Path,
- Select Object to Path,
- Once again select your drawing and go to Extensions - Gcodetools - Engraving,
- Go to Preferences tab,
- Select file name GCODE.ngc and directory in which it will be saved,
- Go to Engraving tab and click apply,
You can also convert into G-code any picture that you want, import it to Inkscape, select it and go to Path - Trace Bitmap. Choose one of three first options depending on your picture (I recommend using Edge Detection). Click OK and path should be under original picture.
You probably will receive an error 'Cylindrical cutter has no shape', so just click ok.
If there will be error #CloseParts change text font to Arial, because in normal the letter 'u' is bugged.
File will be saved in the directory you've typed before, you can close Inkcsape. Open this file and remove header and footer (I'm woking on new program which will ignore it).
Move file to SD card and plug it into plotter.
Step 13: Final Printing
Plotter is very cheap, but his drawings looks very good for me.
If you have got any ideas how to improve this Plotter or any questions about it, make sure to leave a comment!
The next project I'm working on now is my own website. I will publish my projects also there.