Wearables - PWM for 16 LED’s with 70mA each - need hardware-help

Hello everyone,

I am doing a wearables project, and have some questions, I haven’t been able to find the answers to, or rather, the more I read, the more confused I get…

About my project:
I am building a dragonfly costume and I want the wings to flap and light up when activated by a muscle sensor and controlled with a heart-rate sensor.

At the moment I am using the adafruit flora board, powered by a 3.7V Lipo battery, the myoware muscle-sensor, powered trough the 3.3V output on the board and a Servo-Motor, powered with 6V through a separate battery holder. The flapping mechanism is set up and works well.

In the next step, my plan is to run fibre optics along the veins of the wing and a part of the dress and have the light pulsing along with the input of a heart-rate sensor.
I am planning to use around 16 LED’s and I ordered very bright ones, so it will hopefully not only be visible in total darkness.
The LED’s I have draw about 70mA for full brightness and I want them to fade in and out rather than to blink, so I need PWM, but they don’t have to be individually addressable, they should all pulse simultaneously.

My question now is, which additional or alternative hardware I would need to control and power the LED’s.
So far, my research has brought me to different boards with enough PWM-Pins, like the the Adafruit 16-Channel 12-bit PWM/Servo Driver, but it only supplies 25mA/Pin.
I also have a Teensy 3.2 here, and read it has the OctoWS2811 Adaptor for use with many LED’s, but that seems a bit overpowered.

Since it’s a wearable, size and power-sources/heat-development are an issue.

Does anyone have recommendations how to approach this?

So far, my research has brought me to different boards with enough PWM-Pins, like the the Adafruit 16-Channel 12-bit PWM/Servo Driver, but it only supplies 25mA/Pin.

You can add an FET to the output to allow you to control more current. It tells you how in the data sheet for the chip on your board. But you could also use a FET and one Arduino PWM pin to dive all the LEDs.

In the next step, my plan is to run fibre optics along the veins of the wing

These are not called fibre optics, you don’t get light spill from along the length of fibre optic lines.

Thank you for the input!

Grumpy_Mike:
But you could also use a FET and one Arduino PWM pin to dive all the LEDs.

Sorry, I’m still quite new to electronics, so I just looked up, what a FET is.
Do I understand it correctly, that it can be understood as something like a “switch” (or connected to the PWM-Pin, something like a slider), that could control the flow between an additional power source and the LED’s?
That sounds perfect!

Grumpy_Mike:
These are not called fibre optics, you don’t get light spill from along the length of fibre optic lines.

Ah, okay, I thought there were different kinds, but all called fibre optics. I actually have end-emitting fibres, that I plan to carefully nick along the length, to have tiny light dots along the wings.

Sorry I might be misleading you. With one FET and one Arduino pin, they will all dim / pulse at the same time, but you have 6 pins capable of PWM on a Uno, not sure how many you have on your thing. If you had six the. You could wire every sixth one to the same PWM pin and you would be able to achieve a good pulsing pattern.

A FET is a Field Effect Transistor and you can switch big loads with very little heat being generated.

The LED's I have draw about 70mA for full brightness

You should post a link to the specs of those LEDs. Most small LEDs draw only 20~30mA maximum. Larger LEDs often draw 150mA or 300mA, and need a constant current circuit to drive them, otherwise they overheat and fail quite quickly. If your 70mA LEDs are similar, a FET alone won't suitable.

This is the datasheet to the LED's I'm using:

After some more research I ordered the IRLB 8721 MOSFET and could finally test it today - it is running very well!

The LED's did heat up quickly in my previous tests without the MOSFET, which had worried me, but I've had them just blink along for about 20 minutes now and they are not heating up at all. They will only be on (blinking) for a few minutes at a time in the end.

At the moment I have the LED's hooked up in parallel and I'm using a 3.7V 2500mAh battery. It made the most sense with the way they will be distributed along the backplate and with what I have available as powersources...
The alternative I'm still thinking about would be a combination of parallel and in series, with always two LED's paired together in series all running on a 6V battery.

Thank you for the help!!

Have you read page 13 with the two diagrams for parallel wiring?

What sort of current limiting are you using?

My guess would be that the OP is not using any current limiting. LEDs have 3.7V forward voltage, battery is 3.7V, so that must be absolutely perfect.

Yes, that was my thought as well, so I didn't put in any current limiting until now.
I did do some calculations and the difference between the typical forward Voltage of 3.4 and supplied Voltage was so small, it only gave me tiny resistor-values and every available resistor-value would limit my current way beneath the goal of around 70mA.

I did read page 13, and saw that circuit B is recommended for my case, but it didn't quite click at the time, that the calculations I had done were for case A... Thanks for making me think again! :smiley:
So I guess if using a resistor for each LED 4.3 or 4.7Ohm each would absolutely make sense to add.

Unfortunately, using such small resistor values doesn't work so well. The reason is that almost all of the supply voltage is being dropped by the led and only a small voltage is dropped by the resistor. If the forward voltage of the led drops slightly, for example as it warms up, there is a relatively big increase in the voltage dropped by the resistor, allowing a lot more current to flow, warming the led up even more, and... thermal runaway!

The other problem you have is that when a Li-Ion battery is fully charged, it's voltage is 4.1~4.2V. This means you need a much higher resistor when the battery is fully charged compared to when it is 50% charged, and a much lower value when the battery is nearly flat.

mhhh, I see... so instead of using the Lipo battery that seems to just almost fit exactly, it would be safer/more consistent to use something with a higher Voltage, say 5V, and then choose a higher resistance accordingly (although for 5V the resistor needed would still be quite small...)?

Or will the problem with voltage-inconsistency be the same on every portable power source?

Let's take your example figures to start with. The led forward voltage is 3.4V, the battery voltage is 3.7V. So the remaining 0.3V is dropped by the 4R7 and 0.3/4.7=64mA.

Now, the led warms up a little and it's forward voltage drops to 3.3V. The current increases to (3.7-3.3)/4.7=85mA, exceeding the max current from the data sheet.

Next, let's suppose you use a 4.8V battery. To get that 64mA when the led forward voltage is 3.4V, you would choose a resistor of (4.8-3.4)/0.064=22R.

This time, when the led warms up and the forward voltage drops to 3.3V, the current only increases to (4.8-3.3)/22=68mA.

So the larger the value of the series resistor and the more voltage they drop, the smaller the change in current when the led forward voltage changes: the circuit is more stable.

To get 4.8V, you can use 4xAA NiMH, although this will be larger, it will have around 2500mAh capacity.

Thanks for the detailed explanation, that makes it a lot clearer!

I have a battery-holder for 4AA and a bunch of NiMH at 1.2 Volts at hand already. But the problem of fully charged vs half full still remains, right?
I just checked the fully charged NiMH I have (different kinds) and they are all at around 1.35V which then of course sums up to a total of 5.4V instead of the expected 4.8 and would therefore require something like a 33 Ohm resistor but would probably result in only around 40-45mA for each LED after some time...

would therefore require something like a 33 Ohm resistor but would probably result in only around 40-45mA for each LED after some time

Which is why a constant current drive is recommended.