WILL-I
This was my first robot. WILL-I.
The robot is controlled with an Atmel ATMega8 running on internal oscillator at 1MHz. It uses 3 microswitches and a servo rotated Sharp infrared distance sensor to detect the environment. The AVR is programmed in AVR-GCC with WinAVR+AVR Studio.
The code is very simple. The robot waits until a microswitch is pushed. Than goes forward until it detects that an object in front of it is less than approximately 10cm away (the measured ADC value is greater than 200). Than looking left, measuring the distance of any possible object, looking right and measuring the distance again. When finished with the measurements, it turns in the direction where there is no object found. If one of the microswitches at the end of the arms hits something, it generates an interrupt, and the robot reverses for a short time, than turns the opposite direction.
The schematic of the final version of WILL-I is here: LINK
The AVR-GCC code is at the bottom of this webpage: LINK
The motor.h (dcmotor.h) motor controller code is here: LINK
A small vidoe showing WILL-I in action is here: LINK
P.S.: Sorry, but the linked webpages and the comments in the codes are in Hungarian...
This online Hungarian-English dictionary might help: LINK
Avoid obstacles via Sharp IR rangefinder
- Actuators / output devices: Tamiya twin gearbox
- Control method: Autonomous.
- CPU: atMega8
- Power source: 4 AA batteries + 9V battery
- Programming language: AVR-GCC (WinAVR)
- Sensors / input devices: SHARP IR sensor
- Target environment: indoors