filtering 125 RMS to 125 mvDC for a digital display

#12

Joined Nov 30, 2010
18,217
Yipes! You changed the layout since I was last here and I feel kind of lost.
Anyway, I have a PM129B LED display, circuit ground same as input ground. Input impedance guaranteed to be >1000Meg. Max input = 199.9 millivolts DC. Labeled as 3 1/2 digits which I believe means a one on the left and three digits of any integer. I am using a cell phone USB charger to give it 5VDC, isolated, and I want to measure the output of my Variac. First thought: Diode, capacitor, voltage divider. It takes 15 uf to filter the AC down to half a significant digit with a 1 meg voltage divider. That causes a time constant of 15 seconds. I cant wait nearly a minute to get the next reading to stabilize. I have been playing with the math to design a multi-stage R-C filter to get a faster time constant, but the math is tedious and the circuit gets bulky. I think I must be doing something wrong. Maybe my whole approach is wrong.

How to get 125.0V RMS down to 125.0 millivolts DC?

crutschow

Joined Mar 14, 2008
26,735
Hi #12, great to have you back.

I think you need to go to an active filter, with perhaps a precision rectifier circuit, to get such a low ripple with a reasonable settling time (say a second or so).

I can gin up something for you a little later, if that sounds good.

KeithWalker

Joined Jul 10, 2017
1,582
You will need a load on the output of the rectified AC or the smoothing capacitors will take forever to discharge.

Keith

Last edited:

MrChips

Joined Oct 2, 2009
23,070
Welcome back @#12.
For fastest response time use a peak detect and sample and hold. You can reset the signal on every cycle for 16ms response.

Hymie

Joined Mar 30, 2018
963
The simplest method would be to rectify the variac output (with capacitive smoothing) and reduce the voltage to the meter using a resistor dividing network.
At 125Vac the output of the smoothed full wave rectifier would be 177Vdc, so to reduce this to 125mVdc would require a divisor ratio of 1416:1.
With resistor values of 1MΩ and 710Ω, using a 250Vac X rated for the smoothing capacitor with a value of 0.1µF would result in a measurement time constant of around 0.1s (a reasonably fast response when adjusting a variac output).
Bear in mind that the measurement circuit will be a mains circuit, and therefore no part of the measurement circuit or 5Vdc powering the meter should be accessible.

crutschow

Joined Mar 14, 2008
26,735
Below is the LTspice simulation of a circuit with a 3-pole, 2Hz active filter, which gives a settling time of about 0.2s with a rolloff of about 70dB @ 60Hz.
The 120Hz ripple is less than 100μV.

The circuit responds to the average value of the full-wave rectified sinewave, not the peak value, so is less susceptible to spike noise and distortion of the mains sinewave.

Last edited:

DickCappels

Joined Aug 21, 2008
7,155
It is great to see you back here!

There are a lot of RMS to DC converters out there that are quicker than your circuit. I know both Analog Devices and Microchip have such converters. the value of Cavg (C average) gives you a trade-off between accuracy and precision.

If it is worth the effort you can use a microcontroller to continuously calculate the RMS value. I prefer to let an inexpensive analog chip do it for me.

crutschow

Joined Mar 14, 2008
26,735
By increasing the filter corner frequency to 4Hz, the settling time reduced to abou 0.1s, while still maintaining the ripple below 100μV.
(Note I changed the op amp to a CMOS type to eliminate the 5mV of offset due the the LM324's input bias current).

Last edited:

Number11+1

Joined Dec 14, 2019
3
Sorry about the delay. I tried to change my email address and got locked out of AAC. Right after I apologize to you guys I will post a HELP ME in the correct forum.
Thanks for the circuits!

crutschow

Joined Mar 14, 2008
26,735
Here's the result comparing a passive 3-pole filter with the active.
The active settles in about 0.2s to within 100μV and the passive takes about 0.6s.
The passive ripple is also less than 100μV.

Number11+1

Joined Dec 14, 2019
3
Here's the result comparing a passive 3-pole filter with the active.
The active settles in about 0.2s to within 100μV and the passive takes about 0.6s.
The passive ripple is also less than 100μV.

View attachment 194531View attachment 194532
That's perfect! The 3 stage RC is good enough for me. Thanks for doing the math/simulation. My failure in the simulation department is why I gave up after several pages of math, guessing what the part values should be and failing. (scratching through plastic drawers to see if I have any 15 nf caps...)

crutschow

Joined Mar 14, 2008
26,735
Thanks for doing the math/simulation
It was mostly trial-and-error simulation to get the low ripple value you wanted.
scratching through plastic drawers to see if I have any 15 nf caps..
Of course you can use any RC combination that has about a 15ms time-constant.

Last edited:

#12

Joined Nov 30, 2010
18,217
It look like jrap fixed my account. YAY!

#12

Joined Nov 30, 2010
18,217
Of course you can use any RC combination that has about a 15ms time-constant.
I have a very full drawer of .01 caps from 250V line rated to 500V ceramics and enough film caps at 400V to 600V.
.015 is rare today.
Nine (9) 1.5M resistors.
Next a voltage divider. I assume this string of filters needs at least 10 X 4.5Meg for a load. (not a problem.) and that puts the final resistor around 35K to show 125mV to the meter.
This 1,414 to one voltage divider reduces the DC to 125.0 millivolts.
It will also reduce the 100uV ripple by over a thousand to one.
Am I right? Did you just do an overkill by not considering the voltage divider?
And did you figure for 60Hz on the RC model. I also have a big 0-12V (150W) transformer in there as a second output so I think one diode drop is all I want to insert as an error.
But then, when the total current is 3 or 4 microamps I ask: will the diode loss become insignificant, as in not 0.6 volts but more like 0.06 volts?

crutschow

Joined Mar 14, 2008
26,735
It will also reduce the 100uV ripple by over a thousand to one.
Am I right? Did you just do an overkill by not considering the voltage divider?
No.
The <100uV ripple was measured with the filters connected to the output of the divider.
And did you figure for 60Hz on the RC model.
No.
The filter input was the 120Hz full-wave rectified sinewave.
when the total current is 3 or 4 microamps I ask: will the diode loss become insignificant as in not 0.6 volts but more like 0.06 volts?
A diodes voltage vs current is logarithmic, and at that current the drop will still be in the neighborhood of 0.35 volt for a silicon junction diode (below).

Last edited:
#12

#12

Joined Nov 30, 2010
18,217
Thanks! All the details are confirmed.
The best chart I have for 1N4001-4007 shows 0.6V @ 10 ma. My brain can't extrapolate that by a power of 1000 (three logs) to get down in the 10 microamp range. The good news is, I have a 100 bag of 4007 diodes.
The bad news is, today is, "work on the shed" day. Tonight is, "bring in the brass monkeys" time.
36F tonight in Florida. Tomorrow I will be hiding from the weather, assembling a passive filter, and explaining an L-pad to a guitar player in California.

cmartinez

Joined Jan 17, 2007
7,290
If it is worth the effort you can use a microcontroller to continuously calculate the RMS value. I prefer to let an inexpensive analog chip do it for me.
If I remember correctly, Mr #12 doesn't do no MCU's ... no siree... and he doesn't like to sim either (except in his head) ...

Anyway, here's a chip that I've successfully used to accurately convert an offset sinewave input into an accurate linearly proportional RMS output.

Attachments

• 468.3 KB Views: 1

#12

Joined Nov 30, 2010
18,217
I don't like MCU's because they make machines trash can ready at the first failure. You either know the chip and the code and how to program it, or the whole machine never works again.

For instance, I broke my ankle on cinco de Marcho and I received an electrical bone stimulator. Not much of a mystery. 2V p-p sine wave @ 58 Hz into two coils. Twenty bucks in home brew. But it was enclosed in a magnificent plastic case with a controller on a cable. Two hundred bucks. But it has an MCU which allows 30 minutes of use every 22.5 or more hours and commits suicide after 90 days. \$2700.

Of course, I immediately performed a jail break for it. This is December and it still works because it can't remember when or whether it did anything. And that's what I think of MCU's.

#12

Joined Nov 30, 2010
18,217
If I remember correctly, Mr #12 doesn't do no MCU's ... no siree... and he doesn't like to sim either (except in his head) ...

Anyway, here's a chip that I've successfully used to accurately convert an offset sinewave input into an accurate linearly proportional RMS output.
(Read the post before this one.)
Thanks for the chip suggestion. That would be excellent if I had to go active filter on this, and I would if I was building this for anybody except my own personal work bench.
I do sim pretty well in my head, but this one had me frustrated because the math is so tedious. That's what friends are for.
A hearty thanks to all of the contributors!

crutschow

Joined Mar 14, 2008
26,735
this one had me frustrated because the math is so tedious.
That's why I let the simulator do all the math.