Here's my 2 cents on driving the transucer: Have a look at Nation Semi's LM1812 Sonar Chip and app note, this is a chip used for 'Humingbird' fishing sonar's. They use 1 transducer for transmit & recieve. I believe the spec's on the cheap 40KHz transducer is 300mw. Measure the impedance of your transducer. If it's over 75 ohms, at fr. you will need a driver because your PIC only does 5volts. So wrap a ferrite toriod coil to resonate with the transducer. wrap a driver winding; each PIC port is good for +/- 20ma @ 5v, (100mw) so you may want to parrallel 3 port lines. > 1) Bang on the transducer for N pulses, where N < 10, with a pulse > frequency selected to match the 40 KHz center frequency. > > 2) Wait an integral number of cycles (however long you want the > chirp to be) plus 1/2 cycle. > > 3) Bang on the transducer again for M pulses (M are 180 degrees out of phase with the transducer oscillation, > so this has the effect of _damping_ the oscillation, thus > giving a cleaner and quicker pulse. You only need to do 1), because after you chirp the step-up transformer's primary, you can 'short it' and allow the PIC's port pins to dissipate the stored energy, damping the reverberations on the transducer. After a SHORT damping interval, put the PIC port pins in HI-Z state, so they don't dampen the transducer when you want to use it as a microphone. For a reciever, you realy want TDC- time dependant gain control. I like the idea of ripping off an IR remote module. Maybe a FET in the feedback path of an op-amp, used as a voltage-variable resistor, and opened after the transmit pulse through a time constant. Try to use a hi-z input amp directly off the transducer. Maybe not too hard at only 40KHz, if Z-in is just 1-10 Kohms. Have fun. >