View previous topic :: View next topic |
Author |
Message |
Slick05
Joined: 05 Feb 2005 Posts: 14
|
Any suggestions for this design? |
Posted: Fri Feb 11, 2005 8:49 pm |
|
|
Hi, I have a circuit using the 18f458 where I have a microphone going to an amplifer , going to the A/D of the PIC. The microphone generates a signal of amplitude 50mV (roughly). Could you recommend me an amplifer that will give it a 5V peak to peak amplification with a 2.5V DC value? The reaon I need this is I am building a frequency counter, so I need to count the peaks of the incoming signal. Thanks! |
|
|
dvsoft
Joined: 28 Nov 2003 Posts: 46
|
|
Posted: Sat Feb 12, 2005 2:30 am |
|
|
hello
you can use a histeresis comparator
look at www.cypress.com
seek: AN2108 - Standard - Hysteresis Comparator with PSoc
Alain |
|
|
Guest
|
|
Posted: Sat Feb 12, 2005 7:45 am |
|
|
For a frequency counter you probably want to count the zero crossings rather than the peaks. Could you capacitor couple the signal to get rid of DC, compare it to zero with a comparator chip, and bring the result into the PIC through a digital pin? Or use an internal comparator in the PIC if your chip has one. I don't see the need for an A/D in a frequency counter.
Sherpa Doug |
|
|
Slick05
Joined: 05 Feb 2005 Posts: 14
|
|
Posted: Sat Feb 12, 2005 11:10 am |
|
|
Well I have already wrote the software, I just need an amplifier for the input signal.... |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
How about an Op-amp? |
Posted: Sat Feb 12, 2005 8:05 pm |
|
|
Sounds like a job for a rail-to-rail opamp. You can adjust the input differential to get the DC offset you need. |
|
|
Slick05
Joined: 05 Feb 2005 Posts: 14
|
|
Posted: Sun Feb 13, 2005 8:48 pm |
|
|
Yeah, I tried implementing the frequency counter by sampling the signal with the PIC 18F458 and then counting the peaks, but the processor does not have enough RAM to do this robustly. I like the idea of a comparator and counting zero-crossings and sending a pulse to the PIC every zero-crossing. Can anyone recommend me a comparator chip? Thanks! |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Sun Feb 13, 2005 9:21 pm |
|
|
You can use a simple capactive discriminator circuit to get spikes at zero crossing to use for triggering interrupts.. |
|
|
Slick05
Joined: 05 Feb 2005 Posts: 14
|
|
Posted: Sun Feb 13, 2005 10:44 pm |
|
|
Would I be able to use the comparator built into the 18f458? I've never used the comparator before so I'm not sure how it works... |
|
|
|