Page 1 of 1

Need help detecting a frequency shift

PostPosted: Mon Feb 13, 2012 1:04 am
by Jerry
I have a probe head for my mill for doing things like measurements, offsets, and the like. Its an older unit that is self contained and is triggered by a flash unit. It has 6 IR leds around th exterior that transmits a 159khz signal out when it is on and in standby and that jumps up to 174khz when it is activated.

I managed to get it modified to run off something other than $60 lithium primary cells and I found on old amplified photo diode board that I got out of a lot of stuff on ebay probably 10 years ago that can receive the signals from the leds. It uses a couple opamps and a hamamatsu photodiode to detect it and sends the signal out like so:

On, not triggered:
Image
Untitled by macona, on Flickr

On, triggered:
Image
Untitled by macona, on Flickr

The amplitude varies on the distance from the sensor head and the detector runs off +/-15v so technically it could get that high.

What I would like is two logic signals to go to the computer. One goes high when the head is on, and one that goes high on activation. I am guessing something like a PLL is what is called for here but I know nothing about analog.

-Jerry

Re: Need help detecting a frequency shift

PostPosted: Mon Feb 13, 2012 9:45 am
by Doug Coulter
For that large a shift there's probably a simpler way. You could set up a regriggerable one-shot that with the right pulse width, would be continuously triggered at the higher frequency, the output would just sit at a level. At the lower frequency it would have pulses on the output. There are then a couple of ways to decode that. One is just filter the output - if it sits at a rail, you have one state, if not, the other. You could enhance the level shift by putting a diode across the resistor in the RC filter. Another is to use the pulses to clock a flip flop, that the computer resets just before it wants to know the state (setting it up so a clock sets it).

Worst case you could use a PLL, but that's more work than this problem likely needs.

Re: Need help detecting a frequency shift

PostPosted: Mon Feb 13, 2012 11:53 am
by chrismb
Is there a frequency-analogue converter out there already built as some inexpensive chip? If so (and if it has enough resolution at that frequency) you might simply compare the analogue output to a trim-able voltage through a comparator.