Working towards a new update, now also for Teensy 4.1
Hi,
After we released TeensyBat 1.2 in May 2021 we (Edwin, Adrian, Thierry and me) have started to work on the next version.
As some of us had allready a Teensy 4.1 at hand we also decided to see if the code could be converted. At that same moment Edwin created a first prototype PCB for a Teensy 4.1.
At the end of May the code was converted to also work on the T4.1, the compiler had no problem but without a PCB and an audioboard we did not know. Edwin was the first to get "noise" from the new T4.1 mounted on the new prototype PCB. And although not everything worked right from the start most of the code had to be changed not a great deal. Since that moment we have added/enhanced/tested many features of the TeensyBat setup.
Currently the PCBs for the T4.1 are not yet available from Edwin as he is still considering a few changes. We might share a "development" update (code and hexfiles) for the software on the T3.6 and that way also share the software that can be used on the T4.1 in the coming month or so. Announcements will be made on this forum and on Edwin's
http://www.teensybat.com
The list below shows some of the important changes:
Existing features that have been improved:
- recording to SD:
During testing we found out that V1_2 of the code was not able to write to the SD and record audio properly. Small gaps (often <0.5ms) of the incoming signal could be lost. This has been repaired
- start of recording:
In V1_2 we started the recording "after" the pushbutton was released, now we start when the pushbutton is pressed down. This allows a faster response.
- during recording:
Both the Live TimeExpansion and other modes can stay active during recording, including the waterfall graphs. In the previous version we had to switch to Auto-Heterodyne during recording as the only "feedback".
- recording:
The release of TeensyDuino 1.54 made it possible to switch over to the new sdFat setup, both reading/writing are now done using sdFat.
- filtering
We have changed from 1 biquad hipass filterstage to 4, this allows a far steeper (db/octave) filter to be used to prevent lowerfrequency signals coming in.
New features (both T3.6 and T4.1)
Automatic Gain Control:
Sometimes the signals of nearby bats can saturate the amplifier of the audioboard. The new AGC is set up to react very fast to this and reduce the gain. As soon as the signal weakens the gain will restore to the original setting.
SDconfig:
Teensybat saves many of the settings available to users to the EEprom to allow startup with user-preferred settings. In the next version this will also be saved to an SDcard if present. The advantage of this is that settings can be copied between machines and also stored for later usage.
New features only for T4.1
The T4.1 allows us to mount up to 16Mb of PSRAM to be used for processing. And although this PSRAM is not as fast as the usual RAM it is fast enough for our purposes.
-PREBUFFER (PSRAM):
A prebuffer (ringbuffer) is created that will automatically keep incoming data in PSRAM memory. The user can decide how much PSRAM will be used when compiling. The current default is set to 10000 blocks of 128 samples. That translates for a recording samplerate of 281K to 4.5 seconds of audio that is always present. The moment you press RECORD these 4.5 seconds will be stored (or any longer/shorter timespan) so you will not miss a sudden sound when pressing the button.
This option is also available in AUTO_RECORD mode, you can then set this in steps of 0.5 seconds.
-RECORDBUFFER (PSRAM)
During recording we are trying to write to the SD infrequently as the SD can create digital noise inside the TeensyBat. The RECORDBUFFER is used for this purpose.
- FRAMEBUFFER (RAM)
The scrolling waterfall graph can be changed into a horizontal scrolling waterfall when using a framebuffer.
Most of the above changes have been tested for some time and seem to work fine, we are still planning to do some further development for instance to allow the detector
to stay out for a longer time and have it "sleep" during the day. As development takes time we cannot set out a clear release date.
If you have any ideas that seem to be missing in the above and you would like to have added ... please dont forget to send in a request.
kind regards
Cor