This version of the bee counter is easy to solder and assemble (all through-hole). It's been tested and works* with sample code provided.
The current tested design is easy to program and approachable to beginner programmers. The printed circuit board accepts multiple Arduino platforms made by Adafruit including their line of Adafruit Feather type micro-controllers and Adafruit ItsyBitsy micro-controllers. The Adafruit feathers include wifi and long range radio features (*esp8266, esp32, and **LoRA). All the ItsyBitsy 3V models (M0, M4, and 32u4) should work fine.
*the esp8266 is missing A5 so you have to jumper to another pin **see below issue with SPI
- All through-hole components for easy soldering
- Dual footprint, socketed, off-the-shelf micro-controllers => Feather and ItsyBitsy
- Program in Arduino, Lua, and microPython
- A total of 24 gates, 48 sensors, 6 shift registers
- ~14.75" long stretching the entire opening of a langstroth hive for easy placement
- using 2 PCBs to create a sandwich is an inexpensive quick solution. The PCBs must be ordered black so the IR LED emitter is absorbed into the material.
- using 6 pin headers to create the turn-styles or gates
- N-Ch mosfet controlled IR LEDs such that LEDs can be controlled ON for short periods during while sensing (~75us). Allows for reduced power to less than 1ma (plus micro-controller).
Honeybees are forced through 24 gates where optical sensors (48 sensors) determine whether the bee is present and determine the direction of the bee movement. Each optical sensors has an IR LED and an IR sensor. If no bee is present the IR light is absorbed into the black surface. If a bee is present the IR light reflects off the bee and triggers the sensor.
There are 6 shift-in registers. Here's a great description for how to connect and program shift registers. The micro-controller's SPI pins read the shift registers. All six shift registers are read at the same time. The sensors are normally pulled low and show 3.3V or HIGH when a transistor is triggered and a bee is present.
Unfortunately the shift registers we're using (the most popular shift register chip!) are not full SPI devices and wont share the SPI with other devices.. They're like the worst SPI devices!... therefore some boards like the Adalogger or LoRa just wont work out of the box. You can still do it by cutting some traces and patching the SPI lines to free pins and bitbanging the SPI to the shift registers.. buy yeah not optimum. You can get a true-spi shift register but the pinout will be different than the 74hc165 used here.
The 48 LEDs are divided into two sets of 24 with each set controlled by an N-ch mosfet. The normal forward voltage of each IR LED is 1.2V and about 20ma as shown on the data sheet. Two LEDs are connected in series with a 22ohm resistor. There are jumpers on the board that allow the LEDs to bypass the current limiting resistors. Do not solder the jumper until fully tested! Refer to these instructions
The PCB design connects the USB power pin from the uController to the 3.3V regulator so that a usb cable connected to the micro-controller can power the entire project.
The code was tested with the feather esp32 Huzzah and itsyBitsy M0 but will work with all these boards.
- feather Huzzah from mouser
- feather esp8266 from mouser
- the esp8266 is missing A5, so if this micro is used you have to jumper to another pin
- feather LoRa 900mhz from mouser
- ItsyBitsy M0 from mouser
- ItsyBitsy M4 from mouser
JLCPCB ~$16-25 with shipping. Order the PCBs Black. See these instructions for ordering.
Parts and Pieces from mouser
See alternative pricing below for cheaper options specifically for the reflectance sensors.
- qre1113 Reflective Sensors qty(48)
- 6 pin female headers 7mm high, 0.1" spacing, qty(~36)
- 22ohm resistors, bussed, qty(4) SIP Packaged, bussed
- 100k ohm resistors bussed, qty(6) SIP-9, 8 resistors, 9 pins
- Shift registers, qty(6) 74HC165
- 3.3V Regulator, (input, ground, output - IGO, pinout), qty(1)
- screw terminals Two pin, 0.1", qty(3)
- 0.1 uF Ceramic Capacitor, through hole, qty(6)
- 1 uF Ceramic Capacitor, through hole, qty(1)
- 560uF, 6.3V Capacitor low esr, 3.5mm lead spacing, 8mm diameter
- N-Channel Mosfet FQP30N06, qty(2)
Someone pointed out some alternative pricing that can really bring the cost down.
- ITR8307 Reflectance Sensors ~$0.13/each @ qty(48) (same as QRE1113)
- 6 pin female headers 8.5mm high. ~$0.05/each @ qty(36+)
- 22 ohm SIP 8 resistor, 9 pin, it will fit. $0.44 for qty(4)
- 100k SIP Resistors 8 resistor, 9pin, it will fit. $0.44 for qty(6)