Saturday, 22 September 2012

Wireless mesh-able RGB lights and a ATMEGA88

I thought I might test out using the Atmega88p-20au instead of the Atmega168 as a processor for my RFnode. The Atmega88 is a cheaper version of the Atmega168 with only half the flash. 

I had tried using a Atmega8 before but found it did not run too stable at 3.3volts which I need to do to support USB. The Atmega8 datasheet said it  needs 4.5 - 5.5 volts but I was going to give it a go anyway, It did work but I found that about 1 in 5 times I when flashing it I would get an error and would have to retry.

Reading the datasheet the Atmega88 is identical to the Atmega168 with the main differences being just the amount of flash/ram. So hardware wise I did not need to make any changes except the IC but from a software side I did have to change my code a fair amount to get it down to 6KB. The Atmega does have 8KB of flash but I am using 2KB of that for the bootloader.  

After removing all the sleep/watchdog functions and cutting back the meshing support I was able to get my code to less then 6KB and still be left with a wireless mesh-able RGB light with a just enough code space left to added a few basic sensors. 

This version of the board I made it easier to add a STA301A so it would be easy for me use this board to drive brighter and more power hungry lights or devices around the home and have them all wirelessly controllable from my tablet/phone. 

1 comment:

  1. Hey dude, did you ever post any code for this? I'm currently building some home automation stuff and can't seem to settle on a mesh protocol to use with the 'mega328s I'm using. Would be interested to see how you did your mesh.