Electronic – arduino – How to improve an elegant design for an LED dimmer, low-powered with LDO

arduinocapacitordimmingldoled

I am building a sunrise alarm clock. The LED is supposed to get brighter over the course of 30 minutes, then remain fully lit for another 30 minutes, then switch off. I am using a digital pin on an Arduino Pro Mini 3,3V to feed a transistor. The Arduino board will sleep for the rest of the time, saving energy. The device is going to be powered by a single 18650 Li-ion battery, with an additional solar panel to charge the battery during the day (using a TP4056 with additional protection circuit).

This is the rest of the circuit. To protect the LED, I am using an MCP1825 LDO to regulate voltage input. I reason that with this small difference between Vin and Vout, it is efficient enough. I chose the MCP1825 for its low quiescent current and fairly low dropout voltage. (If I am lucky, I might obtain the version with shutdown mode). I might have to replace R1 which I have chosen based on an hfe of 30.

So far I have only tested this circuit without the LDO and battery with a stable 3,3V source (I don't have the other parts yet). It works.

schematic diagram

I have these questions:

  1. Given I am using a battery, I figured there is no input capacitor necessary for the LDO. Is that correct?
  2. If I understand it correctly, an LDO fundamentally acts like a kind of resistor. Does this mean it does not produce any noise and can I therefore do without an output capacitor?
  3. Would the TP4056 (and/or solar panel) introduce noise anyway, which I would have to filter out with capacitors (input AND output)?
  4. Will the caps leak current all the time, wasting energy?
  5. Do you see a way of forgoing voltage regulation or to save energy in any other way in this circuit?

I am trying to understand every single piece of this circuit, but I am still only a beginner. Please let me know of any major flaws in my design and also in the posting of this problem. Thank you.

(I did read the datasheet of the MCP1825 recommending usage of an input capacitor. That does not sound like a necessity though.)

Best Answer

Answering your questions in order:

  1. and 2. Given I am using a battery, I figured there is no input capacitor necessary for the LDO. Is that correct?

NO, that is not correct. You need both input and output capacitors for the regulator since it is an active device with loop gain. It is not like a resistor at all.

  1. Would the TP4056 (and/or solar panel) introduce noise anyway, which I would have to filter out with capacitors (input AND output)?

It is unlikely to have appreciable noise from a solar panel, but the TP4056 IS an active device and specifies the use of input and output capacitors to control stability.

  1. Will the caps leak current all the time, wasting energy?

YES, caps do leak, but for the values of ceramic caps you need we are talking pA. The self discharge rate of the battery you use is much much larger than the leakage current of the capacitors.

  1. Do you see a way of forgoing voltage regulation or to save energy in any other way in this circuit?

A voltage regulator which tries to hold the voltage at a fixed level IS NOT the way to drive a high current LED. Given you are using a 350mA LED device, it is possible you will be using the short circuit limit in the regulator to drop the output voltage, especially when the LED gets hot.

Suggestions:

  1. Use a constant current driver to drive the LED directly from your battery. This will work even though you are using PWM to drive the LED for brightness control. You may be able to get by with just a series limiting resistor for the LED (especially if you are not approaching the 350mA LED limit), but the current will vary as the temperature of the LED increases.

  2. Change the 2N2222 to a FET, it will have a lower on voltage than the VCE(sat) of the transistor at 350mA. Right now the VCE(sat) of the 2N2222 is probably providing the current limitation of your circuit.

enter image description here

Try to understand the datasheet for the devices you use, clearly as shown above, VCE(sat) is the dominating concern at 350mA.

  1. Don't second guess the datasheets. If they specify input an output capacitors, use them. If you are as you say new to electronics, the decisions you make may be poor and you simply don't understand the implications. In this case your understanding of the leakage of ceramic capacitors as a significant problem is a clear indication of your understanding level. You could start by reading this document from Murata.

The worst capacitors for leakage are Aluminum Electrolytic, and here leakage current may be in the uA range, but still not significant for your application.