Honey Bee Counter II

27,040

67

65

Introduction: Honey Bee Counter II

About: just have to figure out how all these things go together....

3/18/2020 - new instructable... https://www.instructables.com/id/Easy-Bee-Counter/

12/21/2019 The project that doesn't die!... I've made a few updates to this design. Just finishing up this design but wanted to start pushing this out. This version of the bee counter is all through hole components. I really wanted to make a kit that was easy to assemble for folks just starting out.

https://www.instructables.com/id/Easy-Bee-Counter/

This is an old project... please see the link above for the latest designs.

Hello, I've made this project easier to build, data log, and post data. This bee counter like the last design counts bees going in and out through twelve gates.

We've teamed up with some new researchers and business owners to provide bee metrics. You can reach me at Thomashudson.org.

.... and we're still interested in helping you build your own bee counter and this new design allows you to add dattalogging, connect to ethernet, wifi, or cellular. It also makes it easy to protect your most sensitive electronic parts..

Step 1: What You Need

What I like about this project is you can build it in pieces as you get comfortable with the parts...

You need a uController... say an Arduino

You need the bee sensor board:
Printed Circuit Board via Oshpark $19 for 3...
Qre1113 reflectance sensors (24 sensors for 12 gates) $10.08
Shift registers qty(3) $1.08 74HC165
pull down resistor array 100k qty(3) $2.04 100k resistor array
resistors LED qty(1) $0.68 47ohm resistor array
Headers qty(13) $5.85 six pin headers for the gates!


Extras
you need some plastic or wood pieces to surround your bee counter
you might want an ethernet, wifi, or data logging shield to log data
a plastic enclosure for your ucontroller

Step 2: How It Works - Electronics

Each gate has two QRE1113 sensors. When a bee is present, reflected IR light triggers the IR sensor HIGH and the shift register reads HIGH. Otherwise the 100K resistors pull the IR sensors low (to ground).

This design uses 3 shift registers. Each shift register can read 8 sensors or 4 gates for a total of 24 sensors and 12 gates. The shift registers continue to track the presence of bees and determines which way the bee is going.

Only one led from each sensor is used; such that, one IR LED provides enough light for reflectance to trigger both IR receivers when a bee passes under one. This reduces parts and simplifies the board.

The parts list for the main board is as follows:

Costs Per Board $6.5 via oshpark
Qre1113 reflectance sensors (24 sensors) $10.08
Shift registers qty(3) $1.08 74HC165
resistors 100k qty(3) $2.04 100k resistor array
resistors LED (47 or 100) qty(1) $0.68 47ohm resistor array, 100ohm resistor array
Headers for gates qty(13) $5.85 six pin headers

You connect the bee counter to your Arduino with five wires.

VCC=> 3.3V or 5V (for 3.3 volts use 45ohm LED resistor and for 5volts use 100ohm LED resistor)
MISO - master_in_serial_out, connects to QH
SCK - clock
Load - Parallel load pin
Gnd - ground

These are very standard connections for reading shift registers. Here is the classic button example from arduino

You may notice that I've broken out the VCC for the IR LEDs. This is done if you want to pulse (PWM) the LEDs and save on power.

Step 3: Soldering... Putting the Parts on the Sensor Board

Ok, brace yourselves... This is a great project to learn surface mount soldering!

All the parts are surface mount accept for the gates. The gates are made from 6 pin headers. You need to cut the middle 4 pins. Only the two outside pins are soldered.

There are a lot of surface mount soldering tutorials out there...but all you need for this project is:

Once you get everything soldered you can apply power and test your LEDs using a camera. Remember we only are powering one of the two LEDs so you will only see the the LED closest to the center lit up.

Solder the V2 jumper (labeled VCC) if you don't want to control V2 separately. Per the schematic, V2 allows you to control the LEDs independently. This might be useful for PWM of the LEDs. I've not tested this yet but it should work to reduce power.

Step 4: Hooking It Up and Getting Data

Before you get data... and even before you solder your gates on... I suggest testing your sensors with this easy shift register code.

pload Pin = 5; // Connects to /PL aka Parallel load aka latch pin the 165
dataPin = 6; // Connects to the Q7 aka MISO pin the 165
clockPin = 7; // Connects to the Clock pin the 165
plus VCC and GND.

I use a piece of white paper and slide it about 3-5mm over each sensor. The IR light will hit the sensor and reflect back into the receiver and trigger a 1 on your test code above.

Once that code is tested with your sensors you can try to save the data to an SD card... send it to your serial monitor, or post it to a webservice. You then need to come up with some simple data to COUNT BEES! This can be as simple as an if then statement. If the IN sensor is triggered first, followed by the OUT sensor ... you know the bee was going OUT. If the OUT sensor is triggered first, followed by the IN sensor is triggered, you know the bee is going IN. I can expand upon this code but it quickly becomes application specific.

I posted code here: github

Step 5: Bee Counter Enclosure

You need two enclosures. You need to wrap your bee counter in thin wood or 1/8" plastic. Then you have an ~18" cable from the hive entrance to your uController. You need an enclosure for the uController too.

I used ~3/16" pieces of plastic for the top of the bee counter and 1/16" at the bottom. I got this from the scrap bin at Tap Plastics. You want your top piece sturdy enough to overhang your entrance by 1" to stop direct sun light from triggering your sensors. The bottom of your bee enclosure must be black or painted black so it doesn't inadvertently reflect IR back into your sensor even though the spec sheet says the range is only ~1/4".

Also, I learned DON'T USE SILICONE. The bees hate silicone and will work feverishly to try to remove it.

The 2nd enclosure can be any water proof box that can house your uController.

Animal Innovations Contest

Participated in the
Animal Innovations Contest

1 Person Made This Project!

Recommendations

  • Make it Glow Contest

    Make it Glow Contest
  • First Time Author Contest

    First Time Author Contest
  • PCB Challenge

    PCB Challenge

65 Discussions

0
dunchudson
dunchudson

Question 7 months ago on Introduction

Just finished building this and ran the Blink_IR_Leads program to test things out. Thinking that I've done something major wrong... Only LEDs 4, 7, 13, 15, 20, 21 & 22 are lighting up. I've checked out all my solder points under a magnifying glass - and they all look good as far as I'm concerned. Any words of wisdom? Thanks,

Dunc

0
Btfergie2
Btfergie2

8 months ago

When I try to open the gerber file I get an invalid file message. When I try to extract it, I get a empty zip file message. Any idea what is going on? Thanks.

0
Btfergie2
Btfergie2

Reply 8 months ago

Ok. I wasn't sure Kicad version was. Guess that will work. Thanks!

0
hydronics
hydronics

Reply 8 months ago

These are the files you need... just zip them and upload them to the board house...

gerber_files_needed.PNG
1
hydronics
hydronics

1 year ago

Just finishing up this design but wanted to start pushing this out. This version of the bee counter is all through hole components. I really wanted to make an easy to assemble bee counter for folks just starting out.

https://github.com/hydronics2/2019-easy-bee-counter

0
VV31L
VV31L

Reply 1 year ago

I really wanted to make an easy to assemble bee counter for folks just starting out.
Thank you!

I want to try building this new iteration of your bee counter project - just ordered the parts - and would like to know if you already have the code for the feather footprint version?

0
RandysBees
RandysBees

1 year ago

Wow, wow, wow. I am so impressed Thomas. Thank you so much
for completing this latest design so quickly and for using through hole
components. I will feel much more competent building this one than i did with
the last design. Thank you for increasing the length of the PCB to that of the
hive entrance and for increasing the width to reduce/eliminate ambient light
interference. I really like the idea of using a blank PCB board to create the
"sandwich" look and eliminate having to find the right material to
enclose the gates. Plus soldering the blank PCB board to the headers will surely
keeps everything tight without silicone or glues which bees don't like. Love
the idea of the uController mounted on the board and everything connected and
powered by the 5-volt USB. You really did think of everything and I'm grateful.



I look forward to you posting the code whenever you are
ready as I have little (to scale) home made "bees" to use for
testing.


Merry Christmas Thomas. Thanks again, Randy

0
sharkbroken
sharkbroken

Question 1 year ago

does anyone have this file in gerber please

0
hydronics
hydronics

Answer 1 year ago

I think I'm going to try to knock out a new board in the next week... It'll be a little untested but might be worth the wait.

0
hydronics
hydronics

1 year ago

Hello,I'm digging into this project again. It's been so long sense the last design I plan to make some improvements.
The price of Printed Circuit Boards (PCBs) has come down quite a bit so I'm making a large sensor board, 24 gates and about 14.5" long to go all the way across the hive body. Also about ~1.5" wide to block out any IR from the sun. Let me know if you have any questions/ideas.

0
AlfieWhite2019
AlfieWhite2019

Reply 1 year ago

Hi Thomas, great project. Just wanted to see if you have an update on the the improvements you were planning to make?

0
hydronics
hydronics

Reply 1 year ago

Hey jczd.. that looks like a great board. Here's a look at the one I'm working on... I might have some time to push forward in the next couple of months. It has a top and a bottom and a layout for an ESP32 and an Atmel M0 SAMD21. I use the atmel chip a lot so I mainly put it their for debugging and will switch to the ESP32 for the final run.

hone_bee.jpg
0
jczd
jczd

Reply 1 year ago

Yo,

nice design, have you worked on the improvement yet? I just see your message, after I fully rerouted the PCB and (almost) placed the order.

as I said below, you can chain it to have Nx12 gates so it still works for small hives. You may also be able to trim it in order to cut away the last 4 gates, not totally sure though I need to double-check that

I just signed up on instructables and will probably fork this project somewhere with documentation


greetings

0
njmchase
njmchase

Reply 1 year ago

Thomas, I have just acquired and hive and being middle aged the creation of this is beyond me, even though I an in technology I was never good with soldering, electronics or coding. I have a Pine A64 but what would it take for you to build with all parts and then send to the UK. Would you even be prepared to do this?