I need to simplify a 'duty cycle to voltage' circuit. The range it has to cover are a varying 5 volt square wave pulse with a frequency range of 40 Hertz to 400 Hertz. Once the frequency is set it stays there while the duty cycle of the square wave is varied within the set time period.
The idea is to use a voltmeter as a percent duty cycle indicator. ie:
10.0 volts = 100 percent duty cycle. If the frequency was always constant I think I could get away with a resistor and capacitor and just measure the average voltage. Things become more difficult with the variable frequency thrown in.
Any help would be welcome.
mike
--
It is hard enough to remember my opinions, without also remembering my
reasons for them!
--Friedrich Nietzsche
As I read it, the OP wants a voltage output proportional to duty cycle, _NOT_proportional_to_frequency_, which is what a tachometer circuit does. ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Who knows? I think it's just the range of input frequencies the OP has to contend with.
You could do it digitally, with a uP. Count the on and off times, then do the math... then feed a DAC if your mind-set is to have an analog output. ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
By the time you get a large enough cap/R on there to remove the ripple at those freq's, your response time to change is slow.
There are a couple of ways I would do it, once I have done and the idea is just an idea of course :)
Edge+ trigger circuit to reset 2 charge constants to zero and two sample and holds via a 4066. First sample and hold will record the on duty charge and the second charge constant will set the gain for the final sample and hold. At the end of each full cycle, the edge triggering will capture the sum to the final hold area and this will also trigger a short pulse afterwards to discharge the caps for the next cycle. I did this years ago using a JFET op-amp to hold the samples and used a 4066 for the gating, a long with a few other basic glue components etc. You can get your readings in one cycle this way.
Use Pic or AVR or similar uC with a high res counter in it and fast output PWM. This will also get you good results and you avoid the log problem of the first one, this one I have not done in a uC yet but have done it using board full of flip flops using a latch and hold digital that made up a R ladder type DAC.
You put a resistor from it to a capacitor to ground.
Like a 10 K going to a 47 uF.
you got other requirement like response time anmd all that ? State them. Otherwise that will work, if you are not pulling any current and don't care about efficiency.
If you want efficiency use a coil instead fo a resistor. It also damps up the DC output better.
OK, 100K and 100 UF then. Should work fine as long as the meter doesn't load.
The engineering question here is for one - how fast do you want it to respond ?
The sinmple RC will do exactly what you want, no doubt. The voltage of course has to be tightly regulated. IF you can rescale the readout, it can be any voltage, but it still has to stay right on the money or the reading will be off.
At 40 Hz, a 10 K into a 47 uF wil make so close to DC it will be fine. It will also take (2tt/t/whatever time constant) to respond to a change. how long do you want to wait ?
You could use a megohm and a 160,000 uF, but it would take about a week to respond.
Who knows? I think it's just the range of input frequencies the OP has to contend with.
You could do it digitally, with a uP. Count the on and off times, then do the math... then feed a DAC if your mind-set is to have an analog output.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
***
When even the king of analog advises a digital solution what other
possibilities may exist? I agree, the most simple solution is a micro,
preferable one with a build in DA-converter. As this type of converters
often provide a 0-5V output, you will need an opamp to amplify that
output... and a program. There are lots of micros available with or without
DA, and dozens of separate DA-converters if you want one. But the learning
curve will be prety steep. Requires lots of time. Maybe too much time for a
one-off. So I propose a digital-analog solution.
Divide the 40-400Hz frequency range in eight or sixteen subranges. Each of
that subranges should be handled by a separate RC-combination. To select the
required RC, take an 8-bits counter that runs with a 1kHz clock to measure
the current period time. The output of that counter will drive the selector.
Off course, you wil need a little bit of control logic but that should not
be that difficult.
petrus bitbyter
I also had twisted thoughts... Use dual slope A-D techniques to convert period to a voltage, likewise convert on time to a voltage... add nasty analog manipulation and get laughed off the group >:-} ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
NO! Nothing with a microprocessor is really simple, and especially nothing that requires real-time performance.
A flip-flop and two sample-hold integrators will give you one-cycle response time, if that's required. Resistor/capacitor/op amp makes an integrator, and the flip flop operates analog switches to enable one integrator input, with output disconnected, while the other input floats, but has its output-connected. Two discharge transistors are operated from the sharp edges of the flip-flop output (so each input-connected integrator starts with a discharged hold capacitor) in the obvious way.
If you can just enable/wait/read the output, it only takes one op amp, and fewer switches. That would be a fairly good way to do things if a microprocessor is doing the readout.
Good point... nice gadgets. I once was tasked with designing a driver to linearize such a gauge.... equal angles for equal input voltage increments (45 years ago :-) ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
--
Mike,
I have a circuit with a duty cycle that you can set at any frequency
within your 40 to 400Hz band, then change the frequency and the duty
cycle remains constant.
I can't give it away, but if you're interested email me.
John Fields
Generate a master ramp synchronized to the input frequency, but amplitude "AGC'd" to be 1V peak by a controlled current source.
Replication of this same current into same value capacitor, but switched by the duty cycle, presents a peak voltage proportional to duty cycle... 1V = 100%, irrespective of frequency.
AGC method shown is a crude "quicky"... in actual practice corrections are by "dollop" ;-)
First used this scheme in the summer of 1968 when I was at Philco-Ford, Santa Clara, for an automotive inductive storage ignition system timing:
Turn on charging of inductor. When it reaches 5.5A go into regulation mode, holding 5.5A until firing.
System senses at firing time, was inductor into regulation already... delay timing by a dollop before beginning next charging cycle.
If inductor current was not yet at 5.5A, make timing a dollop earlier.
(Scheme minimizes/optimizes switch power dissipation.)
I used to scare my bosses (Bob Rutherford/John Welty) by driving (1968 Ford Thunderbird 429CID) up and down 101 with my legs crossed Yoga-style and drive only using the cruise control buttons up to 100 MPH, to see if I could out-run such a timing scheme... I couldn't ;-) ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Thanks to all for the suggestions. The circuit is meant for measuring input voltages to a mosfet H bridge driving a transformer primary in a welder. The polarity changes on the electrode as the square wave pulses.
For aluminium welding, the reverse polarity is used as an oxide removal method and is only a portion (30 percent?) of the complete cycle. The variable frequency changes arc characteristics while the duty cycle changes the amount or width of the cleaning action.
At first I thought of an analog voltmeter with a centered needle. At 50 percent duty cycle, that would probably zero the needle. Then I discovered the local electronics place wanted over ninety dollars for the thing.
Idea two is the use of two digital voltmeters at eight dollars each. One readout for each portion of the period. An open collector setup in the circuit would allow a ground path for meter number two.
The logic voltage is still flexible...I'm not set on using five volts per se. Ten volts is nicer to convert to percentage equivalents and it could be gotten from the mosfet gate drivers.
I'd have to get the ratios right, so the readouts add up to 100 percent.
Thanks to all again for their attention to this.
mike
--
It is hard enough to remember my opinions, without also remembering my
reasons for them!
--Friedrich Nietzsche
Ok, off the top of my head.. I think your problem is simple actually...
use a voltage divider with noise filter from the (+) side that feeds the H bridge, not the output of the H bridge. This is assuming this voltage is varied..
Next, use a basic PWM RC network and connect that to the output side of the H bridge that yields the welding duty not the cleaning cycle when output is (+).
Take these two output networks and introduce them to the inputs of a differential op-amp! Input + and - or a pair. Use some TVS diodes or some sort of HV spike protection in case you get an unexpected high level pulse.
The idea is, (-) INPUT of the amp will monitor the + supply voltage to the bridge, the (+) INPUT will be measuring the output of the PWM conversion to DC, which will be the duty cycle..
As (-) input increases, it'll lower the effect of the (+) input from the PWM circuit.
What you should get when all said and done is an op-amp circuit that tracks the welding supply voltage set point on then (-) input and the duty cycle ratio on + input.. So as your voltage level is changed at the welding supply you should get a steady duty ratio reading..
I see this very clearly in my mind, but there is something you must know, I was born and raised in Maine, USA. and they say we're all related so you may want to ignore me.
P.S. I had a great fathers day, my youngest backed his Jeep wrangler into my rear quarter panel of my Grand Cherokee Jeep. Lots of excuses of course, but I just can't figure how since I went out of my way to park my Jeep far up on the lawn away from the drive way and every one else.
KIDS! They don't even bother to look behind them while they are backing up as they are driving like cowboys. Most likely on the cell, too!
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.