Rice-A-Robi
Simple Rice Removal
By Clint Bridges
It was one week before the 2001 Atlanta Hobby Robot Club's annual robot rally and I had no new robot to tout. During the past two years the robots I chose to build had taxed my sanity, my family, and my rapidly receding hairline. V-Maid required about 110 hours of construction time in 1998/1999 and Spherion consumed 330 hours in 1999/2000. I had made a decision to not build a new robot for 2001. However, a last minute call for more robots by the rally organizer and a little competitive urge and I was back in the basement digging for parts to pick up rice.
Rice-A-Robi is a 2-pound debris removal robot made from materials that were close at hand at the last minute- Lego's & a food storage container similar to Tupperware.
Eight AA batteries provide the juice needed to power the two drive motors, control circuitry, and pancake fan.
Figure 1- At just under 2 pounds this robot runs for hours on 8 AA batteries.
Figure 2- A v-shaped glide steers rice toward the fan.
The rice pickup mechanism consists of a v-shaped glide made from coat-hanger wire mounted to the bottom of the container. As the robot moves forward rice is drawn toward the fan by the v-glide. Once under the fan some rice immediately gets caught up in the blades and spun into the container. Other rice bounces from the agitated air under the blades and rebounds off the floor into the blades like Mexican jumping beans. The result is considerable rice pickup with a remarkably quiet and efficient system.
Three Lego motors are used in the system. One drive motor is connected to each of the left and right drive wheels. The third motor acts as a generator turned via a pulley by the left wheel to provide feedback to the PIC. A stalled condition is detected by sensing the absence of output voltage from the generator motor while the other two motors are being told to go forward. A 2 volt input range is set using a 10K potentiometer on the vref+ pin of the PIC. With the A/D converter set to 8 bit resolution a value less than 60 of 256 or about .47 volts indicates a stall.
Figure 3- Spinning blades from a salvage pancake fan fling and bounce rice into the container
I choose a Micro Engineering Labs 17C proto board to support the control circuitry. One output from the PIC toggles a small reed relay through a FET to turn the fan on or off under program control.
Figure 4- One analog input on the 17C756 monitors the generator motor output to sense a stalled condition.
The Program
DEFINE OSC 20 DEFINE ADC_BITS 8 ' Set ADC Result Bits to 8 INCLUDE "modedefs.bas" DDRG = %11111111 ' Set PORTG Pin I/O as Inputs ADCON1=%01010001 ' A/D Converter Ext-Ref+ Set to 2 Volts, FOSC/32, Right Justified VIN VAR WORD X VAR WORD X=600 DDRC = %00010010 ' Set PORTC Pin I/O high PORTC.0 'Left Motor FM high PORTC.2 'Left Motor Brake Active Low high PORTC.3 'Right Motor FM high PORTC.5 'Right Motor Brake Active Low high PORTC.6 ' Turn the FAN On low PORTC.7 Pause 500 ' Initialize and reset drive motors SEROUT PORTC.0,T2400,[$55,$00] ' Left Stop SEROUT PORTC.3,T2400,[$55,$00] ' Right Stop Pause 350 Running: ' Get the motors running SEROUT PORTC.0,T2400,[$55,$03,$AA] 'Left start with SETDC SEROUT PORTC.3,T2400,[$55,$03,$AA] 'Right start with SETDC Pause 350 ' Test for stalled motor ADCIN 3,VIN IF VIN < 60 then gosub Stopturn Goto Running StopTurn: SEROUT PORTC.0,T2400,[$55,$00] ' Left Stop SEROUT PORTC.3,T2400,[$55,$00] ' Right Stop Pause 350 ' Back up a little SEROUT PORTC.0,T2400,[$55,$01] ' Left Reverse SEROUT PORTC.3,T2400,[$55,$01] ' Right Reverse SEROUT PORTC.0,T2400,[$55,$03,$AA] 'Left start with SETDC SEROUT PORTC.3,T2400,[$55,$03,$AA] 'Right start with SETDC Pause 600 ' Set up for a turn SEROUT PORTC.3,T2400,[$55,$01] ' Right Reverse SEROUT PORTC.0,T2400,[$55,$03,$AA] 'Left start with SETDC SEROUT PORTC.3,T2400,[$55,$03,$AA] 'Right start with SETDC Pause X X=X-100 If X < 400 then X=600 SEROUT PORTC.0,T2400,[$55,$00] ' Left Stop SEROUT PORTC.3,T2400,[$55,$00] ' Right Stop SEROUT PORTC.0,T2400,[$55,$01] ' Left Reverse Back Pause 250 Return low PORTC.6 ' Turn the FAN Off STOP
Previous page: Publications & Presentations by members
Next page: Contests