Low frequency to voltage conversion

Thread Starter

vielle568

Joined Feb 3, 2012
13

My project involves the conversion of a frequency of 500Hz (max) and I need a fast response time for this conversion. The current design uses a 2917 chip for the F/V conversion, and this works OK at slow speeds but the delay is not acceptable at medium or faster rates.

I noticed a quote from jimkeith in a recent post on a similar subject:

Quote: Originally Posted by jimkeith

"The low frequency is a problem--to reduce ripple in the analog output, a relatively long time constant is required--to obtain accurate readings with low ripple, a time period of 0.5sec to 1sec is required for the voltage to settle--is this time delay acceptable?

Another way to do this is via a microcontroller that measures time between pulses calculates 1/t and outputs an analog signal--relatively simple problem for a high level language code developer--this provides fast response without ripple--probably beyond the scope of your problem--do you agree?"


I can't accept the 1 second time delay but can jimkeith (or someone else) please explain a little more about the alternative approach using the microcontroller. I've never used a microcontroller before but it sounds like the ideal solution. Thanks for any help offered.
 

THE_RB

Joined Feb 11, 2008
5,438
The microcontroller measures the pulse period of each incoming wave, measured to 1uS or maybe 0.1uS resolution.

Then the micro generates an analogue voltage output using PWM (probably 10bit, resolution of 0-1023 steps in the range 0v to 5v).
 

jimkeith

Joined Oct 26, 2011
540
Before going to the difficulty of going to a microcontroller, post your current schematic and perhaps we can offer simple improvements. What is your frequency range? The frequency of the above circuit was 18hZ. I did post a F-V converter schem that might have some merit.

Another member (forgot who) suggested a sample and hold circuit--this could possibly be a good solution also.
 

Thread Starter

vielle568

Joined Feb 3, 2012
13
I've attached the schematic to this post.

Basically the IR diode/sensor generates pulses from holes in the rotating wheel. This signal is then fed through a 555 timer

1) to create a good clean signal for the 2917 and

2) to guarantee no signal when the wheel comes to rest.

The output from the 2917 is the overspeed indicator and triggers when the wheel runs above a certain speed; this limit is adjusted by the trim pot (tirant) in the diagram.

The circuit is used in the yellow instrument in my avatar photo. Every time the crank is accelerated (above a set speed) the signal from the 2917 triggers an analogue switch to control the sound effect for the rhythm.

What I'm looking for is some kind of circuit that give a fast response to the acceleration of the wheel; I don't really need an accurate measurement but a rapid response is my main concern. I was thinking of using accelerometers but then there's gravity to consider and the problem of mounting the sensors on the wheel and having to use slip rings or radio to transmit the output signals. Also, if the instrument gets bumped during use you could well get an extra beat in the rhythm! A tacho-generator would be another alternative, but from what I've seen these devices are not that compact and rather expensive for the experimenter. Any other suggestions welcomed.
 

Attachments

Last edited:

Mark_T

Joined Feb 7, 2012
47
If I'm right in thinking that when the wheel passes a certain speed (Not acceleration) you wish a digital output to be activated. Do this using a monostable which can be made adjustable. Set the period of the monostabe to (say, as its adjustabe) 2.5ms = 400Hz Then the o/p will be contiuously Hi above this speed or will have low going spikes below this speed. Feed this output into a resitor and cap to ground (Normal LP filter). But put a diode across the resistor so the capacitor will discharge instantainously on a negative spike. The output can then be fed to the two '14 gates you have at your O/P. The LP filter time constant needs to be 'relatively large' at say 10-20ms if that is an acceptable delay so use 220nF and 10k.
Hope thats what you were wanting from the circuit, schematic avail on request.
A micro will do it, but you'll have to learn programming etc. This is single chip solution, your 555 may act as the monostable in which case throw away the 2917 and feed the 555 O/P in to the filter I've described.(3 components, use a 1n4148 diode)
 

jimkeith

Joined Oct 26, 2011
540
Here is the schem of one I did a while ago--I can provide the expresspcb circuit board file ($51 for 3 pieces).
There are features that may be eliminated, thus simplifying the hardware.
It uses tricky high speed integer math written in assembly to do the division.
To adapt it for 500hZ (from 12kHZ) is not a trivial problem as the timing registers may need an additional byte.
Since the frequency is now a factor of 20 lower, the math may be accomplished via a high level language.
Perhaps a good project for some of you pickaxe guys as I do not have the time available.
 

Attachments

Last edited:

DickCappels

Joined Aug 21, 2008
10,153
A linear analog integrator ramps up until the pulse from the 555 is received. During the pulse, the output of the integrator is frozen and the output is sampled by a sample and hold circuit, then the integrator is reset. This would allow updates once per cycle but its not a one-chip solution. Interested?
 

jimkeith

Joined Oct 26, 2011
540
A linear analog integrator ramps up until the pulse from the 555 is received. During the pulse, the output of the integrator is frozen and the output is sampled by a sample and hold circuit, then the integrator is reset. This would allow updates once per cycle but its not a one-chip solution. Interested?
This sounds neat and I have experimented with it, but the output is a linear function of pulse period--not frequency. To get frequency the sample and hold output must be mathematically inverted because F=1/t. Perhaps the AD633 can do the job--see sketch
 

Attachments

Thread Starter

vielle568

Joined Feb 3, 2012
13
Thanks Mark T for your idea of changing the frequency of the 555 pulses and adding a RC filter to the output. Unfortunately the response time still seems too long to consider this approach.

Thanks too jimkeith for your schematic for the calculating F-V converter. I must admit that I’m not sure exactly how to apply your design to my project but then DickCappel’s proposition and jimkeith's comments about inverting the signal seem to offer a less complex solution.

Looking at jimkeith's schematic for dividing the signal I would assume that the pulse train from the 555 would be connected to input E and that there would be a time reference signal connected to Ex. The output at Wt would be proportional to frequency over time. Am I on track?
 

jimkeith

Joined Oct 26, 2011
540
Looking at jimkeith's schematic for dividing the signal I would assume that the pulse train from the 555 would be connected to input E and that there would be a time reference signal connected to Ex. The output at Wt would be proportional to frequency over time. Am I on track?
This schem is out of the app notes for the Analog Devices AD633:
http://www.analog.com/static/imported-files/data_sheets/AD633.pdf
Available from DigiKey:
http://search.digikey.com/us/en/products/AD633JNZ/AD633JNZ-ND/750991

Ex gets its signal from the '555' sample and hold integrator.
Input "E" is simply a DC scaling input--probably set via a pot and forgotten.
Yes, Wt is the frequency output signal (DC) and it can be inverted to make a positive signal level.
That way you have one input and one output.

Will think about how to do the sample and hold integrator.
 

DickCappels

Joined Aug 21, 2008
10,153
By the way, I'm not sure its clear to Vielle568, but the AD633 circuit as "reciprocal taker", which takes the reciprocal of voltage as a function of cycle time, which is voltage as a function of frequency. That's if you want a linear function of frequency, otherwise, a literal inverting amplifier would get you a nonlinear proportional signal.

Another BTW, Jimkeith, Doh! [slaps forehead] I should have realized that!
 

jimkeith

Joined Oct 26, 2011
540
I think that I'm missing something--you need a stop signal and an over-speed signal--do you need an analog speed signal for anything else?

If not, there is a very simple solution.
 
Last edited:

Thread Starter

vielle568

Joined Feb 3, 2012
13
No need for a stop signal and the over-speed signal was only a convenient option that was available on the 2917 chip.

All I'm basically looking for is an analogue speed signal for the wheel. This can then be sent to a comparator (along with a reference voltage adjusted by the musician) to trigger an output at the desired wheel speed. This will be the over-speed signal that will control the instrument.

The signal from the wheel sensor is a series of pulses and to convert this frequency to a voltage without an appreciable time delay is my main concern. Would it be possible to use a 4046 PLL as a frequency to voltage converter for this circuit? If so, could I use the existing square wave signal or would I need to put the input signal on a carrier frequency?

Sorry if I seem a little vague but my background is ME and not EE so I'm rather out of my territory in electronics. So thanks again for your patience and aid.
 

DickCappels

Joined Aug 21, 2008
10,153
As for the 4046, you can use "demodulator out" (pin 10 on the dip package).

If you can send the frequency to the computer in digital form, it would simplify the measurement circuit greatly.
 

Thread Starter

vielle568

Joined Feb 3, 2012
13
Sorry to inform you DickCappels but there's no computer in this project; it's all soldered onto a PCB and mounted inside the instrument. However, taking up your suggestion of the 4046 and pin 10 as the output here's a circuit diagram using the IC to convert the frequency signal to an analogue output voltage. I haven't had the time to breadboard this circuit yet; the input section works OK and is the design I'm currently using in the prototype instrument; the section with the 4046 has been adapted from a Forrest Mims book (where else).

The circuit will be used for input signals ranging from zero to around 500 Hz maximum (maybe I need a frequency multiplier in this design?) Hopefully the output signal will be an analogue voltage that more or less follows the input frequency. I realise that close to zero hertz the output may become erroneous but I'm primarily interested in the upper end of the scale and tracking the speed between 250 and 500 hertz.

If there are any obvious errors then please let me know before I try wiring the components together. Thanks.
 

Attachments

jimkeith

Joined Oct 26, 2011
540
Here is a sample and hold circuit that might have some merit for your app. It measures Tp/2 and provides a ripple-free output. To get an analog signal that is proportional to frequency, feed it into the AD633 divider to obtain the reciprocal. Perhaps a more complex solution, but would easily fit on an expresspcb miniboard.

If non-linearity is not an issue over a more limited freq range (e.g. 250-500hZ), the signal could be easily inverted and biased to provide a signal that increases with frequency.
 

Attachments

Rx7man

Joined Feb 17, 2012
3
Hey, I'm a newb here, and I'm not particularly good at electronics design, but do have lots of other engineering experience.

I do see a much simpler solution to your problem, if it can be applied. Is there any way to increase the input frequency? Put a bunch more holes in that wheel? That way if you can get your frequency up higher you can use smaller capacitors to take up the ripple, giving you a quicker response time. Come to think of it, there is another option as well, if you were to connect a small permanant magnet to the wheel as a generator, you could get a voltage signal without bothering about f-v conversion, response would be quick.

Good luck... hope I have given you some other ideas
 
Top