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


10 Responses to The PANIC Button

  1. 2834 KsbjA 2012-02-19 9:51 pm

    This is pretty impressive. I like it.

  2. 2835 gps 2012-02-20 4:19 am

    i want to make it say something different, someone have a hint?(

  3. 2836 Lain 2012-02-20 4:49 am

    @gps - would you possibly want to make it say "Don't Panic?"

  4. 2842 Anonymous 2012-02-20 2:00 pm

    Hi thinkl33t,

    One of my co-workers had attempted this with a Staples "Easy" button. This should be the same process… right?

    Also, I'm wondering, would it be possible to program this to create a ticket-tracking case for say, an IT Support / Help Desk? Ideally I'd want to automate more of our process.

    How difficult is this (on a scale of 1 to 5?) I'm not an engineer, but this is incredible and I'd like to try this for myself.

    Thank you.

    P.S. You were featured on LifeHacker. Great job.

  5. 2871 Bob Clough 2012-02-20 11:51 pm

    Hi Anonymous,

    It shows up as a USB keyboard, so you can get it to type anything.

    For more complex things, you could set it up connected to a program running on your PC over either a usb-serial connection or using libusb.

    Saw the lifehacker thing, very cool! :)

  6. 2904 Gary 2012-02-23 9:08 am

    thinkl33t,

    Any chance of a walkthrough on how to achieve this for a complete newbie. I had an Arduino but broke it and as per Hackaday comments want to do what you've done here with two buttons. One for COPY command CTRL+C and one for PASTE command CTRL+V.

    Point in the right direction etc would be greatly apreciated.
    Thanks,
    G

  7. 2944 Gary 2012-02-25 7:12 pm

    Ok, bought 2 Minimus AVR USBs, bought 2 panic buttons.

    Now I have absolutely no idea how to write the code and compile a hex file to upload from my mac to the Minimus to have a COPY and PASTE button.

    Help!

  8. 2985 Bob 2012-02-27 3:56 pm

    SORRY, BUT, I JUST HAVE AN ENGLISH GRAMMAR COMPLAINT;

    Ok, bit of explanation first. We have a iMac set up as a 'democratic jukebox' at HAC:Manchester.

    "We have a iMac"

    Should be: "We have an (not "a") iMac set up..."

    The article is great, by the way!

  9. 3380 Bob Clough 2012-03-16 1:16 pm

    Gary - I can make you some hex files that will send the copy and paste commands if needed, though it might involve changing the code from a media keyboard to a regular keyboard.

    Bob - i must of missed th@ 1 thx!!! (tee hee *hides*)

  10. 5478 Minimus usb (or my quest to flash some LEDs) « Kevin's Blog 2012-05-20 9:36 pm

    ...e from MakeStuff introducing the board and what it can do.

    This is the first in a series of posts about it and what I’ve been up to.
    Like many software engineers, when faced with a bit of hardware with LEDs on it, I wanted to make them flash!  Well to do that I needed a few things to get started – namely a development environment and a means to programme the device.WinAVR gives an IDE (Programmers Notepad), ports of the GNU compilers for AVR devices and a full set of s...