Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM386 Bat Detector Stability

Status
Not open for further replies.
rogs
The bat was back last night and I couldn't hear a thing, so it's time I abandoned the original circuit. I won't mess about just replacing the two 386s with two opamps as you obviously wouldn't have used more than 2 if 2 were enough, although it's possible you only needed three but used all four since there were four in the package. I'll use your circuit as is, although I'll leave the 4024 for the present as that seems to work.

This is the HEF4017 I used : **broken link removed**
Not all versions have a Schmitt trigger on the clock input. I found it made a 'cleaner' divide by 10 division of the 40KHz signal - especially as the ambient state is at the half rail voltage od the opamp output. Bit unconventional, but it's simple and it works.
Thanks for identifying it, I'll make a note.

Again, driving the output of the 4017 directly into the output transducer required the use of a high impedance AC piezo buzzer, rather than a low impedance speaker or earpiece. The 4017 probably doesn't have enough drive capacity to make a useful noise from a low impedance device.
I've found what looks like a buzzer, probably from a PC. I think it has a 30-40 Ohm coil so I might have to buy a piezo sounder. I think that's much better than the earpiece although I'll leave the jack socket for the voice recorder and add a potential divider for it.

Don't use the 74HC4017 version unless you are using a 5V DC supply. The one I linked to can cope with a 3-18 V supply.
The TL074 will be a better choice, spec wise, but will draw a lot more current (relatively speaking)
Since I've got a TL074 I'll use that. I could replace it if the battery goes flat too quickly.

I do have a (relatively!) simple circuit for a heterodyne version as well if you'd like me to dig that out. You will need a better transducer though.
Nigel has suggested a circuit too, but I'll leave heterodynes for later.

Farnell do one: https://uk.farnell.com/knowles-acoust...4/dp/1367846RL but it's not cheap!!
Not actually tried one out (yet!), but it's a much better spec than the electret capsules I was using.
If you do get your freq div one working well, you'll want to try a heterodyne!
Shall note for later.

I would love to go the whole hog, and do a 'real time' one, without paying the 'research' type prices the commercial units cost. Some of the audio recorders like this one: **broken link removed** look promising --especially if use with the transducer I suggested above.
You'd still need a freq div or heterodyne to find them though!!
But we are talking real money now.........
I think that the idea is that you record the sound then play it back later slowly, so you hear what it actually sounds like apart from being slower. I suppose with a hetorodyne you miss a bit because it is so fast. Some computer sounds cards will record at a sample rate of 96KHz so it might be possible to use one of those on a laptop and software like Audacity to record it. For higher frequencies it might be possible to build/buy an analogue/digital converter with a higher sample rate to plug into the laptop USB socket.

Your last point.. must be something like that, but think of the difference in levels. Listening for your own attenuated 'echo', while ignoring direct ultrasonic 'blasts' from other nearby bats which would be many times 'louder' than you own echoes.......quite remarkable....
I think this sort of thing should be researched more - we might find that animal communication is a lot more sophisticated than we think.
 
Last edited:
shame you dont live a bit nearer we have large numbers of bats on our farm indoors and out :D ideal place to test detectors, i can gurantee bats in the loft any time of day or even month
 
pips like living under roof tiles you would be amazed to lift a roof tile and see one sitting there almost flat as pancake! they can get into some realy tight spaces we find then in some odd places! the main ones we get all year round that permantly roost here are mainly pips but we get all kinds throught the year. sheds are another place we find them but you have to look real hard ;)
 
The bat was back last night and I couldn't hear a thing, so it's time I abandoned the original circuit. I won't mess about just replacing the two 386s with two opamps as you obviously wouldn't have used more than 2 if 2 were enough, although it's possible you only needed three but used all four since there were four in the package. I'll use your circuit as is, although I'll leave the 4024 for the present as that seems to work.

One reason for using a quad opamp was so that the gain could be split up between different amplifiers, so that a lower gain/bandwidth product spec for each op amp would do. The TL064 is not a particularly high spec opamp --but it is low current!

The reason I chose a 4017 rather than a 4024 was because the AC piezo buzzer I was using was resonant around 4KHz. For that device a divide by 10 was ideal.
As I say, 40KHz transducers are pretty selective, so just looking for a 'resonant' division of the 40KHz signal makes for a louder sound, but with no extra power required!!



I think that the idea is that you record the sound then play it back later slowly, so you hear what it actually sounds like apart from being slower. I suppose with a hetorodyne you miss a bit because it is so fast. Some computer sounds cards will record at a sample rate of 96KHz so it might be possible to use one of those on a laptop and software like Audacity to record it. For higher frequencies it might be possible to build/buy an analogue/digital converter with a higher sample rate to plug into the laptop USB socket.

Yes, a real time recording, slowed down on replay is the only way you'll hear the 'real' thing. Even the heterodyne only records the FM part of the ultrasound, as it 'passes through' near to the mixing oscillator frequency.

The Korg MR! includes a 1 bit option to record with an audio bandwidth up to almost 100KHz. That's why I thought it the most suitable 'audio' recorder. All the other modes on that model, and on other similar devices, would mean a cutoff too low to be really effective.
96KHz sampling would mean an upper cutoff of less than 48KHz (48KHZ is the the theoretical Nyquist limit - a 'real world' cut off is a bit less).


I think this sort of thing should be researched more - we might find that animal communication is a lot more sophisticated than we think.

There has been some research - I recall some very expensive real time devices a few years back -linked to a university, IIRC?---- Some of the results were impressive, although I don't believe we really have any idea of just how sophisticated bat ultrasound is. There were some sample real time recordings online at one time. Not sure where I found them though?....

Looks as if the real time recorders are now entering the 'semi pro' market (see here for example) but at nearly £1000 it's still pretty expensive!

'Freq div' is the cheapest and easiest way to start. But you do need lots of gain on your device, in my experience, and preferably an area with lots of bats to listen to. River banks are good......

EDIT: I'm a bit out of date with the Korg MR1. Now replaced by the MR2: https://www.dv247.com/studio-equipment/korg-mr-2-high-resolution-mobile-recorder--72998

Still £250, but by making the rest of the set up yourself, it's still a lot less than the £900+ for the device I linked to above.

But that's only, of course, if you get really keen..... which you might? :)

FURTHER EDIT: This site has samples of pipistrelle and noctule calls, from all types of bat detectors. notice that the heterodyne recordings seems to contain a lot more 'information' than the 'clicks' of the freq div versions.

As I say, if you do get interested, I bet you'll end up making a heterodyne version. (Although hopefully using fewer parts than the circuit Nigel linked to! :))

Interesting to notice that the slowed down time expansion calls (i.e. the actual sounds!) seem to have some 'reverberation' on them. But these recordings are made outdoors!! (I assume?). Very odd....
 
Last edited:
pips like living under roof tiles
That would explain it then. The one in my garden is (I think) a Common Pipistrelle. He isn't living under my roof tiles or I think I would have noticed when I went into the loft, but there must be plenty of places around for them to roost if they can squeeze into such small gaps.
 
Last edited:
As I say, 40KHz transducers are pretty selective
The site where I got the original circuit(!) recommends parallellng the transducer with a 6.8mH inductor, presumably to increase the bandwidth, would that work? Obviously it wouldn't affect the physical limitations of the device, I can see a tiny cone-shape like a loudspeaker cone inside it.

I am reluctant to use the bandpass circuit on the last opamp, what are the upper and lower limits? I can only work out such things with one capacitor and one resistor! I would prefer to lose a bit of amplification in exchange for a broader spectrum as 20x20 gain worked on my original circuit (just) and the first 3 opamps give 20x20x2.

The Korg MR1
I have too many interests to seriously take on another - I may make a heterodyne one in the future but I think this is going a bit too far!
Looks interesting.

Interesting to notice that the slowed down time expansion calls (i.e. the actual sounds!) seem to have some 'reverberation' on them.
Could be a recording artefact? More probably just the location, any recording I made in my garden would definitely have reverb on it as there are houses on both sides of me.
 
Last edited:
The site where I got the original circuit(!) recommends parallellng the transducer with a 6.8mH inductor, presumably to increase the bandwidth, would that work? Obviously it wouldn't affect the physical limitations of the device, I can see a tiny cone-shape like a loudspeaker cone inside it.

I am reluctant to use the bandpass circuit on the last opamp, what are the upper and lower limits? I can only work out such things with one capacitor and one resistor! I would prefer to lose a bit of amplification in exchange for a broader spectrum as 20x20 gain worked on my original circuit (just) and the first 3 opamps give 20x20x2.

Although it is some years since I have done any experiments with these transducers, I remember having similar concerns about trying to 'broaden' the bandwidth.
I do remember that it doesn't work very well! These devices are designed to work at 40KHz, and are pretty resonant around that frequency. Attempting to 'detune' will lose you a lot of gain!!

Same with trying to 'lose' the bandpass filter. You will have 3 gain stages before it, which will have amplified not only the tiny 40KHz 'bat' ultrasound content, but, in the latter two stages, the noise from the previous sections. The bandpass filter will attempt to isolate the 40 KHz (the important!) part of that signal, from the overall noise 'mush'...

The calculations for the filter values were done experimentally at the time, although there are now several freeware filter calculators online. This one from ESP is typical: **broken link removed**

I do understand your desire to 'broaden' the range, but I think you'll find you won't get very far with these transducers. Removing the high 'Q' of the transducer and the filter will cost you too much gain loss. Trying to compensate with extra 'untuned' gain will just tend to generate noise!
And remember , most bats calls contain frequency modulated content, with lots of harmonics - so some of it will probably appear at 40KHz!
 
Although it is some years since I have done any experiments with these transducers, I remember having similar concerns about trying to 'broaden' the bandwidth.
I do remember that it doesn't work very well! These devices are designed to work at 40KHz, and are pretty resonant around that frequency.

They aren't 'pretty resonant' they are VERY sharply resonant, which is why you have to use matched pairs (for remote controls etc.)
 
rogs, nigel
Well that's a bit disappointing, it seems that the only remaining part of the original circuit - the transducer - isn't much good either!

lots of harmonics
Well at least that's a bit more positive, If I go searching for the higher pitched ones I'll have to hope for lots of harmonics. I suppose it doesn't matter with a frequency division one whether you get all the sound, as long as you pick up something.
Anyway it's about time I did a little less posting and a bit more soldering. I'll post the results when I get somewhere with it.higher pitched ones
 
Last edited:
They aren't 'pretty resonant' they are VERY sharply resonant, which is why you have to use matched pairs (for remote controls etc.)
I have used electret mics in my diy heterodyne detectors.
Cheap small diameter ( 6mm ) mics work quite well at least to 60kHz.
 
I have used electret mics
I notice this is your first post - it's a good one to start with! I thought the only choice was expensive ultrasonic microphones, so this is a good tip, I'll definitely use an electret mic if I go on to make a heterodyne detector.
 
You need to be aware that there are huge variations in the cheap electret mics. Simply looking for a '6mm' one won't guarantee a good performance. Some are fine, some are simply too noisy - and/or have too limited bandwidth to be much use.

The Knowles EK3132 I mentioned in my earlier posts works well. The much cheaper Panasonic WM61A is also not bad.

For the unbranded 'cheap' types, you might get lucky - maybe not......try one and see!!
 
I've been distracted from this for a while, but have now nearly finished it. I've taken note of all the very sensible comments and so am using rogs' circuit except for using chips I already have. The digital chip is a 4024 - I've checked and it has a schmitt trigger, the analogue chip is a TL074 - I'm not all that bothered about current consumption.

I am thinking of one small addition as I want to record the output as well as listen to it. I intend to add a 5K to 10K pot before the piezo crystal and another before a small jack socket. I'm not sure if this resistance would interfere with the piezo working so would welcome comments.
View attachment 68146
 
Last edited:
The reason I chose a 4017 was because I wanted to divide by 10. The piezo sounder I was using was looking for a 4Khz AC input signal, and was pretty resonant around that frequency, so the output from the 4017 was enough to 'excite' the piezo, and get a reasonable noise level without any audio amplifier stages.
I'm not sure what output you've chosen from your 4024, but as there's no divide by 10 there won't be a 4KHz output. Not sure what AC piezo you're using, but if you try and drive it at anything other than it's resonant frequency, you'll only get a pretty crude selection of pretty quiet DC type clicks. Whether they will be enough?.... can't hurt to try it anyway!

I'm assuming your recorder loading is pretty high impedance, so that won't be too bad. Whether there will be any useful output from your sounder, if you are trying to drive it at anything other than it's resonant frequency, I wouldn't know.
Again, providing your total loading doesn't exceed the output drive capability of the 4024, it won't hurt to try it out.....
 
Ah! I'm glad I asked, I didn't realise that they only worked at their resonant frequency, is there anything similar I could use? I have a little buzzer from a PC RDI DMT 1206-I https://www.gravitech.us/acbuzzer4v8v.html I can play the output of my record deck through it so it's not very resonant, it's more like a crude loudspeaker.

Model RDI-DTM-1206
Rated Voltage 6VDC
Operating Voltage 4VDC - 8VDC
Current Consumption* 40mA max.
Sound Pressure** 85 dB min.
Coil Resistance*** 50 OHM

Some dodgy calculations:
The buzzer datasheet says "Current Consumption* 40mA max." so assuming the battery gives 8 volts then 8x40=320mW.
The 4024 datasheet says: "P power dissipation per output - 100 mW"
But 85dB is pretty loud, so I think if I include a resistor and/or a pot it should be ok, I'll have to experiment.

I hope a 5-10K pot on the socket for the recorder will be ok - the old circuit was much too loud for the recorder, it was clipping.
 
Last edited:
Haven't you seen the awful frequency response of a piezo transducer? It is all over the place with huge peaks and almost nothing at some frequencies. Here is an example:
 
Ah! I'm glad I asked, I didn't realise that they only worked at their resonant frequency, is there anything similar I could use? I have a little buzzer from a PC RDI DMT 1206-I https://www.gravitech.us/acbuzzer4v8v.html I can play the output of my record deck through it so it's not very resonant, it's more like a crude loudspeaker.

That looks as if it might work from a divide by 16 output from your 4024 (i.e. 2.5KHz) -that would be pin6 I think -
As audioguru shows, these really are very peaky devices, so you should get a reasonable sound putput at resonance, but not much at all at any other frequency.
 
I've done a bit of experimenting today with the buzzer and the 4024. For input I tried headphone output from my PC or just a long wire to pick up hum. Since the chip is digital I assume that so long as there is enough voltage input to make it switch it will have full output voltage. With the battery fully charged it works and is just about loud enough so my calculations above were dodgier than I thought!. I think I will complete the circuit as is, but there is enough room to add an LM386 and a trimpot if it's necessary.
 
Last edited:
Maybe your "buzzer" is not piezo and is actually a little speaker.
Measure its resistance. A piezo is like a capacitor with infinite resistance. A speaker is a piece of wire.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top