Aiding my horrible handwriting with Drawing Bot (Polargraph)

People who know me probably noticed that I have a pretty bad handwriting skills. Recently I even realized that apparently there is a  pretty scary word for my case: dysgraphia. Fortunately I was growing up long enough ago when this word hasn't been discovered yet, so this diagnosis did not affect my life. Few times I probably even benefited from it when my teachers couldn't figure out my scrawls and assumed that I was trying to write something deep-thoughtful.

Once upon a time when I was struggling to write something on the whiteboard and my colleagues were trying to read my hen-tracks I realized that I just need a whiteboard robot to help me.

My first idea was to build something like a plotter on the wall: two vertical slides on the side of the board and horizontal slide with dry-erase marker:

Well, this looks way too complicated. So maybe make it simpler: make it a polar coordinated plotter - a pivoted bar mounted top-center with a marker sliding along the bar:

Luckily, before I began my adventure I decided to use my favorite search engine to double-check that no one else is doing anything similar (I am so unique so I must be the only one who ever thought about it, like ever).

Well, unfortunately I am not that original, there are quite a few similar projects and they found even easier way of doing it:

Yes, this thing (beaded cord) - you usually pull it down to turn lamp on/off or to open/close blinds. So instead of having rigid slides they are using flexible cords to position gondola with the marker:

Well, at this point I should probably just shame myself and stop thinking about drawing robot since it already exists and I don't even have any plans to improve it. But I liked the idea so much so I decided to make a replica of such a machine.

After digging a little through similar projects I found the awesome one - Plargraph. It's an open-source project, well developed and based on the popular Arduino platform which I am already familiar with. Although, I didn't want to spend much time on it, so decided to make it kinda ghetto-style.

I started with beaded cord which I got from a local hardware store. Based on the size of the balls and links between them I printed two spools on the 3D Printer and mounted spools to the shafts of the stepper motors. Rest of that supposed to be simple: just grab a motor driver board - Motor Shield, dremel a gondola (old CD), hot-glue an RC servo to lift pen off the whiteboard, program Arduino with Polargraph code and ... realize that my motors are not compatible with Motor Shield.

The problem is my motors are pretty standard NEMA 17 steppers with very low internal resistance and designed to be driven by a special driver. This driver is supposed to measure a motor current and disconnect power source when current reaches a limit, current starts decreasing and driver turns power source back on and this on/off show repeats 20000 times a second or so. But the Motor Shield is pretty dummy, it doesn't have a current feedback, it would just turn full power, overheat and set itself on fire (haven't tried that, just guessing).

I didn't want to get a proper motor driver, I just wanted something quick. I ended up using a lab power supply to reduce motor voltage to ~3V which provides enough current for the motors without overheating the Motor Shield.
Note: It's not a good idea in many aspects, primarily because the Motor Shield is based on the L293 chip that has minimum voltage requirements of 4.5V.

Here is a video of one of the first tests:

At this point I didn't want to spend any more time on it and brought my Polargraph to work. Here is another video, drawing DMC logo:

Couple weeks later I got an excellent stepper motor driver - Allegro A4988 and finally got rid of lab power supply and replaced it with an old laptop AC adapter (it has a standard 19.5V DC output). I also had to slightly modify Arduino code to communicate to the Allergro chip instead of Motor Shield.
Note: Allegro chip is tiny and it's really inconvenient to solder (QFN package, 5x5mm), to save a hassle just get it on the breakout board.

Next steps. I also attempted to make it wireless (between host PC and Arduino), by adding a Bluetooth module to the Arduino side. But ran into some issues of how the communication protocol is implemented (it's very sensitive to delays). Maybe I'll improve it later.

Happy drawing!

No comments:

Post a Comment