Bat detector

Hi,

A brief list of suggestions:

- When I insert the FAT formatted SD card in my Mac the OS generates automatically "dot-dash" resource files for all documents. If I insert back the card in the Bat detector then playing the wav files all "dot-dash" only generates error. So I suggest when playing sound files to ignore all files starting with a dot.

- Generate a compilation file containing all metadata of the all recordings: name, date, length, frequencies, coordinates, temp, gain... One file per day/directory. A CSV file may be OK. , but may be also XML, KML, GPX...

- When recording (auto & manual) show the elapsed time.

- Add " ºC " to temperature display

- I join to the request of battery charge status when using / charging

Alex
 
Hi,

I have connected GPS BN-880Q, GPS gets connected and blue LED is flashing but no data in GPS window, has any one tested BN-880Q before and got it working OK?
On Teensy 4.1, PCB 0.6, latest software 2022-Mar-5

Regards Bengt
 
Hi,

I have connected GPS BN-880Q, GPS gets connected and blue LED is flashing but no data in GPS window, has any one tested BN-880Q before and got it working OK?
On Teensy 4.1, PCB 0.6, latest software 2022-Mar-5

Regards Bengt

Hi,

Its handy if you run the teensybat with DEBUG on, that way you can see in more detail (you will need to connect with a computer to the serialport) what is happening when the system tries to connect to the GPS. The teensybat software communicates with the GPS module using UBLOX at a baudrate of 115200.

regards
Cor
 
Bn-880q

Hi,

Its handy if you run the teensybat with DEBUG on, that way you can see in more detail (you will need to connect with a computer to the serialport) what is happening when the system tries to connect to the GPS. The teensybat software communicates with the GPS module using UBLOX at a baudrate of 115200.

regards
Cor


--------------------------------
Part of output from debug:
GNSS: trying oldbaud 115200
test oldbaud (ms) 5
SKIP 0
GNSS: switching to new baud 115200
Ublox Protocol version:18.0
Power Save Mode disabled.
PMS 0 0 0 0 0 0 0 0
PMS2 2 6 0 0 0 10 42 1 E8 3 0 0 10 27 0 0 0 0 0 0 0 0 0 0 2C 1 0 0 4F C1 3 0 86 2 0 0 FE 0 0 0 64 40 1 0 0 0 0 0
setUTC 08:51:46

PMS 0 0 0 0 0 0 0 0
PMS2 2 6 0 0 0 10 42 1 E8 3 0 0 10 27 0 0 0 0 0 0 0 0 0 0 2C 1 0 0 4F C1 3 0 86 2 0 0 FE 0 0 0 64 40 1 0 0 0 0 0
Found 1 devices.
Parasite power is: OFF
Temp C: 23.19

SETMENU_GPS 10

readGPS(ms)70 DONE
UPDATE AUDIOMEM usage 10006
GET DS TEMP
08:52:00Temp C 23.25
Temp CPU 49.38
readGPS(ms)203 DONE
readGPS(ms)64 DONE
-----------------------

Maybe wrong protocol, but NMEA shall be default protocol from BN-880Q?

Regards Bengt
 
--------------------------------
Part of output from debug:
GNSS: trying oldbaud 115200
test oldbaud (ms) 5
SKIP 0
GNSS: switching to new baud 115200
Ublox Protocol version:18.0
Power Save Mode disabled.
PMS 0 0 0 0 0 0 0 0
PMS2 2 6 0 0 0 10 42 1 E8 3 0 0 10 27 0 0 0 0 0 0 0 0 0 0 2C 1 0 0 4F C1 3 0 86 2 0 0 FE 0 0 0 64 40 1 0 0 0 0 0
setUTC 08:51:46

PMS 0 0 0 0 0 0 0 0
PMS2 2 6 0 0 0 10 42 1 E8 3 0 0 10 27 0 0 0 0 0 0 0 0 0 0 2C 1 0 0 4F C1 3 0 86 2 0 0 FE 0 0 0 64 40 1 0 0 0 0 0
Found 1 devices.
Parasite power is: OFF
Temp C: 23.19

SETMENU_GPS 10

readGPS(ms)70 DONE
UPDATE AUDIOMEM usage 10006
GET DS TEMP
08:52:00Temp C 23.25
Temp CPU 49.38
readGPS(ms)203 DONE
readGPS(ms)64 DONE
-----------------------

Maybe wrong protocol, but NMEA shall be default protocol from BN-880Q?

Regards Bengt
Hi Bengt,

The fact that PMS2 contains data shows that we are communicating I think. The handshake also worked, the UBLOX protocol version was read. So there seems to be communication.
I suggest taking the device outside and switching on the GPS page, that will make the teensybat poll for GPS more frequently and you should be able to see what data is coming in.

Cor
 
--------------------------------
Part of output from debug:
GNSS: trying oldbaud 115200
test oldbaud (ms) 5
SKIP 0
GNSS: switching to new baud 115200
Ublox Protocol version:18.0
Power Save Mode disabled.
PMS 0 0 0 0 0 0 0 0
PMS2 2 6 0 0 0 10 42 1 E8 3 0 0 10 27 0 0 0 0 0 0 0 0 0 0 2C 1 0 0 4F C1 3 0 86 2 0 0 FE 0 0 0 64 40 1 0 0 0 0 0
setUTC 08:51:46

PMS 0 0 0 0 0 0 0 0
PMS2 2 6 0 0 0 10 42 1 E8 3 0 0 10 27 0 0 0 0 0 0 0 0 0 0 2C 1 0 0 4F C1 3 0 86 2 0 0 FE 0 0 0 64 40 1 0 0 0 0 0
Found 1 devices.
Parasite power is: OFF
Temp C: 23.19

SETMENU_GPS 10

readGPS(ms)70 DONE
UPDATE AUDIOMEM usage 10006
GET DS TEMP
08:52:00Temp C 23.25
Temp CPU 49.38
readGPS(ms)203 DONE
readGPS(ms)64 DONE
-----------------------

Maybe wrong protocol, but NMEA shall be default protocol from BN-880Q?

Regards Bengt

Is working now, only difference was to start the detector outside the house, earlier started inside then moved to the outside?

/bengt
 
Hi Bengt,

Good to hear that. We have configured the software so that directly at startup it will try to get a fix from the GPS module. But if that fix isnt present it will not keep polling the GPS as that would break the startup for a longer period and we want a working detector. After startup the GPS is polled not very frequently and if it has not got a fix that might take a longer time. This is due to the fact that the receiver needs to get the positions and oher information of all the satellites properly in.

If you want the GPS asap that after starting the teensybat just switch to the GPSpage and wait for a fix. The GPS page polls the device frequently and you can see the signal quality often improving. After you got a fix just switch to normal functionality and chances are big that the GPS will be updated properly.

Thanks for reporting and debugging !
Cor
 
I built the Teensybat 4.1 with the board v0.7 without temperature sensor and without GPS and use the Teensybat41_1.3 20210920.hex. If I now set the sampling rate to 352k in the settings, the device hangs and restarts after a few seconds.
 
I built the Teensybat 4.1 with the board v0.7 without temperature sensor and without GPS and use the Teensybat41_1.3 20210920.hex. If I now set the sampling rate to 352k in the settings, the device hangs and restarts after a few seconds.

Hi Helge,

On https://github.com/CorBer/teensy_batdetector/tree/master/version1_3development you can see that I have put up a warning for frequencies 352/384Khz.
WARNING :the available HEX compiled versions have problems at higher (352/384K) samplerates, the sourcecode is updated (20210929)

SO if you download the code, compile a HEX that fits your needs ... and activate DEBUG I am interested to see what happens. As you can see the code was updated on the 29th of september last year.

regards
Cor
 
There are also new files on the teensybat website. We discovered an issue with GPS but I generated four versions for both Teensy 3.6 and 4.1 based versions (standard, GPS, Temp and GPS_Temp), For Teensy 4.1 only four hex files that need PSRAM.
Debugging is not enabled in these files.

Using one of those files should also fix your issue.
 
I installed Teensybat 1.3 T4.1 march052022.hex and the sampling rate can be set to 384k. However, the device now loses the time and date when you switch it off.
 
UPDATE src-code and HEX Version 1.31

Hi,

At the beginning of this week one of the users of the Teensybat informed us (Edwin and me) on a bug he had noticed when using AutoRecord. When interrupting the Autorecord using the left-button on the Teensybat the sample-rate of the detector was reset to a setting the user had not set himself. And restarting AutoRecord did not use the user-set Autorecord setting. When Edwin and I looked deeper into the bug this also created a mismatch between the wav-file header (samplerate) and the actual recording. The latter was only the case if the autorecord was interrupted during a recording.
So it took us a few days to understand the nature of the problem en come up with a solution.
At: https://github.com/CorBer/teensy_batdetector/tree/master/version1_31 development/src you can find the changes in the source-code (libraries are still the same as in version 1.3) and I also have created a set of HEX files at https://github.com/CorBer/teensy_batdetector/tree/master/version1_31 development/hex.

If you have any questions on this update, please share them in this forum.

regards
Cor
 
Hi,

YOu will see TE-HT on the screen when in this mode (Time Expansion - HeteroDyne)

Cor

Hi,
I am the Newbie of the week ;-))
Received my parts from Edwin last Wednesday and had my first bat-recording on Thursday night.

First of all, congratulations to this wonderful project!
I plan on using Teensybat not only to feed my amateur-curiosity, but together with my wife, I´ll use the sounds as a source for our sound-art work in the future.

That brought me to my question: Is the software that includes TE-HT freely available? Is there a place were I can download it? This mode might offer us an extra peek into the ultrasound world that could be interesting.


thanks again for the wonderful project, if I can be of any help, I'd be proud to do so.

all the best
Rainer
 
Hi,

The source-code allows you to use TE-HT but its not part of the default settings.
Line 128 of the file bat_defines.h has:
/
Code:
older optional features
//#define USE_TEFACTOR //optional heterodyne module after TimeExpansion to lower the frequency on the output(headphone)

If you remove the // in front of the #define part the source will compile with TE-HT available.

regards
Cor
 
Thanks Cor for your swift answer.

Is there any chance to obtain the ready file?
Although I know how to solder I have never compiled code in my life before. Might be a nice addition to my bucket list of life-long-learning but for now it would be very handy if someone could do me the favour.

All the best
Rainer
 
Dear members of the forum. Being new here: My name is Eef, and just finished building the detector, with some great help from Edwin.
And compliments for Cor, Edwin and others who contributed here: Great job. (I don't know much about bats, but a bit on programming, amplifying etcetera. And this is a "prof"-project. Regards, Eef
 
And already a question:

When I look at the display and settings of the filter, I see this is measured in kHz and scale is linear (what seems very logical at first sight).
However our ear works in a logaritmical way. That means that a tone of for instance 440 Hz is heard as an "A" (musically)
When doubled to 880, we hear the same "a" but an octave higher. (8 white keys to the right on the piano) To be written as a' The whole list would look like this:
440 = a
880 = a'
1760 = a''
3520 = a'''
7040 = a''''
14080 = a'''''
28160 = a''''''
56320 = a'''''''
112040 = a''''''''
As you see, if we show this on a linear scale (as on the batdetector) we use about 80% of the scale for the two highest octaves, and just a small part around 20kHz for the two/three lower ones. My understanding is, that this is the reason is is "crowded" on the screen around the 20kHz.

Perhaps this is already tried/done, but would it be possible to make an extra option to measure this in logaritmic way.
The scale would then be divided in octaves + cents (100 per octave).

Regards, Eef Weenink
 
Hi Eef, I think you are referring to MEL scale.

I think it would become quite hard to determine the species since all batworkers are used to the linear scale (All books and other images I have seen use linear scale).

MEL seems to give a big empty part in the screen on the lower end (below 10kHz)

This is a comparison of a Serotine recording (social sounds) in 3 different display modes.
linmellog.jpg

I guess LIN still makes the best use of the display. Maybe there is a way to use MEL and not display anything below 10kHz to gave the best filling of the display but that still bring problems determining the species.

It seems like bad weather today instead of bat weather, hopefully you can enjoy the use of the freshly built detector soon.

Kind regards

Edwin
 
Logarithmic frequency scales are very common in bio-acoustics as they reflect the hearing capabilities of animals.
However FFT is common in signal processing as it is fast but results in a linear frequency scale.
Additionally, constant Q filters that describe best sound reception are very slow and somewhat tricky to implement.

@pe1pwf, I would choose 10kHz or 15 kHz as lowest frequencies on your display, but the result is anyhow not be constant Q.
 
Back
Top