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 CCS Technical Support

detection of a metal part near an inductive loop
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah
Guest







PostPosted: Thu Jan 10, 2008 3:25 am     Reply with quote

Yes,
Being 'simple' on this, depending on the size, and number of turns in the loop, it is quite possible to make a simple oscillator, that runs in the few tens of kHz range. Then, if the PIC has a master clock at (say) 20MHz, a single cycle of the external oscillator, will give perhaps 1000 cycles of the PIC oscillator, and 250 counts on timer1. Using the CCP module, this count can be recorded, and if the count changes by more than a small percentage, this can be used to give the required detection. A single test, will only take the cycle time of the external oscillator. What you do, is configure the CCP, to capture on (say) the falling edge, record the corrent stored count, clear the interrupt flag, then wait for the interrupt flag to set again, and record the next count. The difference between the counts, is the count between the edges for the external oscillator. It really is very easy to do.

Best Wishes
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Thu Jan 10, 2008 4:42 pm     Reply with quote

wow, thank you very much for so many interesting posts. The Colpitts osc looks good - for instance, this one http://www.electromaniacs.com/content/view/216/42/
The main idea is to measure an occurence of a car in motion.
As for RLScott's post concerning the oscillator: I still didn't get how it works. Shall I just connect the osc circuit to a DC power supply and it starts to oscillate? Shall it be a RLC in series or what combination? What voltage would be measured?

I have also found an IC tda0161 but it can be used only for small distance.

Thanks again,
Best regards meereck
newguy



Joined: 24 Jun 2004
Posts: 1946

View user's profile Send private message

PostPosted: Thu Jan 10, 2008 5:29 pm     Reply with quote

How far away is the car? An optical distance sensor may be appropriate, such as something like this: http://document.sharpsma.com/files/gp2y0a02yk_e.pdf
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Sat Jan 12, 2008 10:57 am     Reply with quote

newguy wrote:
How far away is the car? An optical distance sensor may be appropriate, such as something like this: http://document.sharpsma.com/files/gp2y0a02yk_e.pdf

Thanx for a hint. Unfortunately, an optical sensor cannot be used.
Have all a nice weekend,
regards
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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