Voltage to PWM

Hi all, I want to make a V to PWM circuit. (For a servoed heater.) I drew a triangle wave into a comparator, and that seems simple enough. Though it will take a few IC for the triangle wave. (I guess I could use an opamp and dual comparator.) So I went searching for V-PWM IC's. Most are for SMPS controll, which seem overly complicated for what I want. I also want a fairly low frequency ~10-100 Hz, so I can roll off the edges. I did find the LTC6992

formatting link
which looks fine. Are there any other IC's I should look at? The 555?

Thanks,

George H.

Reply to
George Herold
Loading thread data ...

If you make a 555 sawtooth generator with a current source instead of the top resistor, it PWMs reasonably linearly. I assume this is inside a feedback loop, and merely intended to linearize the heater characteristic, so +-10% or so is not a problem.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

I'm using that IC for my test bed, see thread "Achieving 98% efficiency in a boost converter" and the links to my schematics and PCB layout.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

Yeah inside a loop.. we've got a bunch of 555's in stock.

I mostly forgotten the little I knew of 555's, what's the simplest current source? A two transistor current mirror? (I've never used on of those.)

I'll probably get the LTC chip... laziness wins over creativity. (creativity being constrained by time.)

George H.

Reply to
George Herold

Thanks.. I didn't notice, but I didn't know of the IC before today. I'll order a few.

George h.

Reply to
George Herold

I've just used a PNP transistor with an appropriate resistor between the positive supply and emitter, collector to the capacitor on the threshold/trigger/discharge pins, and a voltage divider to the base.

Something like this works fine:

formatting link

Reply to
bitrex

You can do something like this

formatting link

(ignore any actual part numbers).

This arrangement can be accurate to ppm, not that it sounds like you need it :)

--

John Devereux
Reply to
John Devereux

Thanks John.. I'll have to play a bit to make sure I understand how it works. That's a schmitt trigger inverter on the output? Oh, a schmitt trigger with two outputs and you are using the non-inverting one.

George H.

Reply to
George Herold

Yes, you only need a single-output schmitt of course.

The opamp output is a triangle wave with the turn-around at the schmitt thresholds. The key is that the integrator ensures the averaged PWM output, i.e. the duty, exactly equals the input voltage. Sort of like a delta-sigma without a clock.

--

John Devereux
Reply to
John Devereux

Hard to beat a classic comparator.

formatting link

The TimerBlox thingys are great if you're absolutely cramped on space, but geez, they're so expensive. They're also low voltage, which bites for power switching applications.

And as Phil noted, it's easily linearized with a CCS (which can be diode gated, like this one,

formatting link
but you only need the one current source/sink if you wire it for sawtooth wave instead), which gets it as good as most anything you'd need.

I'm also building a more elaborate PWM generator at the moment, though it's intended for a different kind of power control.

Tim

-- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website:

formatting link

Reply to
Tim Williams

Use a single chip micro to digitise the voltage and to generate the pulse-w idth modulated waveform. If you want precision use a sigma-delta A/D conver ter to digitise the voltage. The single-chip micro lets you paly all sorts of games with the pulse-width modulated waveform that aren't accessible wit h a triangle-wave/comparator approach.

Mixing a triangle-wave generator with a comparator has a few traps for the unwary. Cambridge Instruments had complicated scan-generator board that wo rked that way, and we had to modify the printed circuit layout several time s before the comparators stopped driving one another into oscillation.

It never happened on every board, but it happened often enough to be a real inconvenience to final test. I didn't design the original board, but I nur sed one set of modifications through the new printed circuit layout, and go t consulted when that turned out have occasional residual problems.

--
Bill Sloman, Sydney
Reply to
bill.sloman

If it is going to be inside a control loop and precision isn't required, a simple schmitt oscillator plus one resistor becomes a PWM generator.

Version 4 SHEET 1 880 680 WIRE -80 0 -144 0 WIRE 96 0 0 0 WIRE 144 0 96 0 WIRE 288 0 224 0 WIRE -144 64 -144 0 WIRE 96 96 96 0 WIRE 128 96 96 96 WIRE 176 96 128 96 WIRE 288 96 288 0 WIRE 288 96 240 96 WIRE 320 96 288 96 WIRE 96 112 96 96 WIRE -144 192 -144 144 WIRE 96 192 96 176 FLAG 96 192 0 FLAG 320 96 out FLAG 128 96 rc FLAG -144 192 0 SYMBOL Digital\\schmtinv 176 32 R0 SYMATTR InstName A2 SYMATTR Value2 Vhigh=5 Vt=2.5 Vh=0.5 SYMATTR SpiceLine Td=5n SYMBOL cap 80 112 R0 WINDOW 0 -61 22 Left 2 WINDOW 3 -63 58 Left 2 SYMATTR InstName C1 SYMATTR Value 1n SYMBOL res 128 16 R270 WINDOW 0 81 59 VTop 2 WINDOW 3 74 59 VBottom 2 SYMATTR InstName R1 SYMATTR Value 10k SYMBOL voltage -144 48 R0 WINDOW 0 -87 75 Left 2 WINDOW 3 -233 122 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value PULSE(0 5 0 250u) SYMBOL res 16 -16 R90 WINDOW 0 -53 53 VBottom 2 WINDOW 3 -40 51 VTop 2 SYMATTR InstName R2 SYMATTR Value 15K TEXT 408 64 Left 2 !.tran 0 250u 0 10n TEXT 176 176 Left 2 ;74HC14 has 1 v typ hyst at Vcc=5 TEXT 376 -32 Left 2 ;74HC14 PWM Generator TEXT 416 16 Left 2 ;JL Nov 11 2016

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

I was going to suggest a PIC (or similar), so I second your recommendation. There are devices in tiny packages (if desired), and cost well under $1 for single quantities. Minimal external components for power supply, bypassing, control voltage filtering, etc., same as any other design.

Paul

Reply to
P E Schoen

+1

I recently built a temperature controlled thing (an IR target made of an aluminium cored PCB with SMD resistors and thermocouples on one side and Kapton tape on the other side):

formatting link

I considered making a triangle wave generator, using a comparator, error amplifier etc., or using a TL507CP (plus extra bodged components to prevent the nasty sign-reversal at the end of the range...) but in the end I used a PIC (PIC16F1825) which was a much better solution. I could then implement a proper PID algorithm with no extra parts, graph the sensor output for the step response, and tune the parameters in a few minutes just by tweaking things over the serial port. Having the proper PID algorithm gave much less overshoot and much better control. I could also change the set-point with software which was nice.

I amplified the thermocouple voltage using an ADA4528-1

formatting link
and then fed the amplified voltage to the PIC ADC. (I did not want cold junction compensation as I wanted the target to be a fixed temperature delta above ambient.)

I don't trust software alone to not let things catch on fire, so I did also put a thermistor on the heater, and a window comparator (LM393) that would hold the main power relay on (after manually starting it with a pushbutton) for sensible heater temperatures, but that would cut all power if either the heater gets too hot, or if the thermistor goes open-circuit (which was somewhat likely as it was at the other end of a flex PCB being constantly moved).

Reply to
Chris Jones

You probably could have used a thermistor or RTD in place of the thermocouple, which would not require the precision amplifier, and also possibly cheaper and more rugged. A one-time (or self-resetting) overtemperature thermostat (like in transformers, motors, and toasters) would be good fire prevention (along with a fuse). You could use a Bluetooth model to communicate with the PIC16F1825 (which happens to be the same as I have used for several projects).

Microchip has added a couple devices with on-board op-amps, but the specs are not great:

formatting link

I like to design with the bare minimum pats count and cost, although sometimes it is better to use better external components and also have a few spare pins and other parts for modifications.

Paul

Reply to
P E Schoen

Yes but I wanted to monitor and control the *difference* in temperature between a heated target and a non-heated target. (I didn't care about the absolute temperature.) That would require two precision RTDs and a subtraction, whereas with some pieces of fine thermocouple wire I was able to make a very sensitive thermopile, with many junctions on each target. It can measure very small differences in temperature without the errors inherent in subtracting two large numbers coming from separately calibrated RTDs. Also, a pair of 0.1 degree accurate RTDs is expensive and big and still needs a pretty good opamp, whereas a few bits of fine thermocouple wire are small (so can be embedded in the target better) and cheap.

I found that RTDs do need a decent op-amp if you are measuring with 0.1 degree accuracy. You can directly connect the RTD bridge to a ratiometric sigma-delta ADC, however when I did this with an ADC board from Sensoray (which used a LT ADC), the input currents of the ADC caused unacceptable errors anyway (since they develop voltages in the RTD resistance), and I had to add op-amp buffers to fix the bias current problem, (and then RF filtering to fix slight interference from TV signals). If you use a low sample rate and choose the ADC very carefully then maybe the input current could be low enough that you can get away without buffer op-amps but it would require effort.

I wouldn't trust a pair of cheap thermistors to track each other within

0.1 degree, even if they can individually detect small temperature changes.

True, but they are much larger than the thermistor that I used, and would require significant modifications to the heated target in order to be able to fit them with decent thermal contact. Also the mass would be a problem on the moving assembly in my case.

I'm not sure why I would want to as it was part of some automated test equipment, but yes bluetooth serial adapters are handy sometimes.

Reply to
Chris Jones

s.

Cheap thermistors might not hack it, but you don't have to spend much to ge t "interchangeable" thermistors, which can be accurate to +/-0.2C. You can do better, but it starts getting expensive.

You can improve on this with a single point calibration in a well-stirred i ce bath, which is 0.0 +/-0.001C if the water (and the water made into ice) is of distillation quality. The stirring has to be vigorous enough to move the water right through the ice, but it isn't all that difficult to get it right.

--
Bill Sloman, Sydney
Reply to
bill.sloman

You can do a PID controller and a PWM heater driver.

But you can also just do a bang-bang controller: temp sensor, setpoint, lots of gain, mosfet. Let it find its own frequency and duty cycle. It's sure easy.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

But slow.It's hard to put the temperature sensor close enough to the heater to get a sub-second cycle time.

--
Bill Sloman, Sydney
Reply to
bill.sloman

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.