Let's Make Robots!

van Rijn

Writes and draws stuff

I'm afraid I'm STILL on the Write LMR trip. It's not got tired yet.

I've decided to motorise a miniature Etch-A-Sketch.

I decided on steppers. Not servos. Servos hadn't enough rotation. Continuous servos had no positional feedback.

Here's my prototype circuit. Simple ULN2803 driver and a PIC 16F628. There's a max232 on there, too as the RS-232 interface to the PC.

WOW! It draws a circle. The most impressive bit of this is my implementation of Bresenham's line drawing algorithm. The circle is made up of straight lines. Straight lines are more difficult to draw than you might imagine...!

Look out for more swirly patterns coming soon. Maybe even an LMR logo!

What you see in the main photo there is a "Hilbert Curve." It's a space filling curve in that the algorithm causes the "pointer" to pass through all the cells in a given area.


Hey, how weird does the inside of an Etch-A-Sketch look? I HAD to do this. I programmed it to scan back and forth so all the grey dust got scraped off the glass. It took about an hour! Hmmm... Resolution is 750x500 = 375 KiloPixels (there's a new one) x 10ms per step = 3750 seconds = 62.5 minutes.


I presume all those little metal balley things (description specially for Frits) are where the magic grey coating comes from.

Below is my attempt at a Lissajous figure with two phases. I'm happy with that.


I got the machine to draw a picture of my eldest offspring. It's done by making "pixels" which consist of veritcal lines. The lines are closer together (more dense) for increasing levels of darkness. Later I will try to use a Hilbert curve to make up each pixel with an increasing "order" for increasing levels of darkness. The result should be much better, but it will be sloooooow.


This second photo is slightly easier to see the subject because it's so blurry!


For the sake of completeness, here's the front panel of the software I wrote on the PC to control it, including a preview of the image.


I'm off to see if I can get it to draw the contents of a DXF file. How hard could THAT be?

 Can you believe it doesn't EVEN Write LMR yet? How remiss of me...

Update (7-Mar-2009): NOW, it writes LMR. BTW, reading a DXF file is more difficult than I thought.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How about these ?    :D

What computer language do you program in. I know you do assembly. I want to learn RISC assembly for hardware programming.

Can you vector a computer graphic yet?

You name it. I program in a lot of languages. Some which have never been heard of outside the aviation industry. For control applications I use Visual Basic or LabVIEW. I have to say I'm not enjoying all this .NET crap. Making all computer languages plain old scripting tools when the interesting, fun stuff is all done by Microsoft at a lower level really pisses me off. 

"vector a computer graphic"? van R is a vector display. It renders a computer graphic. I don't see what you mean. The PIC renders the straight line itself in RISC assembler using a Bresenham algorithm. I may try to get it to render a curve next.


Fabulous project, you're all artist !

How fast can you drive the steppers?  Have you found the limit already? Just curious, I would find an odd bit of satisfaction seeing an automated etch-a-sketch drawing faster than a printer...

Sadly, I would derive the same satisfaction. Except, I don't find that odd! Perhaps this was a comment on how people other than yourself would find your mentality? I don't find it odd ion the slightest!!

Ummm. the answer is that it takes a good 5 secons in a straight line from one side of teh EAS to the other. Bear in mind, also that this is a POCKET Etch-A-Sketch, so the screen is only about 3" wide!

I've only use $20 steppers, so their torque is pretty crappy and I have driven them the "easy" way. The proper way (as pointed out above) is to overdrive them, then reduce the current as the stepper settles. I need about 10ms step time, which ro 7.5deg step is nearly half a second for a full rotation AND I have a 4:1 reduction gear in place to increase torque.


Just thought you ought to see this juxtaposition.


via botjunkie

Lovin' that last link!