This project is about combining a cheap solar-powered garden light with a simple bat detecting circuit.
The idea is that at night, as bats fly around your garden, their sonar calls are picked up by an ultrasonic microphone inside the garden light which makes it flash at the rhythm of the bat calls. Imagine an array of these lights!
- inexpensive (like EUR 5,- total)
- no need to charge the batteries (charged by sunlight)
- picks up ultrasonic audio at 40 kHz, which includes many echo-locating bats
- not very scientific but potentially mesmerizing :)
Inside a garden light
A typical inexpensive (3 EUR) garden light combines the following functions:
- detect day or night by looking at the output of the solar array
- during the day, charge a battery (typically single cell AA NiMH) from the solar array
- during the night, step-up the voltage of the battery (about 1.3V) to a voltage that the LED needs (about 3.5V)
It does this using a surprisingly simple circuit, similar to a so-called joule-thief. People have modded these lights before, e.g. putting different LEDs in it (more efficient, or a different color) and even putting two LEDs in series.
The current idea is to re-use an HC-SR04 "pinger" module. This module can be found on ebay for about 2 EUR and consists of an ultrasonic transducer to send a few pulses at 40 kHz and another transducer to receive the echo. By determining the time between sending a pulse and receiving the echo back, the distance to an obstacle can be determined. But we're not going to actually do that!
In short, the module works like this:
- a small microcontroller on the module controls the timing of the pulse that is sent
- an RS232 level-converter boosts the pulse waveform to about +10 and -10V for a strong signal into the transmitter transducer
- on the receive side, a TL074 quad opamp is used to amplify the received echo signal
- the first two stages of the TL074 amplify the signal by about 5x and 10x respectively
- the last two stages compare the received signal to a reference level to determine when an echo is actually received (doing a clever trick, making it more sensitive as time goes by and no echo has been received yet)
The mod to the module will probably consist of the following:
- to save power, disable (or remove) the transmit logic, i.e. the microcontroller and the RS232 level converter
- set a fixed reference level instead of one that is variable with time
- use the existing digital output to drive a LED
I should find out the following things:
- How much voltage/current can the step-up circuit of the garden light deliver?
- How much current will the modded HC-SR04 circuit take?
- Will the step-up circuit interfere with the ultrasonic audio (at about 40 kHz)?
- What is the frequency of the step-up circuit (probably ultrasonic too, like 100 kHz)?
- Can the LED be made brighter?
- Does the whole thing actually work on real bats? (like pipistrellus pipistrellus or "dwergvleermuis" in the netherlands).
- The LED gets about 3.1V peak
- the step-up frequency (with the LED connected) is about 145 kHz
- I've tried various other LEDs, the original one is pretty bright already.
I guess we can drive the LED pretty hard because it will only be on for a small percentage of the time (e.g. typically only 5 percent or so). So, the peak current may be high, making the average current a "normal" value like 10-20 mA or so.
My idea is to charge a capacitor through a resistor and discharge it across the LED as a bat call is received. The value of the capacitor in this RC-circuit is chosen such that the energy contained in it is equivalent to 10-20 mA average when pulsed at 10 Hz, 5% duty cycle. The value of the resistor is chosen such that the C can charge fast enough between pulses at 10 Hz (so, the RC time constant is like 1/3rd the period, or about 30ms).
Some silly ideas
- put an arduino (like the pro mini, 3 EUR) + inexpensive wireless receiver (like the NRF24L01+, 1 EUR) in each of the garden lights and make it run an ad-hoc wireless network
- run an NTP-like protocol on the wireless network to synchronize the clocks in each of the garden lights
- make each garden light report the time instant when it received a bat call, this will be different for each light because it has a different distance to the bat and the bat sonar travels at the speed of sound (about 340 m/s).
- triangulate the bat for each call it makes!