Thursday, April 30, 2009

Code on github

git is a really interesting way to do source control and github.com provides a free git server.

I've moved my AVR code to github to make it more accessable. Find it here.

Sunday, April 26, 2009

Phototransistor speed


I tried a phototransistor instead of an LDR. Look at the speed difference! The scale here is different (far faster sampling) which means that the phototransistor is at least 50x the speed of the LDR.

I'm designing a multi-channel colour sensor which will have 4 colour sensors controlled by a single AVR ATMEGA48.
* Each sensor has 3 LEDs red, green, blue.
* Each of these LEDs is turned on in turn, the ADC is then sampled approx 4 times and some filtering is done on the returned signal. The signal is then corrected for differences in phototransistor sensitivity etc by applying a simple gamma correction to give reasonably matched RGB values.

Using phototransistors should make this all fast enough to operate 4 channels at 100Hz or so.

100Hz sampling should be fast enough for an NXT robot.

Monday, April 13, 2009

Make your own Lego NXT sensors

Just finished putting together a presentation for the Christchurch Robotics Group on making custom sensors for the Lego NXT.

Making resistive/switch sensors is very simple, but one of the sensors is an AVR-based I2C sensor which puts all the flexibility of a microcontroller in the sensor. More info on that to be posted later.

Presentation pdf and code for the micro here.

Update: Code is now on github.