An old Telecran (French for Etch-a-Sketch) later, we are in business !
What I used for this project:
- an arduino Uno
- 2 stepper motors
- 2 easydrivers v44 (by www.sparkfun.com)
- various Fishertechnik parts (http://www.fischertechnik.com)
- a push button.
- a sensor shield + 2 push buttons
- a Nintendo Wii Nunchuck
- a WiiChuck adapter
- hot glue gun
Step 1: Mechanics
I had to drill into the stepper cogs as the axis of the steppers were 5mm where the FT standard is 4 mm.
The other cogs were simply hot glued onto the Telecran (Etch-a-sketch) knobs.
The rest is best explained in pictures...
Step 2: Steppers
Step 3: Arduino
Very straight forward. Note the emergency button that allows to put the motors to sleep in case of a runaway sketch.
I added a sensor shield to the arduino for convenience as I have a couple of push buttons (with a pull-up resistor) already cabled.
WiiChuck adapter is one of my favorite. Although the Nunchuck is a little more difficult to program than it may first appear.
Step 4: Schematics
Step 5: Code - Sketch
The motors are then controlled exclusively with the Wii Nunchuck.
if NUNCHUCK is not defined, then a pre-defined drawing is executed.
Said drawing is controlled by the 'mode' variable modified at compile time.
This calls for a proper menu, an LCD screen etc... I leave this as an exercise to the reader.
Step 6: Calibration - Backlash
Backlash has been the most annoying part of this project.
It comes from all the mechanical parts involved, the biggest culprit being the Telecran itself.
I finally took backlash into account programmatically and I designed a calibration routine.
Said routine draws a cross several times using various values of backlash.
One can visually decide which value gives the best (most aligned) cross.
In my case 14 is the magic number.
When the nunchuck is activated in the code, one can open the serial interface and note the magic numbers for said nunchuck.
Mininum and maximum X and Y.
X and Y values when nunchuck is still.
Nunchuck is active when either 'c' or 'z' is pressed. 'c' is slow, 'w' is fast.