Can a circuit output a voltage proportional to frequency of a square wave?

In summary, the conversation discusses the building of a measurement device to measure the speed of a fan. This involves using a diode and phototransistor to create a square wave output signal. The conversation then delves into the possibility of building a circuit that can output a voltage proportional to the frequency of the square wave, with suggestions including using a differentiator op-amp circuit or a 555 timer IC. The conversation also mentions using a LM2917 tachometer chip or a LM3914 dot/bar display driver for a more economical solution. The conversation concludes with a discussion about using a monostable multivibrator chip and a LM3914 LED driver chip to achieve a display of the fan's speed.
  • #1
swraman
167
0
Hi,

Im am building a measurement device to measure the speed of a fan.

Essentially I have a diode on one side of the fan, and a phototransistor pointing to it on the other side of the fan. This results in an output signal resembling a square wave.

I am also trying to build an circuit that will output a voltage proportional to the frequency of the square wave. Is this possible? The input frequency of the square will always be around 50-300Hz, so I don't have to worry about extremely large frequencies or I can later tune the circuit to deal with saturation outside of these bounds.

I was thinking of using a differentiator op-amp circuit, which would simplify the signal into a set of positive and negative impulses at the edges of each square in the square wave, but I don't know any way to output a voltage proportional to the number of spikes/sec.

If it makes any diference, I am planning on making a line of LEDs, say 10, where the number of LED's glowing will be proportional to the frequency of the fan.

Thanks
 
Engineering news on Phys.org
  • #2
swraman said:
I am also trying to build an circuit that will output a voltage proportional to the frequency of the square wave. Is this possible?
Thanks
The short answer is yes.

If you can get a pulse train, there are a number of routes to take:
A filter circuit would give you a voltage for a given frequency
A processor with a DAC could do this with minimal part count
Or you could use a binary counter circuit to give read the frequency. Naturally a circuit to handle the set/reset and a DAC of some type would be needed (all can be done discretely if needed).
 
  • #3
The easiest solution I can think of is to use a 555 timer IC and connect it for monostable operation and for a pulse width of slightly more than 0.00333 seconds. Every time it sees a negative going pulse at the input, it will output a pulse of that duration. When the fan is at maximum speed, the output will have only thin negative going pulses which will increase in width as the fan slows down. This should give you a linear voltage to speed relationship. When the fan is stopped, even if light is shining through the blades, you won't get any pulses so the voltage will be zero.
 
  • #4
There are two integrated circuits that might be useful for this.

The first is a LM2917 tachometer chip. These convert frequency to voltage.

Then there is the LM3914 dot/bar display driver.
This could take the voltage out of the first chip and convert it into a moving dot or bar display.

However, economically, it is hard to beat the following product:
http://cgi.ebay.com/ebaymotors/ws/eBayISAPI.dll?ViewItem&_rdc=1&item=260691975579&ru=http%3A%2F%2Fshop.ebay.com.au%3A80%2F%3F_from%3DR40%26_trksid%3Dp3907.m570.l1313%26_nkw%3D260691975579%26_sacat%3DSee-All-Categories%26_fvi%3D1&viewitem=

A digital tachometer for $4 plus postage.
 
  • #5
is there's no way to do it with only resistors, capacitors, and inductors, and op amps?
 
  • #6
You can do it with an op-amp. I'll post in a short while and explain.
 
  • #7
You could make something like this circuit:
http://ecelab.com/circuit-monostable-opamp.htm
(However, the input pulses have to be shorter than the output pulses with this circuit or with the equivalent 555 monostable.
A 74C221 chip allows you to have input pulses that are longer than the output pulses, however the result would not be as good as the LM2917 approach.)

And then follow Skeptic2's suggestion above. That method works well and I have used it to produce a meter reading on a Geiger Counter.

This would give you a readout on an analog meter.

Getting a bargraph would really require a dedicated IC like the LM3914.
These are cheap and easy to use, so you should get one.
You could use 10 opamps to produce voltage windows but the LM3914 already has these in it as well as circuitry for driving LEDs.
 
Last edited:
  • #8
vk6kro pretty much covered it.
 
  • #9
Thanks for all the replies.

So - just to clarify - if I build the Op amp monistable multivibrator circuit, I would receive a fairly constant voltage at the output? and it would be proportional to the frequency of the input?

Sorry for all the questions, I am a ME student and haven't really used circuits for much more than RC filtering =\.
 
  • #10
No, you wouldn't.

As mentioned, the input pulses have to be shorter than the output pulses for that circuit to work.

You should get a 74C221 monostable (or others like the 74C121, 74HC121, 74HC221) and use that.
These allow you to produce a short pulse from a rising or falling edge in a waveform.

Then, because these pulses are a constant width, the more of them you get per second, the higher the average voltage that will be produced.

These chips are simple to use and cost about the same as an opamp. They also do a far better job for this application.
 
  • #11
OK, I guess I will use a monostable multivibrator chip. That sounds like what I want it to do.

Now my next problem: I want to have a string of LED that represent the frequency of the signal. So, i guess, the higher teh average voltage output of the multivibrator, the more LED's are on.

Is this possible?

Thanks again
 
  • #12
If you still want a row of LEDs you really need to look at the LM3914 LED driver chip.
Just applying a varying voltage to a whole lot of LEDs isn't going to somehow produce a nice display.

See post no 4 above. You would just connect these two chips and get a result, although you would have to do some design work to get resistor values correct for an optimal display.
These chips come with data sheets you can download and they explain how to design to use them for different applications.

Personally, I would prefer to read out the actual speed with a digital display.

Maybe you could do a search for an actual circuit where someone has done something like this and put the circuit on internet.
 
  • #13
Thanks for the info vk6kro.

Im actually hooking up the system to a computer and am going to measure the frequency more accuratley and easily that way.

THis is for a class though, and this prof likes extras so I am trying to do this LED thing.

I guess I could just hook up the string of LEDs to the computer and have it drive them - that would be easier. But i wanted to have it done all with ICs. Ill try to get the 2 ICs you mentioned, but with my timeframe i don't know if I will be able to.

Thanks for all the info --

Raman
 

1. What is a frequency measurement circuit?

A frequency measurement circuit is an electronic circuit used to measure the frequency of an electrical signal. It typically consists of a timer or counter, a display or output device, and input and output connections.

2. How does a frequency measurement circuit work?

A frequency measurement circuit works by counting the number of cycles of a signal within a given time period, and then calculating the frequency based on that count. This is typically done using a timer or counter, which is triggered by the input signal and then stopped after a predetermined time interval. The count is then displayed or output in the desired format.

3. What are the components of a frequency measurement circuit?

The main components of a frequency measurement circuit include a timer or counter, a frequency-to-voltage converter, a display or output device, and input and output connections. Some circuits may also include additional components such as amplifiers, filters, and voltage regulators.

4. What are the applications of frequency measurement circuits?

Frequency measurement circuits have a wide range of applications, including in telecommunications, audio and video equipment, scientific research, and industrial control systems. They are also commonly used in electronic testing and measurement equipment, such as oscilloscopes and signal generators.

5. How accurate are frequency measurement circuits?

The accuracy of a frequency measurement circuit depends on a variety of factors, including the quality of its components, the stability of the input signal, and the precision of the timer or counter. Generally, modern frequency measurement circuits can achieve accuracies of up to 0.001% or better.

Similar threads

  • Electrical Engineering
Replies
28
Views
3K
Replies
2
Views
1K
  • Electrical Engineering
2
Replies
41
Views
4K
Replies
5
Views
787
Replies
46
Views
3K
  • Electrical Engineering
Replies
8
Views
893
Replies
16
Views
1K
  • Electrical Engineering
Replies
7
Views
3K
  • Electrical Engineering
Replies
27
Views
1K
  • Electrical Engineering
Replies
1
Views
962
Back
Top