The PANIC Button

Ok, bit of explanation first.  We have an iMac set up as a 'democratic jukebox' at HAC:Manchester.  The idea being that anyone can put music on it, and it plays the entire library on shuffle during our hack sessions for a bit of background music.

The problem is, of course, some people have an... odd taste in music, so sometimes the jukebox ends up flipping between Aqua and Cannibal Corpse for ten minutes, and the horror of this was just too much!

Enter the PANIC button.

 

The button uses a minimus board. The minimus is a carrier for the AT90USB162, an AVR microcontroller with onboard USB hardware, which means it can be programmed to show up as any USB device.  Before getting the button I modified one of the pieces of LUFA demo software, a media keyboard, and stripped it down to just read the one button on the minimus.  When the button is pressed, it sends the keycode for next track. 

The button's housing is a joke button that played an alarm and flashed when pressed, I ripped its guts out to get to the switch.  After finding the switch contacts on the original board, i soldered on two wires to connecto to the AVR.

Next,  I stripped off the USB connector  from the minimus, and added a 1m USB lead directly to the pads, to make it fit in the old speaker housing section of the button.  I connected the leads from the button to PD7 and GND on the minimus, the same as the onboard button.  This has the handy side effect that if the button is pressed while being plugged in, it boots into DFU mode, allowing me to upgrade the firmware easily.

I cut a slot in the casing for the wire to escape, and added a couple of cable ties for strain relief.

Press Button, Song Skips, Panic averted!

 [Download Code] - AVR C

Dealextreme: Cheap GPS modules & Buyer's Guide

Found these the other day, may be handy for anyone doing something they want GPS assisted. I'm considering the em-411 for the quadcopter's GPS assist (as its the only self contained unit).

Datasheets

http://www.globalsat.com.tw/manual.php?menu=3

Hints for buying from DX:

  • The prices are including shipping!
  • If you're getting lots of things, do it in smaller orders. DX get everything you order shipped to them, then package it all up and ship it to you. Smaller packages means you'll get some items far quicker.
  • Dont browse, you'll end up spending about £900 if my experience is anything to go by :P
  • Some of the stuff will be fake, or crappy, but its largely cheap enough you can forget about it.

Other Cool stuff

Speak and Spell - Keyboard Matrix

Tonight i spent some time at HAC:Manchester reverse engineering the keyboard matrix on our speak and spell, in preparation for hooking it up to an MBED.  Since nobody else has released this information (as far as i can tell), here is the pinout:

pin 3 4 5 6 7 8 9 10
1ukoffaf?pz
2vlgobg&q`
11wm<-ch???r#
12xn"di:)s/
13yo_ejontreturn

This means that when the 'off' button is pressed, for example, pin 1 and pin 5 will be connected together.

To read a matrix keyboard like this, we write some code that steps through the 'down' set of pins (1, 2, 11, 12, 13), holding them low one at a time, then checks each of the other pins (3-10) to see if anything is being held low. If so, we perform a lookup on the table above.

Code to follow next week!

 1