![]() |
||||
Measuring RPM via Photo reflector
Computer
Interface
|
Basic LEGO Robot by Pololu LEGO is famous for its construction blocks, and it has lately been introducing many robot-themed sets. In this project, we demonstrate how you can use the Pololu micro dual serial motor controller to control a simple LEGO robot with a BASIC Stamp. The BASIC Stamp from Parallax is a popular introductory miniature computer for learning the basics of electronics and computer programming. By themsleves, however, the BASIC Stamps cannot control motors, which are crucial to robotics and many other projects that require motion. LEGO is famous for its construction blocks, and it has lately been introducing many robot-themed sets. In this project, we demonstrate how you can use the Pololu micro dual serial motor controller to control a simple LEGO robot with a BASIC Stamp. In its initial configuration, this robot behaves very similarly to the obstacle-avoiding robot from project 1: this robot drives forward until it hits an obstacle; when it does, it backs up, turns, and resumes its forward motion. In future projects, we will use this project as a foundation for more complex and interesting robots. Because the details of the mechanical design are not particularly interesting, we will not cover the assembly of the LEGO chassis. Instead, we will focus on how to use the micro motor controller with the BASIC Stamp II. This sample project should, therefore, serve as a reference for anyone wanting to use a BASIC Stamp to control a small, differential-drive robot (a type of robot, which, like a bulldozer or tank, has independent drive wheels or treads on its two sides). 2. Materials and Tools
3. Hardware Construction To use the LEGO motors in you own project, you need to get leads that you can connect to your own electronics. One possibility is to cut a regular LEGO cable in half and solder on male header pins onto the cut wires. This will give you the two necessary connectors at the expense of one LEGO cable. We built the electronics on a small solderless breadboard.
As you can see from the close-up picture to the right, there isn't much
to the circuit. The only components other than the BASIC Stamp II and
the motor controller are the two pull-up resistors for the bumper switches.
The schematic diagram for this circuit is shown below.
|
|||