Intro: Hacking a Coldplay LED Wristband
When going to a big concert, they often hand out small LED lights. When going to a concert of Coldplay, you get the awesome version of it: an LED wristband. During the show, they light up automagically and give an awesome effect. At the end of the show however, the bracelet becomes utterly useless, a real shame for such a cool gadget!
In this instructable, we'll do something about it and revive the LED wristband! I've seen some people who managed to get some of the colors to work, but that's not cool enough. We are going to reprogram the band, to have full control over the LEDs, and make them light up in all kinds of cool patterns!
Let's get started!
Step 1: Taking It Apart
Before we can revive the bracelet, we should know what makes it tick. Let's take it apart!
Getting inside the case is quite straightforward: 4 screws are enough to reveal the magic inside. We are greeted by the batteries (or what's left of them). You'll see 2 battery holders: the first has two (2025 size) which put out 6V and are used for the LEDs; the second one has a single battery (2032 size) for the microcontroller inside.
When they hand the wristbands out at the concert they turn them on by pulling a small plastic tab from between the battery and the battery holder. Since they are not meant to be reused, there is also no way to turn them off. Since the unit will remain powered until the battery runs out, we'll have to replace it with a fresh coin cell.
Replacing the battery is one thing, making sure we can turn the wristband off again is another. I tried adding a switch, but found a far easier solution: insert the same kind of pull tab (does this make it a push tab..?) between the battery and the holder to cut power to the device. Any thin and sturdy tab can work: hard plastic, cardboard, ...
I used a small piece of Nickel strip (used to connect lithium cells) with some painters tape around half of it. This is very sturdy and allows it to be inserted the other way around (with the metal part in between the battery and holder) as a way of storing the tab when the wristband is on.
Now that we have the power, let's find out how we can make some light!
Step 2: Controlling the LEDs
We will now find out how to control the LEDs. If you are just interested in uploading the code and actually watching the LEDs, then go straight to the next step.
Before we can start programming, we need to know the hardware first. More specifically, we should know how the LEDs are connected to the microcontroller. We can check this by following the traces on the circuit board, or by checking the schematic someone else already made (credits). The complete schematic is in PDF, but I aso added a simplified version with the information we need.
We can see that they use the ATmega88 as microcontroller. The LEDs are controlled with some MOSFETs, which are driven by the ATmega88 with following pins:
- Red LED: Port B6
- Green LED: Port C3
- Blue LED: Port B7
- Common: Port D3
That's all we need to know! Now let's make some light! We do this by simply turning the corresponding pins on or off. However, there's a catch: the LEDs don't have a current limiting resistor, so the current will only be limited by the internal resistance of the batteries. Not good. Furthermore, since the red LED has a lower forward voltage than the green and blue one, it will draw more current, and be a lot brighter than the other ones. Not good.
To nicely control the LEDs, we should control them with PWM. I did this by writing an interrupt routine which runs at 10 kHz and creates a PWM signal for all LEDs. It also compensates for the difference in current draw: the current duty cycle for the red LED is lower than the green and blue one. We can now control the brightness of each of the LEDs by updating a variable.
In the main loop, we'll do just that. I made some patterns which change the brightness of the LEDs. It should be quite easy to make some more for yourself, you can use my code as an example.
I've made more than 10 different patterns, and they just keep on looping. One loop takes around 5 minutes, so it won't get boring too quickly ;)
Step 3: Programming
With the code written, we can program the device! But wait, where should we connect the programmer?
Let's take a look at the back of the PCB. Apart from the batteries, there are only some holes. And those are exactly what we're looking for, lucky us :) The holes are the programming port, used for the In-System Programming (ISP). It will allow us to program the microcontroller while it is in the circuit (hence the name).
So now that we've located our target, we can hook those up to an AVR programmer (a programmer for ATMEL microcontrollers). Since the 6 pins in a row are not a really standard connection, I used simple jumper wires to connect the two. You can check the pin-out in the picture.
Depending on your programmer, you have 2 options for powering the device while programming. Either power it with 3.3V via the programmer itself (if it is supported) or insert a new battery in the wristband and power it that way. Certainly don't do both!
Now that we've connected the programmer and supplied power, we can finally program the damn thing!
We'll use Atmel Studio to make it rise from the ashes!
- Open Atmel Studio and open the project (.atsln file).
- Go to Tools>Device Programming (ctrl+shift+p) and select your programmer; press Apply.
- Go to the Fuses tab and copy the settings shown in the picture. Press Program
- Go to the Memories tab and press Program.
That's it, let there be light!
Step 4: Test & Enjoy
We're done! The only thing left to do is to test our wristband!
Finally, we can reuse this awesome wristband and shine at parties! I hope you'll revive yours, and relive the memories of the concert along with it.
Feel free to check out my other instructables here :)