Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Constant average output voltage with PWM

Status
Not open for further replies.
Futterama said:
Then, if supplying the glowplug with 3V at a 50% duty cycle, the current through the glowplug at ON time is 3A (at 3V). This gives a power of 9W half the time = 4.5W. This is twice the power at 1.5V.

I'll just have to recalculate the duty cycle to make this work right.

Exactly. But still, the RC filter for the ADC looks like a problematic implementation for 2 reasons. One, if the filter cap's value is too low or the switch gets left on for a tiny bit too long, the ADC pin can easily exceed Vdd and blow the PIC unless we add some additional protection. Also note the switching transistor is either on or off, not connecting it from v+ then ground. Thus when the transistor is off the glow plug load is the only way it discharges. Since it's probably <1/100th the R of the RC filter this is ok. But if you don't have the load connected, the C will charge up to V+ almost instantly and can blow the PIC pin if the PIC doesn't respond fast enough.

Second, the flow's complicated. You have to wait for the filter to settle, then you read 3v on the filter, but the last duty cycle was 50%, then the source voltage must be 6v so the duty cycle should be 1/16th. I'm suggesting the simplest thing to do is use a voltage divider to read the source voltage, you see 6v, immediately you can calculate that 1/16th is the required duty.

But there is another catch to the PWM strategy here. Your proposed source voltage is way high. When the transistor is on and V+ is 18v, the current is 12x what the glow plug normally takes and I think glow plugs already take multiple amps. If this is a small battery you are asking for a lot of surge capacity, maybe up to 30A, and the wiring may also present a significant resistance at this current.

The ideal solution is a step down "buck" DC/DC converter, one that uses an inductor. There are many ICs that can do this. Also the PIC can be used as a controller for the same circuit, although it is not well suited. The special purpose reg chip is a much better idea. In either case you will need to deal with a number of issues with inductor, transistor, and frequency selection.
 
Oznog said:
But there is another catch to the PWM strategy here.
I see your point. I'll use the buck thing, or perhaps just go the easy crude way, and use a linear regulator with a big heatsink (eg. the RC car alu chassis plate) and a lower voltage source.
 
Oznog said:
Nigel Goodwin said:
Sorry to do this!, but you are so completely wrong! :roll:

A 50% duty cycle of a square wave is 50% of the power, don't forget PWM is a square wave, NOT a sine wave, so RMS isn't a problem (RMS and average for a square wave are the same). Feel free to draw a square wave on graph paper and count the squares, THAT'S how to calculate RMS (you can do it with a sine wave as well!).

Man Nigel, I thought you'd be the last guy to mix this one up! RMS and average voltage are different factors for any varying waveform, including square wave.

50% duty is 50% of the power. But since twice the voltage is 4x the power into a resistive load, 50% duty cycle will not bring the power delivered to the load back down to nominal. You would need to use 1/4 the duty cycle to get back to nominal.

Please accept my apologies :oops: :oops: :oops: :oops: :oops:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top