Batango – open source Bat Detector

This frequency division Bat Detector comes from an old (2012) project based on a very small microcontroller. This project was realized in only 100 pieces. Now it’s time to share this project as open source. Here you can download all the files for NON COMMERCIAL production. This device captures ultrasounds and divides the incoming frequency, to allow it to be audible to human ears. This is done by detecting the zero crossing signal and synthesizing a digital wave, with the same amplitude but a lower frequency. In contrast to the majority of other frequency division bat detectors, The Batango can be programmed for three different dividing factors: 8, 10 or 16. Moreover, it’s possible to change the volume; all of these functions are accomplished using a single button!    

PCB image generated with EAGLE

Here the source files


Here you can download the USER GUIDE


From left to right: R1 and R2 are used for a mid reference voltage and C6 + C7 stabilyze the voltage for the positive input of the operational amplifier. IC2 is the ultrasonic sensor. The signal pass through C11 (decoupling) and R6 to the negative input of the IC1 (MCP6021 not MCP6001 as in the image) The signal in greatly amplified and then sent to the second stage used as rectifier. Here the voltage is smoothed by R7 and C13 and R8 bring the signal to zero when there's no sound in the air.The GP4 of the PIC12LF1822 sample the signal that will be used to generate a signal amplitude proportional to the incoming volume level. From the ouput of IC1 the signal is sent to GP0 of IC4 and this signal is used to count the impulse and then divided via softtware. A PWM creates the output signal and the duty cycle of this PWM is used to regulate the overall volume. The push button generates an interrupt when pressed and the timings on how this button is pressed discriminates ifwe have done a single press to turn on the device, a long presso to turn off or a single press when it is on to change the volume or a doulbe click to change the number of the frequency division. SJ1 and SJ2 are open when in program mode and must be shartened after programmed.

Here you can download the compiled HEX file

Here the bill of material. Unfortunately some components are no more produced but they can be easily replaced with other form factor. I.e. the sensor can be replaced with the SPU0410LR5H-QB-7


This is the source code that can be compiled with MPLAB from

You can follow the discussion on Facebook