Constant average output voltage with PWM

Status
Not open for further replies.

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.
 

Please accept my apologies
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…