CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

code to VCO and controller frequency

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
TOMER



Joined: 04 Feb 2009
Posts: 13

View user's profile Send private message

code to VCO and controller frequency
PostPosted: Tue Jun 30, 2009 6:51 am     Reply with quote

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







PostPosted: Tue Jun 30, 2009 7:31 am     Reply with quote

Look at the NJM567/LM567.

Best Wishes
TOMER



Joined: 04 Feb 2009
Posts: 13

View user's profile Send private message

PostPosted: Tue Jun 30, 2009 9:10 am     Reply with quote

I will glad to receive more explanation and comments
Thanks
TOMER
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Jun 30, 2009 10:03 am     Reply with quote

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







PostPosted: Tue Jun 30, 2009 12:05 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jun 30, 2009 2:12 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 7:58 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group