This robot can move around on a tabletop without falling off the edge. Its smarts are provided by an AVR ATTINY microcontroller. It uses two edge sensors composed each of a discrete IR transistor and a discrete IR LED. The controller board is built with the idea that it could be re-purposed for other robot configurations.
Both laser cut and scroll saw / drill versions are included in this instructible.
The video below shows the Tiny Wanderer in action:
The Dallas Personal Robotics Group (DPRG), founded in June of 1984, is one of the nation’s oldest special interest groups dedicated to the development and use of personal robotics. DPRG members are interested in autonomous robots, movie replica robots, vintage robots, robot and kinetic art, as well as just about anything involving electronics, technology, or science.
The DPRG invites you to come visit if your travels take you to the Dallas, TX area. They meet every Tuesday night and every 2nd Saturday of the month,. see http://www.dprg.org for location details.
Step 1: Materials
1 -- switch with 200 mil pitch leads
1 -- 0.1 uF capacitor
1 -- 100 uF capacitor (it can be a larger capacitive value)
1 -- diode (almost any will do)
1 -- 10K ohm resistor
1 -- 150 ohm resistor
2 -- 100K ohm resistor
1 -- strip of single row 100 mil pitch pin connectors that can be broken apart
1 -- 2x3 100 mil pitch double row pin connector (6 pins)
1 -- AVR ATTINY 85 micro-controller (ATTINYs with less memory could also be used)
1 -- DIY PCB board or proto-board
Robot Chassis :
2 -- 11.5 x 12 inch pieces of either 1/8 inch Masonite or acrylic plastic (Plexiglas)
2 -- 12.5 inch pieces of 0.175 inch window screen spline
18 -- 5/8 inch #4 screws
14 -- 3/8 inch #4 screws
18 -- #4 washers
32 -- #4 nuts
2 -- small tie wraps
1 -- o-ring or window screen spline o-ring that fits the outer race of the inline skate bearing
2 -- inline skate bearings
2 -- 1 inch long 5/16 inch bolts
2 -- 5/16 inch nuts
note: if you are making the scroll saw / drill version of the Tiny Wanderer you will also
need several 5/16 inch washers and some #4 nylon washers or spacers.
2 -- continuous rotation regular size hobby servos (ex. Parallax or Pololu continuous hobby servo,
the robot in the video is using modified T PRO SG-5010 -- not recommended for the beginner)
1 -- four AA battery holder (original used a 2x2 holder with a 9V style battery clip from Radio Shack)
4 -- AA batteries
1 -- piece of Velcro to attach battery case to chassis
2 -- 940nm IR LED (ex. LTE4206 -- available from BG Micro)
2 -- 940nm IR photo transistor (ex. LTE4206E -- available from BG Micro)
note: Radio Shack part 276-0142 - IR Emitter and Detector will work for the the parts above
2 -- DIY PCB sensor boards or small pieces of prototyping board
2 -- 3 pin single row 100 mil pitch pin connector
2 -- 10 inch, 3 wire ribbon cable with 3 position single row female connector on each end
Step 2: Mechanical Layout
The original Tiny Wanderer was cut out on a laser cutter, however a scroll saw / drill version is also provided in the files below. The files are .svg format. They can be opened with Inkscape. Inkscape is a free open source vector drawing program.
The scroll saw / drill version simplifies the nut capture technique by using a drilled hole for the nut capture and for the end of the slot. This version also eliminates any holes not necessary to the Tiny Wanderer design.
note for scroll saw version: If you want to get fancy, you can make 1/4 inch cross dowel nuts, but a normal #4 nut works fine.
Masonite (hard board) or Acrylic Plastic?
Making the Tiny Wanderer using Masonite has several advantages over materials like Plexiglas. The original Tiny Wanderer started out being made out of acrylic plastic, however unfortunate mishaps eventually resulted in many parts being replaced with Masonite.
Masonite Advantages :
1. It is about 1/10 the cost.
2. it is easily obtained.
3. It is stronger.
4. It is very crack resistant and less brittle.
5. It is easier to work, especially on a scroll saw.
Acrylic Plastic Advantages:
1. It is cooler looking.
2. It can be obtained in different colors.
Step 3: The Controller
Attached are all the KiCAD files needed to build or modify the PCB boards (both controller and sensor boards). A PDF of the copper side and the front silk-screen masks are also included.
The DPRG has a very detailed video of a presentation that actually does a demo of making a PCB using the toner transfer method at http://www.dprg.org/tutorials/2011-02a/index.html . The nice thing about this particular tutorial is that it discusses the problems that you are likely to run into. It is however, somewhat long.
note: The resistor location in the sensor board should be jumpered, since the main board already has a current limiting resistor.
Step 4: The Code and How the Sensors Works
How does the sensor work?
The cliff sensor is composed of a discrete IR LED and a discrete IR photo NPN transistor. Both parts are tuned to 940nm. They are mounted side by side on a DIY PCB board. The transistor is shielded from side light by a short piece of heat shrink. The anode of the LED is connected to an general I/O pin on the ATTINY with a current limiting resistor in series. The collector of the transistor is connected to an ADC pin on the ATTINY. The collector also has a pull up resistor connected to Vcc. In the firmware, the pin is measured twice; once with the LED turned on and once with it turned off. The signal used to make a decision is the absolute value of the difference of the ADC readings between the two measurements. It is compared to a trigger level. When you reach a cliff the difference will be small. On the table the difference will be large.
Step 5: Assembly
How to make window spline tires for Masonite or Plexiglas wheels is shown in the instructible located at:
Step 6: Tuning
The alternative is to tune the robot's behavior in the firmware, to at least minimize the possibility of backing off the edge.
One Possible Strategy:
If the left sensor (you facing robot front) finds the cliff, back up in a fairly tight arc to the right, turning approximately 120 degrees.
if the right sensor finds the cliff, back up in a shallow arc to the left of approximately 30 degrees.
Extend the left sensor beyond the right when viewed from the front by about 1/2 inch.
This strategy will cause the robot to correct its attack of the edge when the right sensor finds the edge. The left sensor will cause a large change in direction (generally move towards another edge of the table). The robot will move CW around the table.
There are many other strategies that can be pursued.
Step 7: What Next?
1. Change the IR sensor configuration for line following.
2. Add paper encoders to the inside of the wheels and use the IR sensors
to track servo speed and perform dead reckoning calculations.
3. Use different sensors for other information (light, sound, distance, etc).
4. Use controller board independently as servo tester, pan/tilt, etc.
1. Servo zero calibrator mode in the initiation state.
2. Table top surface calibrator in the initiation state.
3. Servo forward / backward speed adjustment in the initiation state.
1. Timing loop to do all ADC tests in a single servo 20 m Sec period.