Raspberry Pi Driven Polargraph Exhibits High Precision Drawing Ability

This polar graph draws some amazing shapes on a dry erase board. Part of that is due to the mounting brackets used for the two stepper motors and the stylus. But credit is also due for the code which takes velocity into account in order to plan for the next set of movements.

The Go language is used to translate data into step commands for the two motors. This stream of commands is fed over a serial connection between the RPi board and an Arduino. The Arduino simply pushes the steps to the motor controllers. The inclusion of the RPi provides the horsepower needed to make such smooth designs. This is explained in the second half of [Brandon Green’s] post. The technique uses constant acceleration, speed, and deceleration for most cases which prevents any kind of oscillation in the hanging stylus. But there are also contingencies used when there is not enough room to accelerate or decelerate smoothly.

You can catch a very short clip of the hardware drawing a tight spiral in the video embedded after the break.

23 thoughts on “Raspberry Pi Driven Polargraph Exhibits High Precision Drawing Ability

        1. I put a small heatsink on it just because I had a bunch sitting around, but I haven’t had any problems, even when I accidently ran it at max amps instead of min for a few days because the labels on the PCB for the version I got are backwards

  1. Does anyone know which of these drawing robots are open source? I think it could be feasible to build one with multiple heads for simultaneous writing but I’d rather start on a good foundation instead of rolling my own.

    1. At full speed with 1/8 micro stepping there is a pulse roughly every 400 microseconds. Since the pi is isn’t running a hard realtime OS it can’t guarantee that the polar graph process will be running constantly, and a user land process doesn’t easily have access to timing that is microsecond precise

      1. But that doesn’t matter. A stepper motor will either take a step or not. As long as you don’t send the pulses too often then you can run it as slowly or as fast as you like. The key is to synchronise the pulses sent to the X and Y steppers, but even with a little latency I don’t think this would be an issue. If it was, you could probably just use a 4042 latch and set up the step/direction state for both motors, then a single pulse would synchronously transfer these signals to the output.

        Maybe I’ll have to build one myself to find out. That’s why I’m interested in this project, it’s one of the best ones I have seen.

  2. Do this on a whiteboard in a classroom somewhere, and then take it down and hide it. When someone comes in, grab the marker and pretend that you did it by hand. Minds will be blown. Lulz will be had.

Leave a Reply to CurrCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.