My new job involves me driving into Lancaster City Centre. After a trial run on my induction day I figured it would be easier and quicker to cycle part of the way. So what do I need? An RGB LED indicator grid to go on the back of my cycling jacket of course!
This project is NOT finished. In fact – it’s not even started! But there has been a lot of lessons learnt which I want to share.
The general plan was a grid of lights on my back that would show a left arrow when I pressed a button on my handlebars and a right arrow when I pressed a different button. I also wanted a always on display for visibility – like a smiley face!
The minimum amount of lights I would need for this pattern overlapping is 15. The colours above are just for demo. The lights would actually be one colour. I didn’t want a disco distracting drivers behind me!
Plan A: Neopixels and 2 Bluetooth boards
When using conductive thread none of the wires can overlap. With neopixels you have three wires – Ground, Power and Data. Three wires coming out of 15 lights in a close grid going to different pins on a board… it quickly became a nightmare to even try and plan this. Also neopixels are expensive.
Plan B: 15 LEDs and 2 Bluetooth boards
Sewable LEDs are cheap! All you do is turn them on or turn them off. The Bluetooth board I decided on is also really cheap. The WEMOS LOLIN32 board was only released 3 months ago but it looks perfect. Only available from China I ordered 2 and designed the plan for the grid:
The + point of each LED connects to a IO pin on the board. Simples, right?
Plan C: Power consumption
While sitting around for my Bluetooth boards to arrive I looked at the grid again and figured out a better way to display the grid to save power. I got rid of the smiley face and brought the number of lights down to 11.
- Lights 1, 4, 6, 8 and 11 are always on.
- The left arrow would need to turn on 2, 7 and 9.
- The right arrow would need to turn on 3, 5 and 10.
Plan D: Alternate board?
I realised my package wasn’t actually on its way… I re-ordered it and twiddled my thumbs some more. I wondered how well the bluetooth boards would pair with each other every morning. I was in the middle of creating my micro:bit radio controlled belt and wondered about using the micro:bit to control the lights. The radio works really well on the belt, the micro:bit is small and sewable.
Nope: the IO pins of the micro:bit only provide 5ma of power. A simple LED need 11.
Plan E: Neopixels, LEDs and the micro:bit
I only need to control 6 lights. The rest of the lights can be connected directly to a power source as they’re always on. The micro:bit can’t power 6 LEDs but it can control 6 Neopixels.
- 5 lights will be normal LEDs connected to an always on power source (sewable CR2032 battery?)
- 6 lights are neopixels chained together (indicated in blue below) with the data pins connected to the micro:bit
That’s as far as I’ve got! I’ve ordered yellow LEDs. The trick will be matching the colour of the neopixels to the LEDs so it all works together.
Watch out for Plan F!