Skip to content

Latest commit

 

History

History
87 lines (73 loc) · 8.66 KB

README.md

File metadata and controls

87 lines (73 loc) · 8.66 KB

2019 Easy Bee Counter V.1

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

Foo

Major Differences/Improvements

  • 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). feather feather feather feather feather pic

General Operation

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. https://github.com/hydronics2/2019-easy-bee-counter/blob/master/pics/IR_photo_diode.PNG

Micro-Controller Pinout

Feather ESP32 Pinout

feather

ItsyBitsy Pinout

itsy

Shift-in registers

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.

IR LEDs

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

Power

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.

Bill of Materials

uController

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

PCB

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.

Alternative pricing from Chinese distributor LCSC

Someone pointed out some alternative pricing that can really bring the cost down.