Bat Detector Overhaul: Logging Bat Data

I have to admit to being a lazy person, so even the effort of standing in the garden pointing my bat detector at the sky is too much for me.

It can also be a bit boring. Especially when its 11pm and I’m not seeing (let alone detecting) any bats!

So the next step is to leave the bat detector outside unattended and try to log any activity on a computer.

Since I need a digital input, and I don’t want to leave my laptop laying on the grass, the next best option is a Raspberry Pi. The Pi may not be the best option for data logging in the field, as it is over complex and requires too much power (I could use a Picaxe and EEPROM on less than 10% of a Pi supply current).

But for testing ideas its great, because I can quickly knock up a simple test app in Gambas and have it recording data within a few hours.

Bat Detector Overhaul

What’s the big idea

First a confession. In my last post I said the high frequency to audio divider was dividing by 8.

On closer examination I find that I’m using pin 6 on the cmos 4024 which divides by 16. This means that the audio frequencies are half those previously quoted. So at some point I’ll re-work the filter calculations and probably make a few simple changes.

The Pi logger needs to sample the output from the divider fast enough to ensure we can count transitions from low to high. To make life a little easier, I decided to use the “divide by 32” output from the 4024

By counting high and low states, and then dividing by the sample time, we can get an indication of frequency. In my Gambas test program I just use a For loop which counts the number of times the signal changes state during 100,000 loops. A complete cycle consists of 2 state changes (e.g. low-to-high and high-to-low).

 

For more detail: Bat Detector Overhaul: Logging Bat Data

About The Author

Scroll to Top
Read previous post:
The Adafruit USB Audio Adapter
The Adafruit USB Audio Adapter

This USB module is recommended for the Raspberry Pi, but one of the sales bullet points for this module says...

Close