"R4" (Reconfigured Robot Rally Roomba)
Transcription
"R4" (Reconfigured Robot Rally Roomba)
"R4" (Reconfigured Robot Rally Roomba) Specifications Chassis: Processor: A cannibalized “iRobot Roomba” (model: 4110) vacuum cleaner. All Roomba components were taken out except the motors, H-bridges, wheels, encoders, and 4 cliff sensors. Arduino Atmel Mega 1280 Digital I/O: 54 (14 PWM) Analog I/O: 16 Weight 5.6lb Diameter 14” Height 6.25” Power 16 AA batteries. Max speed (calculated) = ((2.56”*pi)* 138rpm)/60 = 18.5 in/sec 1st year competing R4 Outfitted with the following additional components: Four Infrared Proximity Sensors Short Range - Sharp GP2D120XJ00F Two Ultrasonic Range Finder - MaxBotix LV-EZ3 Homemade infrared line following sensor array (5 sensors) Deployable plow Event Sensor or component utilized for event Beacon Killer: Pololu IR beacon transceiver pair. Beacon Killer w/obstacles Pololu IR beacon transceiver pair. Four Sharp infrared proximity sensors for object detection Dead Reckoning: Onboard Roomba incremental encoders Line Following: 5 homemade IR line sensors Bulldozer: 4 onboard Roomba cliff sensors. 4 Infrared Proximity Sensors for object detection Expandable Plow wings The build report can be downloaded at www.Atlanta-Robotics.com This project was to build a robot to compete in the Atlanta Hobby Robot Club’s (AHRC) “Robot Rally” Polyatholon competition. The iRobot Roomba platform was chosen partially because of cost and time restraints but most of all to provide amateur robot builders with a base model and tutorial to help get them off the bench. Since the Roomba is basically a motorized chassis hopefully it will remove the intimidation that some DIY’ers might have when wanting to build a similar robot. This Roomba model 4110 was bought at a garage sale for $20. You can find several deals like this on used Roombas at online auction sites pretty cheap once the original owner’s battery no longer holds a charge and they are tired of it. I like to replace the battery with a bank of AA’s anyway, plus the empty pocket where the Roomba battery went is a great place to put a set of line sensors. The Polyatholon the R4 was designed to compete in the following 6 events: Basic Line following o A basic oval shape made with ¾” electrical tape on a white foam board. Turn radiuses are no less than 6 inches. Lines will be at least 8 inches from the edge. A time limit of 90 seconds will be imposed. Failure to complete the course within 90 seconds will result in a score of zero o Fastest time wins Advanced line following o Course will have intersecting lines and 90 degree turns. Non-intersecting lines will be spaced apart greater than 8 inches. Intersections will be 90 degrees. The line the same tape used in the basic line following event and will be at least 8 inches from the edge. A time limit of 90 seconds will be imposed. Failure to complete the course within 90 seconds will result in a score of zero o Fastest time wins Bulldozer o Push 5 objects off a table in the least amount of time without driving off the edge. The objects to be pushed are 3.5” long sections of 3.5” OD white PVC pipe standing on end. The surface is a 2.5’ x 8’ folding table 3.75 inches above the floor. There will be no line marking the edge. Robots must detect the 3.75” drop-off to avoid falling off. Robots may use optical, mechanical, sonar, or other sensors to detect the edge. There is a 5 second delayed start. Robots start behind a line that is 18 inches from the end of the table. All objects are on the other side of the line. Time starts when the robot moves and stops when all objects are pushed off. Time limit is 90 seconds. If the robot runs off the table before pushing off all objects the time defaults to 90 seconds. A time penalty of 10 seconds is imposed for each object left on the table after time expires or the robot falls off. Navigation by dead reckoning o Travel 3 legs of an equilateral triangle in a clockwise direction and arrive back at the starting point. Scoring is based on how close the robot is to the original start position. The robot must accurately measure distance traveled and angle of turns to succeed. The triangle sides are 4 feet. There are no lines. Robots must touch imaginary 8.5 inch diameter circles at the intersections of the 4’ sides. The contestant must define the reference point on the robot which will be placed over the starting point and used to measure the offset distance when finished. 2 minute time limit. Beacon Killer o Travel 10 feet to make contact with a beacon from a random start orientation in the least amount of time. Contestants may supply his own beacon or use the Atlanta Hobby Robot Club’s Cube Quest white light beacon. The robot will be placed 10 feet from the beacon pointed in a random direction. All contestants will be placed in the same direction. Robots will have a 5 second delayed start. Time starts when the robot starts moving and ends when it touches the beacon. Robots have a maximum of 60 seconds to complete this task. Beacon Killer with obstacles o Travel 10 feet to make contact with a beacon from a random start orientation in the least time without moving obstacles. A time penalty will be imposed for each obstacle moved. Five to twenty objects may be placed in the area between the robot and the beacon. They will be at least 2 feet apart, edge to edge. The objects will be 3.5 inch sections of 3.5 inch OD white PVC pipe standing on end. The position of each objjext will be marked with a small marker. Markers will be about 3 inches in diameter. Moving an obstacle more than ¼” will expose the marker. A 10 second time penalty will be applied for every marker that is exposed after the run. Robots have a maximum of 90 seconds to complete the task. This build report, videos and other related documents can be downloaded at my website at www.Atlanta-Robotics.com. Since pictures get the message across so much better than descriptions I have tried to take pictures of everything. This document is a work in progress and will be updated soon. Without any further preliminaries, let’s start talking Roomba. R4 OVERVIEW DISSASEMBLY OF THE ROOMBA AND CHASSIS CONSTRUCTION_______ First off, here is a good video to get started with the disassembly of an iRobot Roomba http://www.dinofab.com/roombahack.html All of the vacuum components were taken out of the bot. All unneeded wiring was clipped off and some plastic had to be drilled and cut to get the chassis ready for its new purpose. The Roomba motherboard was used only for motor control. The only wires I left on the board were the motor power wires. I then soldered on the control PWM wires to the transistors on the board that control the motors. This procedure is shown in the above link. Here is a very helpful hint if you do not cannibalize stuff like this often. DO NOT clip wires off right at the connector, leave at least 1 inch of wire remaining in case you made a mistake and need solder them back together. Even better if you can just disconnect the wires and zip tie them out of the way even better. You can see in the following pictures that I did just this until I knew I was not going to need them. Now that everything is off I needed a new floor plate platform to put all of my components on. I had a sheet of ABS plastic that would work perfect for this. The CAD drawing I made for this plate is shown below. I also had to clip off several plastic bosses and tabs for the correct fit. The CAD .dxf file can be downloaded from my website (www.Atlanta-Robotics.com) along with this document. Now with the plate installed I can drill and mount anything I want at my discretion. R4 floor plate Removal of tabs to accommodate new floor plate Removal of plastic to accommodate new floor plate Finished floor plate installed I used two ping pong balls as front and back slider wheels. Ping pong balls are perfect for something like this. They are cheap, easy to cut and mount, have low friction, and pass over small obstacles without any issues. Try and mount these in the center of the bot to avoid any left or right drag. The batteries are mounted on the bottom which is a perfect place to put them. This allows more electronic room on top of the bot. MOTORS AND WHEELS_______________________________________ The motor power comes directly from 12 AA NiMH batteries in series which supplies 14.4V, the original Roomba battery voltage. The 5volt TTL power for the rest of the electronics comes from another set of 4 AA Alkaline batteries which gives 6V. The pictures above show the turquoise SPST limit switch to detect when wheel falls off an edge. The Roomba wheel swings out from the bottom of the chassis if it is not on the ground. These were not used on the R4 though they are still available if needed in the future. They can be easily wired up to an input of the microcontroller. Drive motor in chassis shown on left and removed from chassis shown on right. Drive motor cover taken off exposing encoders Here shows the 42 tooth encoder wheel and drive belt cover removed from the drive motors. You can see the o-ring drive and encoder wheel. The IR LED transmitter and receiver are shown in each picture. The brown and blue wire pair goes to the transmitter and the gray and black wires go to the receiver. They are facing each other when assembled and as the encoder wheel turns it breaks the light beam. This signal is captured by the Arduino Mega inputs using an interrupt routine. Make sure there is no dust or debris in this area since it will affect the encoder Since the encoder wheel is coupled very close to the motor and before the gear box it spins much faster than the wheel, giving is much more accuracy as an odometer or speedometer. The pulley on the motor was measured at xxxx and the pulley at the encoder was measured to be xxxx. This gives a reduction ratio of xxxx. Access to the gear box is on the other side of the motor and is shown below. Reverse side of wheel assembly with cover on and off. The other side of the motor has a cover shown above on left. Be careful taking it apart, there are small pieces that can fall out. Under the wheel shows the housing for the gear box. It is a planetary gear type as shown in the following two pictures. The gear ratio is xxxx and coupled with the belt gear ratio equals xxxx. Wheel removed Planetary gears of the drive wheel Above shows the circuit used for capturing the encoder pulses. Pin 20 on the Atmel microcontroller is used for interrupt number 3 and pin 21 is used for interrupt number 2. The snippet of code below should give you insight as to how it is captured. For the navigation by dead reckoning event the encoders are how the bot knows where it is. The basic routine for the dead reckoning event was to go straight for a certain number of encoder pulses, turn a certain number of pulses, go straight, etc… Because of the sloppy wheels the R4 did not perform very well in this event. attachInterrupt(2, ENCODER_PULSE_L, RISING); // interrupt #2 is on pin 21, watch left encoder for rising pulse attachInterrupt(3, ENCODER_PUSLE_R, RISING); // interrupt #3 is on pin 20, watch right encoder for rising pulse // ENCODERS // void ENCODER_PULSE_L(){ count_l++;} void ENCODER_PUSLE_R(){ count_r++;} Incremental encoder signal. Below explains how I lined up the wheels. The alignment is important for the “Navigation by Dead Reckoning” event. If the wheels are not straight the bot will veer to one side. I used a couple squares and laser level for this procedure. I turned the bot upside down and got it as square as I could with the drywall square I taped to the table. Then I used another smaller square to slide the laser level from one wheel to another. Once the wheels were lined up I used hot glue to secure them in place. The Roomba wheels are naturally too loose and wobbly so there is a great lack of accuracy. More development will come later on this. CLIFF SENSORS______________________ _________________ The cliff sensors that come with the Roomba are used for the bulldozer competition. There are four sensors on the front of the Roomba. These sensors are just an IR emitter and receiver. If the sensor does not see anything then it is at the edge of the table and must stop or back up. The Eagle schematics are shown below of how I wired them up to the Arduino microcontroller. I also acid etched a board for this. After drilling some new holes for the wires to go through I put the new board I made where the original Roomba battery went, this is a nice pocket to put items like this. This Eagle file can also be downloaded from my web site. Here a helpful hint: use a digital camera like to one on most cell phones today and look at the IR LED to see if it is on. Most cameras can see higher frequencies than our human eyes can see. You can test this out by aiming a TV remote at you camera and pressing any button. Schematic of cliff sensor array Eagle board layout on left and etched sensor array on right Cliff sensor bar removed from Roomba Cliff sensor removed from sensor bar. Sensor array shown on Roomba LINE SENSORS______________________ _________________ Good line tracking links below. http://www.ikalogic.com/tut_line_sens_algo.php http://www.chibots.org/?q=node/339 The line tracking sensors used were made from simple a simple IR LED and IR phototransistor. The 5 pink colored LEDs emit the infrared light down at the floor and the 5 dark LEDs sense the reflections. The emitting IR LED was from Digi-Key (PN# QED223-ND) and receiving IR phototransistor was also from Digi-Key (PN# QSD123-ND). The receiver is usually the dark one because the dark plastic blocks ambient/visible light and the infrared light is able to pass through this type of plastic and triggering the light sensitive transistor inside. Aim you TV remote at a digital camera or cell phone camera and you can see the IR light passing through the black plastic. Line Sensor Board Below is the Eagle schematic of the line sensor array. When the LED is over the black line the signal is XXXXX when it is over the white foam board the signal is XXXXX. The code used for determining where the line is under the bot is based off of the “Centroid Algorithm” developed by Kirk Charles of the Atlanta Hobby Robot Club. Line Sensor Array Schematic R4 competing in advanced line follower BULLDOZER________________________ _________________ The description of how the robot does not drive off of the table for this event is described in the Cliff Sensor section above. Since the Roomba is round it does make for a good plow so plow wings were added for this. The rules for this competition state that the bot must fit within a 12”x12” box or a 14” circle but arms or manipulators can extend out after the event starts. The arms and bot must fit within an 18” circle at this point. The plow wings were Aluminum pieces of sheet metal attached to some hinges. A torsion spring was used to keep them extended while plowing. R4 with plow wings extended The plow wings were held in place by a cotter pin tied to a rotary arm motor with some fishing line. The rotary arm motor is in the center top of the bot and rotates back 180 degrees and pulls the pins up allowing the plow wings to deploy. The motor arm moves fairly fast so I decided to use PWM so slow it down. This motor is controlled by a Toshiba TA8050P 1.5A MOTOR DRIVER WITH BRAKE FUNCTION chip. This is a very simple H-Bridge on a chip. I send it a 70% PWM signal to the direction 1 pin once the event starts and then on pin 2 to reset the motor when I change modes for the bot. Plow wings in action for the Bulldozer event BEACON___________________________ _________________ I used the Pololu IR Beacon Pair (PN# 702) for the “Beacon Killer” event. The pair consists of two of the same units and can be used for two robots to avoid or find each other. Each module has six IR pulsed emitters (56kHz) and four IR receivers. The one placed on R4 was used solely as a locator and the one placed on the D-cell battery pack was used solely as a beacon. The beacon locator only has the capability to determine if the beacon is located forward, aft, port or starboard from the bot. The beacon was placed at the highest point on the bot so nothing will get in the IR transmission path. http://www.pololu.com/catalog/product/702 The two Maxbotix sonar sensors on the front of the bot are for long range path planning during the “Beacon Killer with obstacle avoidance” event. The four IR sensors on the front are for short range avoidance of obstacles. Beacon locator on left and beacon on right I don’t think iRobot will be able to help me with my Roomba anymore. To add: pics of 14” and 18” circles with R4 within specs. DIP switch modes. Gear ratios Test top speed