Wednesday, September 26, 2012

Wirless Buzzer


So a friend of mine, told me if i can help him create a wireless buzzer, at first i thought yes it should be simple, but then i started working on it. First problem was beining down the cost. If i had used something like Zigbee or bluetooth, my work was less, but then it was cost prohibitive. I can use a Transmitter Reciever pair to lower cost, but it adds complications off handshake ACK SYN etc. So the other option was to use a transceiver. Sparkfun has a Nordic version of it. It had everything required, error handling, multiple retries etc. But then at $20 it was expensive. I almost finalized this, then i came across JeeLab JeeNode. This was exactly what i was looking for. But then i dont want to buy this, because it will again increase my cost. So after digging into it, i found that it uses a RF Transceiver called RFM12B. This was great, i can now use Arduino and hook it up to RFM12B and use SPI to get to work. There is also some code available from JeeLab to get this to work. So i got the final cost down to $15 and here is how i propose it will work


Each buzzer will have the following wireless modules:


You can use any of the port from 6-13 to connect to a buzzer and light.  Also note the ATMEG also need to be powered and crystal needs to be added

It can be programed using AVR or Arduino if we have the arduino boot loder insallted

Following is how the power circuit will work

The central controller will have the above circuit. The logic behind the code should be something like this

1.     Define a structure on how code will be received from slaves/buzzer. Something like
a.     When key is pressed pass :SL{1}
where ID is a buzzer number and 1 means on
2.     The master will look for above patter, while slaves will ignore the above pattern
3.     As soon as the master receives this, it will stop looking for more, and transmit a new ACK, something like
a.     :MA{1}
4.     The slave will also monitor for the above pattern, and master will ignore. Once it receives this pattern, the slave will check if the ID matches its ID, if it does it will turn ports 6-13 high, which will turn on the light and buzzer. We can keep the buzzer high for sometime if we don’t want it to on always
5.     In the master you will coneect an input to one of the ports 6-13, and when a button is pressed, the whole thing is reset. It will broadcast something like
a.     :MA{0}:
6.     All slaves will accept the above message and reset itself and go to sleep
7.     When the button is pressed, the salve will turn on and go to step 1

No comments: