Bat detector

Wow, a lot of activity here.

I was quite busy the last weeks so I did not have the time to check the forum.

The encodes I used are very cheap chinese encoders EC11 or sometting 10pcs only cost around USD 5.

The TFT is also one of the major noise contributor : I add SMD capacitor ( 470nF , 1µF ) soldered on the TFT pin. Same think on bottom side 3.3V and GND under teensy and audio board
I know the splay is a great noise source. I was not able to get most noise out, I tried grounding some unused pins but it does not help a lot. What TFT pin do you mean that has 470nf/1uf on it?
It would probably help is we introduced some resistors into the data lines to the display but I am using quite a small housing so space is limited when I want to add extra resistors.


A BC847 is similar to the BC547, I used BC550 sinc it is a low noise version. I guess BC850 also is the low noise SMD equivalent. The A,B or C at the back determines the hFE, A is low C is highest.

I found the single transistor amplifier a good one. The transistor amplifier picked up less noise than the opamp I was experimenting with.
On high gain the audioboard becomes quite noisy, that is why I think it is important to have a small microphone amplifier.

I still want to try to get an opamp amlifier to work properly. I changed the board design so I can fit an opamp and hope I tried good enough to keep most of the noise out.
My reason to try this, is that the transistor output will be only around 1Vpp but the low noise opamp should be able to output around 3.1Vpp which is the maximum the audioboard can take as input.
Where stronger signals on the transistor amplifier start clipping and start to look like a square wave that might create harmonics the output of the opamp could still be a sine wave and have less harmonics.

I have also been thinking of a way to switch and bypass the amplifier but with the opamp that might not be necessary.

Anyway, I ordered for a bunch of PCB's that have all the modifications implemented so the 3v3 regulator is on the mainboard now and I can experiment with the opamp.
I ordered 20 pcs and like the other board I wille sell the ones I don't need via ebay or directly to people that want to build the bat detector.

I already had people asking if I was going to sell more boards, but these will be a little different for the first batch and they still have not arrived yet so be patient.

Oh I have been using the detector here near Koblenz, I heared a lot of noises, probably crickets or grasshoppers but I could not determine the sound.
It were fairly low frequency sounds maybe they sound better when frequency expansion was like 5 times in stead of 10 times. Unfortunately I forgot to place a memory card so I could not record.

Kind regards,

Edwin
 
AOP for mic

Hi,
See attached schematic LTC file for ADA4807 AOP,used in differential mode: Low noise, available at farnel and others. Simulation OK. I plan tu use it to remove common-mode noise on MIC output.
 

Attachments

  • ADA4807remisschematic.zip
    1.4 KB · Views: 127
Hi,
See attached schematic LTC file for ADA4807 AOP,used in differential mode: Low noise, available at farnel and others. Simulation OK. I plan tu use it to remove common-mode noise on MIC output.

I understand why differential mode should help reduce common mode noise.

ada4807.jpg

I tried to add an image to make me and others help to understand.

Can you explain the function of R11 and R12?
I think vout connects to the input of the audioboard. What is te purpose of the components to the right of vout?

Kind regards,

Edwin
 
you can add common mode noise source in serie with 05vcc, left on R11 and R12.

all parts left C2 and C3 simulate Mic differential signal:
for better accuracy we need to add 750 ohm output mems impedance ( read datasheet ton confirm) left C2 and C3

To fixe R1 and R6 value we must know the max available pic value at mic outpout, to not saturate audio board : 1.8V full scale (confirm with my previous post and audio board schematict)

R11 and R12 are for simulation purpose only : we can not have sources without dc reference for some simulation.
And average value of differential signal is centered to VCC/2 : same as microphone.

Vout is also the input audio board.
R7 simulate audio board input impedance : replace with value I have measured in my previous message

With the other parts I try to add a simple RC low pass filter. Not good idea. For proper filtering we need to add LC filters with High inductor values.
Or we need to study Salen key schematic in differential mode. more complicated.

In ideal system, cut off frequency must follow Sampling rate value....Usuaaly is done with oversampling system and numerical filter. Not for this bat detector.

To be honest : the transistor solution is the best compromise, if the mic output don"t have a common mode spurious.
Remis
 
you can add common mode noise source in serie with 05vcc, left on R11 and R12.

all parts left C2 and C3 simulate Mic differential signal:
for better accuracy we need to add 750 ohm output mems impedance ( read datasheet ton confirm) left C2 and C3

To fixe R1 and R6 value we must know the max available pic value at mic outpout, to not saturate audio board : 1.8V full scale (confirm with my previous post and audio board schematict)

R11 and R12 are for simulation purpose only : we can not have sources without dc reference for some simulation.
And average value of differential signal is centered to VCC/2 : same as microphone.

Vout is also the input audio board.
R7 simulate audio board input impedance : replace with value I have measured in my previous message

With the other parts I try to add a simple RC low pass filter. Not good idea. For proper filtering we need to add LC filters with High inductor values.
Or we need to study Salen key schematic in differential mode. more complicated.

In ideal system, cut off frequency must follow Sampling rate value....Usuaaly is done with oversampling system and numerical filter. Not for this bat detector.

To be honest : the transistor solution is the best compromise, if the mic output don"t have a common mode spurious.
Remis

Hi,

I am interested to see if any of the proposed changes (opamp etc) is another improvement in the hardware design. There is always a difference between the simulation and reality and it would be nice to see a "real" test. Ideally that test would also be done using several microphone setups (default MEMS SPU0410LR5H-QB, but if possible also ICS40730 or anything we have not heard of yet). My main interest is to see if the new pre-amp design improves the SignaltoNoiseRatio and if that reduces the effects of the internal noise of the hardware.

BTW: I have not heard much recently on the current software. Can I conclude that we have a stable setup ? If so, which version of the software should we use to go forward (0.82/0.84/0.86) ?

regards
Cor
 
Last edited:
Hi,
I'm using LTC spice for many year . You are right :"There is always a difference between the simulation and reality" But LTC spice use model used during the design of IC. ( should be different for analog device, or not). During my job I was able to confirm some default on DC DC voltage converter, compliant with my measurements, but in opposite with datasheet. After few emails . Linear conclude to a mistake in the datasheet...not in simulator. Thus use LTC spice, you will be close to reality.

Before big change in schematic , improve decoupling. And look at spectrum analyseur, with max gain value, with and without signal or with/witout connection at the codec input, with or without transitor amplifier. Check also the bias value on transitor to be far from saturation.

I'm using your 0.86 compiled version . But only 10 minutes. And I'm waiting vaccation to here some bats..
Regards
Remi
 
Hi Remi,

Thanks for the response and have a nice holiday with hopefully quite some bats that you can detect/record. As I am mainly busy on the software please tell what you find works awkward, is missing or does not work at all. Its still a work in progress but with the help of you and others in both hard and software this is a very interesting project !

regar
Cor
 
Finally I had the 0.86 version to compile thans to post #316.
I donwload the files from the link Remis provided.

Removed Arduino by the uninstall feature in windows, also removed the contents from my documents/arduino/libraries to be sure no old libraries were present.

After that I installed Ardino 1.8.7 and Teensyduino 1.44

I extracted the files from the #316 post and copied the libraries folder to: C:\Users\username\Documents\Arduino\libraries

In the C:\Users\username\Downloads\CorBee086windows\CorBee086 is simply clicked the .ino file to open the scetch.

Now it compiles fine with some minor issues.


Code:
C:\Users\Toshiba\AppData\Local\Temp\arduino_build_515311\sketch\effect_granular.cpp: In member function 'void mAudioEffectGranular::begin(int16_t*, int16_t)':

effect_granular.cpp:39: warning: unused variable 'subsample' 
  int subsample=0;

      ^

C:\Users\Toshiba\Documents\Arduino\libraries\uSDFS-master\src\utility\ff_utils.c: In function 'get_fattime':

C:\Users\Toshiba\Documents\Arduino\libraries\uSDFS-master\src\utility\ff_utils.c:68:29: warning: implicit declaration of function 'rtc_get' [-Wimplicit-function-declaration]

     struct tm tx=seconds2tm(rtc_get());

                             ^

Opening Teensy Loader...

Sketch uses 186184 bytes (17%) of program storage space. Maximum is 1048576 bytes.
Global variables use 227416 bytes (86%) of dynamic memory, leaving 34728 bytes for local variables. Maximum is 262144 bytes.

Unfortunately I did not bring a cable with me for uploading the code but at least it compiles.

Edwin
 
So I found me a cable and even a small SD card. Somehow I can't get the 0.86 version to record. I already found the same problems when i used the precompiled hexes others made.

Maybe it is in the old and small SD cards I use.

The one I found in an old mp3 player was only 256Mb and others I used were like 1 or 2 GB. Maybe bigger newer cards do correct playback and recording?
What kinds of cards do you guys uses and what file system do you use? I think my cards are Fat32

Edwin

Oh, forgot to mention, the 0.82 version works fine with my old SD cards.
 
Hi Edwin,

I am using a 16Gb Fat32 formatted card, have not experienced problems but will check today again as I am busy with v0.87.

EDIT: just checked and I had no problem recording/playing files on v0.86 and v0.87

regards
Cor
 
Last edited:
Next version: EEprom

Hello,

Working on the next version currently, this is not yet available but I am interested to hear from users what they would like to have "recorded" between sessions. Based (once again) on code from Frank(DD4WH) I have added a set of routines to store/restore data inside the EEprom of the Teensy. The idea behind this is that I would like certain settings to be stored so we can restore them at startup (or via a menu). This allows users to have different "preset" settings that fit their preferred way of working.

I am interested to hear what settings should be considered for this and if they should be automatically restored at startup or via a menu.

In the next version two new parameters can be set using the menu, they are related to the Auto_TimeExpansion setup. Parameter TE_Speed allows you to set the replay speed (currently fixed at 1/20, now configurable between 1/5 and 1/30 of the original speed) and parameter TE_low which is used to set the lowest frequency when checking for signalpeaks. If a signal has a peak below this frequency it will not be replayed in Auto_TimeExpansion. This has the advantage that - when for instance crickets/grasshoppers are active - we can be more selective in which sounds should be replayed or not. The lowest frequency can be set between 15-35 Khz in the next version.

regards
Cor
 
Hi Cor
Simply restore the state, same as it was just before last power on (mode , SR value , center frequency, spectrum view, gain, volume) , will be a great improvement. Or may be with specifi menu entry : ''store state''. Becaus it is not a goog idea to store in eeprom at every change...
Remis
 
Hello Remi,

The way I have set things up there will be an update at maximum once per minute currently. That way the 100000 writes will not be spoiled too fast. But for a state I will implement a preset-setup that will be started from the menu. So you can store all the current settings as a "default", when powering up it will load that into all the "saved" settings. I will try to implement this in the coming day or so.

Thanks for the response

Cor
 
I just picked up a Sandisk Ultra 16GB Miceo SD HC I card this afternoon.

It seems to work fine. Somehow older SD cards do not seem to work anymore from V0.84 up.

Edwin
 
EEprom Saving added

Hi,

I have uploaded a precompiled version firmwarev088.hex onto the Github repository for those that want to test this. As this is a work in progress things might not work completely yet.

How does it work ?
With the left-encoder you can go the menu option Preset, if you choose that (by pressing the encoder) you can switch between Preset Default and Preset User. After you have made a choice and confirmed that by pressing the encoder all the current settings will be saved. If you saved as Preset User that will mean that the next startup will be using the just saved settings, if you saved as Preset Default the function values will be saved but at the next startup they will not be used.

This function will also not directly switch between Default or User after selecting it, you will need to restart the Teensy for that first. I am however planning to allow direct switching between default and user settings.

As this is a test-version the "DEBUGSERIAL" option is on and this will provide feedback if you have a computer listening to the serialbus(9800bps) connected.

Currently I am saving the following variables:

volume
gain
centre frequency:
detector_mode
display_mode(IS NOT PROPERLY RESTORED YET AFTER STARTUP !!)
sample_rate
play_rate (used when playing back files)
TimeExpansion_speed (replay speed)
TimeExpansion_low_frequency (lowest frequency to detect a possible signal for replay)
Preset_mode

Hope that some of you can test this and give some feedback.

regards
Cor
 
Last edited:
ICS40730 spurious confirmed

Hello. I confirm what I saw in my message 239: Today with ''new'' parts. ICS40730, ICS4720 have some spurious signal in opposite phase at 27Khz, 10mVpp. It wil be canceled with diff AOP. I add also spectrum view: with , without mic , and I “compare” this noise with my fingers touching themselves à 10cm. You can see the big amplitude difference. This spurious seem to be very smal
In HT mode I can not ear any sinus signal.
Next step : improve my AOP schematic and add , or replace TR amplifier to see the difference.
But the first step will be confirmation on your side with same parameters , with and witout mic, with same transistor amplifier: my modified schematic is far from saturation.
Remis
 

Attachments

  • spectICS40730.png
    spectICS40730.png
    474.5 KB · Views: 93
  • spectFinger10cm.jpg
    spectFinger10cm.jpg
    60 KB · Views: 107
  • ICS70430dual.png
    ICS70430dual.png
    57.7 KB · Views: 121
  • spectrumwitoutMIC.png
    spectrumwitoutMIC.png
    412.1 KB · Views: 105
Hello. I confirm what I saw in my message 239: Today with ''new'' parts. ICS40730, ICS4720 have some spurious signal in opposite phase at 27Khz, 10mVpp. It wil be canceled with diff AOP. I add also spectrum view: with , without mic , and I “compare” this noise with my fingers touching themselves à 10cm. You can see the big amplitude difference. This spurious seem to be very smal
In HT mode I can not ear any sinus signal.
Next step : improve my AOP schematic and add , or replace TR amplifier to see the difference.
But the first step will be confirmation on your side with same parameters , with and witout mic, with same transistor amplifier: my modified schematic is far from saturation.
Remis

Hi Remi,

For me its unclear which amp you are currently using. So comparing isnt just possible, I am using a two-stage transistor preamp which is for instance also different from the setup that Edwin uses. Another thing that is different between designs is the way the TFT interferes with the signals, I remember spending a lot of time trying to reduce this to a minimum by adding shielding between wires etc.

regards
Cor
 
I use the one transistor amplifier in the modified schematic from Edwin. ( see my previous amplifer measurement simulation and description). The TFT is operating: One picture show the noise floor : no mic connected, TFT and amplifier working. Adding this mic 40730 add this spurious around 27Khz. Adding an ultrasonic mirophone don't add this spurious.
 
I use the one transistor amplifier in the modified schematic from Edwin. ( see my previous amplifer measurement simulation and description). The TFT is operating: One picture show the noise floor : no mic connected, TFT and amplifier working. Adding this mic 40730 add this spurious around 27Khz. Adding an ultrasonic mirophone don't add this spurious.

When you mention adding an ultrasonic microphone you mean the spu0410lr5h-qb ?
 
I use the one transistor amplifier in the modified schematic from Edwin. ( see my previous amplifer measurement simulation and description). The TFT is operating: One picture show the noise floor : no mic connected, TFT and amplifier working. Adding this mic 40730 add this spurious around 27Khz. Adding an ultrasonic mirophone don't add this spurious.

Have a look at these pictures, one with the microphone in the housing behind a 10mm hole, with this setup you can see a big spike near 24Khz.

The other picture is with a cone installed. I used to have a short cone with 90 degree angle. This is a larger one wit only like 20 degree cone.
The settings on the device have not changed!

The reason to install this was to make sure there is a seal to the outside of the box and the microphone is not inside some kind of resonant box.
It seems this can take care of the spurious you see.

IMG_20190719_213642605.jpg

IMG_20190719_213555439.jpg

Sorry the pictures are not that great, my camera seems to make some ultrasonic noise and my phone did not make the best pictures.

Edwin
 
hi
mic for ultrasonic is like farnell ref 1007349. I use it 30 years ago for my first HT analog receiver. it it is a passiv device. no spurious. Edwin : your test is very interesting. It could be both issue : spurious , and resonnance. But osciloscope is clear for me. There is a signal close to 27khz.
on ICS730 and 720.
Remis
 
The images I made are with the ICS-40730 microphone. Please investigate any acoustic issue.

I already used a cone with a SPU0410LR5H-QB microphone. I Just put in the ICS in place of the SPU.

I did not notice the strong signal with the SPU, allthoug that signal was not all that good either.


In my detector a farly large signal suddenly dissapears. after placing the cone.

I hope you can do some experiments on the audio port side and het rid of the noise.

Edwin
 
hi
mic for ultrasonic is like farnell ref 1007349. I use it 30 years ago for my first HT analog receiver. it it is a passiv device. no spurious. Edwin : your test is very interesting. It could be both issue : spurious , and resonnance. But osciloscope is clear for me. There is a signal close to 27khz.
on ICS730 and 720.
Remis

Hi,

I have made several HT receivers myself using such an ultrasonic microphone(UST/USR 40Khz), but their sensitivity is really not comparable to the ICS or SPU microphones. So it might be that the ICS picks up a signal coming from the TFT or other hardware which the USR (or UST) does not receive at all. In my tests - using the ICS with a 2 step transistor preamp - I have not seen a strong spurious signal at all, but my microphone is outside the detector on top of a GX12 connector (well shielded). One thing I do however - have not done a proper test yet - see is that the ICS seems to give a very different response compared to the SPU, not clear if it is (at least for my setup) more sensitive than the SPU.

regards
Cor
 
Last edited:
Testing ICS40730 vs spu0410lr5h-qb

Hi,

I have tried to compare the sensitivity of the SPU0410 vs the ICS40730 using one of Edwins PCBs for the ICS40730. I used a UST transducer (midfrequency 40Khz) to transmit a signal at 35, 45, 55 and 65 Khz, the 35Khz signal was longer than the 45/55/65. After recording the audio (bat-detector and transducer at a fixed position, all settings for gain etc the same) I analysed it using Audacity and below you can see the spectrum output. The 35 and 45Khz are very visible in both recordings and dont differ much in both microphones. The 55Khz signal is clearly visible in the SPU0410 but far less in the ICS40730 and the 65 Khz is hardly visible in both microphones but this can also have to do with the fact that the UST is not so good in transmitting that far away from 40Khz.
EDIT:I also have included a 2nd image showing the noise I get in between the signal-sequences, again ICS on the topimage and SPU on the lower image.

Another thing to notice is that the noisefloor of the ICS40730 is a lot lower. I am not making too many conclusions from this thusfar, I want to take both microphones out tonight if the weather permits. Last evening I have had a brief check with both microphones listening to a pipistrelle and a serotine flying around the local walnut trees.

regards
Cor
signal @35/45/55/65
compare.jpg


noise
noise_compare.jpg
 
Update V0.88 on Github

Hi,

I have uploaded both the source and the pre_compiled HEX for v0.88. As stated earlier this contains the new EEprom setup, this allows you to save the current settings as a default for the next startup.
For this the main menu (left encoder) has been changed and allows you to select PRESET. If you set PRESET to Default it will startup with the default values from the source, if you set PRESET to USER it will startup using the last saved usersettings. The settings are saved by confirming (stepping back one menu level) the choice after pressing the encoder-button.
Two more settings can currently be controlled directly from the main menu (this is temporary as I am thinking about another setup for these in the menu).
- TE_speed: This sets the speed of the AUTO_Time_Expansion replay, default this is currently programmed at 20 which means the replay speed is 1/20. You can set this between 5 and 30.
- TE_low: This sets the lowest frequency where the detector will trigger AUTO_Time_Expansion replay. If the incoming signal has a peakfrequency higher than the TE_low this will trigger. Currently this is set by default at 15 Khz but can be set up to 35Khz. Settings this frequency higher has the advantage that -in a noisy environment with for instance grasshoppers/crickets - you can be more selective in what gets played and what does not get played.

Next to this I have been working on further improving Auto_Time_Expansion so it works more reliable (I hope).

regards
Cor
 
Back
Top