|
Back to ARobot Projects Page
This application note in PDF format
A robotic arm can make your robot more useful and very cool! The Lego Mindstorm system allows you to create computer controlled devices, and for this app note, we’ll use it to build a robotic arm complete with gripper. The arm joints and gripper will be controlled with Lego’s RCX controller which will accept signals from ARobot’s Basic Stamp II controller.
We assume you’re familiar with Lego Mindstorms building techniques and programming. Some soldering and possibly some drilling will also be required depending on your mounting requirements.
|       Parts List |
Part Part # Price
---------------------------------------------------------
Lego Mindstorm System ? ?
Alligator clips RS# 278-1156 $3.99
40 conductor IDE cable RS# 278-780 $6.99 Or IDE disk drive cable.
RS = Radio Shack http://www.radioshack.com
See the Lego Mindstorms web site at http://www.legomindstorms.com
|       Building an Arm and Gripper |
Instead of giving you detailed instructions on building a robot arm and gripper, we’ll just show you some pictures how we did it. The idea behind Lego is personal creativity, so create your own contraption. And don’t forget to visit the Lego Mindstorm web site at http://www.legomindstorms.com
|       Mounting |
Several options exist for mounting the Lego Arm to ARobot’s chassis.
- Double Sided Tape
- Nylon Wire Ties
- Hot Glue
- Metal Brackets
|       Lego Mindstorm Software |
Use the graphic go construct a Lego Mindstorm RCX program. Basically it looks for switch inputs and activates the motors. These switch input will come from ARobot’s controller. But first you can test the software with contact switches. Connect a contact switch to Lego input 1. Pressing this button with the Lego program loaded will cause the arm to raise or lower. Connecting a switch to Lego input 2 and pressing it will cause the gripper to open and close.
Download the Lego Mindstorm program LEGOMS.PRG
You may need to RIGHT CLICK on this link to save it to your local disk.
Now it's time to wire in the outputs from ARobot’s controller into the Lego Mindstorm Computer. We will wire in Basic Stamp II pins #4 and #5 (Expansion Connector pins #9 and #10) into the Lego Computer's input pins #1 and #2. See the drawing.
The easiest way to attach wires between the expansion connector and the Lego computer is to use a 40 pin header on ARobot’s expansion connector, and alligator clips on the Lego computer. Notice that we wire the ground pins on Lego input ports 1 and 2 together with expansion connector pin number 2. Then we wire expansion connector pin 9 into Lego input 1. Finally, we wire expansion connector 10 into Lego input 2.
|       ARobot Software |
Use this code example on ARobot’s Basic Stamp II controller to activate the Lego arm.
Integrate the 'movearm' and 'movegrip' subroutines into your own programs.
You can download this program here LEGOMS.BS2
'------------------------------------------------------------------
'legoarm.bs2 Arrick Robotics 02/16/98 www.robotics.com
'
' This program demonstrates the use of an arm constructed from
' Lego Mindstorms.
' Turning on pin 9 causes the arm to move up or down.
' Turning on pin 10 causes the gripper to open or close.
'
' This program assumes the lego arm is up and the lego gripper is
' open at the beginning of execution.
'------------------------------------------------------------------
'
'I/O pins.
arm con 4 'lego arm
grip con 5 'lego gripper
'------------------------------------------------------------------
'
main:
gosub setup
pause 1000
gosub movegrip 'Move gripper.
pause 1000 'Delay.
gosub movearm 'Move arm.
pause 1000 'Delay.
goto main 'Loop.
'------------------------------------------------------------------
'Initialize.
'
setup:
low arm 'Arm off.
low grip 'Gripper off.
return
'------------------------------------------------------------------
'Move Arm.
'
movearm:
high arm
pause 1000
low arm
return
'------------------------------------------------------------------
'Move Gripper.
'
movegrip:
high grip
pause 1000
low grip
return
'------------------------------------------------------------------
'End of program
'------------------------------------------------------------------
Here's are some useful sources for parts:
|