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.

Comments

  1. Peter says:

    Nice project and great execution. How did you do the conversion from pictures (raspberry pi logo and face) to vector line art/gcode?

  2. giacomo says:

    Oh man I was just about to start a project just like this. Well done people!

  3. voxbrateagle says:
  4. Zee says:

    That stepper driver looks tiny. I’m impressed it can do such fine microstepping. What driver is it?

  5. Joshua says:

    Any links for schematics, BOM’s etc? It looks like you breadboarded an arduino but not sure about the motor drivers and pinouts from the Pi. Thanks!

  6. Curr says:

    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.

  7. Andrew says:

    Why use an Arduino? Surely you can use the GPIO pins on the Pi to driver the steppers?

    • Brandon says:

      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

      • Andrew says:

        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.

    • nxpguy says:

      Why use a raspberry pi, you could hook up the arduino to a laptop ?

  8. Joshua says:

    Dan Royer at MarginallyClever.com has a nice open Java and Arduino project that’ll even make your photos into G-code.

  9. Galane says:

    Use three, or four like those flying cameras, motors and there’ll be no oscillation or wiggle or wobble problems.

  10. M4CGYV3R says:

    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.

  11. nxpguy says:

    It would be nice to have some information about the pen.How is made the system that move the pen away from the board when moving and not drawing ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,915 other followers