Icon not available

Occasional rain, worsening.
Computed at 19:52 GMT:

12 hour weather forecast, computed on Tue, 22 Dec at 08:59 GMT: Fairly fine, improving.
NB: this forecast is highly experimental and should not be relied upon.

Sunrise: 07:59
Sunset: 16:48


You are visitor number to this site



Raspberry Pi Projects


Please provide any feedback or comments by clicking here:


South Somerset Weather

Raspberry Pi Bat Recorder

Do you want to listen to the bats flying outside your house at night? Or maybe have a visual representation of their calls right in front of you? Or even record their calls for later analysis? Then read on...

This project uses a Raspberry Pi and Wolfson Audio Card, with a simple LED and Push Button wired to the GPIO. A home-made ultrasound microphone is plugged into the headphone socket of the Wolfson card.

Update (March 2015): A new Bat Call Recorder is shown below using a Raspberry Pi B+ and Cirrus Logic audio card. This new recorder also contains a GPS module and Temperature / Humidity Sensor, to allow location, temperature and humidity to be logged when each new recording is started. This version integrates the recording button and microphone into a single case, making it much more portable than my previous version. A second LED has been added to show when the GPS has a fix.

Using a Bat Detector, when bat calls are detected a recording can be started by pressing the record button on the recorder. The LED indicates that recording is active. Sound is captured at a sample rate of 192000 Hz until the button is pressed again.

Sonograms for bat call analysis are created using Python and Matplotlib. A wav file can be imported and a sonogram created. Various parameters can be changed to optimise the image. Call duration and inter-pulse interval can be shown by using mouse clicks. The graphs are interactive and can be zoomed. Peak frequency of the loudest part of the call is displayed.

Images of the Pi Bat Recorder, Bat Scanner and Sonograms are shown below. This page will be developed as more recordings become available. The species indicated and other statements may be unreliable due to many influencing factors (e.g. bat species, location, recording quality etc).

(Tip: Click on sonograms to open in a new window).

General details on how to make a Pi Bat Recorder using the older Pi 1 Model B and Wolfson Audio Card can be found here (pdf file).

Update (July 2015): A Fritzing diagram showing the updated Pi Bat Recorder using a Raspberry Pi 1 Model B+ (or Pi 2 Model B) and Cirrus Logic Audio Card with the addition of an Adafruit Ultimate GPS and DHT22 Temperature and Humidity Sensor can be found here (pdf file).

The Pi 1 Model B Python code can be adapted to allow use of the GPS and DHT22, which are well documented on the internet.

Update (10th September 2015): Pi Bat Recorder upgraded using Pi2 Model B, and the addition of a 2.8" USB LCD Touchscreen, replacing the pushbutton and status LEDs. Two new Python applications created: one for recording and the other for real-time frequency display of bat calls. See images below.

Update (4th October 2015): Using SoX, it is possible to slow down (time expand) bat calls picked up by the microphone, and play back the sound through a speaker attached to the Cirrus Logic audio card, effectively turning the Pi Bat Recorder into an audio Bat Detector. A short video example is provided below.

Update (11th October 2015): Pi2 Bat Recorder - new Python script added to provide a spectrogram display. Sound is continuously recorded and an updated cropped spectrogram image displayed every 4 seconds. Spectrogram images are saved for later examination...see examples below.

Update (1st November 2015): Pi2 Bat Recorder - new housing with LCD touchscreen built into the case lid. All applications now landscape instead of portrait - allowing for better spectrogram definition. New GPS Module (Ublox NEO-6M) used, with ceramic antenna mounted externally on top side of case. Speaker built into inside of case.

Update (15th March 2016): Details of this bat recorder have been moved to a sub-domain on this site, to allow for easier updates, easier feedback etc. here.

If you find this information useful or require more information, please let me know via the new site.( feedback.)

Page created June 2014. Last updated: 15th March 2016.

November 2015: Pi2 Bat Recorder - Latest version with LCD Touchscreen display. Includes Cirrus Logic sound card + electret microphone, GPS module and Speaker. Features Full Spectrum recording (192kHz sample rate), Time Expansion recording and audio, Live Spectrogram Display, Live Frequency display.

November 2015: Pi2 Bat Recorder - showing real-time four second spectrogram.

November 2015: Pi2 Bat Recorder - showing real-time frequency display.

Example of spectrogram saved during live display

Example of spectrogram saved during live display

Short video showing real-time frequency display of bat calls. Audio is being recorded from a separate heterodyne bat detector whilst videoing the display on the Pi Bat Detector (both devices are picking up the same calls).

Short video showing time expansion recording of a bat call, and the assoicated spectrogram. Audio is being recorded and slowed down using SoX.

New in 2015! Pi Bat Recorder creates Google Earth KML file when wav recording started

Python/Matplotlib Sonogram Creator - used for analysing recorded wav files

Noctule (Somerset 28/06/2014)

Soprano Pipistrelle Social Call (Devon 13/07/2014)

Soprano Pipistrelle Feeding Buzz (Somerset 15/08/2014)

Serotine (Somerset 15/08/2014)

Soprano Pipistrelle Social Call (Somerset 15/08/2014)

Serotine? (Somerset 23/08/2014)

Myotis species (Somerset 23/08/2014)

Myotis species (Somerset 23/08/2014)

Soprano Pipistrelle Social Call (Somerset 23/08/2014)

Natterer's Bat Feeding Buzz (Somerset 24/08/2014)

Rat Distress Call (Somerset 10/09/2014)

Social Call (4 Component) (Somerset 26/09/2014)

Serotine (Somerset 26/09/2014)

Social Call (5 Component) (Somerset 26/09/2014)

Pi Bat Recorder using a Wolfson Audio Card

Pi Bat Recorder with GPS and Temperature/Humidity Logging, using a Cirrus Logic Audio Card, and push-button recording

September 2015: Pi2 Bat Recorder - GPS, Temperature, Humidity, and LCD Touchscreen

September 2015: Pi2 Bat Recorder - Recording application using LCD Touchscreen

Further reading: British Bat Calls: A Guide to Species Identification