The Bat detector from Nuts and Volts
LoopyByteloose
Posts: 12,537
The latest Nuts and Volts arrived here in Taiwan and has a very interesting op amp project, an ultrasonic sensing and listening device.
The high points of the project are that one LM324 with 4 op amps does the whole build and for an ultrasonic microphone, one just use a piezoelectric speaker.
Since the LM324 is low power, one could power it from 3 volts DC, but that is really the lower limit of op amps. I suspect 4.5 volts would be more stable. The LM324 offers op amps with up to 100db gain.
You can even have it detect other ultrasonic sounds. Apparently leaves rustle at ultrasonic frequencies. And it inspires me to see what is going on with ultrasonic distance sensors. One might even make enchanced range sensors with microcontroller, the enhanced amplification, and specific op amp filtering.
Of course it helps that we have bats flying everywhere in Taiwan around dusk as they feast on mosquitoes..
The high points of the project are that one LM324 with 4 op amps does the whole build and for an ultrasonic microphone, one just use a piezoelectric speaker.
Since the LM324 is low power, one could power it from 3 volts DC, but that is really the lower limit of op amps. I suspect 4.5 volts would be more stable. The LM324 offers op amps with up to 100db gain.
You can even have it detect other ultrasonic sounds. Apparently leaves rustle at ultrasonic frequencies. And it inspires me to see what is going on with ultrasonic distance sensors. One might even make enchanced range sensors with microcontroller, the enhanced amplification, and specific op amp filtering.
Of course it helps that we have bats flying everywhere in Taiwan around dusk as they feast on mosquitoes..
Comments
in the den that made a horrible high pitched tone
whenever it was on. I bet this bat detector would
have detected it.
They thought I was goofy until I had them turn the set
off and on and I stood outside the room. I could tell
them when the TV was on or off by the tone. They
could not hear it.
-Phil
The situation is that op amps can easily handle the bandwidth, so can power transistors. But one has to find the right devices to listen and to output ultrasonic sounds. Buying purpose built devices can be very expensive; but it appears there are ways to work around the problem.
to generate sound...like a speaker. I think they were talking about
ordinary ceramic caps. Has anyone ever heard of such a thing?
I'm clueless as to how it could work. The only sound I ever got out
of a cap was a bang when I hooked up a tantalum backwards :-)
In looking at the Nuts and Volts circuit I was intrigued by the selection of microphone, using a piezo sounder element "in reverse" as a microphone. Clever idea! But it does leave a lot to luck on the part of the circuit builder, a dogged effort to characterize different sounders to find one that works. I wonder what the frequency response is really attainable in these things? The usual ultrasonic sounders are usually quite narrowly resonant, around 40 kHz or 25 kHz or some other particular frequency. A mems sensor from Knowles, the SPM0404UD5 (Digikey) is somewhat wider band with a peak from 20 to 60 kHz. Even the SensComp capsules have quite a bit of up and down in their wideband frequency response curve, also peaking around 50 kHz.
One thing that bothers me about the N&V circuit design is the LM354 op-amp: It's feedback is set up in the first stage for a gain of greater than 2000. (1MΩ / 470Ω) The LM358 has a gain*bandwidth product of 1 MHz, so a gain of 2000 should only be possible at up to 500 Hz, and the gain at 30kHz would roll back to about *33. The second stage is set up for a gain of around 60. Even with those rolloffs and the uncharacterized response of the sounder operating in reverse, the gain evidently turned out to be sufficient to listen in on bat calls.
The Nuts and Volts circuit is based on the heterodyne principle. In answer to Loopy, I believe the Prop could supply the local oscillator and the mixer via the counter modules, or it could do frequency division. I don't think the Prop is fast enough to do full spectrum recording. But it coud certainly combine a great user interface into the same chip. The analog front end is still necessary, and as in all audio, the microphone is the biggest challenge of all.
Yes that first stage - called the 'preamp' - has a rather absurdly high gain - it might be wiser to use several stages to get to a gain of 2000. But the op amp specified seems to be about right. So there seems to be some trial and error in building this, especially getting the pre-amp stage to produce useful audio. I've already mentioned that supplying 3V power is chancy, 4.5V would be better. I'm willing to work with it and modify the engineering as needed.
I also noticed that the inputs are biased with 1 meg resistors due to this being a single supply device. I wonder if that these resistors might generate noise in the device as most low noise op amp circuits in audio mic and phono preamps avoid going that high specifically to avoid noise from the resistors.
Reversing a piezo electric speaker obviously isn't ideal, but really allows one to be exploring on a very low budget.
@Others
Yes indeed, some ceramic capacitors have 'microphonic' phenomena associated with them. The fact is that as one goes up in frequency, one has to be more selective of what components they use. The average audiophile is lunatic in unnecessarily trying to select perfect components; but as one enters the range of radio frequency being selective really matters and one needs to observe what is going on with a good oscilloscope.
Tantalum is claimed to have piezo properties creating high frequencies according to "The Art of Electronics" by Horowitz, et al.
Ideally, having an oscilloscope and a frequency counter available would help get results a lot faster.
I guess my main point is that this detector becomes a starting point for a nice blend of analog and digital design. Many of the principles and the acquired knowldege would transfer from processing audio signals to processing RF.
To test the basic theory of operation here, drive two 40Khz transmitters side by side... one at 39kHz, and the other at 41kHz.... you should audibly hear 2kHz
The schematic demonstrates a very poor understanding of op amp design and several modifications might be helpful.
1. That 2000x gain preamp is rather absurd and beyond the ability of the opamp for the ultrasonic range.
At best within the frequency range required, you are going to get 10-30x gain with this rather sloppy design scheme. Those of us that understand how op amp feedback really works (those who have learned how feedback enhances bandwidth by sacrificing greater gain available by the op amp) would just set the first amp at somewhere between 10-30x gain and adjust the second one to be an excellent high pass filter while providing minimal additional gain. If 20-30x is not enough, another stage might be inserted to boost the voltage further without compromising the top frequency.
60db is the normally accepted practical limit for one stage of most audio op amps and is common with magnetic phono pickups and microphone preamps. It may be even too high for ultrasonics, but 60db is roughly 1000x, not 2000x.
As it works out 30x voltage gain is roughly 30db, by coincidence. But the LM324 may be working at only 20x if you read and understand the PDF and provided Bode Chart.
Additionally, if you need an extreme high impedance input due to the nature of the pickup, you can use an op amp stage at the front end in a special high impedance buffer.
I have an article from Ellliot Sound Products at http://sound.westhost.com called 'Audio Designs With Op-amps - Part ONE" and he explains a particular nice high impedance amplifier configuration that cleaning handle any problems.
2. Piezoelectric buzzers and speakers may actually be much wider bandwidth as sensors tha specified in documents. This may seem a bit odd, but needs someone with a good scope to investigate.
The reason I suspect so is that there are a number of guitar players that are successfully hacking piezoelectric buzzers for use as acoustic guitar pickups. So I am thinking that they have a rather narrow resonant frequency when driven by a stable voltage, but the reception bandwidth is wider. In most cases, the ultrasonic device is intended to transmit a ping and receive the same frequency - so the documentation doesn't discuss wider bandwidth.
3. Using 1 meg ohm resistors to set the mid-point of the audio signal is rather absurd. Sure, this may be low power. But 1 meg may add unnecessary resistor Brownian noise into the op amp. Most op amps seem to stop at 100K ohm for such purposes. So, I would waste some battery life in exchange for a better noise-to-signal ratio.
4. The output 'buffer' is shown with a feedback loop. That may work, but standard practice is to add a 'unity gain' feedback loop in order to maintain stability.
The only real drawback with these improvements are that you may consume a bit more power and you have have to use 5 or 6 op amps rather than the one DIP package of 4.
~~~~~~~~~~~~~~~~~~~~~~~
Having gotten all that sorted out, using an op amp for an adjustable ultrasonic oscillator offers other projects, such as the means to chase away moles in your lawn or unwanted animals in your garden.
I have no lawn or garden, but I do have a dog that insists on wanting to sleep in the building's hallway rather than in my room. So I am considering putting an ultrasonic generator in the hallway to make him prefer the quite of my room. It is worth a try and the op amp can be easily powered up to drive an 8 ohm tweeter. If you want a pulse, a 555 timer can drive the oscillator on and off. Rumors are you can even chase away loitering teenagers.
That's all for now.
http://www.circuitcellar.com/nxpmbeddesignchallenge/winners/DE3851.htm
Very nice bat detector, yet it is digital - once again.
1. The scheme that I mentioned in Nuts and Volts is an analog heterodyne. This used to be the basis of AM radio receivers, but it has reasonable validity as a digital front end.
2. The beauty of the device is that you can listen and hear what the bats are doing in real time.
3. The project demonstrates a whole range of possibilities in hacking piezoelectric devices as sensors.
4. The project is an interesting study of the use of op amps beyond regular audio range.
http://home.earthlink.net/~bat-detector/Scanner/
Second is Tony's simple frequency division detector.
http://home.netcom.com/~t-rex/BatDetector.html
I built something like that years ago, using a CMOS CD4000 inverter operated in linear mode as the preamplifier.
The microphone! The trouble with 40kHz (or 25 or 32kHz) transducers as microphones is that they have a narrow bandwidth and a sharp resonant peak. It is possible to widen their bandwidth out to about 10kHz by detuning them an inductor and resistor. My guess about the piezo sounder as a microphone would be that it is best at relatively low frequencies, but it is true that there are a lot of bats that vocalize in the 8 to 20 kHz range. Detuning might help those too. Knowles recently introduced a nice mems microphone (SPM0404UD5 available from Digikey) that has a relatively wide bandwidth peaked at 50 kHz.
Another link from Tony with a caveat to bat enthusiasts about ultrasonic emissions from electronic circuits, which would include crystals and ceramic capacitors.
http://home.earthlink.net/~nevadabat/XtalProb.html
One state-of-the-art vocalization detector is the SongMeter from Wildlife Acoustics. It uses a Texas Instruments true DSP/processor, the TMS320VC5509A, and samples at up to 44kHz in stereo for birds, or up to 192 kHz in stereo for bats. It does not do much in the way of user interface. It records full spectrum audio onto SD cards (4 slots up to 32 Gig each). The point is to allow later analysis of the data with powerful PC programs that can identify specific calls and give estimates of total activity in programs of unattended remote monitoring.
It seems to me that the above 'super-tweeter' would be good for an ultrasonic pickup. One might be able to squeeze more bandwidth out of it than the piezoelectric devices we have been talking about. A pre-amp with adjustable gain might help as well.
But I also see that at least one Bat detector just uses and electret mike and seems to work well. All this seeking alternative may be rather unnecessary
It is hard to make a good source of ultrasonic sound. I've always wanted to make a plasma speaker. Those work by modulating a high voltage plasma in air, and the variations in heating make the waves. The "cone" has zero mass, so that it has a practically flat high-frequency response.
Songbirds are capable of generating ultrasonic harmonics. My grandparents had one of the original remote control TV's where the remote worked by striking ultrasonic bells with spring-loaded hammers. One year they woke up nearly every day to find the TV on. It turned out that a mockingbird had learned to turn it on.
My parents couldn't hear the ping from that damnable Zenith remote, but I could. They finally replaced the set when the channel rotor motor burned out. By that time I had my own set, a color TV with one color (green).
-- Gordon
Beau mentioned that jangling keys generate a lot of ultrasound, as does rubbing dry fingers together, or vocal sss sounds. Bat researchers try to talk in normal voices, not hussshhhed, for that reason.
The electret most often recommended for bat detectors appears to be the Knowles EK23132. Or the BT21759. The response is very flat up to 10kHz, but not well characterized above that, although they do work relatively well. Knowles proudly claims that the EK23132 was used on Mars Rover. These are not cheap--US$20 ea (Digikey, Mouser, Farnell/Newark). The Knowles ultrasonic mic, SPM0404 is characterized from 1kHz to 100 kHz, and it only costs US$4.
Here is an interesting DIY bat detector sites with lots of links to different circuits...
http://bertrik.sikken.nl/bat/index.html
Excellent web site. It seems to confirm that the microphone or sensor is the most critical issue.
Thanks for the $4 electret to 100K hz. I am now looking at trying to get the added bandwidth with possibly a OP3134 dual op amp for a front end as it will handled more bandwidth with more gain in the ultrasonic range. The only drawback is that a single voltage supply should be about 10V minimum instead of 3V.
Yes, when I was young I could hear both the Zenith remote control ping and a steady high pitch whine from the TV. But I doubt that I ever could hear as high as 100K Hz.
It seems that having two methods of making the ultrasound audio would be best. The heterodyne seems to be limited to around a particular range determined by the beat oscillator. Having a frequency divider, might offer a more broadband listening experience.
The obvious mechanism to me would be an array of PLLs looking for signals over a range of frequencies (or maybe a single frequency if you know the species already). Once a signal is detected, this can then track the sweep,monitor the harmonics and also monitor any other relevant freqiencies (such as the starting frequency for a new sweep)
Clearly the output needs to be presented in a parametrised way to a logging unit rather than a full spectrum, but this approach ought to be more sensitive than the downconversion approach, and more real-time than FFTs.
As an example, I worked on a radio system which scanned a 200kHz spectrum for about 20 simultaneous PSK transmissions at arbitrary frequencies. 12 years ago, this took 4 high end AD6620 DSPs - hopefully the tech is a bit more affordable now.
DSP work is a bit beyone me, otherwise i might be tempted to pursue this a bit more.
For many of us, digital approaches have left us behind - not knowing how to catch up.
There are indeed many ways to create a bat detector and yours might be the most desirable, but all of them have contributed something to learning how things are done with modern electronics.
Thanks. I'll try to explore your suggestions.
http://www.leonheller.com/Designs/dsPIC33FJ12GP201/proto(Page1).pdf
http://www.leonheller.com/Designs/dsPIC33FJ12GP201/dsPIC33FJ12_pcb.gif