PDA

View Full Version : Measuring p-p of a 1.5v to 12v ac signal?



sccoupe
- 29th October 2009, 20:16
I am using a pic12f675 to measure the duration of a prox switch to determine rpm. The signal is a sine wave that increases in frequency and voltage with rpm. I have been running this signal right into an input pin and working just fine for a long time. Sometimes though I need to measure a lower rpm and because the voltage drops below the detectable voltage of the pic, it doesnt see the signal. What is my simplest way of showing a high signal over 1.5 volts and low signal under 1.5 volts? Noise hasnt been a problem with the higher voltages but could arise at the lower voltages?

Thanks all!

Jason

Sneaky-geek
- 29th October 2009, 20:38
Hi Scoupe,

A few things to consider;
Since it looks like the AMPLITUDE of the ac signal is Frequency dependent, ie Lower Frequency means Lower voltage peak on the sine(?) wave, it may be the easiest way to go is with a EXTERNAL comparator or use a op-amp to convert to a square wave. Any good book on intro to op-amps or The ARRL Handbook for Radio Amateurs chapters on op-amps or comparators. You also could try Googling op-amps or comparators.

Hope this makes things less muddy.
Tryin to help
Terry K9HA

Acetronics2
- 30th October 2009, 16:22
Hi, Scoupe

An elegant way would be to compare the instant value of the signal to its mean value ( a R/C ladder with 0.2 or 0.5s time constant is enough ) of your signal ...

So, the reference level will always being adjusted to your signal level ...

That is what I use for Light detection ( RPM optical meters ...) to be aware of ambient light

Alain