Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

frequency to voltage conversion

Status
Not open for further replies.

randomvalue

Newbie level 5
Joined
Dec 2, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,349
Hi all,

I know there are several threads to this, but none that I have found addressed my question.

I have a project that requires a variable frequency be converted into a linear voltage. The frequency is generated from dc and has a max rise of 12v. It does not swing below 0. It varries from 100hz to 250hz. I would like to have the output between 0 and 5vdc. eg at 100hz the output would be 0.1v and at 250hz the output would be 4.9v. This is to feed a PIC microcontroller's ADC. I can use a voltage divider to bring the voltages down to workin levels if needed.

now the question:

I want to just use a not gate to invert the signal and rectify back to dc. Is this a possibility? if not whats wrong with my idea?

Thanks,

Random
 

Sorry, but your idea is not very clear to me. Could you, please, explain it better.
 

I will try to be more clear,

I have a signal that ranges from 100hz to 250hz that I need to convert into a voltage that if the requency rises so does the voltage. This is so I can read this voltage into a microcontroller. I do not need to read the frequency into the microcontroller. I just need to have a reference of what that frequency is.

My idea is to basicaly use a diode to rectify this signal into a voltage that rises and falls in proportion the the frequency. If this in not the way to do this please explain as I want to understand why not.
 

Logically a frequency measurement is just counting. So you'd have to use a counter to see how frequent you are going at a time.
Then the count value should go to your PIC, where you would calculate a corresponding number you need {a value between 0.1 and 4.9}.
[Actually I think PIC could also do the counting, you just need to divide the maximum 12V amplitude with a resistive divider to fit the voltage input of the pic.]
Then having that value just convert it to voltage by use of an external DAC and voila, you have a voltage, you can feed back to your pic through ADC.
As for the diode idea - you said your signal is positive from zero to 12V, right? So how exactly do you want the diode to help?
 

My theory is still rough so forgiv my ignorance, but isnt this signal an AC wave on a DC bias? if so the pulses are a going from ov to 12v. the more pulses the more time spent at 12v. so by rectifing and filtering(like in a ac to dc circuit) I would see a voltage change based on the frequency of the pulses. I realize I could use the Pic to do the work, but im limited in my abilities with programming the pic. Im still using asmembler as I have not learned C yet. I also realize that I could use one of several descrete chils to do this, I just want to know why I cant treat this like an AC signal that has been shifted onto a 6v DC center?

Please be patient as I am still learning.
 

You are confusing frequency with duty-cycle. The frequency of a periodic signal is the inverse of the time elapsed from an initial time stamp to the time in which the signal will repeat identical from the initial time you fixed. For example between two adjacent rising (or falling) edges of a square waveform. The duty-cycle, instead is the time the square wave stay "high" with respect to the total period.
You can combine every frequency with every duty-cycle you want. Let's uppose to have a 1kHz square wave. The time elapsed between two rising edges will be:
T= 1/1kHz = 1 ms this is the period. If the duty cyle is 50% the wave will stay 500 us High and 500 us Low. If the duty cylce is, instead 20% the same 1kHz wave will stay 200 us High and 800 us Low.
So with your method you can measure the duty-cylce but not the frequency. You could use a lowpass filter with a cut frequency around 100Hz before the diode, so the higher frequency will be attenuated more thus the rectified DC voltage will be decreasing with the frequency. However this very simple method need a fine tuning of the circuits, due to part-to-part differences of the components. Furthermore the non-linearity has to be compensated in the microcontroller. You need to implement a look-up table.
 

Hi,

feed the signal into a monoflop with a pulse time just a bit below 4ms. This will give you a signal with a duty cycle depending on input frequency. Then you can just low pass filter the signal to get a linear frequency dependent voltage.
You could add an offset to utilize the full input range if you like.

If your input signal has constant amplitude and rise time you might be able to omit the monoflop and use a high pass filter and a rectifier after that instead.

Regards,
Schmocki
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top