Projects/Skipbutton

From Hackerspace Amersfoort
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Internals.JPG
Project Skipbutton
Name Skipbutton
Start 2011/07/01
End 2011-10-10
Contact Bobo1on1
Website
Information Skipbutton remote
Status Production


At Bitlair, we have a computer playing music using mpd and fookebox. Bitlair members can queue new songs and skip to the next song using the fookebox http interface. This is a very practical system, but for the sake of overengineering, a better solution had to be found.

After several months of hard overengineering, we from Bitlair, bring you the skipbutton:

Button.JPG


Whenever a member smashes on the big red button, a command is sent to our music server over a 433 MHz link, which is then received by a daemon running on the same machine. That daemon then queues the next song on fookebox using some curl hackery.


But wait! There's more!

Button2.JPG

See that small black button on the front? That's for controlling mpd's volume. There's one on the other side as well.


Internals.JPG

Inside sits a 9 volts battery, an arduino pro mini with some additional components, and a 433 mhz transmitter.


Receiver.JPG

The receiver uses a Yagi-Uda antenna tuned to 433 MHz, the antenna is placed on top of our server rack and is pointed at our main area, a directional antenna was used because there's no room inside the skipbutton for a good antenna, and using an external one defeats the whole "wtf is that?" idea. The skipbutton works in the entire hackerspace, in our garden where we do a lot of bbq-ing, and about 30 meters beyond that (oops, we probably didn't need the yagi after all).

Do you see that small pcb in the middle of the antenna? That's the receiver itself. The white cable carries 5 volt from usb to power the receiver, and the receiver's data output to the rs232 port. The receiver outputs a TTL signal (0-5 volts), but most serial ports accept that perfectly ok (I've never come across one that doesn't). The skipbutton only turns on the transmitter when a logical 0 is transmitted, which creates a high output on the receiver, whichs corresponds with a logical 0 on rs232, so the receiver can be connected directly to the rs232 port without any additional components (yay!).

The antenna is based on this design:

Yagi433.jpg


The arduino and transmitter receive their power from a 9 volts battery, through an IRF9520n P-channel mosfet. Each button is wired to pull the mosfet's gate to ground, and to pull an arduino pin to gnd, using diodes. This way the battery only drains when a button is pressed (ignoring some extremely small leakage current), this considerably prolongs the battery life. When the arduino starts running, it turns on transistor Q4, this keeps the arduino powered until all data is transmitted, the arduino then turns Q4 off, if no buttons are pressed at that point the arduino will lose power and turn off.


The default bootloader on the arduino checks for incoming data on the usart for about 1 second before starting its program, this is not very good for our use, because that would mean you would have to hold a button for at least one second before any command is transmitted. The arduino bootloader was modified (some lines uncommented) to start the program immedately on power on if pin 6 is high, this can be selected with a jumper.

The modified bootloader, arduino program and linux daemon sources are available on github: https://github.com/bitlair/skipbutton


Schematic:

Skipbutton schematic.png