Wireless Mesh LED Party Bracelets
by barney.nicholls in Circuits > Wearables
3484 Views, 69 Favorites, 0 Comments
Wireless Mesh LED Party Bracelets
I was watching the Glastonbury festival and saw the synchronized LED bracelets that people were wearing in the crowd. So I thought to myself it might be fun to create something similar. This instructable will walk you through how to create your own LED bracelets that will automatically sync together over a MESH wireless network. I've currently made five bracelets and they seem to work flawlessly.
Supplies
The parts list for this is pretty simple but you will need access to a 3D printer capable of printing TPU for the bracelets.
The prices are GBP and rough estimates for the cost per bracelet. Some items are in multi-packs but I've priced them individually for a single bracelet.
Wemos D1 Mini (£1.50 - £3.00)
WS2812B LED Strip (cut into lengths of 12 LEDS) (£0.30 - £1.40)
Step up 3.7v to 5v DC converter (£0.70 ea)
400mah Battery (£3.00 ea)
Molex Connector (£0.80 ea)
TPU Filament (£ 0.40 ea)
I also used some sundry items I had to hand:
- Wire
- Solder
- Heatshrink
Printing the Bracelet
The bracelet fits all the components and prints in one piece. I used a clear TPU but you might choose to use a coloured version. The perforations around the middle can be separated with your thumb or a tool such as a screwdriver allowing you to insert the components once assembled.
The print uses about 17g of filament and takes about two hours. You can view it on Tinkercad or Thingiverse
They are sized to be the smallest I could get my hand through, you may want to scale them up or down in your slicer.
Circuit Assembly
The assembly process is very straightforward. First I cut the LED strip to length, for this bracelet that was 12 LEDs. If you use more or less the software will need updating to match the LED count.
Then I soldered the positive, negative, and data wires to the LED strip, making sure they are attached at the correct end. There is an arrow on the LED strip showing the flow of data.
I then connected the Step-Up converter to a Molex connector and added cables for voltage out. I added a piece of heat shrink over the converter to protect it.
After this, I connected both the LED strip and power supply to the Wemos D1 board.
- 5v+ red wire -> Wemos 5v
- GND black wire -> Wemos G
- Data orange wire => Wemos D4
That's it you're basically done, with a nice and simple setup.
Flashing the Wemos
I used Visual Studio Code and PlatformIO to flash the Wemos, you could also use the Arduino IDE if you so choose.
The code makes use of a couple of libraries.
This should in theory work with any ESP32 or ESP8266 board but I've only done this with a Wemos D1 mini
I used and adapted sample apps from Painless Mesh and FastLED. What happens is that on each loop the MESH network updates. If it receives an ID from other bracelets it compares that to its own and whichever has the lowest ID becomes the controller. The controller then randomly picks one of the available palettes and transmits this across the network. All the bracelets should then receive a message to play the chosen palette at the same time. Once each palette has finished the controller chooses and transmits the next.
The GIT repository is below and should work out of the box.
barneynicholls/mesh-bracelets (github.com)
Once flashed all twelve LEDs should light up. If you have changed the number of LEDs or the data pin please remember to update the code to match.
Putting It Together
Insert the LEDs first making sure that the LEDs themselves face outwards of course. You must also remember to insert them the same way as you make multiple bracelets.
You should adjust them once in place so that they are all as even as possible.
Then insert the Wemos and try and ensure it is at the back and to one side of the container. The converter goes in next alongside the Wemos and towards the back.
This should have left enough space to get the battery in on top. You can connect the battery and should be able to insert the cables into the gap that is left.
Using the Bracelets
When you connect the battery the first bracelet shows a default pattern. As other bracelets are powered up or come within range they should start to automatically sync. This normally only takes a few seconds but sometimes can be longer. If it still hasn't synced after a few minutes, which is very rare, I tend to use the tried and trusted technique of disconnecting and then reconnecting the battery.
With a 400mah battery, I get approximately two hours of use from a bracelet.