A Simple Bat Detector based shield for the Arduino Uno
I've built a number of projects that have interfaced the output of the Simple Bat Detector with a microprocessor, but I hadn't come up with an easy way for others to experiment with this idea ...
My friend, Frank, in Germany, had wanted to make a relatively inexpensive bat activity logger ... and he had come on the idea to do it using a Simple Bat Detector connected to an Arduino board. He added a data logging shield that provided a real time clock and an interface for an SD data card. The ArduBat was born.
Once I had seen what the Arduino based hardware had enabled, I felt I needed to see if I couldn't make this an even easier to accomplish task. So I designed the ArduBat shield, and now it is possible for anyone who is familiar with the Arduino, to more easily build their own bat detector based, microprocessor controlled devices.
The ArduBat shield is shown to the left. Besides the Simple Bat Detector circuit, there are two user configurable push-buttons, a reset button, and three user configurable LEDs.
The ArduBat 3.4 is now a mature and stable design, having been used, tested, and tweaked for several years now.
|What can the ArduBat
be used for ? That depends on the inspiration and
cleverness of whomever wants to use it. It might be used
to develop a bat alarm, or a video camera that is
triggered when bats are nearby. Or maybe you want to log
the date and times that bats are active ... like Frank
and I do. The ArduBat doesn't even have to be
used with bats ... maybe you could use it to detect and
decode ultrasonic signals used for some other purpose !
Whatever the idea might be, I expect that the ArduBat
could be easily applied to many different educational,
scout, and school projects, as well as more serious
( Be sure to also visit Frank's ArduBat web pages )
after reading through these web pages, you decide you
would like to build an ArduBat,
send me an email.
The ArduBat Circuits...
|The basic working circuit
on the ArduBat shield is a slight variation of
the enhanced Simple Bat Detector, and is shown
in the diagram above. Two LM386's amplify the bat calls
from a piezo transducer and drive a CD4024 binary divider.
The divide by 16 and divide by 32 outputs of the CD4024
are used to monitor and process the bat calls.
In the original Simple Bat Detector, only the divide by 16 output is used for listening. On the ArduBat, the divide by 32 signal is connected to a digital input on the Arduino ( digital pin 2 is recommended ). The pulses coming from the bat detector circuit at this point represent 16 cycles of whatever ultrasound has been detected. This pulse is easily measured by the Arduino with the PulseIn command ... but other measurement techniques can also be used.
Another variation from the Simple Bat Detector is the addition of a 9 volt regulator to power the detector circuitry from the VIN supply from the Arduino. Also, the monitor output is fixed at one volume level, instead of having a pot to set it. This is OK, as you really will only use this output for testing and programming purposes.
|Besides the bat detector circuitry,
there are a some user interface circuits to give the
shield more utility.
There are two pushbuttons on the circuit board, F1 and F2, along with a reset button that gives you some control functions for whatever project you are constructing.
There are also three LEDs ... typically green, yellow, and red, that can be used to display the various functions and information that the project needs to communicate back to the user.
One reason for including these circuits is that the ArduBat shield is usually going to be the TOP board of an Arduino project stack. The bat detector circuitry on the ArduBat board operates at very high gains, and is susceptible to electrical noise generated by the other circuits on the Arduino stack. To minimize this interference, a full surface ground plane is on the bottom of the ArduBat shield to screen as much EMI as possible. So the ArduBat should be on the top of the stack to make the best use of this shielding.
Putting the ArduBat to Work, an Overview ...
|A number of steps are required to get
an ArduBat project going. You first need to get
your hands on an Arduino UNO board. These can be
found at many sources, like DigiKey or Mouser
Electronics. You can buy them on-line as well ... I
like to use Adafruit as a source for Arduino
boards and shields ( www.adafruit.com ),
but there are many excellent vendors available.
After you have your Arduino board, you need to download and install the software that allows you to write and load programs ( called SKETCHES in Arduino speak ) into the Arduino processor. The software also links you into the reference libraries, but that feature only works if you are connected to the Internet at the time you are trying to use it. While on the Internet, be sure to explore the Arduino website, and all of the resources that it makes available: www.arduino.cc .
By this time you should have an idea of what you want to do with your project. In my case I wanted to make a bat activity logger. So, next you need to survey all of the other hardware shields that might be out there to help you achieve your goal. There are many of these building blocks available. One list of them can be found at: shieldlist.org .
Once you've collected all
the building blocks, you will have assembled your project
stack ... like the one I have for my logger at the right,
which I cover in more detail here.
|Configuring the shields
and writing the sketch to drive it all is the next, and
most interesting part of the project. This is where it
all comes alive. You will need to have an I/O pin map
list to identify which digital and analog Arduino
pins are used by which boards, and for which purposes.
This map list is needed to avoid conflicts
between two circuits trying to use the same pins. You
need to decide if the bat call signal will go to the D2
or D3 pin on the Arduino ( D2 is the default )
and place the jumper. Then all that that remains is
writing the code. There are many resources, both on the Arduino
web site, or through the Arduino reference that
you can access via the Arduino program. Websites
that sell the shields can also have valuable resources
for programming the hardware they sell.
Let's build the ArduBat board !
Quick Links: ... Construction ... Configuration ... the Demo sketch ... Troubleshooting
Tony Messina - Las Vegas, Nevada - email: T-Rex@ix.netcom.com