Recently I embarked on a new project: creating a bracelet of LEDs. But not just any old bracelet. This one has the ability to be changed using a mobile phone, using a technology I've written about in the past called NFC.
Essentially the idea of this bracelet is:
- Input a colour sequence in a phone app
- put the dynamic NFC tag connected to the bracelet against your phone
- turn on the bracelet. Bracelet reads the sequence from the tag and displays the pattern.
To do this we need the following kit list:
Components
- As many Adafruit Neopixels as you can fit round your wrist. For me, this is about 6-7
- 2 resistors - value should be above 4.7k ish.
- 1 LIPO battery or else a 2-coin cell holder.
Extras
- hookup wire to connect the antenna, GEMMA and LEDs together: I'm using very very thin wires so that you can use 1 hole for multiple connections. It also makes the jewellery more malleable so you can shape it around your wrist
- solder/soldering iron
- wire strippers
- 1 glue dot or similar sticky thing to go between the gemma and the antenna
Step 1
Start by cutting 5 lengths of wire. Take two of them and strip one end, their lengths don't matter, but make sure you have enough room to make changes to the length of your bracelet if need be.
Take these two strands and twist them together, like this:
Poke the exposed copper through either the power hole or ground hole of your first Neopixel. You want to make sure the wire comes through the front of the neopixel, not the back, so that you can make the solder connection on the front and not irritate the skin resting against the LED by soldering the back.
Now put a dab of solder onto the connection, and trim off the excess wire.
Take a further 2 lengths and do the same, but poke the copper through the opposite side of your neopixel.
The final wire is for signal - strip, twist the ends and poke it through the outward signal hole on your neopixel.
The reason the power and ground wires were twisted together was so that we can keep chaining together neopixels - repeat the same process for the next LED, but solder the signal wire going outward from your first neopixel to the inward signal on your second neopixel.
Repeat this until you have a strand which wraps around the front of your wrist, with enough room to adjust it to your liking/remove from your wrist.
Step 2
The next step is to connect your neopixel strand to your GEMMA. To achieve this, cut a further signal strand of wire, strip it and solder it to the inward signal of the first neopixel of your strand. This neopixel should now have 6 total strands of wire coming out of it, with 3 of them unconnected.
Take these 3 wires, strip and twist the ends, and poke them through power, D1 and ground of your GEMMA, with the + going to power and the - going to ground. Solder D1 and Power, but leave GND unsoldered for now, just wrap it into place. This is because the Antenna will also need grounding, and there is only one on the board.
Step 3
Now take one of the antennas from the matrix. Cut 4 more lengths of wire - these won't have to be too long because the gemma will eventually sit on top of your antenna, but make them long enough that we can adjust for any mistakes or to position the gemma as we like.
Take one of your resistors and poke it from the back through the VCC hole. Poke the other end through either SDA or SCL - whichever one is not connected in this way will be connected to power on the gemma.
Take one length of wire, strip the end and poke it from front to back through the same holes. An example on SDA:
Next take another strand of wire, strip the end and poke it through GND from front to back. This is a bit fiddly, you can either position the resistor flat to the board and wiggle the wire through using tweezers, or move the resistor back to let the wire come through.
Solder GND, VCC and SDA or SCL (depending which currently has wires attached) on the front (aka, the side with writing on it) - this is again so that the back rests neatly against your wrist. Be careful to make sure the solder blobs don't touch each other.
Next, take your final bit of wire, strip the end and poke it from front to back through either SDA or SCL, whichever is remaining to be soldered. Solder it on the front.
Clean up by snipping all the remaining wires from either of the side. Your board should now look something like this:
Step 4
Now we're going to connect the other ends of those wires to your GEMMA. First up, poke 1 leg of your resistor through 3v3 on your GEMMA. The other leg needs to go through D2 or D0 - d0 is SCL, D2 is SDA, so whichever type of signal does NOT have a resistor connecting it to VCC on your antenna is the one that needs connecting.
Next, take the VCC wire from your antenna and poke it through the 3v3 hole and solder the connection. So that the antenna doesn't take up too much room on your wrist, I positioned the gemma on top of the antenna, on the corner which doesn't have anything but writing on it. When most of the connections were in place, I put a glue dot on the back of the gemma so that it wouldn't move around too much.
Next take the SDA wire and connect it to D0. Take SCL and connect it to D1.
Finally, connect GND to...well...GND. You should now have something like this:
Note that at the minute this doesn't join up at the ends - you'll need to figure out for yourself how to do a clasp, though if I get to making one for this project I shall write about the steps to create a proper loop.
For now, this concludes the first stage of the project. The next stage we'll be creating an android Phone App which generates the NFC signal, and in stage 3 we'll write the arduino code to have the GEMMA read from the Antenna's EEPROM.
Thanks for reading!