Author Topic: Want to hear the bat flying in the front yard  (Read 18324 times)

0 Members and 1 Guest are viewing this topic.

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Want to hear the bat flying in the front yard
« on: August 02, 2021, 12:02:13 pm »
A bat keeps flying almost every night above a certain piece of green yard, right in front of the building, at about the same level with the balcony, so quite close (no more than 10-30 meters, or 30-100 feet in straight line).  The drawback is this is inside the city, so during the night it might be more noise pollution than in the wilderness.

Would like to DIY an ultrasonic receiver, only for the fun of it, so without buying a dedicated ultrasound microphone.  Already having around:

- a few analog electret microphones, mostly from former mobile phones or former headsets
- about 10 of HC-SR04 ultrasonic sensors that can be used as donors for microphones, or even for a directional array
- some piezo discs from singing postcards and toys
- a very old ultrasonic-remote receiver board from an old TV (don't know the model)

Mostly concerned about the available signal to noise ratio (inside a city) and the expected power levels (if there is any hope such microphones would be sensitive enough).  The frequency range is said to be between 20kHz-160kHz, but mostly the signals would be expected to be around 50KHz or so.

Any chances to receive the bat's echolocation signals with microphones like the ones in the list?

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #1 on: August 02, 2021, 12:25:52 pm »
I believe electrect microphones are the best.

Piezo discs from greetings cards have a resonant spike at around 30kHz and the HC-SR04 and old remote controls have a peak at 40kHz.

Do you plan to record the sound, or down convert it to the audiable range? Either way you'll need to high pass filter it at 20kHz, or whatever the lowest frequency of interest is. Down conversion can be done the old fashioned way, by heterodynining, or digital signal processing.

 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #2 on: August 02, 2021, 02:38:36 pm »
From wikipedia it appears to be many types of receivers for bat sounds: https://en.wikipedia.org/wiki/Bat_detector

- heterodyne/superheterodyne (local osc mixed with the Rx signal, so all analog)
- frequency division (amplify to square wave, then use a digital counter/divider to shift down the frequency)
- time expansion (high speed digital sampling and recording then playback the recorder samples but slower, so no real time audio)

Not sure yet how to post process the signal.

At first it would be great only to test if any signal at all can be received, so just the ultrasound mic and an analog amplifier in the 12kHz ... 160 kHz band.

Can test these two in the field, with a DS202 hendheld oscilloscope to see if anything at all can be received.  The DS202 mini oscilloscope has 1MHz analog input band with 1Mohm impedance input, min 20mV/div, max 10MSa/s (also has a signal generator output, 10Hz~1MHz square wave duty adjustable or 10Hz~20Khz Sine/Square/Triangle/Sawtooth wave, might be usable as a local oscillator to improvise a heterodyne but I don't have any connector that fits).

Good point about sensor resonances, thanks!   :-+
(could test for that in the lab at first, to eliminate the worst candidates)

Offline nali

  • Frequent Contributor
  • **
  • Posts: 666
  • Country: gb
Re: Want to hear the bat flying in the front yard
« Reply #3 on: August 02, 2021, 06:02:15 pm »
I know you didn't want to buy another microphone, but just to say you can get MEMS mics pretty cheap now, including on carrier PCBs e.g. eBay auction: #114874902126

There are also some homebrew projects already out there:

Rasp Pi http://pibat.afraidofsunlight.co.uk/
Teensy https://www.teensybat.com/

 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #4 on: August 02, 2021, 08:01:18 pm »
Somebody else PM-ed about a MEMS microphone, too, https://www.digikey.com/en/products/detail/pui-audio-inc/AMM-3742-T-WP-R/14289962 with very good response around 50kHz and above, indeed, but I don't think I have any analog MEMS based mikes.

Might be a few MEMS mikes through the scraped parts boxes, but AFAIK those were with digital output only, and not sure if their sampling rate would be high enough to record at 50kHz or more.  Never tested any of those digital MEMS microphones.  Should look for some analog MEMS microphones, but not sure if I have any.

Tested today some miniature speakers and the piezo discs from singing post cards.  Nothing promising so far.  The speakers doesn't play well at more than a few kHz, and the piezo disks have some strong resonance peak at approx. 7kHz and multiples, but above 30kHz couldn't get any signal with them.   ???

Searching the scrap boxes for electret microphones now.  Would search for any MEMS mikes, too.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #5 on: August 03, 2021, 07:45:41 am »
Somebody else PM-ed about a MEMS microphone, too, https://www.digikey.com/en/products/detail/pui-audio-inc/AMM-3742-T-WP-R/14289962 with very good response around 50kHz and above, indeed, but I don't think I have any analog MEMS based mikes.

Might be a few MEMS mikes through the scraped parts boxes, but AFAIK those were with digital output only, and not sure if their sampling rate would be high enough to record at 50kHz or more.  Never tested any of those digital MEMS microphones.  Should look for some analog MEMS microphones, but not sure if I have any.

Tested today some miniature speakers and the piezo discs from singing post cards.  Nothing promising so far.  The speakers doesn't play well at more than a few kHz, and the piezo disks have some strong resonance peak at approx. 7kHz and multiples, but above 30kHz couldn't get any signal with them.   ???

Searching the scrap boxes for electret microphones now.  Would search for any MEMS mikes, too.
It looks like a MEMS microphone is the way to go.

Regarding the piezo disc: the resonant peak is very sharp, so I wouldn't recommend it anyway. I'll have to test some piezo discs I have at the moment. It was awhile ago, when I did it, so it might have just been lucky with the ones I had back then.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #6 on: August 03, 2021, 08:46:27 am »
About the piezo discs, mine are much bigger than the average piezo discs we see nowadays.  The ones I tested are 5cm (2 inch) in diameter, and the setup wasn't very careful (for example the audio amplitude can vary a lot by simply putting a little tension on the disks (bending them a little from the sides), etc.

I'm using them now only as a piezo speaker, to evaluate other (electret for now) mikes.

So far i seems like an electret mike would do it, and the size does matter again.  The ones of about 5mm in diameter are doing much better than the 8mm ones (when it's coming to ~50kHz or higher).

Last night found a 5mm electret mike that can go up to 110kHz (with the same big piezo disks to generate the testing ultrasounds  :-// ) only to realize later that the signal I was seeing on the oscilloscope was caused by induction (radio) and not by ultrasounds.   ;D

I need a much careful measuring setup.
Couldn't see any bats last night.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #7 on: August 03, 2021, 10:48:57 am »
If the piezo disc isn't a very good microphone, at ultrasonic frequencies, then it will also be a poor speaker. How do you know it's producing any ultrasound?
 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1564
  • Country: gb
Re: Want to hear the bat flying in the front yard
« Reply #8 on: August 03, 2021, 01:49:46 pm »
A good way to generate ultrasound, so I am told, is to jingle a bunch of keys in front of the sensor
 

Offline Gary350z

  • Regular Contributor
  • *
  • Posts: 240
  • Country: us
Re: Want to hear the bat flying in the front yard
« Reply #9 on: August 03, 2021, 07:56:24 pm »
A good way to generate ultrasound, so I am told, is to jingle a bunch of keys in front of the sensor

I have done this. It makes ultrasonic receivers go crazy.
 

Offline nali

  • Frequent Contributor
  • **
  • Posts: 666
  • Country: gb
Re: Want to hear the bat flying in the front yard
« Reply #10 on: August 03, 2021, 08:10:46 pm »
You'll be suprised what generates ultrasound - a biscuit or crisp packet is also pretty good.

I do have a cheap-ish hetrodyne bat detector which my wife bought me as a birthday present. I went for a walk with it one night but couldn't work out what the "chink chink chink" sound was that I could hear in my headphones. As it turned out it was the small metal tab of the zip on my jacket tapping against the zip's metal teeth.

The detector unit itself is OK but noisy as hell, it's like a small radio with no antenna. It's one of my "maybe one day" projects to make something a bit better.
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9630
  • Country: gb
Re: Want to hear the bat flying in the front yard
« Reply #11 on: August 03, 2021, 08:23:41 pm »
A good way to generate ultrasound, so I am told, is to jingle a bunch of keys in front of the sensor

Even simpler, rub your thumb and fingertip together. The ridges riding over each other produce abundant ultrasound without all the loud audible jangling that you get with keys.
Best Regards, Chris
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #12 on: August 04, 2021, 05:29:21 pm »
If the piezo disc isn't a very good microphone, at ultrasonic frequencies, then it will also be a poor speaker. How do you know it's producing any ultrasound?

The piezo disc might work better with a high impedance input preamplifier than with the 1M\$\Omega\$/13pF of the oscilloscope input.  I was using the probe in 1x mode to get the max sensitivity of 500uV/div from the scope.

To see if what's seen on the oscilloscope is indeed the ultrasounds and not just induction from wires it's enough to block the space between Tx and Rx with a piece of foam.  Also, when the distance changes, for example by slowly moving the Tx back and forth, the phase shift can be seen on the oscilloscope.

It's funny to observe the ultrasounds' wavelength by slowly moving the piezo disc back and forth while watching on the oscilloscope how the reference sine wave from the generator and the received sound slides with the move.   :)




The non-repetitive ultrasound sources are hard to measure without a preamplifier.  For now I am doing the lock-in amplifier trick with the oscilloscope (synchronous detection + averaging) so signals as small as tens of \$\mu V\$ coming directly from the sensor can be easily observed.

I didn't make any preamplifier yet because I was not sure which type of sensor will work better with ultrasounds.  So far the winners seem to be electret microphones scavenged from decade old mobile phones.  The smaller diameter ones are the best.

The only MEMS mikes I have are from very recent phones, so it is expected that they'll have local preamplifiers integrated with the MEMS, and they will be limited to the audio only band, if not voice only.

Looking through the opamps stash, I found only lame generic opamps 741-like, needing at least 10V supply to run and with a slew-rate that is too small for 160kHz.  So, to make the specs for a preamplifier opamp:
  • - working at a supply voltage of 3V or lower, so it can run from a single cell Li-ion battery, 3...4.2V, without any voltage step-up converters

  • - able to output 3Vpp at 160kHz.  This is rare with general purpose opamps because of the slew-rate needed to output a sinusoidal signal of, let's say, 3Vpp at 160kHz.

    (Trying some \$LaTeX\$ on EEVblog, to show (off) the finding of required slew-rate for such a signal)   :P
    The instantaneous voltage \$v_i\$ at any moment \$t\$ is given by the generic formula of the \$harmonic\ oscillator\$:
    \[
    v_i(t) = A_0 \cos(2 \pi f t + \phi_0)  \tag{1}  \label{eq:n1}
    \]
    where \$A_0\$ is the \$amplitude\$ of the signal, \$f\$ is the \$frequency\$, \$\phi_0\$ is the \$phase\$, and \$t\$ is the \$time\$.  The phase doesn't matter in regard to the maximum slew-rate.  Thus, \$\eqref{eq:n1}\$ becomes:
    \[
    v_i(t) = A_0 \cos(2 \pi f t)  \tag{2}  \label{eq:n2}
    \]
    By definition, the first derivative corresponds to the slope, or the slew-rate in opamp language.  To find the max slope for the signal means to find the max of the derivative of \$\eqref{eq:n2}\$, which derivative is:
    \[
    v'_i(t) = A_0 2 \pi f (- \sin(2 \pi f t))  \tag{3}  \label{eq:n3}
    \]
    Since any \$\sin(x)\$ is bounded between -1 and 1, the max slope, or slew-rate, \$SR_{max}\$ of the signal is:
    \[
    SR_{max} = \left|v'\right|_{max} = A_0 2 \pi f  \tag{4}  \label{eq:n4}
    \]
    Plugging the numbers in \$\eqref{eq:n4}\$:
    \[
    SR_{max} = 1.5V \cdot 2 \cdot 3.14 \cdot 160kHz = 1.507\ V/\mu s
    \]
    so the opamp should have a slew rate of at least \$1.5\ V/\mu s\$.

  • - be available at hand.  With such specs, I could find so far only comparators through the scrap boxes:
       - LM393 - dual comparator, open collector, min supply 2V
       - TCA520 - opamp/comparator, TTL output compatible (so good current sinking but low current when sourcing), min supply 2V, SR max 25V/us




- Anybody tried using LM393 or TCA520 as amplifier?
- Is there any chance to make them stable, or better just make a preamplifier with discrete transistors?
« Last Edit: August 04, 2021, 07:09:08 pm by RoGeorge »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6858
  • Country: pl
Re: Want to hear the bat flying in the front yard
« Reply #13 on: August 04, 2021, 08:19:33 pm »
4. Gain bandwidth product ;)

Old 5534 would work and provide a bit of gain (60MHz GBW) but not at 3V.
AD8397 is a viable alternative for 3V rail to rail operation but not as cheap.
There are some older National LMHxxxx parts, bipolar and low voltage, but they could be noisier - not sure what the requirements are with those mics.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14367
  • Country: de
Re: Want to hear the bat flying in the front yard
« Reply #14 on: August 04, 2021, 08:34:28 pm »
The ultrsound transducers SR04 are not good as a microphone, because they are very resonant. But they should be good for a US test source to than check the electret mics.  Some of the small electret mics work surprisingly well. As the university I had one (sennheiser 4.8 mm diameter) that showed response to 100 kHz (limit of the Lockin used for detection). However not all are suiteable: often there is an internal capacitor to reduce the higher frequency response to get a flatter curve. Otherwise the internal resonance makes the gain go up at the higher audio band. I would mainly check the mics < 5 or 6  mm. The larger one usually don't work as the self resonance of the membrane is to low and thus the low pass filtering needed.

The phase shift from a changing distance is quite indicative for having US and not electric coupling.

The LM393 has a chance to also work as amplifier, at least with high gain (e.g. G > 10). Definitely only use 1 channel and have bias curent / resistor at the output and little capacitve load to the output (relatively high ouput impedance).

 A discrete transistor amplifier is likely easier and more predictable and also lower noise. At higher frequency the signal from the mic may be quite small, but the noise gets also often quite low.

Chances are the LM393 could be higher noise (e.g. similar to LM358) than the microphone at higher frequencies (e.g. 10 kHz). I would expec a noise level of some 10-20 nV/sqrt(Hz) at 10 kHz for the electret mic, with mainly an 1/f  increase to lower frequency. So no need to go super low noise, but also not that much. I rememer that for the amplifier after the mic it made a difference going from an LF356 to OP27, though not very much. There is essentially a small JFET source follower inside, often a bit larger (lower noise) then the 2N4117, but not much.
 

Offline Harm314

  • Newbie
  • Posts: 6
  • Country: nl
Re: Want to hear the bat flying in the front yard
« Reply #15 on: August 06, 2021, 01:07:59 pm »
I have a low-end bat detector kit from Franzis Verlag:

https://www.franzis.de/search?sSearch=fledermaus, https://www.amazon.com/Franzis-Make-your-Detector-Manual/dp/3645652760/ref=sr_1_5?dchild=1&keywords=franzis+bat+detector&qid=1628254669&sr=8-5.

I have the older (green box) version, the newer version needs even less (no?) soldering. 

For the bats that fly over my back yard (Wester Europe/Netherlands), it does the job of making the ultrasound audible, including the switch from 'search' clicks to 'attack' mode. Great fun together with my boy on a summer evening.

It's quite simple, built around a CD2003GB, with an LM3861 and an NE555.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #16 on: August 07, 2021, 11:11:49 am »
Cobbled a 100x preamplifier with a TCA520 OpAmp/Comp, to ease the mikes measurement and selection.  It works fine at 3.3V.  Found an electret mike from a former Motorola 8700 that still works even at 200kHz.   :o

Used the Tx to Rx distance variation to be sure it's ultrasound what the oscilloscope shows, and not radio.  Had some fun playing around with ultrasounds, observing the direct wave, the reflected wave, and then the interference pattern between the direct and the reflected wave.  The setup can easily detect my own movement near the workbench, but have you ever seen a breadboard with wheels?   ;D






For the bat detector, not sure which one to build first:
- a preamplifier to square wave, then use a digital divider by 16
- a heterodyne
- maybe use a logarithmic preamplifier as amplitude compressor, for more sensitivity?

By looking at the expected spectrum, some species emit a signal as wide as 80kHz (e.g. see page 11 of 19 from https://rss.onlinelibrary.wiley.com/doi/pdf/10.1111/rssc.12217 or fig.2 in https://acoustics.org/pressroom/httpdocs/154th/aytekin.html etc.), so how will a heterodyne translate 80kHz wide bandwidth into only a few kHz of human hearing?   :-//

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14367
  • Country: de
Re: Want to hear the bat flying in the front yard
« Reply #17 on: August 07, 2021, 12:23:09 pm »
The simple heterodyne can only convert some 20-30 kHz of BW around the local oscillator. One has both band of tone mixed up and mixed down, but no more than twice the audio band. For most used this is still Ok. If needed one could to a 2nd channel for stereo with a 2nd LO.

The divider part is tricky, as it only wirks with the strongest signals.
The dynamic range is likely OK and no real need for compression, at least not for the start.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4866
  • Country: vc
Re: Want to hear the bat flying in the front yard
« Reply #18 on: August 07, 2021, 01:15:09 pm »
I would amplify the mic and feed the signal into an MCU, something like stm32 (with at least 12bit adc and single precision fpu).. And DSP the signal then.
With 2 mics attached you may even create a bat-position-visualizer then (showing the bat flying on an LCD screen)..
 :D
« Last Edit: August 07, 2021, 01:22:23 pm by imo »
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2452
  • Country: gb
  • Recovering Electrical Engineer
Re: Want to hear the bat flying in the front yard
« Reply #19 on: August 07, 2021, 04:55:21 pm »
A staright forward hetrodyne down converter using a balanced mixer is a good place to start. https://www.google.co.uk/url?sa=i&url=http%3A%2F%2Fwww.magenta2000.co.uk%2Facatalog%2FBat%2520Detector%2520Mk2%2520Kit%2520Assembly_Farmer.pdf&psig=AOvVaw2tBERHW6ScMRQv1LMA9UJn&ust=1628441407046000&source=images&cd=vfe&ved=0CAgQjhxqFwoTCLjN1Y6vn_ICFQAAAAAdAAAAABAI   
You can also sample the amplified signal and pitch shift it thus: http://www.technoblogy.com/show?1L02 increase the clock to suit.
Either way you need to compensate for the horrible frequency response of your piezo.
Most bat detectors have a tuning control to select the frequncy band. Bandwith compression is not for the faint hearted.  It cannot be done in hardware as far as I am aware.
FPGA boys???
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #20 on: August 07, 2021, 08:49:46 pm »
Regarding the modulator: what's wrong with just using a simple BJT LC oscillator, with the signal going to the base to change the transconductance, thus the amplitude?
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7115
  • Country: ca
Re: Want to hear the bat flying in the front yard
« Reply #21 on: August 08, 2021, 07:16:01 am »
Popular Electronics Electronic Experimenter's Handbook 1982 pg. 76 has this simple ultrasonic detector project. It uses old TV remote control piezo ultrasonic sensors and oddball TBA231 op-amp.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #22 on: August 09, 2021, 10:18:26 am »
Thanks for that Popular Electronics schematic, had one of those "Aha!" moments because of it.  :-+

That was because there is no obvious multiplier (or frequency mixer) there, so how does it shifts the spectrum from ultrasounds to audio?  C5 and C10 only adds the ultrasound signal \$f_x\$ with the local oscillator \$f_{LO}\$.  An adder does not produce new frequencies.  If we add two frequencies \$f_x\$ and \$f_{LO}\$ we do NOT get any \$f_x - f_{LO}\$ like we get from a normal mixer/multiplier.

A circuit needs some non-linearity to produce new frequencies, frequencies other than the ones that were put in.  So, how come that an adder can produce  \$f_x - f_{LO}\$?  Well, it doesn't.

Then how that that schematic even works?  It's the diode detector with D1, D2, R8 following after the C5 and C10.  ;D  The diodes detector is in fact a frequency mixer, didn't realized that before!

Those diodes also acts as a frequency mixer  8), then R8, C6, C7, R9 makes a low-pass filter that rejects higher frequencies and let to pass mostly the \$f_x - f_{LO}\$ component, which is the bats' ultrasounds shifted down to audio.  ^-^




Added a screen capture to illustrate a low pass of \$f_x + f_{LO}\$ in blue vs a low pass of \$|{f_x + f_{LO}}|\$ in yellow.

The green trace is the sum of the two frequencies and the red trace is the rectified sum.  In blue is the signal after low-pass on the sum of the \$f_x\$ and \$f_{LO}\$, while the yellow trace shows the same but for the absolute value (with diodes).  Blue signal only shows ultrasounds, while the yellow signal shows \$f_x - f_{LO}\$.
« Last Edit: August 09, 2021, 10:53:29 am by RoGeorge »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7115
  • Country: ca
Re: Want to hear the bat flying in the front yard
« Reply #23 on: August 11, 2021, 12:12:02 am »
That is interesting, it did look like an oddball circuit. I didn't think that circuit would be practical, the first TBA231 op-amp stage voltage gain 1,001 then second stage gain 148, total about 148,000 which is crazy high. Who can pull that off on perfboard?
Bertrik's bat detector page worth a look and his NE612 version.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1835
  • Country: is
Re: Want to hear the bat flying in the front yard
« Reply #24 on: August 13, 2021, 01:57:17 am »
The old 'motorola' Piezo tweeters that were sold by Radio Shack and still available
from MCM work great. They have a resonant peak around 25khz but are very broadband
and also are basically a compression driver horn so they are directional with about 90
degrees in the vertical and horizontal plane. I used one of these mounted in front of an
aluminum concave dish as the antenna and RX/TX element for an ultrasonic radar and
was painting targets out to 100 yards with around 10vpp squarewave drive and around
100db receive gain (total voltage gain) to drive a CRT grid for an 'A Scope' type display.
B.T.W., a signal 100 yards away has a long travel time out and back!!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline Tomorokoshi

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: us
Re: Want to hear the bat flying in the front yard
« Reply #25 on: August 13, 2021, 12:18:59 pm »
Recorded from an HP 4918A Ultrasonic Translator.
 
The following users thanked this post: RoGeorge

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #26 on: August 13, 2021, 06:12:38 pm »
Nice!   :)

Thanks for mentioning the instrument.  By googling it I've learned that ultrasound are used industrially to detect gas leaks, debug HVAC, corona discharge, etc.  For example here it is used with a conduction wand to debug a Freon leak https://youtu.be/4oMYMYI17cM

That's a nice to have around tool, much more useful than hearing the bats.  First application that came to mind would be to detect which coils are singing in SMPS.   8)

Just curious how they made the HP Ultrasonic Translator, the service manual for another model HP 4917A Ultrasonic Translator Detector is available online, https://www.kennethkuhn.com/hpmuseum/scans/hp4917a_manual.pdf and has the block diagram at page 9 of 26, and the schematic at schematic at page 19 of 29.  There is a \$\pi\$ LC filter right after the probe to bandpass the 36-44kHz range, then the signal is mixed with a fixed LO of 40kHz.  The only setting is the audio volume knob.   :-+



LATER EDIT:

Just for the docs, applications for HP Ultrasonic Translators featured in HP Journal - May 1967:
https://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1967-05.pdf
« Last Edit: August 13, 2021, 06:54:07 pm by RoGeorge »
 
The following users thanked this post: Tomorokoshi

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #27 on: August 19, 2021, 08:25:18 pm »
I was playing with a Wein bridge oscillator recently, remembered this thread and thought it could be easily used as a modulator, by coupling a signal to the gate of the limiting J-FET. It could also be built with an op-amp. R1, R2 C1 & C2 form a filter which sets the frequency, which can be varied using a dual ganged potentiometer and fixed resistor. It will probably need some tweaks to be a practical circuit.
« Last Edit: August 19, 2021, 08:27:11 pm by Zero999 »
 
The following users thanked this post: RoGeorge

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #28 on: August 19, 2021, 10:28:12 pm »
That's very ingenious!   :-+
Might be tricky to keep the Wien oscillating in practice, but definitely worth a try.

Speaking of unconventional ways to make a heterodyne, another one I was thinking the other days was to use the local oscillator output as a power source for the electret mic.  That will turn the electret mic into a multiplying mixer.  ;D




Though, there are some inconvenients with any heterodyne when using for listening to bats:
- first is that the bats emit short pulses, so when hearing at that in real time it will sound more like burst of clicks, not much can be distinguish regarding the "voice/singing" of the bats
- second is that a heterodyne might reverse the spectrum when the LO is higher, like shown in the two examples.  First image is with the waveforms and the second with the spectrum corresponding to those waveforms.


Notice how in the last spectrum plotted appears reversed in audio (magenta spectrum near the origin of the axes - magenta is corresponding to the green signal mixed with the blue oscillator, where the blue LO is higher in frequency than the bats signal).

That will make, for example, an increasing pitch chirp to hear as decreasing in pitch.   :o

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #29 on: August 22, 2021, 11:54:27 am »
Found this on the street   :o



and noticed it still has a small piece of PCB with the answering button on it, so it was from the bottom half of a phone, where a mic is expected to be, and guess what?  It does has a mic on that small piece of PCB leftover:



and it happened to be a MEMS mic, the analog kind of MEMS mic  :D F4-(S)MOE-N090R38-3P marked "ME V1.0".

Tested it with the ultrasounds coming from a piezo disc, and this MEMS mic seems to be working just find up to at least 135kHz if not more, outputting tens of mV (without any amplifier).   :-+



The upper level of blue marks the mic out signal for a frequency sweep between 20kHz and 150kHz, while the lower level blue marks the response for the rest of the sweep, between 150kHz and 200kHz.
« Last Edit: August 22, 2021, 11:59:55 am by RoGeorge »
 
The following users thanked this post: Zero999

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #30 on: August 23, 2021, 08:40:22 pm »
The software is not yet ready, but couldn't resist the temptation, so last night took the handheld oscilloscope and the MEMS mic powered by two AAA batteries, and went outside curious if it can capture anything:





It took a while to find a good trigger level, and at first I thought the captures are coming from the rare passing by cars in the night.  Then I realized that the trigger captures are not from the cars noises, but the triggering happens more often in the presence of the car noises because the bat raises the Tx power when it is more noise outside!  :D

I don't think the captured signals were from the cars, because of two things:
- the signals look like a burst of only a few milliseconds long, thought the passing by cars were taking many seconds of sustained level of noise before fading away
- a few ultrasonic bursts were captured in the silence of the night background sound, with no strong noises to be hear

Offline Tomorokoshi

  • Super Contributor
  • ***
  • Posts: 1212
  • Country: us
Re: Want to hear the bat flying in the front yard
« Reply #31 on: August 24, 2021, 12:19:58 am »
For what it's worth, I couldn't hear crickets at all over the background noise with the ultrasonic translator. So apparently there isn't much energy from them between 35 kHz and 45 kHz.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #32 on: August 24, 2021, 12:57:53 am »
That was a surprise for me, too.  Even with the crickets and all other background noises of the night, the trace on the oscilloscope was staying mostly flat, except for the bat chirps, which chirps were comparable in amplitude with loud cars.  Bats are probably one of the loudest creatures, if not the most loud out there in the ultrasonic range.

I bet if it were for humans to hear ultrasounds, bats would probably sound very, very loud, like a dog barking only a few feet away, or rather like screaming seagulls above a net full of fish.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #33 on: May 18, 2024, 08:36:06 pm »
Good find regarding the microphone, which is the most difficult part of a bat detector.

I recently attesteded a bat walk meet up with my 11 year old nephew and he loved it. We used heterodyne detectors, which worked from 17kHz ro 140kHz and I remembered this thread.

I'm now thinking of making or buying one.

I had another idea. Rather than heterodyne, use a sample and hold circuit, clocked with an adjustable squarewave oscillator. This has the advantage of not requiring a sine wave oscillator. It just requires a simple low pass filter to give a good output. The only thing is the oscillator needs to have a low duty cycle to work well, but even the TL072 should be able to cope with that up to 140kHz.

I've had a play with LTSpcie.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #34 on: May 18, 2024, 09:12:09 pm »
Looks interesting.  :-+

Ready made bat receivers can be quite expensive (for what they have inside).
Better build your own, so to implement the sampling idea in practice.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #35 on: May 18, 2024, 09:48:52 pm »
Sorry, I forgot to ask: did you ever complete your project?

I've had a look for the microphone you used, but couldn't find it for sale anywhere.
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #36 on: May 19, 2024, 05:20:00 am »
I've switched to digital, because it happened that I was already heaving a DSP devboard from TI ( https://www.ti.com/tool/TMDX5535EZDSP ), with a CODEC that can do 192kHz sampling, but it turned out the 192kHz was not really possible for frequencies above the audio.  There were some internal filters I couldn't bypass, got lost in programming and configuring the DSP+CODEC, and eventually never completed my bat receiver.  :-[


For the microphone, I think most of the electret microphones should be good enough.  A MEMS microphone would be even better, though the bats ultrasounds are very loud when compared with any other sounds of the night.  Might need a preamplifier if the bats are not very close.

Look for any abandoned mobile phones, or search for MEMS microphone if you can not find any discarded mobile phone to scrap it's microphone.  The very new ones might have many microphones, but are often digital mics, and very, very small, really hard to reuse.  IIRC Adafruit was heaving some MEMS mics on a breakout board, or if you have one of those "17 sensors Arduino kit", there are one or two sensors with a small microphone.

If you don't have any ultrasound source to test which microphone works the best, shake a ring with (door) keys nearby, their metallic ringing sound will produce a lot of ultrasounds.

Beware with the electret microphones, they are very, very sensitive to heat.  Heat depolarizes the electret material inside, and makes them lose from their sensitivity.  That is why many mobile phones will use spring contacts to connect to their mic, and if not, usually the electret mic has some wires soldered from the factory.  Avoid soldering on electret microphones if possible.

The waveforms above were captured without any filter, with a handheld oscilloscope connected directly to the microphone.  The recording was made from a balcony, at about the same height as the bat was flying, so the distance was somewhere between a few meters and 20-50 meters maybe.  In the picture are loudest ones, when the bat was flying only a few meters (maybe as close as 3meters/10feet or so).
« Last Edit: May 19, 2024, 05:25:24 am by RoGeorge »
 
The following users thanked this post: Zero999

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #37 on: May 19, 2024, 07:59:20 pm »
It's a shame you didn't complete it. It's a bit silly having such a high sample rate, with all that filtering. It makes it pretty pointless. You could have added an external sample and hold circuit.

Yes, an electret microphone should work, but I've noticed some models have a built-in capacitor, which is designed to filter out RF GSM signals. It's typically 1nF, so would form a 72kHz low pass filter with the 2k2 bias resistor. I could use a lower value bias resistor, say 1k for a cut-off of 159kHz, along with a lower bias voltage, so the bias current remains within the permitted level, but I don't know how well it'll work. I might buy a few of each part and then open them up to check there isn't a capacitor.

I found this kit which uses sampling, but with an analogue switch. I would need to build a case and add a speaker amplifier, since his mum wouldn't want him wearing headphones, in case he sets the volume too loud.
https://whadda.uk/manuals/velleman/illustrated_assembly_manual_k8118.pdf
EDIT: Schematic added.

I'm not set on the sub-sample/aliasing/strobe idea. It's just I thought it might be easier to understand. I could go with heterodyne, perhaps with the incandescent lamp for the AGC, but with a J-FET in series to provide the amplitude modulation.
« Last Edit: May 20, 2024, 09:43:28 pm by Zero999 »
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #38 on: May 20, 2024, 07:54:01 am »
Well, most of my projects remain unfinished, and I have no excuse for that.  Once there are some partial results, and only disciplined work remain for a project to be finished, something else pops into attention.  Learning new things or exploring new topics is more appealing then working to finish something.  Sometimes I return to older projects and finish them, but not for closure.  Usually I return to an old project when I need that device to do something with it.

Unfinished projects leave some sort of guilt behind them, so it is better to finish them if you have the discipline.

I've opened yesterday your simulation, and noticed you used ~150kHz.  Isn't that too high?  I remember bats were audible somewhere around 50kHz, maybe up to 80kHz or so.  150kHz osc - 50kHz bat = 100kHz at the output, which will need a second frequency shift to become audible.  I've read they might emit higher than 100kHz, though that doesn't propagate well enough through air, but I didn't try in practice how much of 100-150kHz can be received from a distance, outside.

Another inconvenience with frequency shifting, in general, is that bats might use a wider band than the audio width of human hearing, so not all the spectrum produced by the bat can be shifted into audio (that's why I've tried to move to digital, with the intention to use DSP for compressing a wider band of 50-100kHz into only 5 or 10kHz of audio bandwidth).  Though, was a little too pedantic from my side when I wanted to implement spectrum compression.  It is very interesting to hear the bats even when only a fraction of their spectrum can be made audible at a time.
« Last Edit: May 20, 2024, 08:02:28 am by RoGeorge »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #39 on: May 20, 2024, 08:56:38 am »
Why 150kHz? I noticed the bat detectors provided worked up to 140kHz, Wikipedia says >100kHz and wanted to account for the highst frequency. The idea is to make it tunable, with R4 being a 100k potentiometer with 10k in series. It's not the final design.

Is the wider spectrum a problem? The idea is just to detect bats. Adjusting the tuning would help.

Digitally recording and playing back at a much lower speed would give a more accurate representation, but it doesn't work in real time.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #40 on: May 27, 2024, 11:34:54 am »
I hope you don't mind if I continue to post my designs and questions in this thread, since you appear to have abandoned this project.

I've not stopped work on it.

I tested a few piezoelectric transducers designed for audio/alarm applications and noticed how they have various sharp peaks and troughs between 20kHz and 150kHz. I used two units for each test, one as a transmitter and the other as a receiver. I haven't recorded any detailed measurements, simply because I don't have a microphone with any response data over said frequency range. The intention is to use a transducer to test various electret and MEMS microphones to find a suitable candidate.

I've also had a failed attempt a designing a Wein bridge oscillator with AM, for the heterodyne circuit. The oscillator works, but the modulation index sharply declines, as the input frequency increases.

Here's the schematic.

I built it on a solderless breadboard. For simplicity I used the TL071, because it's single channel, so there's no unused op-amp to worry about.

R4 is a small incandescent lamp, (RS stock code 587-686) I found in a box of old bulbs. I chose this over the J-FET AGC for simplicity's sake. It's run off a +/-6V dual power supply, to avoid the additional complexity of single supply design. It is connected in series with the J113 to 0V. I measured the channel resistance of the F-FET: 54R. This is purely to test the concept, rather than a final design.

The oscillator works perfectly, giving a nice 51.5kHz (very close to the 48.2kHz calculated) sine wave of about 1.2Vpp.


Unfortunately, the amplitude modulation doesn't work properly. 1Vpp (500mVp) of different frequencies were applied to J1's gate. This was low enough to avoid the gate conducting significant current, when forward biased, causing the transistor to work in the enhancement region, yes depletion mode J-FETs can do that.

At very low frequencies, it was enough to saturate the circuit, resulting in a distorted modulation envelope.
128Hz input


This got much better as the input frequency was increased, but note the 45° phase shift and the modulation index decreases drastically, as the frequency is increased.
1.3kHz

5kHz


I tested with 56kHz in and there's hardly any modulation, rendering it useless for the intended application.


The question is: why the steep roll-off? I chose low impedances to avoid the parasitic capacitances of the breadboard being a problem. The output impedance of the signal generator is 50R, connected to 1m of co-axial cable, but I don't see how that's a problem.
« Last Edit: May 28, 2024, 01:33:43 pm by Zero999 »
 

Online RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6381
  • Country: ro
Re: Want to hear the bat flying in the front yard
« Reply #41 on: May 27, 2024, 01:28:03 pm »
I've not stopped work on it.
...
The question is: why the steep roll-off?

Glad to hear you didn't drop the project.  :-+

About the Wien bridge, IIRC it only oscillates when the amplification is precisely 3.  Anything slightly bigger than 3, and the amplitude will go to infinity, so it will generate distorted square waves.  Anything lower than 3 will extinguish the oscillations.  The desired number 3 comes from the attenuation of the RC resonant network.  The negative reaction has to match precisely the positive reaction.  The bulb is supposed to keep the amplification precisely 3.

My guess is that influencing the amplification (by the FET that interferes with the bulb resistance) means messing with the oscillation condition (and extinguish or goes to infinite amplitude) rather than just modulating the amplitude.

For amplitude modulation, I would let the Wien bridge and the light bulb do their thing at keeping the gain precisely 3 and outputting a constant amplitude, then add another circuit as an AM modulator after the Wien bridge.
« Last Edit: May 27, 2024, 05:44:59 pm by RoGeorge »
 
The following users thanked this post: Zero999

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19641
  • Country: gb
  • 0999
Re: Want to hear the bat flying in the front yard
« Reply #42 on: May 27, 2024, 05:29:53 pm »
I've not stopped work on it.https://www.eevblog.com/forum/Smileys/default/phew.gif :palm:
...
The question is: why the steep roll-off?

Glad to hear you didn't drop the project.  :-+
I'm glad you don't mind me using the thread you created.

Quote
About the Wien bridge, IIRC it only oscillates when the amplification is precisely 3.  Anything slightly bigger than 3 will, and the amplitude will go to infinity, so it will generate distorted square waves.  Anything lower than 3 will extinguish the oscillations.  The desired number 3 comes from the attenuation of the RC resonant network.  The negative reaction has to mach precisely the positive reaction.  The bulb is supposed to keep the amplification precisely 3.

My guess is that influencing the amplification (by the FET that interferes with the bulb resistance) means messing with the oscillation condition (and extinguish or goes to infinite amplitude) rather than just modulating the amplitude.
Yes that's true, but it doesn't happen immediately. It takes time to the oscillation do build when AV > 3 and decay when AV < 3. This is why my circuit doesn't work and is a bad idea. :palm:  At low frequencies, the Wein bridge oscillator has time for the oscillations to build and die away. Give it too much time (very low frequencies) and it'll die away completely and at build up to the point of causing distortion, over the cause of a cycle of the input signal. At higher frequencies, simply isn't time for the oscillations to build and decay, during the cycle. It's inherently limited in bandwidth. The only fix would be to put the input through a high-pass filter circuit with the complementary response, which would complicate things and there are simpler alternatives.

The circuit I posted a few years ago will have the same issue.

Thank you for helping me realising this is a bad design. It didn't click, until I responded to your post. I'm a bit annoyed it took me so long to realise what should have been obvious.  :horse:

Quote
For amplitude modulation, I would let the Wien bridge and the light bulb do their thing at keeping the gain precisely 3 and outputting a constant amplitude, then add another circuit as an AM modulator after the Wien bridge.
I agree.

I'm moving towards the stroboscopic, sample and hold idea.  I might use an analogue switch such as the 741GHC66 rather than a FET. The only downside is it's surface mount, which doesn't bother me, but I would like to go through hole, to make it so my 12 old nephew can work on it, although I plan on doing it myself, so maybe not.
« Last Edit: May 27, 2024, 05:35:09 pm by Zero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf