Electronics > Beginners
Filtering PWM to smooth DC
<< < (9/12) > >>
wraper:
Nobody prohibits using LDO with lower voltage drop. As of 2.5R, it's on border with insane circuit design, my condolences to the smoothing capacitor. No sane engineer would ever place something like this into actual product.
Rapsey:

--- Quote from: wraper on September 25, 2018, 06:35:47 pm ---Nobody prohibits using LDO with lower voltage drop. As of 2.5R, it's on border with insane circuit design, my condolences to the smoothing capacitor. No sane engineer would ever place something like this into actual product.

--- End quote ---
That's what I thought. I suppose I should not expect too many years out of that capacitor before it blows up like a balloon? On the bright side, it's "only" cycling at 500Hz.

Also, I just made a rather worrying observation... The control box of my printer (which houses all the electronics) can be powered in two ways: either from the printer's own power supply or via 5V USB.

I wanted to do a test with a different power supply so I powered off the printer (unplugged both mains and USB) and then hooked up a 12V wall wart to my testing breadboard. Of course being the newb that I am I forgot that the printer's fan connector was still connected to the breadboard power rails as well. Guess what, the damn thing powers on. Apparently putting 12V on those fan leads somehow goes back through the FET to supply power to the internals. Guess that answers that, there's no diode in there.

Now I'm even more concerned about having a capacitor discharge into those fan leads during the off-portion of the PWM cycles...
Zero999:

--- Quote from: Rapsey on September 25, 2018, 04:27:54 pm ---
--- Quote from: Hero999 on September 25, 2018, 03:38:01 pm ---
--- Quote from: wraper on September 25, 2018, 02:29:42 pm ---Don't bother with that. It's a completely non viable solution. And with those small inductors even non working. Unless you get into 10+kHz range, forget about LC.

--- End quote ---
There's no reason why an LC filter won't work. It will just need an inductor 50 times the size of the equivalent circuit, working at 25kHz. Now this may not be ideal, but it's certainly possible and the current is under 200mA, which helps to make it easier too.

--- End quote ---
Looks like you aren't kidding about that size. Maybe I'm looking in the wrong places but after browsing DigiKey and Mouser I still haven't been able to find an inductor that would be even remotely usable for this. Anything with sufficient inductance, current capacity and a low enough DC resistance is massive and often insanely expensive. So far the closest I could find was this thing... I guess this will remain a thought experiment after all.

Does it really need to have that much inductance though? I don't need to smoothen my DC output that much. Even with 2V ripple it would still be good enough to eliminate the PWM noise. Then again I don't think I fully understand the impact of inductance in an LC circuit.
--- End quote ---
Yes, to get smoothing at low frequencies, a big fat inductor is required.


--- Quote ---
--- Quote from: Hero999 on September 25, 2018, 03:38:01 pm ---
--- Quote from: Rapsey on September 25, 2018, 02:09:12 pm ---
--- Quote from: Hero999 on September 24, 2018, 10:02:48 pm ---The peak current can be calculated from the supply voltage and resistor value.

--- End quote ---
How would you calculate that?
--- End quote ---
Ohm's law. It's no coincidence the peak current is nearly 14A, the supply voltage is nearly 14V and the series resistor is 1Ohm.

--- End quote ---
So then you divide your resistor voltage drop by the resistor value? ~0.8V / 1Ohm seems like the only way I can arrive at ~830mA.

--- End quote ---
Look at the voltage, when the 14A peak is drawn.
Rapsey:
By the way, at 100% PWM that LC filter you provided shows a voltage spike before stabilizing. Is that something I should be concerned about? I'm not sure if ~20ms is long enough for such a spike to be dangerous.




EDIT 1: Changing the placement of the diode seems to cut off the spike as it should:






EDIT 2: Because I do not need the smoothing to be perfect I tried an LC filter with a smaller inductor. This actually seems to work quite well. The control curve is much better than an RC filter while also getting closer to 12V. The question remains: is this a sane thing to do?

I'm using a 1N5819 here because I have a few of those lying around. For the inductor values I used a 5900-222-RC (axial, 2.2mH, 1.7RDC, 500mA).



10% PWM: (this would be the lowest setting for practical use)



20% PWM:



30% PWM:



50% PWM:



100% PWM:




EDIT 3: This is probably a better way to do the flyback diode:



Having the diode in this configuration does raise the output voltage at low duty cycles: 10% PWM has gone from 3.3V to 5V.


EDIT 4: Added a resistor to the flyback diode to dampen the effect of the inductor during the off-portion of the PWM cycles. Mostly to improve the control curve, so I can have access to low voltages (3-4V) without resorting to ultra-low PWM duty cycles (<=5%).



Control curve now looks like this:


--- Code: ---PWM% => Vout
   5 =>  1.3
   6 =>  1.7
   7 =>  2.1
   8 =>  2.6
   9 =>  3.0
  10 =>  3.5
  11 =>  3.9
  12 =>  4.3
  13 =>  4.7
  14 =>  5.1
  15 =>  5.5
  16 =>  5.9
  17 =>  6.2
  18 =>  6.5
  19 =>  6.8
  20 =>  7.0
  25 =>  8.2
  30 =>  9.0
  35 =>  9.6
  40 => 10.0
  50 => 10.6
  60 => 11.0
  80 => 11.3
 100 => 11.8
--- End code ---
Zero999:
Did you model the ESR of the inductors?

Why do you want the inductor over the plain RC circuit? If it's efficiency, then in the first two edits, the diode is dissipating quite a bit of the power. In the fourth and final edit, R1 is dissipating a lot of power. Of course, if you're not bothered about efficiency, then this isn't a problem.

Another approach is to build a PWM circuit, running at a much higher frequency, run off a diode and capacitor rectifier and use much smaller inductors and capacitors.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod