This is my first autonomous robot. I built it to explore the interfacing of various sensors to a PICAXE processor. His mission is to search for a magnet (South pole) via his Hall-effect sensors and avoid obstacles via 2 IR reflectance sensors (one looking forward for walls and the other looking downward for cliffs).
The robot's protocol is: go forward until you find a magnet or encounter an obstruction respond to obstructions by stopping, backing up, turning and resuming search. if magnet is found, stop and flash green LED.
Step 1: Gearbox Assembly
The Tamiya 89915 Twin-Motor Gearbox comes from Pololu as a kit. You have a choice of 58:1 or 204:1 gear ratios (I chose 204:1 for 61 RPM operation). I find just assembling these gear boxes to be a lot of fun. Then I added the Pololu round laser-cut chassis and caster kit. The nice thing about using this chassis is that I did not need to drill a single hole, it comes with all kinds of holes and slots. A lot of engineering went into even the caster kit, which has 3 height options (I used the tallest one). With all of these pieces you have a differential drive 2-wheeled robot.
Step 2: Sensors
A remote-controlled robot replies upon the operator's senses; but an autonomous robot must have sensors of its own to engage its environment. This robot has 2 IR (infra-red) digital reflective sensors (meaning their output is either high or low, making for easy integration into a micro-controller's ports). One IR sensor is forward looking: it sends out a modulated beam of light and will go low if the amplitude of reflected light corresponds to a distance of 10cm or less. This one will be used to keep the robot from running into walls. Another IR sensor will be positioned downward to look for cliffs (i.e. the edge of a table or other surface) so the robot does not run over it. Then, behind the robot is a low shelf with 6 digital Hall-effect sensors that detect magnetic fields. I wired all 6 in parallel, so that if any one sensor goes low the whole Hall bus goes low to the PICAXE port.
Step 3: Sensor Distribution
Logically, the downward-looking sensor was placed up in front of the robot so it would detect a fall-off before the wheels went over the edge. The forward-looking sensor was placed on a mast to avoid being triggered by the robot itself. The Hall sensor array 'plow' behind the robot in hopes of finding the magnet (which is the target goal of this project).
Step 4: Control Circuit Schematic
This is a classic PICAXE-18M2 micro-controller circuit interfaced with a dual H-Bridge to run the motors. The micro-controller runs on 1.8 to 5.0VDC; (you can destroy the chip with a direct connection to the 6V battery pack!) I used 2 series diodes to reduce the battery pack voltage to below 5V. The H-Bridge, pin 8, has a connection directly to the 6V battery pack to give the motors everything this robot has.
The PICAXE Basic code is attached: [Link]
Step 5: Parts List
Parts list: [Link]
The cost of this robot was @$85. The sensors account for 30% of that.
Step 6: Video of Robot in Action
Step 7: Thanks for Visiting!
Here is my main blog list; you can use it to contact me and to see my other interests (kayaking, camping, electronics, plant identification, sea beans, etc.)