XY Plotter Drawing Robot | Arduino | Polargraph

84,593

328

76

Introduction: XY Plotter Drawing Robot | Arduino | Polargraph

About: Arduino, Raspberry Pi, esp8266, Tutorials, Projects

In this tutorial we will learn how to make Arduino XY Plotter Drawing machine. With Drawing Robot you can draw images on wall, panel or A4 paper. You can print pictures or print text. All required hardware for this project are listed below. We will learn how to install and use the Polargraph program for robot control. Motor drivers - Adafruit's Motoshield v1. A modern classic. It can drive two stepper motors each drawing up to 600mA and has pinouts for a servo too, so is perfect for this project.

Step 1: Required Hardwares

Step 2: 3D Models - Plotter Gondola and Stepper Bracket

  • If a 3D printer is not available, you can use a CD for create the Gondola

Step 3: Assembly of the Gondola, Stepper Motors and Servo

  • Belts connect to the Gondola. (Adjust the length of the belts according to size of your board.)
  • Servo motor connect to the Gondola
  • Assembly the mounting brackets to the stepper motors.
  • Attach a weight to the empty end of the belts (I used 4xAA batteries for weight.)

Step 4: Assembly All Parts on the Board

  • Fix the stepper motors to the upper right and upper left corner of the board.
  • Fiz the servo motor and pen to the gondola.
  • Connect enough weight to the empty en of the belts.
  • Also use a weight to hang the gondola down. (This weight may be coins or batteries.)

Step 5: Machine Dimensions

  • Remember that your machine size is NOT the same as your surface siz.
  • Your PAGE or drawing AREA size will be smaller.
  • Machine Width:

This is the distance between two closest points on the sprockets (between two pulleys).

  • Machine Height:

This is the distance from the sprocket axis to bottom of your drawing (board) area.

  • Home Point:

This is a magic point marked on the centerline, exactly 120mm (12cm) down from the top edge of your machine.

  • Keep the dimensions of your machine. We will use these values in the software section.

Step 6: Connections

Motor Shield Upgrade for the High-Torque Stepper Motor:

  • In this tutorial we will learn how to use a high-torque stepper motor with the L293D motor drive shield. I used a high torque stepper motor with the L293D motor driver, so the L293D integration overheated. The cause is high current requirement. I modified the L293D Motor driver shield to solve this problem.

  • After L293D upgrade, make connections according to the circuit diagram above.

Step 7: Source Code and Polargraph

Get the latest version released. The problem will be solved.

https://github.com/MertArduino/Make-Arduino-XY-Plo...

*** Also: Install Arduino IDE v1.8.5 and Processing 2.2.1

  • Download and install Processing version 1.5.1 -- https://processing.org/download/
  • Download and install Arduino IDE version 1.0.5 -- https://www.arduino.cc/en/Main/OldSoftwareReleases
  • Finally, download the following compressed file for Polargraph 1.2 and its libraries.

  • Copy the libraries to be used for the Arduino source code. (Copy the libraries in the Polargraph libraries folder to the Arduino libraries folder.)
  • Find the source code to use for the Arduino. (Open the cource code in the Polargraph/ arduino-source/ polargraph_server_a1 folder.)
  • Upload the polargraph_server_a1.ino source code to the Arduino.
  • Then open the Processing software. Find the SketchBook folder from file / preferences/ sketchbook/ location
  • Find the Processing libraries in the Polargraph folder. Copy all the library folders in this folder into the libraries folder in the Processing Sketchbook folder.
  • Move the Polargrapcontroller folder inside the Polargraph folder/ processing-source/ folder into the sketchbook folder.

Define first settings - Machine dimensions

  • Open Processing. Then open polargraphcontroller (file -> sketchbook -> polargraphcontroller)
  • Run the program by pressing the Run button.
  • Enter the Setup section from the tool bar.
  • Adjust the size between two pulleys on the Machine Width
  • Adjust the Machine Height (height between the pulleyand the end of the panel)
  • After machine dimensions, adjust the size the area you will draw. (If ou will draw on an A4 paper, set the A4 size.)
  • Then, first clicthe Center Page and then set the Page Pos Y value 120.
  • Secondly click Center Home Point and set Home Pos Y value 120.

Stepper motor and pulley settings

  • Set the MM Per Rev value according to the pulley and belt you are using. For example, if the belt is GT2 the lue is 2mm. If the pulley has 16 teeth, 2x16 = 32mm. So, the belt will advance 2mm each turn.
  • Adjust Steps Per Rev according to the stepper motor type. For example, if te step angle of the used stepper motor is 1.8 degrees the value is 200 steps. This value is adjust to 400 because dual motor is used.

Servo motor (Pen) settings

  • Pen Up Position and Pen Down Position values are the operating angle of the servo motor.
  • Click Serial Port and select Arduino's port from the list of connected devices.
  • When the correct port is selected, the 'No Serial Connection' display will turn GREEN and the port number to which it is CONNECTED will be displayed.
  • Click on 'Command Queue' and command transmission is activated.
  • Click Upload Lift Range, then click Test Lift Range and test the servo motor angle.

Last Settings - Upload vector image and start the print

  • Save your setting. Load your setting every time you turn on the program.
  • Click the Input tab and switch to the main screen of the program.
  • Then we will anually set the gondola for 'Set Home' manually. Move the gondola by manually and move it to the previously defined home point. The gondola must be adjusted this way before each drawing before clicking 'Set Home'.
  • After this adjustment is done, Set Home and Set Pen Position are clicked.
  • Click Set Area to specify your drawing are. Then click Set Frame to Area to make all necessary settings for drawing.

Draw Vector

  • Find any vector drawing image. Convert image to the SVG format from any converter platform.
  • After select Load Vector from program. Adjust image size with Resize Vector. Move the image to the desired area with Move Vector. Then adjust the area to be printed with Select Area and Set Frame to Area.
  • Finally, click the Draw Vector command to start the machine.

Polargraph controller Copyright Sandy Noble 2018. http://www.polargraph.co.uk/

6 People Made This Project!

Recommendations

  • Microcontroller Contest

    Microcontroller Contest
  • Automation Contest

    Automation Contest
  • Make it Glow Contest

    Make it Glow Contest

76 Comments

0
Yiding_luo
Yiding_luo

Question 2 months ago

How to use this method to draw a horizontal line just by the codes in Arduino (C++)? Should I use trigonometry to achieve that? Is there a formula or a function to do that?

0
Gandolfthegray
Gandolfthegray

Question 4 months ago on Step 1

I noticed that the gondola and motor brackets use ball chain. Would I set everything up the same way just using ball chain? Or where are the parts for the belt?

0
jzayden63
jzayden63

6 months ago

Hi, May I know can I use power adapter with maximum current 1A and adjustable voltage 3 to 15V to power it ?thank you

0
sTrAnGe--Tag
sTrAnGe--Tag

Question 6 months ago

If i understand correctly i use the 5v 2500mA on the drive shield ? Do i also need power on the arduino board ?

0
Leon a von m
Leon a von m

Question 7 months ago

Hi everyone
The polargrapher moves extremely slowly and I tried to increase the motor speed but that only increases the maximum motor speed and not the speed at which it is drawing, how could I increase the move speed?

Thanks

0
Leon a von m
Leon a von m

7 months ago

Hi, I am so close to be done, I uploaded the vector and then said draw vector, however It constantly says "Line is not on the page skipping it" How can I fix this?
Thanks in advance

1
Quasar2520
Quasar2520

2 years ago

why is it that i can move to the pen whitin the area of the machine but when I upload the vector inside that area, it shows error that the points fall out of the machine ,skipping it.!!!!

Any help is highly appreciated.

0
tobias_chavalit
tobias_chavalit

Reply 9 months ago

I still have the same error with the newest version. Have you found a solution to your problem?

0
Nebbur
Nebbur

Reply 2 years ago

i have the same error, can someone help please, i need to finish this proiect

0
VaibhavA32
VaibhavA32

Reply 2 years ago

i'm getting the same error

0
Quasar2520
Quasar2520

Reply 2 years ago

Have you find solution for this ?
I've tried different computers and boards . Still not working;

20180905_185613.jpg
0
drtonis
drtonis

3 years ago

very nice project. I would like to build one, but your link to Polargraph 1.2 is broken... Could you re-link it? Thanks

0
selvakumar.me15
selvakumar.me15

3 years ago

I am not able to get into the machine settings. I have done all steps as said by you.I have installed processing version 1.5.1 but it is not working.So I have installed processing version 3.3.6. I am stuck with the machine settings. Can you please help me with this problem? After 5:40 that is in the video i am not able to proceed. Please help me with this problem.

0
selvakumar.me15
selvakumar.me15

Question 3 years ago on Step 7

I am not able to get into the machine settings. I have done all steps as said by you.I have installed processing version 1.5.1 but it is not working.So I have installed processing version 3.3.6. I am stuck with the machine settings. Can you please help me with this problem? After 5:40 that is in the video i am not able to proceed. Please help me with this problem.

0
ZdeněkG
ZdeněkG

Question 3 years ago on Step 7

Hello,
I have a problem with inatallation software. It is about copying Polargraph into individual folders. Somehow I did not understand it. I can not English, I use google translator. I have correct versions of individual programs. Will you help me?
Thank you Zdeněk
68 years old
fun, hobby, new technology