 |
 |
| View previous topic :: View next topic |
| Author |
Message |
Ttelmah Guest
|
|
Posted: Thu Jan 10, 2008 3:25 am |
|
|
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
|
|
Posted: Thu Jan 10, 2008 4:42 pm |
|
|
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
|
|
 |
meereck
Joined: 09 Nov 2006 Posts: 173
|
|
Posted: Sat Jan 12, 2008 10:57 am |
|
|
Thanx for a hint. Unfortunately, an optical sensor cannot be used.
Have all a nice weekend,
regards |
|
 |
|
|
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
|