0
\$\begingroup\$

Main Question: What is the best way to convert PWM voltage generated by an external (i.e. 'blackbox') power source to a constant DC voltage while minimally affecting the load it is connected to?

Background: I built this PWM switch circuit to dim a 12V, 2A LED strip. This would be installed into a boat, and would be connected to the onboard 12 volt battery. Attached to this battery is an inverter and a battery charger, which is powered by the shore power (mains).

Board Schematic

Everything worked fine in testing whilst the board was powered by a benchtop power supply, but after being installed into boat it was discovered that when the battery charger is connected, the LED strip begins visibly flickering erratically.

What I believe is happening is that the battery charger converts the shore power into pulsed DC, which it modulates depending on what it decides is required to charge the boat's battery. Because my board is connected to the battery at the same time, this modulated voltage becomes the input voltage to my board, which resets the 555 timer on each cycle of the battery charger modulation, leading to the flickering. I also presume that even if it didn't reset the 555, beat frequencies would be produced and could be visible due to the difference in the power source modulation and my board's PWM switching.

If this is indeed the problem, how can I stop the modulated DC power source from affecting my downstream switching circuit or the load? Thank you in advance.

\$\endgroup\$
  • 1
    \$\begingroup\$ Your schematic is missing some values (arguable the most important values for this question): C1, C2, C5. Also, are you really using a 7815 or is that a typo? The 7815 needs at least 17.5V to regulate, which 12V is not. \$\endgroup\$ – uint128_t Apr 27 '17 at 3:17
  • 1
    \$\begingroup\$ Your mechanism of creating a PWM signal and filtering it is very similar to using a buck converter. I would recommend looking into those; they're not too difficult once you understand what you're doing, or you can buy off-the-shelf modules. \$\endgroup\$ – Hearth Apr 27 '17 at 3:26
  • \$\begingroup\$ @uint128_t Sorry, my mistake - it's late and I posted the wrong schematic, will update in the question right now. Thank you. \$\endgroup\$ – MichaelK Apr 27 '17 at 3:32
  • 1
    \$\begingroup\$ Car battery chargers don't try to smooth their outputs, as far as I've seen. They'd need really big capacitors at their output currents but the battery under charge acts like a giant capacitor anyway so there's no point. So your circuit needs to be tolerant of a very large ripple voltage on the supply. Will take a closer look at your circuit in a bit. \$\endgroup\$ – TonyM Apr 27 '17 at 4:09
  • 3
    \$\begingroup\$ Re: new schematic. The 7812 expects 14.5V minimum, so it's probably regulating poorly (14.5V is at the far upper range of a 12V battery). 47uF is probably not enough bulk capacitance, and some more capacitance on the output of the regulator is probably a good idea. This circuit would likely be better served by a switching regulator able to handle a very wide voltage range (likely SEPIC or similar if you need ~12V in, 12V out). \$\endgroup\$ – uint128_t Apr 27 '17 at 6:07
1
\$\begingroup\$

As other have noted, your 7812 regulator cannot maintain regulation as its input voltage is too low. However, your circuit does not need to run off of 12 V and can run just as well from a lower voltage, provided the FET gate is driven with a high-enough Vgs to turn it on.

Therefore I recommend you change your 12 V regulator to an 8 V regulator. The standard 7808 regulator has a minimum input voltage of 10 V, which should be OK. However, the LM2940T-8.0/NOPB-ND runs from 8.5 V min. which should give you plenty of headroom and is just as readily available. Add a 47 uF capacitor in parallel with C2 so there is plenty of decoupled 8 V supply for when the 555 and FET gate switch.

If you still get any odd effects when on charge, put a 1N4001 diode in between your 12 V input connector and the C1/IC1. If there is excessive ripple on the supply during charging, this will keep C1 charged to near the peaks of the input voltage and stop the regulator seeing the troughs. Because your load is so small, the 47 uF capacitors on the regulator input and output should be plenty of hold-up for this rail.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Makes sense. I'll swap out the regulator, add the extra cap and see what happens. Thank you! \$\endgroup\$ – MichaelK Apr 27 '17 at 15:23
  • 1
    \$\begingroup\$ This is a little bit late, but I'm marking this as accepted - I swapped out the regulator for an 8V as suggested, and the dimmer worked perfectly. Thank you! \$\endgroup\$ – MichaelK May 22 '17 at 16:16
  • \$\begingroup\$ @MichaelK, you're very welcome, glad that was the solution :-) Which regulator did you fit? (part number please) Wondering if it was an ordinary regulator or an LDO part... \$\endgroup\$ – TonyM May 22 '17 at 16:29
  • \$\begingroup\$ Sorry again for the delay, but this one, which was an LDO part: digikey.ca/product-detail/en/fairchild-on-semiconductor/… \$\endgroup\$ – MichaelK Jun 2 '17 at 15:44
  • \$\begingroup\$ They call it LDO but it actually needs 10 V min at full load, no different to a standard 7808. Anyway, all works so all good. \$\endgroup\$ – TonyM Jun 2 '17 at 16:30
0
\$\begingroup\$

If this is indeed the problem,

it doesn't sound like the problem for me. but if you insist,

how can I stop the modulated DC power source from affecting my downstream switching circuit or the load?

you would first try to decouple your board's power supply from the pulsed power supply. A regulator + beefy filter for example should work.

you may also want to introduce feedback from the current going through the led so that the average current is steady vs. the supply.

you can also increase the pwm frequency so beat frequency isn't an issue.

...

| improve this answer | |
\$\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.