View previous topic :: View next topic |
Author |
Message |
TOMER
Joined: 04 Feb 2009 Posts: 13
|
code to VCO and controller frequency |
Posted: Tue Jun 30, 2009 6:51 am |
|
|
Hallow friends
I have variable frequency and I want to make a controller that if the frequency is over
150 HZ then it give on "1" logic to other electronic circuit, if the frequency is under 150 HZ than the controller give off "0" logic.
I search for codes that sample the frequency and give the orders according to the frequency.
I need to supply the right voltage and to choose the right switch.
I search in google and find this article:
http://www.edn.com/article/CA54576.html#ref
VCO is device that give variable voltage in respect of changes in frequency.
Thanks
TOMER |
|
|
Ttelmah Guest
|
|
Posted: Tue Jun 30, 2009 7:31 am |
|
|
Look at the NJM567/LM567.
Best Wishes |
|
|
TOMER
Joined: 04 Feb 2009 Posts: 13
|
|
Posted: Tue Jun 30, 2009 9:10 am |
|
|
I will glad to receive more explanation and comments
Thanks
TOMER |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Jun 30, 2009 10:03 am |
|
|
LM567 doesn't give f1<f0 or f1>f0 output, only f1=f0.
A frequency counter is a suitable solution. Depending on the input signal, low pass filtering may be necessary to suppress harmonics and spikes. A comparator with hysteresis or a schmitt-trigger logic gate should be used to convert the input signal to digital. The frequency counter gate time has to be choosen according to intended response time and frequency resolution. |
|
|
Ttelmah Guest
|
|
Posted: Tue Jun 30, 2009 12:05 pm |
|
|
The 567, does f1 (within band) f2, rather than '='. You can set a very wide band.
Alternative, just use the Vout from any PLL, and feed this into a comparator.
Best Wishes |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Jun 30, 2009 2:12 pm |
|
|
LM567 maximum detection bandwidth is 14% of f0. I didn't hear a bandwidth specification from the initial post, thus I assumes, it can be considerably higher. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Jul 01, 2009 7:58 am |
|
|
How about a high pass filter and a low pass filter. Rectify and feed both filters to A/D channels and see which is higher?
Or of you have a square wave input just wait for a rising edge and start a timer. then either wait for the next rising edge, read the timer and calculate the frequency, or wait 1/150Hz = 6.67ms and see if the next rising edge has arrived yet. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|