This page shows a complete wireless system running from batteries. This is also the first time I've used one of the AVR microcontroller chips on the breadboard rather than on the development board. The following photo shows an ATMega16 powered by a 9V battery and a 7805 voltage regulator, and clocked by a 3.6864 MHz external clock:
The chip is running a simple program that increments a register twice a second and sends two bits of the count to the leds. I chose an ATMega16 rather than an ATMega32 because I had one, and because if I was going to fry one I'd prefer it not to be one of the ATMega32s. The ATMega16 and ATMega32 are pin-compatible. The ribbon cable is for programming the chip. Eventually, the chip can also be programmed via the radio, using the bootstrapping feature of the AVRs.
The next photo shows the chip interacting with the radio. The Mac is sending bytes, the chip increments them and displays 2 bits on the leds, and sends the results back to the Mac. The led near the radio indicates a connection:
Here is the entire system hooked up and running:
This setup includes the radio, microcontroller, motor control board, and two motors. The radio and AVR chip are powered by a 9V battery, and the motors are powered by the 12V AA packs. The two electrical systems are isolated optically. One of the motors is hooked up to a wheel and optical sensor which provides speed feedback. In actual use, both motors will be connected to drive wheels of the robot, and speed sensors will be attached to each wheel. The direction and speed of each motor can be set independently.
Here is a closeup of the connections to the motor electronics:
Here is a closeup of the connections to the microcontroller:
Here is a closeup of the connections to the radio:
Here is a screenshot of a simple GUI program to control the motors. Each motor's direction and speed can be set with the sliders or text fields at top left. The feedback from the optical sensors is indicated in the plot and fields at bottom left. Only the right motor sensor (blue) is currently in use:
In this particular program, there is no active feedback maintaining the speed of each motor. To see examples of active feedback, see the previous 6/15/06 and 6/8/06 pages. In actual use, both speed and distance feedback will be used to navigate the robot. The next step is to create another circuit board for the radio and microcontroller electronics.
İSky Coyote 2006