Difference between revisions of "Boe-Bot"
Line 97: | Line 97: | ||
same time and respond quickly to an obstacle. You have to split Your program to small fast-executing parts with an | same time and respond quickly to an obstacle. You have to split Your program to small fast-executing parts with an | ||
impression of "concurrent" movement and sensing. In simple programs this is of course not a problem, but as your | impression of "concurrent" movement and sensing. In simple programs this is of course not a problem, but as your | ||
− | programs become more and more complicate, you will also find it | + | programs become more and more complicate, you will also find it more limiting. |
− | + | For debugging purposes it is very good to have an possibility to print various reports, current state of variables | |
+ | etc. Messages sent from the robot via a serial interface (DEBUG command) are displayed on any terminal - one is | ||
+ | included in the development environment. | ||
− | + | To demonstrate how the robot is programmed, here are simple programming examples. First one is | |
+ | for robot driving around a square. See also a corresponding video. | ||
+ | |||
+ | <source lang="basic"> | ||
+ | Main: ' Main loop starts here | ||
+ | GOSUB Forward ' Subroutine to drive the robot forward | ||
+ | GOSUB Right ' Subroutine to drive the robot right | ||
+ | GOTO Main ' Do this forever | ||
+ | END ' End of the main loop | ||
+ | |||
+ | Forward: ' Subroutine Forward | ||
+ | FOR counter = 1 TO 50 ' Do this loop 50x | ||
+ | PULSOUT 13, 850 ' Send short pulse to left servo | ||
+ | PULSOUT 12, 650 ' Send another to right servo | ||
+ | PAUSE 20 ' Wait for another pulse | ||
+ | NEXT | ||
+ | RETURN ' Return from subroutine | ||
+ | </source> | ||
+ | |||
+ | Second program is an excerpt from the program for robot navigating using whiskers. Full length listing is | ||
+ | included at the end of the page. See also a corresponding video. | ||
+ | |||
+ | <source lang="basic"> | ||
+ | ' -----[ Main Routine ]------------------------------------------------------- | ||
+ | |||
+ | DO ' Neverending loop | ||
+ | |||
+ | IF (Left = 0) AND (Right = 0) THEN ' Front obstacle | ||
+ | GOSUB Go_Back ' Back up & U-turn (left twice) | ||
+ | GOSUB Go_Left | ||
+ | GOSUB Go_Left | ||
+ | ELSEIF (Left = 0) THEN ' Obstacle on left | ||
+ | GOSUB Go_Back ' Back up & turn right | ||
+ | GOSUB Go_Right | ||
+ | ELSEIF (Right = 0) THEN ' Obstacle on right | ||
+ | GOSUB Go_Back ' Back up & turn left | ||
+ | GOSUB Go_Left | ||
+ | ELSE ' Nothing in front | ||
+ | GOSUB Go_Forward ' Apply a forward pulse | ||
+ | ENDIF | ||
+ | |||
+ | LOOP ' and repeat again | ||
+ | </source> | ||
The entire guide contains dozens of tasks, which will gradually be transferred through all the basic components of the robot. Enable you to understand the depth nielen how the robot moves, but also how to interpret the world using simple sensors. At the end of each chapter is the number of open issues, which the authors present the reader to address the deficiency, which leads to a substantial deepening of the problem. After mastering the foundations of movement, change direction and speed and acceleration followed by a chapter in which the characters in the annexed parts of two antennae - the bumpers. With them, you try mobile robot navigation and motion without an accident - detection of obstacles, walls. Other attempts to deal with sensor photoresistors. These allow the search light and dark places, where track lighting spots of batteries. Finally the manual is dedicated to working with modulated infrared sensors, which serve very well to detect obstacles and avoid them. These sensors can be used to estimate the distance from building and maintaining a constant distance from it (basic control). | The entire guide contains dozens of tasks, which will gradually be transferred through all the basic components of the robot. Enable you to understand the depth nielen how the robot moves, but also how to interpret the world using simple sensors. At the end of each chapter is the number of open issues, which the authors present the reader to address the deficiency, which leads to a substantial deepening of the problem. After mastering the foundations of movement, change direction and speed and acceleration followed by a chapter in which the characters in the annexed parts of two antennae - the bumpers. With them, you try mobile robot navigation and motion without an accident - detection of obstacles, walls. Other attempts to deal with sensor photoresistors. These allow the search light and dark places, where track lighting spots of batteries. Finally the manual is dedicated to working with modulated infrared sensors, which serve very well to detect obstacles and avoid them. These sensors can be used to estimate the distance from building and maintaining a constant distance from it (basic control). |
Revision as of 11:01, 14 February 2011
Introduction
Boe-Bot is a small mobile robotic kit made by Parallax, Inc. An acronym Boe in its name stands for Board of Education, the electronic control board, which controls the robot. As its name implies, it is used mainly for education. In this article we will give a brief description of the kit labeled Boe-Bot Robot Kit - Serial (with USB adapter and cable) - order code #28132 selled by the Parallax, Inc. for 160 USD. It can be purchased directly from their e-shop, or from one of their distributors (MITE in the Czech Republic, RLX components in Slovakia).
An idea of the robot appeared a the Idaho University in the Chuck Schoeffler's head. He attached the Board of Education to a plastic box (see Fig. 1). The people in Parallax then draw a CAD design which was cut out of aluminum on the NC machine. So the first Boe-Bots were born. A little bit later a textbook by Andy Lindsay - Robotics with the Boe-Bot[1] appeared and to day there was more than 80.000 (?) robots produced. In the Czech and Slovak republics there is around ?? robots. There are also special courses for teachers and the kits are used in secondary schools and universities not only in America but around the world.
The robot can be built by 12-year pupils, but I can confirm that with a little help from an adult also smallar can handle it. The kit does not require almost no prior robotic knowledge.
Complete kit (see Fig. 2) contains all the mechanical components necessary to build a robot. You may need also small tongs or tweezers, handy screwdriver is bundled with the kit. Other tools are not necessary. In the box you will find also a PCB with Board of Education and programming cable. There exists a kit that has an USB interface directly on the board and connects using a Mini-USB cable. Version, which we describe here contains a serial RS-232 cable, plus a small converter USB/232 with the cable. This version we prefer, as in our opinion, RS-232 interface is more robust and you also get the converter to USB, which can be used elsewhere.
Part of the kit is excellent 345-pages manual and a CD-ROM with all the necessary software. Finally, you will find some other components (LEDs, resistors, sensors, spacers) in a box that you will use in experiments according to the examples in the book.
Robot can be built in half an hour. It's base is an aluminum chassis to which You have to attach two motors and wheels, four AA batteries holder and a rear wheel (castor). It is a ball made of polyethylene, which is attached to the frame with split pin. Finally, on spacers you will attach the electronics board. Voila, the robot is ready for programming (see Fig. 3)!
Let's look on Board of Education (Fig. 4) more detaily. Its heart is BasicStamp II processor. It is a tiny printed circuit board (31 mm x 16 mm x 9 mm), which contains microprocessor Microchip PIC 16F57 and PBASIC language interpreter. As a program and fixed data storage is used an external serial EEPROM, the variables are stored in internal RAM. The Board of Education contains BasicStampII (1), and power stabilization circuit with low-drop stabilizer LM2940 (2) and LED indicator (3), 9V battery or wall-adapter connectors (4), RS-232 connector (5), connector for expansion modules (6) and connectors for motors (7). Board is switched on/off with three position switch (8) (everything off - everything on except the motors - everything on). Roughly one third of the board occupy an universal solderless breadboard (9). There ara elso the power supply and processor ports connectors on its sides. This section is used for various experiments and creation of your own circuits. The Board of Education is also used in many other Parallax educational kits (e.g. What's a microcontroller, Applied Sensors, etc.).
Almost each robotic experiment according to the book requires additional components to be connected into the solderless breadboard area - whether it's only LED indicator, or complicated ultrasonic sensor. The microprocessor ports are all available, so simply connect your new circuit to the processor and you can start programming.
How to program the robot?
Absolute beginners can use a simple graphical programming language Gui-Bot, where the program consists of a sequence of several graphical elements (Fig. 5). For routine work with a robot is used PBASIC programming language. Language commands are first translated to the tokens, those to be loaded into the EEPROM. From there they are subsequently carried out by a built-in PBASIC language interpreter. To write, translate and download programs, freely available Basic Stamp Editor for Windows is available (there are also solutions for MAC and Linux).
For digital inputs and outputs operation You can use commands IN, HIGH and LOW. For more specific applications there are additional commands available - FREQOUT (the signal of specified frequency to certain output), - PULSIN (measuring pulse length at specified input), - SHIFTOUT (at the specific output sends sequence of pulses, can be used for serial communication with peripherals) - PULSOUT (pulse of the specified length at specific output).
Some of them are probably familiar to readers of Robotrevue magazine from the series about the Picacxe processors. The last-mentioned PULSOUT command (see also Robotrevue 02/2010) is also used to control the modified RC servo motors, which drive the robot. Using this command, you will find also one of the PBASIC language limitations. During the instruction PULSOUT processor cannot do anything else, it only outputs pulses. So you cannot e.g watch a sensor at the same time and respond quickly to an obstacle. You have to split Your program to small fast-executing parts with an impression of "concurrent" movement and sensing. In simple programs this is of course not a problem, but as your programs become more and more complicate, you will also find it more limiting.
For debugging purposes it is very good to have an possibility to print various reports, current state of variables etc. Messages sent from the robot via a serial interface (DEBUG command) are displayed on any terminal - one is included in the development environment.
To demonstrate how the robot is programmed, here are simple programming examples. First one is for robot driving around a square. See also a corresponding video.
Main: ' Main loop starts here
GOSUB Forward ' Subroutine to drive the robot forward
GOSUB Right ' Subroutine to drive the robot right
GOTO Main ' Do this forever
END ' End of the main loop
Forward: ' Subroutine Forward
FOR counter = 1 TO 50 ' Do this loop 50x
PULSOUT 13, 850 ' Send short pulse to left servo
PULSOUT 12, 650 ' Send another to right servo
PAUSE 20 ' Wait for another pulse
NEXT
RETURN ' Return from subroutine
Second program is an excerpt from the program for robot navigating using whiskers. Full length listing is included at the end of the page. See also a corresponding video.
' -----[ Main Routine ]-------------------------------------------------------
DO ' Neverending loop
IF (Left = 0) AND (Right = 0) THEN ' Front obstacle
GOSUB Go_Back ' Back up & U-turn (left twice)
GOSUB Go_Left
GOSUB Go_Left
ELSEIF (Left = 0) THEN ' Obstacle on left
GOSUB Go_Back ' Back up & turn right
GOSUB Go_Right
ELSEIF (Right = 0) THEN ' Obstacle on right
GOSUB Go_Back ' Back up & turn left
GOSUB Go_Left
ELSE ' Nothing in front
GOSUB Go_Forward ' Apply a forward pulse
ENDIF
LOOP ' and repeat again
The entire guide contains dozens of tasks, which will gradually be transferred through all the basic components of the robot. Enable you to understand the depth nielen how the robot moves, but also how to interpret the world using simple sensors. At the end of each chapter is the number of open issues, which the authors present the reader to address the deficiency, which leads to a substantial deepening of the problem. After mastering the foundations of movement, change direction and speed and acceleration followed by a chapter in which the characters in the annexed parts of two antennae - the bumpers. With them, you try mobile robot navigation and motion without an accident - detection of obstacles, walls. Other attempts to deal with sensor photoresistors. These allow the search light and dark places, where track lighting spots of batteries. Finally the manual is dedicated to working with modulated infrared sensors, which serve very well to detect obstacles and avoid them. These sensors can be used to estimate the distance from building and maintaining a constant distance from it (basic control).
How to proceed?
After the development of all the examples listed in the guide can do their own experiments, or you buy some accessories. Perhaps the simplest is complementary to infrared remote control, which is available again very detailed instruction manual. Since the driver can also be found at home and guide can be downloaded free from the manufacturer's website, it is certainly worth a try. Another typical application for a mobile robot is tracking the line. Also you can try - there is a kit with four infrasenzormi which attach to the studs and spacers with a detailed manual to understand how to program a robot to monitor whether white or black line. Of course, it is possible to design and make your own and sensor.
The robot is sold as a simple gripper. There is a kit allowing the robot to redo the belt, or even to šesťnohého walking robot. On another article published by expanding the list of sensors - compass, accelerometer, ultrasonic, or encoders in the wheels, allowing for more precise position control of a robot.
Evaluation
For someone who may be a disadvantage PBASIC programming language, which does not create custom functions or libraries. Experienced will surely miss direct access to peripherals processor, and the timer. You will definitely miss the interruption. For beginners, it may even be a problem, even without those features, you get very far. Later you may encounter a lack of RAM and EEPROM, which, however, the school and beginner projects is sufficient. The bottleneck (especially for those who have competitive ambitions) is a robot speed - it uses the drive as modified RC servo is quite slow. The disadvantage may also be its relatively high price.
On the other hand, a higher price you get a robot with the fitting allows a large number of activities, so it's definitely not a time killer for a weekend. It is very robust, durable and suitable for beginners. Very good guide certainly appreciate the end in itself and especially teachers. Not every teacher has the time to create and invent new activities. Textbook, which is part of the kit will provide enough material very well prepared. In addition, teachers may ask the company about slides from the presentations and, where such a version of the brochure, which themselves can translate and edit.
Fig. 8. Robot with infrasenzormi.
If we compare the Boe-Bot robot with the popular Lego Mindstorms, it is clear that it lacks the mechanical variability. Boe-Bot is more or less fixed structure and there is not too much to change. However, the chassis contains many holes which enable to add and use a lot of accessories (sensors, Meccano parts etc.) Also the programming possibilities of the Boe-Bot robot are narrower than Lego Mindstorms, because just PBASIC and graphic languages are available here. However, where the Boe-Bot is clear winner is the electronics expansion. Using the breadboard area you can connect to the robot almost anything. Moreover, the Board of Education itself allows to learn basics of sensor technology, digital circuits and simillar topics.
It is an excellent entry kit for those who want to know robotics and learn something more.
BasicStamp II Technical data
Case 24-pin DIP Dimensions 30,6 x 15,7 x 8,2 mm Frequency 20 MHz Speed ~ 4000 instructions / sec RAM 32 B (not kB, just B!) EEPROM 2kB (~500 instructions) I/O 16 (+ 2 dedicated serial) Supply 5 – 15 Vdc (contains regulator) Consumption 3 mA run / 50 uA sleep @5V Load 20 mA / pin & max. 40 mA / chip
Boe-Bot Technical data
Dimensions: 150 x 114 x 102 mm Weight: 300 g bez batérií Supply: 4 x AA batteries or wall adapter Speed: approx 17 cm/s
Programs
' {$STAMP BS2}
' {$PBASIC 2.5}
Counter VAR Byte
DEBUG "Program Running!"
Main:
GOSUB Forward
GOSUB Right
GOTO Main
END
Forward:
FOR counter = 1 TO 50
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT
PAUSE 200
RETURN
Right:
FOR counter = 1 TO 22
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT
PAUSE 200
RETURN
References
- [1] Andy Lindsay: Robotics with the Boe-Bot [1]
Links
Following are links for those who wants to know more:
Documentation
- Boe-Bot robot description (Parallax, Inc.)
- Robotics with Boe-Bot robot (textbook, Parallax)
- Boe-Bot on Wikipedia
Video
- Boe-Bot robot driving square (YouTube video)
- Boe-Bot robot roaming with whiskers (YouTube video)
- Boe-Bot robot roaming with infrared sensors (YouTube video)
Boe Bot Workshop