0
\$\begingroup\$

I am working on a project which will be switching LED strips with a max of 2A. As a test I have connected a 20W hallogen light. When I try to switch it I get a voltage drop as can be seen in the scope picture and causes my microcontroller to reboot (< 5V). I was thinking of using a capacitor to filter out the voltage drop.

How can I determine which value of capacitor I can use? Or does someone have any other tip I can do to fix this?

Scope picture

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
12
  • 2
    \$\begingroup\$ Why have you chosen this circuit? With this circuit the voltage across the LED will never be 12 V but limited to 5 V - 1.4 V (Vbe of a Darlington transistor) = 3.6 V. Most of the energy from the supply is lost in the transistor. Your LED can never burn at full brightness (assuming it needs 12 V for that). You need to look up how to properly switch a 12 V LED from a 5 V PWM signal using an NPN. The LED needs to be at the collector side, not the emitter side as you have it now. \$\endgroup\$ Oct 11, 2018 at 19:54
  • 4
    \$\begingroup\$ In addition to Bimpelrekkie's point above, a halogen is a very poor substitute for LEDs. Halogens have a very low resistance when 'cold' and will initially draw substantially more current than their normal operating wattage rating would suggest. So as a result, your power supply is 'browning out'. \$\endgroup\$
    – brhans
    Oct 11, 2018 at 20:00
  • 2
    \$\begingroup\$ I was thinking of using a capacitor to filter out the voltage drop. Before thinking of a solution would it not be "better engineering" to find the real cause of the problem first? Do you realize that a 20 W halogen bulb has a very different behavior than an LED or even a resistor. Use a multimeter to measure the resistance of that bulb, do you expect it to be around 7 ohms (\$R=V^2/P\$)? But it measures much lower! That's because the filament will only be 7 ohms when it is glowing hot, when it is cold it has a much lower resistance. So more current flows.. \$\endgroup\$ Oct 11, 2018 at 20:02
  • 3
    \$\begingroup\$ Why do you refer to a FET in your question text, but then have an NPN BJT in your schematic? Which is it? \$\endgroup\$
    – brhans
    Oct 11, 2018 at 20:06
  • 1
    \$\begingroup\$ To OP I believe what Bimpelrekkie is saying is that you have a fundamental wiring problem and that your transistor should be between the LED and ground rather than the LED being between transistor and ground as shown in your schematic. Trivial to fix and no advantage to using the incorrect arrangement, so you may as well fix it. If you want to confirm function at full current without actually setting up 2A worth of LEDs, a cheap high power resistor will do the job, perhaps 7 Ohm, 100W. You would want a "non inductive" load. \$\endgroup\$
    – K H
    Oct 11, 2018 at 21:18

1 Answer 1

0
\$\begingroup\$

When I try to switch it I get a voltage drop as can be seen in the scope picture and causes my microcontroller to reboot (< 5V). I was thinking of using a capacitor to filter out the voltage drop.

Good idea!

Put a diode before the capacitor and then the lamp won't discharge the capacitor when it drags the supply voltage down. Like this:-

schematic

simulate this circuit – Schematic created using CircuitLab

With this arrangement the capacitor only needs to be large enough to power the controller during supply voltage sags. Assuming the regulator needs 7V and the capacitor charges to 11.4V (12V - 0.6V across the diode), you have 4.4V of 'headroom' before the regulator starts to drop out. The formula for capacitor charge/discharge is t = C*V/I, so if the controller draws eg. 20mA then it should last 0.00047F * 4.4V / 0.02A = ~100ms.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.