Waldo Nuts and Bolts
Waldo wiring layout. |
The problem
with bodging things together is that the various parts do not use the same
supply voltage. A 12 VDC, 4Amp wall-wartish supply provides power for the
scanner stepper motor. For $2.19 each (eBay), I bought a bunch of adjustable
Step-Down DC switching converters, that take the 12v supply and convert to 4.1V for
the rack-and-pinion motor and to 6.0V for the servos. The Arduino likes 9V for
its supply but since I will always be USB connected to my computer, I let the
USB supply it’s power.
Waldo's wiring. |
The Arduino provides the timing signals for the step motors and
servos. The TD62003AP driver for the scanner’s six wire stepper motor resides
on the original scanner board but I had to make an H-bridge motor driver
(SN754410NE $2.58 from Mouser) for the four wire rack-and-pinion stepper motor.
X and Y position flag sensors. |
A couple of scavenged flag sensors are placed so stepper home
positions can be determined. I wired in a momentary “start” switch on the
scanner case to notify the host when to capture a Sudoku image and to begin
analysis of the image.
VB6 Waldo interface. |
A VB6 interface program on my computer sends character string
commands that the Arduino decodes into actions. Codes “0N” through “9N” execute
predefined servo movements that drops the pen to the paper, draws the called
character and then lifts the pen. Codes “0X” through “0052X” move Waldo’s arm
to the X step positions 0 to 2500. Note, I send the string digits in reverse
order (the least significant digit is sent first.) Codes “0Y” through “005Y” move Waldo’s arm in the Y direction; step positions 0 to 500 (again sent in
reverse order). Codes “1L” and “0L” turn the LED on and off. Code “H” homes
Waldo’s arm to X = 0 and Y = 0.
Meanwhile, the USB camera is watching a green
LED on the head of the pen to determine the pen’s location within it’s field of
view. This process turned out to be more difficult than I expected and I'm still working on some glitches. Frustratingly, the USB camera controls cause conflicts with the Arduino USB communication and visa-versa. I have worked out what seems to be an overly complicated timing scheme using five VB6 timer controls and I have successfully filled in one puzzle. The detection of the green LED in the camera image is taking too long and it is still a bit unreliable. By the net post, I hope to have video of the completed project.
No comments:
Post a Comment