1
\$\begingroup\$

I have a cheap ac-dc adapter, but it outputs DC with a ripple. It has variable output, so it can output 12, 14, 17, and so on up to 32V.

I measured output of ac-dc adapter with an Agilent multimeter, and I was getting rather chaotic DC voltage. It would be around 16.9V to 17.2V, but it wouldn't "consistently" oscillate at some point or for the same amount of time.

Like it'd be around 16.880V and then jump around that value (±50mV), sometimes stay steady.

Or rise up to 17.120V and be there etc. I tried using a voltage regulator - and it worked, however it would output at fixed voltage level - 12V.

I don't need a fixed voltage output. As I would be using this adapter with various circuits, so buying a voltage regulator isn't an option.

For instance, I used this cheap ac-dc adapter on an old walkman audio player that needs 12V at the input, and there was a lot of noise in the headphones due to DC ripple.

I managed to simulate a 3rd order low pass filter, and it seemed to smooth out DC, so I get this straight line of DC with ~0Hz. 360nF was chosen per article, so that cut off frequency is around 45 hz. I tried changing capacitors to 1.6uF which corresponds to cut-off of 20Hz, but it was the same. Also, should I try to seek another formula, since I'm unlikely to have same values for all three capacitors IRL?

Anyhow, if I to build this circuit, how do I power up my LM358 op-amps? I thought I'd just supply op-amps from the ac-dc adapter that has DC ripple, but then the filter stops functioning properly and I no longer get smooth DC at the output of the filter circuit.

enter image description here

Does 3rd order low pass filter require separate, external, smooth DC (like from a lab bench supply) power? Am I supposed to rely on passive low pass filtering then?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ IIRC the LM358 isn't rail-to-rail. Try an opamp that can amplifier rail-to-rail \$\endgroup\$
    – Swedgin
    Commented Oct 23, 2019 at 11:56
  • \$\begingroup\$ Your multimeter voltage measurements likely vary because AC input amplitude varies. A DC multimeter won't indicate how much audio-frequency ripple is present. You seem concerned with both DC variations and ripple...the low-pass filter will do nothing about DC variations. Consider using a LM317 regulator with a variable-resistor control of output voltage - it will kill both ripple and DC variations. \$\endgroup\$
    – glen_geek
    Commented Oct 23, 2019 at 20:42
  • \$\begingroup\$ @Swedgin which one would that be by default in LTspice? And something's that's common enough that I can buy at a local electronics shop? \$\endgroup\$
    – user234571
    Commented Oct 24, 2019 at 9:18
  • \$\begingroup\$ Sorry, no idea which one in LTspice. As for an IC in specific, almost all new op-amps are rail-to-rail. Just filter in your local supplier after rail-to-rail op-amps. I have to google too. \$\endgroup\$
    – Swedgin
    Commented Oct 24, 2019 at 9:41
  • \$\begingroup\$ Decoupling caps. Your simulation doesn't need them because its wires are perfect. \$\endgroup\$
    – DKNguyen
    Commented Oct 28, 2019 at 14:54

2 Answers 2

3
\$\begingroup\$

There is a gotcha when measuring supply voltage ripple: it depends on load current.

For an oldschool transformer-rectifiers-capacitor supply, more load current increases ripple voltage.

For a switching converter, it is more complicated. Quite often, wall wart AC-DC switching converters will be optimized for low idle current at no load, as people often leave them plugged in with no load attached. This often happens with cellphone chargers. In this situation, the converter spends most of the time in sleep mode doing nothing, and only recharges the output capacitor once in a while when its voltage is below a threshold, then it goes back to sleep mode. This results in a sawtooth ripple on the output, and this is most likely what makes your multimeter display those weird readings.

But as soon as you connect a load, the converter will work continuously, which results in a different ripple voltage value and frequency. So, don't trust your multimeter measurements too much. Also a multimeter won't tell you about the high frequency noise.

Anyway. If you want a tracking regulator which cleans up noise while allowing you to adjust voltage with the voltage control on your wall wart, you can try a capacitance multiplier like this (fancy version):

enter image description here

The LC filter at the input rejects HF. Then there is a lowpass, and a follower, to reject LF ripple. I used a CFP follower for lower output impedance and also lower base current on Q1, which allows using a quite high value resistor for RC filter R2/C5. Output voltage is about 1-2V below input voltage, depending on choice of diode D1, which can also be a LED.

This is the transfer function. It has about 60dB rejection over a wide range of frequencies.

enter image description here

HF rejection will strongly depend on layout. I'd suggest wiring it ghetto style on top of a piece of copper-clad pcb used as ground plane, with the input at one side and the output at the other side. This way, you can't get bitten by a shared impedance in GND between the input and output caps, which would transfer HF input noise into the output...

In the sim, 100µF cap is lowish ESR (1 ohm) and 1µF is MLCC. L1 should be a ferrite bead which can handle required current. Same for Q2, it should handle the current.

EDIT how to design the circuit.

You specified a max current of 0.5A and max voltage 30V. First we need a power transistor for Q2, it should handle the voltage, current, power and safe operating area. With 2-3V dropout at 0.5A it will dissipate less than 2W, so let's use a TO220 or DPAK package.

Q1 provides Q2's base current, and Q1 is not a power transistor, so we don't want Q1 to run at more than say 10-20mA for 500mA output, which means Q2 should have at least hFe>25 at 0.5A. The STN9260 you have won't work, as its hFe vs Ic curve shows, at 500mA hFe drops too much.

enter image description here

So let's use TIP127 instead, it's a darlington so it will have plenty of gain, plus I have the Spice model. Datasheet says minimum hFe around 1000, so its base current will be less than 0.5mA. Q1's Ic is S2's Ib plus 2mA from R6. So, Q1's base current will be less than 20µA, which means we can set R2=4k7 for an entirely arbitrary 100mV drop on R2...

Q1's base sees an impedance of C5 in parallel with (R2+D1) ; in this case R1 is irrelevant as D1 is ON, its dynamic impedance will be a few omhs to a few tens of ohms. So at DC R2 dominates the impedance seen by Q2's base.

Q2 Vce is D1's Vf plus Q1 Vbe. If D1 is a red LED, its Vf will be 1.6-1.8V so we get 2.2-2.4V for Q2 Vce, that should work fine. You can use a green LED for an extra 0.2-0.4V.

On power up, C5 will require a few seconds to charge through R2.

In case of short circuit at the output, C5 will discharge through Q1's base into the output. In order to avoid excessive base current, it would be a good idea to add a 100R base resistor to Q1 that I forgot in the above schematic.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ @ peufeu you continue to delight \$\endgroup\$ Commented Oct 23, 2019 at 17:43
  • \$\begingroup\$ @peufeu Like I said, I kinda need something that I wouldn't need to manage by replacing some components in the circuit to change voltage. Like if I have several devices each requiring different input voltage, I need to be able to swap them quickly. Also, putting in some kind of pot or other button is also not an option. Why can't there be circuit that would just smooth/average whatever is inputted? \$\endgroup\$
    – user234571
    Commented Oct 24, 2019 at 8:08
  • \$\begingroup\$ @user234571 This circuit tracks the input voltage, output will be: input minus voltage on D1 and one Vbe. But it does not output exactly the input voltage. For this you could use a "finesse noise shunt" but it'll only have high ripple rejection at HF, not LF. \$\endgroup\$
    – bobflux
    Commented Oct 24, 2019 at 9:42
  • \$\begingroup\$ @peufeu a bit of voltage drop is fine, where do I get this Q2 D45H11?? Can I use any other transistor instead? Like BC860C,215? Where do I get formulas to choose components for this capacitor multiplier? I also suppose, I would have to pick R6, R2 and C5 with certain values to bias both Q1 and Q2 (related to beta value of those transistors)? Also, wouldn't I need a voltage follower? Can I just use an op-amp Lm358 for that? The way I connected it at the end of my circuit in op-post? \$\endgroup\$
    – user234571
    Commented Oct 25, 2019 at 3:36
  • \$\begingroup\$ You can replace D45H11 with another transistor that can handle the current and power dissipation you need. BC860 is very low power, so that wouldn't work. LM358 is a low power opamp, it would need a power transistor at the output as a follower, but it isn't the ideal opamp since its output voltage range is limited to 2.5-4V below positive rail. \$\endgroup\$
    – bobflux
    Commented Oct 25, 2019 at 9:13
1
\$\begingroup\$

While an active-lowpass filter does "filter", these are designed for signals, not power. What you need is power filtering.

There are three main ways in which this is typically done, from simplest to most complex:

  1. Use a passive RLC filter and power components. These can work well for some loads, and work very poorly for others.

  2. Use a LM317 linear regulator. Instead of the LM7812 (fixed 12v), consider an adjustable linear regulator (or make it adjustable.) Look in this datasheet for examples. Drawback is that these can dissipate a lot of power as waste heat, because there can be many volts dropped across them.

  3. Use a "tracking pre-regulator." This implies reducing the voltage dropped across the linear regulator as much as possible. Thus the linear regulator's output is "tracked" to be just a volt or two under whatever the supply voltage is. This provides very stable DC output with minimal loss, but is harder to build and would be custom-tailored to your particular application.

\$\endgroup\$
2
  • \$\begingroup\$ @peufeu by adjustable do you mean it's going to be automatic? Like no one has to manually adjust it? The circuit needs to work on its own. If you input with ac-dc 12V, then the circuit needs to stabilize 12V, if you input 17V, then filtering circuit needs to stabilize 17V aand so on. If I have various devices that need various voltages, 12v, 17V, 20V, I don't need have to each time remove some resistor from a circuit and put another one in order to fix output. \$\endgroup\$
    – user234571
    Commented Oct 24, 2019 at 4:12
  • \$\begingroup\$ @user234571 A simple 317 circuit needs to be adjusted by changing resistances in it. But you could add circuitry to make it automatic, or even just switches to make it easy to do manually. \$\endgroup\$
    – Hearth
    Commented Oct 28, 2019 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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