Bat detector

Hi,

I am planning to release a new version of the code in a few days that has some bugs resolved and allows monitoring the battery if the right chip is installed.
This forum will be informed when the hex becomes available, Edwin, Willem and Thierry have been testing in the past weeks.

cheers
Cor

Thanks to Edwin (and your work, Cor ), I was able to confirm that my welds are ok. (He gave me the link for the newest .hex file).
Battery indicator appears correctly in the main screen (and brieffly on the boot screen), i'll try out this new sw version this evening !

Here are my welds :
IMG-3362_resultat.jpg

I didn't cut off pcb traces, but unsoldered the two CMS resistors, protected the two pads we don't need anymore with kapton tape and solder the resistors back in place.
Then I used thin wires to connect them to pins 24 & 25
IMG-3365_resultat.jpg
 
TeensyBat 1.4beta1 release (20221020)

Hi,

I have just uploaded the new HEX files and project-sourcecode for TeensyBat1.4beta1.
See https://github.com/CorBer/teensy_batdetector/tree/master/version1_4

The changes in the software have been tested in the past month or so by Edwin, Thierry and Willem. Thanks again for spending time (probably hours) testing this out.

One of the major changes in this version is that we by default enable all possible hardware options (GPS, temperature monitor, LIPO battery monitor). Based on a short test
during startup the software knows what is available and will only use those parts. This allows users to add additional hardware later without the need to upload another HEX, and
it makes maintenance of the code also a lot easier. HEX files therefore only come in 3 flavours, one for Teensy36 and two for Teensy41 (with/without PSRAM mounted).

As always, this is a Work In Progress Project. This release is a beta and therefore I am sure bugs are still present in the code and if you find one please submit it to us. That way we can
keep improving both software and hardware. If you have ideas/requests for changes in hard/software please also share those. We cant always implement those immediately but we will
often try.

A short list of the more important changes:
- monitoring of LIPO batterylife based on a MAX17043 chip (on the latest PCB from Edwin) was added
- saving and restoring the configuration from an SD has improved. This allows transfer of configuration between TeensyBat machines and also allows easy restoration of your settings between releases. There are also more settings stored in the configfiles.
- deepsleep functionality had a limitation in V1_3, you could not set a wakeup of the device after 0h, now this is also possible
- the "total powerspectrum" of a recording was improved and will not show recorded "noise". This will give a cleaner view of the ultrasonic signals inside a recording.
This is only shown on the detector when replaying a file that was recorded with a TeensyBat.
- when playing a recording the switching between replay rates and Direct replay was not always reliable, now works as planned
- Autorecording was not restoring all default settings after it was stopped by the user, this has been improved
- in autoRecording the PRE-Buffer was deactivated in V1_31 it seems, this is restored
- the GPS menu also shows coordinates in HH MM SS


Although bats are slowly going to become less active (overhere in the N-hemisphere) I hope everybody has fun using the TeensyBat detectors.

Also on behalf of Edwin,

Greetings,

Cor
 
So I ran out of PCB's, well, I have 3 left at the moment but I ordered some new ones.

It turns out that some of the chips I used are not available, the SGTL5000 was changed to a qfn20 variant, and also the max17043 was not available so I used a max17048 instead. It is a bit smaller and wired a bit differently but the output is the same so it works with the software we have.

Another important change is the space I reserved for an extra microphone amplifier. The opamp is not in place yet but all other parts are and they are wired to line-in right, the mic in is also wired to line-in left.
For the guys that want to try stereo I guess this could be a good platform.

Not having the extra amplification of the microphone-input might reduce a bit of the flexibility but stereo could be fun.

I/we did not yet work on stereo software, and it could very well be that the hardware has its limitations for working in stereo but I just wanted you to know the PCB is prepared for some experiments which will work much better than breadboards and dupont wires.

Kind regards,

Edwin
 
Hi all,

The github repository of TeensyBat is temporarily unavailable, I will notify when we are "back".

cheers
Cor
 
teensybat V1_5alpha release available

Hi,

The github repository for teensybat code and hexfiles is publicly available again. This is an ALPHA release but since it is mainly based on the 1.4 release I am not expecting large issues.
See https://github.com/CorBer/teensy_batdetector/releases/tag/v1.5

In previous releases we have used the acronym "TE" for one of the modes of the detector. A producer of commercial detectors has objected to us using that acronym as they have a patent on a live TE technique. Although We Are not using their technique We Are now renaming this mode to Granular Stretch(GS). This also reflects the mode and library we have been using since 2018 based on the standard granular-effect of the Teensy Audio library. (see https://forum.pjrc.com/threads/5303...ng-granular-effect?highlight=granular+effect).

Previous versions are currently not available but can be re-created when there is demand(please send a PM) for a previous version. Re-creating all previous versions and replacing all the acronyms inside the code would cost us a lot of time.

cheers
Cor
 
request for bugs/issues/enhancements

Hi,

As spring is approaching I will be updating the current software shortly. If you have any bugs/issues or requests for enhancements please share them either in this
forum or via a PM.

cheers
Cor
 
T1_5 ... development teaser

Hi,

First new part of the upcoming version. Direct readout of the microSD card using MTP (thanks for the people on this forum developing this !!)
Screenshot at 2023-02-01 12-47-41.png

cheers
Cor
 
TeensyBat v1.6 (final testing stages)

Hi all,

The next version is currently under development but in the final testing stages. A few important changes:

MediaTransferProtocol added: The detector now can be connected to a PC/Laptop and will show up as an MTP-device. this will allow copying of files from the detector to a PC without removing the SD-card
Screen on during recording: the screen can now be left active (default is OFF) both during manual and automatic recording sessions.
Deepsleep improvements: Deepsleep now will behave properly based in the start-end times of the recording period. Too keep battery-usage minimal the T41 version will switch to a lower clockspeed in the deepsleep mode (both during sleep and recording). Additional status-screen information is now avaiable when the screen is off during deepsleep, long-pressing a button will provide feedback of the status.
GPS improvements: The GPS module (if mounted) demands quite a bit of current during usage, in the new version you can switch the GPS on/off to get a position and still preserve battery
Battery-indicator: if a lipo battery-indicator is mounted this will provide better feedback of the battery-status.

cheers
Cor
 
Hello Cor,

I have a question for you. I am a volunteer wildlife researcher in Los Angeles. I am working on a design for a solar powered wildlife observation device that can stream wildlife observations from a listening post over a WiFi bridge (Ubiquiti). The goal is to have 1 video stream and 2 microphone streams (one for birds and one for bats). My thought at the moment is to use a IP webcam with stereo mic input for the bird mic, so I won't need any custom hardware. For the bat mic I am hoping to use a Teensy 4.1 with ethernet to send the data over the network. I stumbled across your project today and it seems like a great fit! My goal is to have the hardware be hands-off so I don't have to go and reconfigure the device in the field, ideally it would just turn on and stream 24/7 as long as there is sufficient power. I don't need it to record to an SD card. I was wondering if you have considered use cases like this before and if you had any thoughts on how I should proceed. I would like to get an initial prototype going. I've worked with the Teensy Audio board about 7 years ago but am quite rusty. Thanks, Max
 
Hi Max

We have not worked on this thusfar, this is a rather specific usecase I think. Question is, what do you want to send over ethernet ? Audible sound or raw ultrasonic sound. Audible sound (from the teensybat) can be easily used for instance using bluetooth. You can add a bluetooth transmitter on the output.
Alternatively you could feed audible sound the same way as you do with the normal sound via a channel on the camera (left for birds, right for bats) ?

You will need to study and set your goals in this.

cheers
Cor
 
Last edited:
Hi Max

(...)this is a rather specific usecase I think (...)

cheers
Cor

Dear all, this use case sounds similar to our ideal monitoring setup in a church. The ideal would be to have a number (between 6 and 12) of Teensybats that could be remotely accessed through ethernet UTP/Wifi, i.e., download the sound recordings and tune settings.

Bas
 
Hi Bas,

The main - unanswered question - of the original post is that its not clear what should be recorded. Directly transmitting RAW ultrasonic data isnt a simple thing, even at 192K sampling speed (which isnt really high) the datastream is large. In your use-case you want to record on the teensybat and access the recordings on the SDcard. That is probably also possible (since we now have an MTP option) as you dont need a real datastream. The original post does NOT want to use recordings stored on an SDcard. So the two cases are "related" in the fact that they want to access the data either directly (original poster) or at intervals (your usecase) over an external connection. As we are finishing the work on version 1.6 this will not be part of the current codebase. But the code will be open-source so anybody that wants to can experiment with this, and I hope they then also share so well can benefit.

cheers
Cor
 
Hi Cor,
Yes you're right, for me downloadable audio fragments would work. Max is aiming at a stream. That's not the same.
Bas
 
The code is open for people to explore this kind of option, anybody that tries and has questions can always share them via a PM with me. I am willing to help out.

cheers
Cor
 
Hi
I am trying to use Teensybat as a trigger. Convert it to a PWM signal. Right now, I am using the audio output from the headphone jack. But it's AC signal which breaks my board via adc. I wonder if there is any other ways to do such thing.
 
Hi
I am trying to use Teensybat as a trigger. Convert it to a PWM signal. Right now, I am using the audio output from the headphone jack. But it's AC signal which breaks my board via adc. I wonder if there is any other ways to do such thing.

Hi,

The code is free to use and in that you could change for instance what happens when the detector reacts to an ultrasonic pulse. You could make it set a pin with a high-low pulse.

cheers
Cor
 
Hi Cor
Thanks a lot for your reply. it sounds great. But I kind of have problems modifying the code from https://github.com/CorBer/teensy_batdetector/releases/tag/v1.6. I only see the Binary Code when I open the files. I wonder if there is any guidance to access the code in C. I do want to do what you described, make a pin to output a PWM signal whenever there is ultrasound within A range. And The PWM signal is related to the frequency of the sound.

Best
Sinistra
 
Hi Cor
Thanks a lot for your reply. it sounds great. But I kind of have problems modifying the code from https://github.com/CorBer/teensy_batdetector/releases/tag/v1.6. I only see the Binary Code when I open the files. I wonder if there is any guidance to access the code in C. I do want to do what you described, make a pin to output a PWM signal whenever there is ultrasound within A range. And The PWM signal is related to the frequency of the sound.

Best
Sinistra

Hi,

It seems I never uploaded the release-code, just updated the Github with this. If you have any questions on the code please use a PM to contact me, we dont need to clutter this forum with tech messages on the code.

cheers
Cor
 
microphone issue

hi,
i'm not sure this is the right place. but i have a teensy bat 4.1 and now my internal microphone is not working anymore. when i plug in the external one everything works fine. I already tested resetting the detector, and upgrading tot the latest version, but this didn't change anything concerning the microphone. so i supose it's the microphone that is not working anymore. last time i used it it was still working fine, and mor it doesnt't record noting.
 
hi,
i'm not sure this is the right place. but i have a teensy bat 4.1 and now my internal microphone is not working anymore. when i plug in the external one everything works fine. I already tested resetting the detector, and upgrading tot the latest version, but this didn't change anything concerning the microphone. so i supose it's the microphone that is not working anymore. last time i used it it was still working fine, and mor it doesnt't record noting.

Hi Red Dragon,

I suggest measuring the lines from the internal microphone to see if they are still connected properly. The hardware functionality of the microphone should not depend on the version of the software as we are using a fixed setup for this. If your microphone is not working anymore (I have not had that in all these years) its easy to replace it.

cheers
Cor
 
There could be an issue with the switch or the microphone itself or a bad solder joint. I had some rain damage on one of my devices and I needed to plug-in extract a 3.5mm jack to clear the contacts. To rule-out the mechanical switch in the connector you could short the switch by putting a drop of solder on SJ1 and SJ2 (you find those under the connector between the pins) Alternatively you could measure over those pins/pads to check for a connection (when there is no external microphone in place).
It is also easy to check for 3.3V on the microphone pins, one end is GND, the other 3.3V the middle pin is signal output. Touching that pin with your finger (or holding some metal object and touching the pin with that) should show on the display. (have gain high enough to have it start scrolling). I hope this helps to find where the defect is. Edwin
 
Hi,

I have a very strange phenomenon with my neewly built TeensyBat:

As soon as the coin cell is populated, the SD card isn't recognized anymore (neither within the program, nor via MTP access). If I remove the coin cell, SD works fine again.
I checked all my soldering for cold joints and shorts and measured the VBAT pin against every other Teensy 4.1 pin. All ok, as far as I see. I also tried another Teensy, but the problem still remains.

Check out this video to see what happens.

I already discussed this with Edwin, but we both have no explanation for that behaviour.

Any ideas what happens here?

Thank you in advance.

Regards, Thorsten
 
Hi Thorsten, I just wondered, are all Teensy's from the same batch? It seems some changes have been made but I only have older versions and not the latest.
The diode's are quite an important part, I have the orientation wrong in my image but rotating 180 degrees would give the same connections.

Mine probably has BAS40-05V and new ones should have BAT54CTB6 which has the same internal layout. When I measure Vbat on the middle pin, I have about 3.33V on an very fresh coin cell. The output seems to be 3.09V When I switch to my lithium battery I get 3.29 on the kathodes. Maybe you can check the diodes in this small chip. I can only imagine something is funny with this chip, I do no see any other connections.

Or check the voltages although it is tricky to measure this.

vbat-diodes.jpg
 
Back
Top