Scribbling X-Y Plotter

by thirukum in Circuits > Arduino

432 Views, 1 Favorites, 0 Comments

Scribbling X-Y Plotter

IMG_7697.jpeg
29ECB041-49CC-4BE5-A722-0B3FE4EDB6D0.jpeg
X-Y Scrib

I made a 2-axis x-y plotter that scribbles similar art to a toddler. When my sister was 3 years old she would scribble and call it art and bring them to me. Now that she is 5 years old she has matured in her art journey and produces fully fletched sketches. However, as her older brother, I missed receiving less complicated scribbles. Therefore, I made this scribble robot that would produce a similar result to my 3-year-old sister.

Downloads

Supplies

  • 3 SG92R Servos
  • 2 Popsicles
  • 1 pencil
  • 2 screws to screw the handles of the popsicles
  • Hot Glue gun
  • Wood Piece as your stationary axis for your first servo
  • Clothing Pin
  • 1 Button

Hot Glue

IMG_7691.jpeg
IMG_7692.jpeg
IMG_7695.jpeg

1) Hot glue your first servo to the stationary wooden piece with the servo facing up.

2) Hot glue the handles of the servo to one popsicle on the same side. One at one end of the popsicle and the other at another.

3) Hot glue your second servo to the side of your second popsicle making sure your servo tip faces up.

4) Hot glue your third servo to the other side of the second popsicle having the top face towards you (hot glue the bottom of the servo to the popsicle).

4) On the opposite side of your third servo, hot glue a clothes pin letting the pinching point of it face outwards and the handle faces the second servo.

Circuit Layout

IMG_7693.jpeg

Connect the power for the servo into all Vin and 3.3V available.

Connect the button to either power since we will need to register the pull.DOWN method.

Use the layout pins online to connect the servo. The servo should be connected to D5, D9, and D3.

Math Before the Code

IMG_0629.jpeg

You will need to measure the length of the arms to utilize this formula!


The calculation of the angles of the 2 mots determines the length in which the pencil will move. We assume that the triangle is 90 degrees since we are not looking for perfect scribbles here. Following the image above will give us the 2 angles required. Python outputs the angle in radiants therefore we need to convert our final answer to angle. Also, when calibrating there also needs to be a set range of X and Y values since the formula uses acos and only 0 to 1 can be utilized. Therefore, if a value is greater than 1 python will output an error or a nan value.


Code Set Up

Downloads

Send Power

Make sure your wiring scheme is correct, and that you but the right board layout.