servo connector so you
can easily connect
sensors to the docking
station. The completed
OEM docking station is
shown in Figure 6. One
of the sensors that easily
plugs into the docking
station is the Lynxmotion single line detector that I added
to my setup to eventually create a simple line follower.
These are really great sensors but have to be bent a little to
fit the Mark III chassis. They easily plug into the three pin
connections of the docking station. Figure 7 shows the
sensor by itself.
I didn’t finish the line follower code in time for this article
but you can find plenty examples of this in SERVO. I mainly
just wanted to demonstrate how easy it was to put all this
together and end up with an effective, low-cost robot from
off-the-shelf parts and a little creativity of your own.
main:
Forward:
For x = 1 to 20
FIGURE 7. Single
line detector.
servo serv1, 1200, 1
servo serv2, -1200, 1
Next
‘ Send the servo control pulse
‘ 20 times
‘ Drive the right servo forward
‘ Drive the left servo forward
‘ do it again
Pause 500
‘ Delay 500 milliseconds
Backward:
For x = 1 to 20
servo serv1, -1200, 1
servo serv2, 1200, 1
Next
‘ Send the servo control pulse
‘ 20 times
‘ Drive the right servo in
‘ reverse
‘ Drive the left servo in
‘ reverse
‘ do it again
Pause 500
‘ Delay 500 milliseconds
Goto Main
‘ Go back to the top and drive
‘ it again.
Software
Conclusion
I wanted to at least test my final creation by writing a
simple program to drive the servos. This is a quick program
to make the robot go forward for a short distance, then pause
for a half second, then move the robot backward and delay
for a half second again. The program will loop through this
over and over again. This is a simple program (shown next)
that demonstrates the Basic Atom servo command.
serv1 con p10
serv2 con p11
‘ Make nickname for servo1
‘ connection
‘ Make nickname for servo2
‘ connection
x var byte
‘ Create a counting variable for
‘ the servo loops
If you wonder what the final robot looks like, check
out Figure 8. It’s nothing exciting but it’s simple to build
without a lot of expense. We do have a few of the older
docking station boards, so maybe I’ll make a kit out it for
anybody that wants a one-stop source for this same kit.
As I mentioned, I ran out of time to get the line sensors
working before sending this to SERVO, so I’ll consider that plus
maybe wheel sensors for a future article. The off-the-shelf
chassis from Junun.org works well and saves you a lot of
cutting and bending of metal, plus its smooth finish prevents
any sharp edges. Adding the docking station definitely simplifies
connecting an OEM module of your choice. If you want to
modify the design or just build it the way we have it, remember
the docking station board files are available from expresspcb.com. You can use
their low-cost $59 option if you don’t
need silkscreen or solder mask. SV
Metal Fabrication
Quality parts within 24 hours!!
Materials from 0.001” to 6.000” in
thickness.
Parts from practically any material.
Finishes such as powder coat, paint,
plating, anodizing, silk screen, and
more!
Every job is an extension of IIT. We
meet and exceed the quality and
service expectations of our clients on a
consistent basis. Contact sales at
(208) 665-2166 or visit
www.iitmetalfab.com today!
* Quick
* Affordable
* Precise
* No Minimums
Complete Fabrication Center
Integrated Ideas & Technologies, Inc.
Precision Laser, Waterjet, Plasma, Machining,
Micro-Machining, Forming, and Welding
Capabilities
3896 N. Schreiber Way • Coeur d’Alene, ID • 83815-8362 • USA
Ph (208) 665-2166 • Fax (208) 665-5906 • www.iitmetalfab.com
FIGURE 8.
Final robot
assembly.
60 SERVO 06.2008