I'm not sure about the details of the sonar receiver, but I'll be happy to explain gain since it is within my very limited electronics knowledge. Gain is simply the ratio of the output signal to the input signal. Most microphones generate a very very small output signal, which is not easily used by any digital electronics such as a PIC. So you have to amplify the signal using it as an input signal to some sort of amplifier (as the microphone pre-amp in many stereo systems), which increases the signal to usable levels on its output side. [Sonar Receiver] --> [Amplifier] --> usable output Most opamps amplify in the 40khz range, so I'd recommend reading up on how they are used. The best electronics book I've found is the big gray classic "The Art of Electronics", by Horowitz and Hill. It's a classic reference that covers just about everything involving analog electronics, and has some somwhat dated, but still pertinent, info on the digital stuff. Definitely try to get the 2nd edition, as the FET chapter is much better and it has some updated tables. ----- Original Message ----- From: "Lindy Mayfield" > Could you briefly describe to me how this sort of device, which I think is just a microphone "tuned" to 40KHz, works? I mean, do I put +5 on one side and ground on the other and stick in some capacitors or what? What is this "gain" stuff that I need a lot of? > > Is there some electronics book that I should perhaps read? (Besides Forest Mimms's book which I have studied to the point where it is falling apart at the seams.) > > Thanks! > Lindy > > -----Original Message----- > From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of michael brown > Sent: Sunday, May 23, 2004 18:36 > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC:] Newbie question about Sonar Receiver > > From: "Spehro Pefhany" > > > > You need a lot of gain, depending on the distance to be covered and > the > > transmitter signal. You may even need a nonlinear time-variable gain > > amplifier. > > You may have trouble using a breadboard due to noise issues (signals > in the > > mV range). I'm trying not to be negative, but I think this is not a > really > > a beginner project, IMO. If you have an oscilloscope, look at the > > transducer output and you'll see just what you are dealing with. > > I did this several months back on a solderless breadboard and it worked > very well. I used an ordinary LM741 as the amplifier stage and a 393 > comparator as the second stage to clean up the signal. I just biased > one of the comparator inputs a few millivolts higher than the idling > output of the 741 (which was fed into the other input). The echoes give > me a real nice square wave out of the comparator perfect for feeding > directly into a digital input of a PICs CCP module (no ADC required). > The transducers are very insensitive to frequencies that are not > ultrasonic so normal room noises had very little effect. I was > surprised that I didn't need to apply any audio filtering to get decent > reliability. > > I found that about 5-6 cycles directly into the sending transducer > (driven directly from the PIC) gave decent results without allot of > ringing decay of the transducer. A small blanking interval during and > after transmission and you're ready to capture the echoes. > > michael brown > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.663 / Virus Database: 426 - Release Date: 4/20/2004 > > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body