AVR Controller Program

I've created a GUI for the robot controller chip, and can send messages to set a motor speed and get back speed data. Currently I am using a large capacitor as a load to simulate a motor, as it has a delay of several seconds to charge/discharge as I change the 'speed'. The Mac program sends a message to the chip, which then sends out a rectangular wave (PWM) of variable duty cycle to the load, which changes voltage slowly in response. Both the PWM and the following voltage are shown on the scope display in the upper center. The voltage then goes into a signal generator VCO to change the frequency of a square wave which is sent back to the chip. This simulates the motor speed as if detected by an optointerrupter and rotating disk mask. This square wave is then counted by a timer on the chip and periodically sent back to the Mac program. External interrupts (buttons) can also be intermixed in the message stream, all of which is asynchronous and handled by interrupt code on the chip. The Mac program uses a separate thread to continuously monitor messages from the chip. The Mac program is also now operating on an Intel Mac.

I've got some motors, optoisolators, and various transistors that I will shortly use to build an electrically isolated motor driver circuit (e.g. bidirectional H bridge). The shaft of the motor will be connected to a rotating disk with cutouts which passes through an optointerrupter connected to a Schmitt trigger to send speed data back to the chip (currently the signal generator does this). I now need to close the feedback loop by writing a program that attempts to set the speed of the motor and keep it there during variable loads. The next step will be to do the serial radio link, which may be a Bluetooth or ZigBee module interfaced to the chip via SPI or I2C.

At this point I could interface the current EEG robot simulator software (which animates a little robot turning left and right in response to realtime classification of EEG signals) to the chip to send out two commands. I will eventually have to rebuild some EEG acquisition hardware (using a similar microcontroller chipset and instrument amplifiers), and will need to buy a Mac laptop in order to run the system without AC power. Since all new Apple computers are now Intel-based, I wanted to make sure that the software and hardware would work OK with an Intel system.

İSky Coyote 2006