Arduino Controlled Pocket Etch a Sketch Random Walk Simulation




This project is the result of Wal-Mart check-out lane impulse purchase of Pocket size Etch A Sketch for $3.99.

Two stepper motors drive Etch A Sketch knob shafts, and a servo motor flips Etch A Sketch to erase the screen.  Using the Arduino IDE’s Serial Monitor the user can automatically generate “random walk” simulations. Material cost  about $60, simple construction requires only a couple hours effort.

Not a true random walk simulation since it separately moves random amounts in horizontal and vertical directions; and maximum travel is restricted to remain within Etch A Sketch screen.
Time lapse video took about 30 real time minutes.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Procure Hardware:

See pdf file for detailed listing of stuff you’ll need.

For the Arduino board, I actually used a Freeduino board, although I initially developed the project using an Arduino Uno board.  Both these Ardunio boards can be powered directly from USB.

Step 2: Mechanical Assembly

Step 1: Drill 9/64 hole in one side of the 1” nut (this will be the Counterweight).  Drill a 9/64 hole in the sidewall of 3/8 ID Nylon bushing, see photo.

Step 2: Cut a 130 mm by 132 mm piece of 1/8 plywood and drill five 9/64 holes per figure 1. Mark a servo pivot axis line 50 mm from top on board back side. Cut 3 pieces of ¾ inch square stock wood  ¾” long.  In one piece drill a 9/64 hole per figure 2. Cut a 1” long piece from 1” square stock wood and drill two 3/8 holes per figure 3. Cut a 150 mm by 200 mm piece of ½ plywood and drill two 3/8 holes per figure 4.

Step 3: Install 1 ½ long 6-32 screw into hole of ¾ ”  wood piece, secure with lock washer and nut. Using wood glue, attach  to 1/8 plywood piece, use servo pivot axis line as a guide.  The screw should be 10 mm above the plywood – same as the servo motor drive shaft.  Also using wood glue, attach  the other two 3/4 inch  blocks to opposite side of the plywood, positioning them as mounts for servo motor,  assure alignment with servo pivot axis line .  Allow wood glue to dry overnight.  After glue dries, attach servo motor using hardware included with servo motor, see photo.

Step 4: With #2 screws and epoxy, attach over the 3/8 hole, the servo horn (wheel) to 1” square wood piece, see photo.  The 3/8 “side hole” will allow you to later install the horn to servo shaft mounting screw.

Step 5: Cut 2 pieces of vinyl tubing 0.25 OD X 0.17" ID x 20 mm long.  Pry off Etch A Sketch knobs and using super glue attach each tube to knob shafts. Attach stepper motor shaft to other tube ends, secure with wire wrap.  Using 2 ½ long 6-32 screws, nuts, flat and lock washers, and double stick foam tape (between Etch A Sketch and plywood) attach stepper motors and Etch A Sketch to 1/8 plywood, see photos. Gradually tighten screws to assure good stepper motor to Etch A Sketch knob shaft alignment.

Step 3: Mechanical Assembly Continued

Step 6: Put 2 carriage bolts thru 3/8 holes in ½ plywood base plate and fasten with nuts and flat washers. Add 4 rubber feet to corners of base to prevent rocking on carriage bolt heads, see photo.

Step 7: With servo motor shaft rotated fully clockwise (as viewed from the front of the shaft) attach the 1” block to servo motor using horn mounting screw so that the block’s vertical hole is nearly straight up, see photo. You’ll probably need a bit of trial and error to  get this properly positioned. Slide the bushing in place over 6-32 screw, see photo.  Slide both bushing and servo block over 3/8 carriage bolt uprights and secure with nuts and washers so that the Etch A Sketch is level, pivots freely, and the lower edge of 1/8 plywood is 30 mm above the base.

Step 8: Mount 1 inch nut as a counter weight to top of 1/8 plywood using 4 inch long 6-32 screw, nuts,  lock , flat and fender washers, see photos.

Step 4: Wiring, Programming and Operation

Step 9: Assembly the wiring harness per figure 5.  For Arduino to Stepper Control board signal cable, use 4 conductor ribbon cable with 4 pin male header on one end and 4 pin female header on opposite end.  I used solid core hook up wire for the other connections.  Once the wiring is complete, secure with hot glue the Arduino, Stepper Control boards and power jack to the base, see photo.  Check that wiring is routed to avoid binding as the Etch A Sketch pivots backwards.

Step 10: Copy program (Stepper_Motor_Example_Keyboard.pdf) into Arduino IDE and upload to Ardunio board.  Attach 5VDC 1 Amp or greater power supply to power jack.  After program uploads, open Arduino IDE Serial Monitor (can be found under Arduino IDE Tools menu).  The Etch A Sketch can now be controlled by typing commands at the top line of the serial monitor. The commands, all lower case single characters  are:

jogs the Etch A Sketch “pen”  about 2 mm to the left
r  jogs the Etch A Sketch “pen”  about 2 mm to the right
u  jogs the Etch A Sketch “pen”  about 2 mm to the up
d  jogs the Etch A Sketch “pen”  about 2 mm to the down
c clears Etch A Sketch by flipping it backward with servo motor
x  begins Etch A Sketch random walk simulation WARNING – don’t use this command unless the pen is centered on the screen. I typically use “ l , r , u , d ” commands to initially center pen on screen, then “c “ command to erase, and finally start random walk with “ x” command.
h  returns Etch A Sketch “pen”  to original position following a random walk.

Hit  return key to send commands to the Ardunio, otherwise nothing will happen. Also, you can stack commands, that is “xhc” will run random walk simulation, then return pen to original position and finally flip the Etch A Sketch to erase it.

Enjoy !!

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    19 Discussions


    Question 3 months ago

    A fantastic project
    Have you also a program to plot a drawing or photo from PC to etch a sketch


    5 years ago on Introduction

    I've also been working on a project to do exactly this for a long time, just keeps getting pushed to the back of my workbench. I plan to use StippleGen2 from Evil Mad Scientist Laboratories to generate my TSP paths for sketching pics.

    1 reply

    Reply 3 months ago

    Have you already achieved results, let me know please
    I like it


    5 years ago on Introduction

    I am having a little problem with the ( h) or home command it doesn't seem to do anything and getting out of the random or (x) command. I have to close the window to stop the pointer movement. Is there a way to make the random movements larger. I made mine on the full size etch-a- sketch it is hard to see the movements. Other than that it works fine.


    6 years ago on Introduction

    Great project! A fun thing you could do with this is to have the etch a sketch draw non-random objects like from a photo. Maybe its out of scope for the Arduino? Nevertheless awesome job!

    5 replies

    Reply 6 years ago on Introduction

    I wouldn't think this is too far out of the arduinos range. Possibly only monochrome bitmap images. Arduinos are already used for CNC machines, why not an automatic etch-a-sketch?


    Reply 6 years ago on Introduction

    Maybe if you added an SD shield to hold the image, then the logic on the arduino to interpret the image. But converting an image to a single line drawing is computationally expensive, and would be much too slow on the arduino. However, you could interpret the image into movement commands via the pc, then send those over serial to the arduino. (in fact, this is more or less how arduinos are used in hobby CNC - they interpret gcode into motor movement, but they only receive a limited number of commands at a time [unless, of course, an SD shield is used in conjunction, but even in this case, the heavy lifting is done ahead of time by the pc])


    Reply 6 years ago on Introduction

    Is there a way to pre-process an image to a single line drawing and then send the commands to the arduino?

    I used Mach3, a CNC controlling program. Free up to 500 lines of code. You will need to learn to CAM the picture, there is an online CAm prg at
    that will take your SVG (Inkscape) drawing and convert it to Gcode. There is also a plugin for Inkscape that will do that for you. Eggbot uses this system, and it is the very same type of machine as this!


    Reply 6 years ago on Introduction

    That seems most probable. It would end up similar to the electronics of a CNC machine, where the computer sends movement commands to the arduino, and that arduino is used basically as a driver module.


    6 years ago

    Could you have it center itself and clear every time u press X?

    Well documented buld! I like how it started small. I've been trying to go big with a Makelangelo sketcher. It is always popular, and was super easy to use. In response to previous comments: What makes it so easy is that you can input any picture, and it figures out the moves. Can't wait to try to put both of these projects together for the ultimate Drawbot flexibility. Thank you.

    1 reply

    The problem with drawbots is that they generally use servos to lift the pen off the drawing surface, something that isn't possible with EAS. You'd need a way to convert the image into a legible single line drawing (such as a Traveling Salesman Problem, or TSP art).


    6 years ago on Introduction

    Well now this is pretty cool, I must say! Way to go -- I love this!


    6 years ago on Introduction

    Neat, funny, and went to my Blog:


    6 years ago on Introduction

    Great Arduino project, but having trouble with your code. What version are you using? Wants to stop on the first line "Stepper small_stepperV(steps, 4, 6, 5, 7);". Can you help me out? Thanks.

    2 replies

    Reply 6 years ago on Introduction

    I'm using Arduino IDE 1.0.3. Perhaps there is a problem reading the libraries see -