# RMS approximation of Square/PWM signal

• posted

Does anyone have a way to approximate and RMS voltage from a PWM signal. I want to regulate the RMS voltage sent to a lightbulb, but do not have the room for the inductor and capacitor required to carry 20+ amps of current. I need to feedback a voltage to the PWM controller that is proportional to the RMS voltage of the output. I don't need an EXACT RMS conversion, rather a ratio would be fine since I can adjust the actual voltage fed back to the PWM controller via a resistor divider. For this current design, it will be operating at about 40kHz.

• posted

square-wave, duty cycle D = Ton/Toff

RMS = peak*sqrt(D)

Cheers Terry

• posted

I know how to calculate it on paper. I'm trying to electronically approximate it to use as a feedback voltage for a PWM controller/regulator. I'm trying to avoid using an RMS converter chip.

• posted

** RMS to DC converters probably lack sufficient bandwidth for 40 kHz PWM anyhow.

A small lamp connected across the PWM output with a CdS cell sensing the light level would give you a feedback mechanism that could then be trimmed to give the desired rms voltage output value.

BTW with 40 kHz PWM at 20amps - I hope your cable runs are short.

...... Phil

• posted

This is wrong - duty cycle is D= Ton/(Ton+Toff)

Ton/Toff is the mark to space ratio (MS) which isn't immediately useful for this kind of calculation. Obviously, it can be greater than one.

D= MS/(MS+1/MS)

Happily, if you define D correctly, Terry's conclusion is correct.

If the pulse width modulation was very slow - slower than the thermal time constant of the filament - the situation could be complicated by the fact that the filament would start off with a relatively low resistance,which would rise to normal operating levels (ticket output) during the duration of the "on" pulse, but this is a couple of orders of magnitude slower than 40kHz.

-- Bill Sloman, Nijmegen

• posted

"Jamie" = Maynard A. Philbrook KA1LPA

** Gives the average value - not the rms one the OP is after.
** ROTFL

Radio hams don't even know the significance of rms values.

..... Phil

• posted

It's a square wave? If it is, and it's unipolar (0-110v), then average and RMS should be the same. Sample your voltage with a voltage divider, and put in a RC timeconstant to average the signal. Choose a reasonable timeconstant, say 1/10 sec (lightbulb itself isn't all that fast, so there's no point putting in a short time constant). If the drive is "bipolar" (AC square wave), you can rectify the sample voltage, just make sure that the charge/discharge times in your diode RC circuit are similiar so you get an average and not a peak. If by PWM you mean a chopped up sine wave like you get from an SCR or TRIAC controller, then put in a small (1/2 w) load resistor, and strap a thermistor to it. Use the thermistor in a voltage divider from DC, and effectively use your controller to regulate the temperature of the resistor! You will need another similiar circuit to make a full wheatstone bridge to reduce the effects of ambient temperature. This circuit is truly RMS, and will take all kinds of frequencies, crest factors, etc. You could use a photocell in the above circuit instead, thereby regulating the light level!

-Paul

• posted

Use a R and C network to yield you the DC Loop back voltage.

At 50% duty cycle. the output is 50%. if external loading is going to be an issue that may cause this to drop even more then Use the RC network to drive an ADC input on the Uc. Since this same Uc knows the current duty cycle, you should be able to determine the actual voltage on output and loading..

"

• posted

"Paul"

** Oh no - not another one with no clue what " rms value " is.

The only time " rms " and average value are the same is for a DC voltage.

..... Phil

• posted

It's funny you suggest the lamp/CdS cell. I had thought of that, but thought the response would be to slow during startup. Also, size is a huge factor.

• posted

"Jamie" = Maynard A. Philbrook KA1LPA

** You are an absolute FUCKWIT Philbrook.

...... Phil

• posted

Phil, Please go back to school and learn how to read peoples request of what they're trying to do, dick head.

And get your nose out of the text books. Because it's obvious that most of that vile you spuke out comes from nothing but text and not experience..

Reading about it and actually doing something with it are two different worlds boy!

P.S. No, I won't be all upset with your come back, It'll be the usual Phil Vile with nothing but dog shit comments and lack of content.

Mostly old one's because you haven't an imagination to think up some new material to keep it interesting.

But then again, with you it's always been a circus show so why should we expect any better?

"

• posted

While somone else has already addressed your RMS misinterpretation, I had thought of the resistor/thermistor idea. A 1206 SMD package resistor with a NTC thermistor superglued to it. The problem there would be that this regulator would be fitted inside a 30mm round x 6mm high cavity. The heat from the D2PAK FET, just mm away, would corrupt the reading of the thermistor. So the linger this thing was running, the dimmer the output bulb would get because the thermistor would be getting heat from a source other than the resistor on which it's mounted.

• posted

** A small size ( 1 or 2 watt) lamp will light up way faster than the main 20 amp load one - plus the PWM needs to ramp up from zero to avoid a large surge in current at start up.

If your PWM drive snaps on there will be a 200 amp plus surge due to the tempco of tungsten.

Also, a CdS cell plus lamp ain't very big - a tad larger than a 1W resistor.

Time you came up with more details - pal.

What is the DC supply voltage and source ?

Will the 20 amp lamp be very close to the PWM circuit or not?

What duty cycle will be typical ?

..... Phil

• posted

"Jamie" = Maynard A. Philbrook KA1LPA

Radio hams don't even know the significance of rms values.

** You are an absolute FUCKWIT Philbrook.

...... Phil

• posted

oops. I meant to write "T". thanks.

• posted

You know the duty cycle. Lowpass filter the load voltage, measure that average voltage, do the math.

John

• posted

"Jamie" = Maynard A. Philbrook KA1LPA

Radio hams don't even know the significance of rms values.

** You are an absolute FUCKWIT Philbrook.

...... Phil

• posted

"John Larkin" "JMini"

** ???????????

The OP does NOT know the duty cycle at any particular time - that is a variable in the system.

..... Phil

• posted

how wide a range do you need to regulate over? average the square wave, then run it thru a suitable nonlinear amplifier to get a crude approximation.

or: use a pair of multipliers. square the sensed voltage & average (LPF), then square the setpoint prior to your controller, IOW control Vrms^2 not Vrms. squaring is a lot easier than sqrting

Cheers Terry (who cant tell T from Toff)

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.