XY Plotter Drawing Robot (Complete Hardware and Software Guide)

by Tech Zx in Circuits > Arduino

846 Views, 6 Favorites, 0 Comments

XY Plotter Drawing Robot (Complete Hardware and Software Guide)

DSCN2972.JPG
20221215_141201.jpg
DSCN2976.JPG
DSCN2965.JPG
DSCN2970.JPG
DSCN2975.JPG

This is a complete guide on how to make a XY Plotter drawing robot with tips on hardware and step to step software setup. A detailed .pdf manual and the .stl files of the 3D printed parts are also included in the project .zip file. The project was based on other projects with some changes . The manual is really useful if you wanna build this project as it includes troubleshooting and configuration tips.

Supplies

image_2022-12-15_203058111.png
image_2022-12-15_203110518.png

Bellow there is an index of the hardware required to develop a XY Plotter robot. Note that there are many variations of the hardware used in various robots, so this is not an exclusive list. This is the list of the hardware used to develop the robot of this manual as well as links to the products. These parts are widely available so there is no need to put links next to each product. Pay attention to the model of the steppers and the motor arduino shield

·       Arduino Uno

·       L293D Motor Driver Shield - Expansion Board For Arduino

·       2 x Nema 17 Stepper Motors

·       Micro Servo Motor

·       12v 2A PSU

·       2m String Roll

·       2x Paper Grip Clips

·       Black Drawing Canvas

·       Fishing weights

·       Some jumper cables

·       Type B USB to USB (at least 2m)

Furthermore, for the needs of the project, some 3d printed parts were used. To be precise, the most 3d parts were used from the project of Met Arduino at Instructables.


Notes

·The fishing weights are used because they come in many sizes and forms and they are cheap, so this gives a freedom to experiment on what weight best suites each robot and its needs, so they are highly recommended.

·The stringed roll is used for convenience purposes. Instead of Stringed roll, a timing belt for motors can be used. Theoretically a timing belt with a proper aluminum timing pulley for the motors gives the robot a better accuracy, but practically for a simple project there is no big difference since the parameters can be tuned via the firmware which is explained later in the documentation.

·If 3d printing is convenient, the paper grip clips can be skipped and replaced with some 3d printed custom parts to hold the paper steady. This is recommended because this way the steadiness of the paper can be increased and also 3d printed custom parts may take less space in the construction which is for the best.

·The choice of a drawing canvas as a base is meant for the prototype robot and to explore the possibility of the electrical components to be fit on the back so that the robot looks like a wall frame construction. A wooden back may be a sturdier choice, but it may increase the weight and cost of the built. The choice and the proportions of the back depend on the manufacturer. The choice of the drawing canvas although works fine. A white canvas can easily get dirty either during built or tests or other causes, that’s why a black colored canvas is preferred.

·The 3D printed pulleys for the cords come with some disadvantages. They can be damaged and corrupt easily resulting in losing steps from the motors and not rolling as they are supposed to. Also they may need to be custom designed to the cord used so they have sufficient space for each step of the cord.

3D Printed Parts

Some of the supplies mentioned above can be replaced with 3D printed parts, it depends on what you would like. But 3D parts will make your life easier in some parts.

Assembly

The assembly part of the built is not that tricky but there are some things that need attention which will be explained. For a better understanding it is obvious that a visual aid will help a lot ,so it is recommended to also look in parallel this video by MERT Arduino & Tech which also was the base for this project. Make sure all the parts are gathered before assembly. Since the XY Plotter robots are named after the 2 axis and 2 motor principle applied, such robots can be built with different dimensions and hardware so unavoidably each built needs its own tuning and setup as for the assembly and parts except for the basic concept and assembly.


Electronics & Motors

image_2022-12-15_203644147.png

The motors we are using have 2 coils and each one outputs 2 wires. You can check the motors schematic to find the 2 pairs of wires. Another way is to use a multimeter. Once you do you need to connect them to the Arduino shield, which should be connected to the Arduino board. If the motor cables have any pins installed it is better if they are cut so there is complete access to the wires. It is also practical that the wires are burned with some solder and a soldering gun so they can be installed to the shield more easily. At first do not fully secure the electronics because there might occur some changes to the wires so the right way can be found so that they move the right way with the firmware. It might take a few tries. The mini servo is also connected to the shield. The servo will probably have short cables, so they need to be extended with some jumper cables, otherwise it will cause problems to the functionality of the robot. The gondola needs to be free to move without any constraints. At last, make sure you have access to the board so you can use the serial port of the Arduino and the power input. The robot using the serial cable power alone will not function corrently. That's why we need the 12v 2A power adapter. But you will need it after the assembly.


Software Setup and Configuration

image_2022-12-15_204138931.png
image_2022-12-15_204157223.png

There is a community for such drawing robots for exchange of opinions, tips and questions. An open-source firmware has been developed for XY Plotter robots, called Polagraph. Also Arduino IDE and Processing needed. Before you download and install anything, some things need to be noted first.

Notes

·A good practice for the project is to make a VM environment using Virtual Box for example to setup all the requirements and not have any effect in your system, but this is optional.

· It is suggested that everything concerning this project should be in the same folder for practical reasons.

· Make sure your PC has Java and JDK installed and updated.

·  At the time this documentation is being written, many projects so far use Processing 1.5.1 version. But this version is not supported by Processing anymore and even if it can be found it has trouble when installed and compatibility issues with JDK. So, the next version is used which is Processing 2.2.1 and it is almost an one-way road as the next versions, by the time of this documentation, have problems also with the Polygraph firmware. Lastly, it needs to be noted that the project was set up, thus the following steps, in Windows.

· For the Project, it is suggested that older versions of Arduino are more compatible with the project. In this specific project, there was found some truth in this suggestion concerning the libraries that need to be setup in the next steps. It is checked that Arduino versions 1.8.19 and 1.0.5 work. But Arduino version 1.0.5 is the safer choice.


Detailed steps with photos are given in the PDF manual. It will save you precious time !




Tips

In order to achieve good runs, you will need to make many tests to figure out the right settings for your machine. Try to make your values as precise as possible when configuring your machine in the Polagraph GUI. It is expected to have many obstacles concerning mostly the hardware. Try to have as less as possible loose parts, especially the motors and the pulley because it can easily lose steps due to malfunction and ruin the robot’s performance. Since in the making of this project there was not a compact place for FAQ’s and answers, this documentation provides solutions to many cases for troubleshooting. Further answers can be found in the Polagraph Forum.

 

Final notes & Tips

·The hardware can get really heated, especially the motors. It is suggested that after the built, some kind of cooling is installed. For this project a future cooling system with fans is going to be installed cause this kind overheating can cause damage to the robot.

·Before buying the components needed, it is suggested to pay attention to the details and give the project a good thought. This can save you from many obstacles in the future.