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?
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
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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
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.