Go Down

Topic: Powering white LEDs from 3.3VDC and dimming with PWM (Read 482 times) previous topic - next topic

shutterfreak

I'm currently working on a battery-operated project that will run on a 3.3V board. Functions:
  • control a small DC motor (telescope focuser) with a KY-023 joystick (PWM duty cycle)
  • control a LED flashlight with the same KY-023 joystick: dimming through PWM + toggle on/off with the joystick button)
  • switch between red and white LEDs by long pressing the joystick button


The prototype runs without problem on a Nano at 5VDC.

I plan the real thing to run on batteries, most likely a small LiPo 3.7V cell.

It is obvious that I won't be able to drive the white LEDs from 3.3VDC, let alone from the output pins. I still want to be able to dim the white LEDs.

I tried to find a LED boost module that could drive the white LEDs. And that supports a PWM signal for modulating the current. So far I only came across a module named LD06AJSA which generates 6VDC and might be driven through PWM. They recommend putting the LEDs in parallel (without series resistor) which I don't think is a good idea.

Would that work, or should I consider other options?

PaulRB

Your "LED flashlight" could be one of thousands of designs. There's a very high chance it won't accept a pwm signal, no matter what you do with external circuits. It's designed to run on batteries, who's voltage changes with the remaining charge level, but provide an otherwise steady voltage. By all means experiment, but be prepared for disappointment.

shutterfreak

#2
May 14, 2020, 09:03 pm Last Edit: May 14, 2020, 09:17 pm by shutterfreak
Here's an image that provides the details of that module when driven with PWM:

The main component is a CN5711 LED driver. And that immediately raises the need for a DC/DC boost module as I now realize that the circuit only drives the LED. The data sheet is also an interesting read. They recommend a series resistor when putting LEDs in parallel.

I suppose that another option is to use a DC/DC boost converter with an ENable pin, and activate this converter only when the white LED is switched on (1 extra digital pin needed, no problem). Then use a fast-switching (MOSFET) transistor to drive the LED. That would likely require designing a small PCB and identifying the right components. I was hoping to find a readily available module but I may be out of luck on this one.

For charging the 3.7V LiPo battery, there are plenty of inexpensive battery charging modules, most of which even featuring some USB connector, which is very convenient.

shutterfreak

I now see that I have 2 (or even 3) interrelated problems to solve:
  • Powering the Arduino Pro Mini 3.3V
  • Powering the white LEDs
  • Charging the Lithium battery


Maybe I should first convert the battery voltage to 5VDC through a boost regulator. Then I can power the white LEDs through a switching transistor and I can power a buck regulator for powering the Arduino at 3.3VDC.

It even appears that some 5VDC boost converters offer LiPo cell charging as well (they're part of simple 1-cell power banks). Then I only need to hook the battery to the charger / boost converter, de-solder the USB 5VDC power supply and hook the 5VDC circuitry to that end of the circuit (i.e., the buck converter for powering the Arduino Pro Mini 3.3V and the white LEDs through a switching transistor).

If this second approach is sensible, could someone recommend such 5VDC boost /charger module?

shutterfreak

I will give the 1-cell power bank / UPS approach a try. I ordered a single-cell 18650 5V boost module that attaches to a 18650 battery holder. The white LEDs will be powered 5VDC through a switching transistor driven by a PWM signal. An adequate current-limiting series resistor will be added:

R = (Vf + 0.7V) / 20mA = 50 * Vf + 35 [Ohms]


I could probably use one PWM pin for driving multiple switching transistors in parallel.

I could probably run the red LEDs the same way.

Or use the LD06AJSA/B for powering the LEDs in parallel by feeding the PWM signal to the Chip Enable pin.

Go Up