Track real-time traffic at your hive without opening boxes. A small sensor-driven system records insect movement and turns raw counts into useful information for growers and hobbyists.
The basic DIY path pairs an Arduino-compatible microcontroller with a custom sensor board using QRE1113 reflectance sensors and 74HC165 shift registers. Typical wiring uses five lines: VCC, MISO (Q7), clock, load (/PL), and GND.
Compact commercial units offer a different trade-off. They may have 24 entrances (9×9 mm), infrared proximity sensing, a 6V/0.2A solar panel, a 330 mAh Li‑Po battery (about 48 hours without sun), IP53 protection, and Bluetooth broadcast to a nearby gateway.
Setup is straightforward. Use the Diagnostics application to discover the device, check battery and firmware, view live red bar counts as insects pass, and assign the unit to a hive via QR or API. Data then uploads through a gateway or mobile application for continuous remote visibility.
Monitoring both ingress and egress helps interpret forage strength, orientation flights, and colony vitality. Later sections show layout planning, environmental mitigation, and power protection to keep readings reliable all season.
Key Takeaways
- Sensor systems capture continuous traffic without intrusive inspections.
- DIY builds use Arduino, QRE1113 sensors, and 74HC165 shift registers for low-cost monitoring.
- Commercial solar units add weatherproofing, battery backup, and Bluetooth links to gateways.
- Diagnostics apps validate battery, firmware, and live counts during setup.
- Tracking in and out movement gives early signs of forage and colony health.
- Proper enclosures and placement greatly improve signal quality and data fidelity.
Why monitor bee traffic now: benefits of smart hive entrance counters
Real-time gate monitoring turns raw insect traffic into clear, time-stamped trends at each hive opening. A bee counter converts every pass into a timestamped record that reveals forager strength, daily flight windows, nectar flows, and recovery after storms.
Key beekeeping insights from entrance data
Paired infrared sensor elements at each gate track the order of beam triggers. That order lets the device infer direction so you can separate outgoing flights from returns.
With in/out differentiation, you get net activity measures that show resource intake versus outflow and can even highlight robbing or traffic jams when patterns skew.
Reducing manual inspections and stress on bees
Automated counts let you check colony trends without opening boxes. That lowers disturbance while still giving objective metrics to guide feeding, supering, or targeted checks.
- Early alerts to sudden downturns prompt focused inspections, saving time and reducing unnecessary disturbance.
- Persistent monitoring ties management actions to observable changes in the data, improving decision-making.
- App diagnostics show live red-bar activity so you can verify every gate is live before you rely on the stream to count bees.
How Smart hive entrance counters work
Infrared reflectance pairs observe close-range motion and turn timing into usable counts.
Infrared reflectance sensors and two-gate logic
Each gate uses two QRE1113 reflectance elements. One element will go HIGH when a bee passes; 100k resistor arrays pull lines LOW otherwise.
When the first sensor trips and the second follows, the firmware infers direction and increments an in or out value. This two-sensor-per-gate scheme yields clear, timestamped data for daily traffic trends.

Shift registers, signal flow, and direction of travel
Three 74HC165 chips chain to read up to 24 inputs while saving microcontroller pins. The module uses /PL to latch current states, then the clock toggles bits out over MISO (Q7) into the microcontroller.
Sample cycle: toggle parallel load, then clock out each bit. The microcontroller compares paired bits and timing to decide whether the bee moved in or out.
Power, light, and enclosure considerations at the entrance
Drive LEDs with proper resistors: ~47 Ω near 3.3V and ~100 Ω near 5V. Putting LEDs on a separate VCC rail allows PWM dimming to extend life and cut power without losing reliable detection.
Prevent false positives by adding an overhang to block direct sunlight and painting the base matte black to damp reflections. Seal side gaps so stray light can’t leak into the reflectance field.
Mechanical tolerance and secure mounting are critical. Keep the pass close enough for stable detection but free of obstructions. Careful alignment reduces calibration drift and improves the quality of every count.
“Reliable counts start with stable geometry and simple timing — two reflectance elements per gate deliver both.”
Note: The same logic applies to DIY boards and commercial products; the components may differ in packaging but the principles remain identical for a working counter.
Choosing your setup: DIY sensor board vs. solar-powered commercial counter
Deciding between a DIY board and a factory-made unit comes down to cost, control, and how you plan to gather data. A DIY bee counter favors customization, lower parts cost, and open firmware. It also requires hands-on assembly and occasional troubleshooting.
DIY parts and cost snapshot
The typical build lists a PCB ($6.50–$19), 24 QRE1113 reflectance sensors (for 12 gates), three 74HC165 shift registers, 100k resistor arrays, LED resistor array (47–100 Ω), and 6‑pin headers. Wire to an Arduino over VCC, MISO (Q7), clock, load (/PL), and GND.
Commercial features and runtime
Factory versions bundle 24 9×9 mm entrances, IR proximity sensing, a 6V/0.2A solar panel, and a 330 mAh Li‑Po battery rated ~48 hours without sun. IP53 protection and -30°C to +55°C ratings improve season-to-season reliability.
Connectivity: app vs. local logging
Choose Bluetooth broadcast to a gateway for simple, app-based upload. Pick SD logging or shields for DIY when you need full local control and offline storage. Think about power budgeting, sleep cycles, and PWM LED dimming to extend runtime.
| Option | Pros | Cons |
|---|---|---|
| DIY | Custom layout, lower part cost | Assembly time, design work |
| Commercial | Plug-and-play, sealed form | Higher unit cost, requires hub |
“Select based on scale and skill: builders who enjoy hardware get flexibility; operators who want reliable deployment pick a packaged unit.”
Plan your installation for reliable data
Good placement and sealing make every reading useful. Start by matching gate openings to the 9×9 mm geometry used by many 24‑gate commercial designs so traffic flows straight through the detection zone.
Entrance geometry and light control
Seal side openings so bees cannot bypass the detectors. That ensures each bee crosses the sensor plane and yields complete counts.
Build an overhang about 1 inch above the openings to block direct light. Paint the bottom surface matte black to reduce IR reflections and raise the signal‑to‑noise ratio.
Positioning for sun, shade, and water protection
Place the unit where it gets sunlight for charging but is shielded from heavy rain and snow. IP53 resists spray but not immersion or driven rain; remove the unit before winter.
Wiring, enclosure, and materials to avoid
Route an ~18″ cable from the entrance assembly to a dedicated waterproof box to keep terminals dry and minimize corrosion. Add strain relief and UV‑stable fasteners so thermal cycles do not shift alignment.
Avoid silicone near the brood area or mounting points. Bees try to remove silicone and can disturb mounts or seals. Keep the detection zone clear of propolis and burr comb.
Tip: Elevate and angle the controller box to shed water and debris, and size the opening so traffic isn’t choked—preserve natural airflow so behavior stays unchanged.
Step-by-step: install, wire, and power your bee counter
Start on a tidy bench. Pre-stage QRE1113 and 74HC165 parts, confirm orientation marks, and pre-tin pads. Have a fine-tip iron, flux pen, solder, wick, and a brass sponge at hand for clean surface-mount joints.
Soldering and assembly tips:
Solder small parts with care
Use the fine-tip iron and flux to flow solder quickly. Work one pad at a time. Inspect joints with a magnifier and rework bridges with wick.
Build gates and wire the register chain
Make gates from 6-pin headers: cut out the middle four pins and solder only the outer two so each gate sits flat over the detection path.
Connect the 74HC165 chain to the microcontroller with short leads: VCC, GND, MISO (Q7), clock, and /PL (load). Keep wires tidy to reduce noise.

Test with paper passes and simple code
Validate every sensor by sliding white paper 3–5 mm over the element. Run a minimal sketch that latches inputs, clocks bits out, and prints states.
Implement concise direction logic in the code: if IN triggers then OUT, count OUT; if OUT triggers then IN, count IN. Add debouncing and timing windows to handle overlaps so the counter stays reliable.
Mounting and enclosure
Fit the assembly under a ~1″ overhang and paint the underside matte black to block direct sun and cut reflections. Place the microcontroller in a sealed box with strain relief and desiccant for easy maintenance and long-term reliability.
Configure the application and data flow
Open the Diagnostics application and enable device discovery so the phone or gateway can locate the bee counter in range.
Tap “Devices in Range”, choose the unit, and if the firmware needs updating tap the green up-arrow. Wait until the progress reaches 100% so the device runs the latest version before field use.
Check the battery state and signal status if the unit fails to connect. Low battery often prevents pairing and should be resolved before installation.
Assigning and validating the device
Use the live red-bar view to confirm each sensor lane. Pass a finger through the openings and watch red bars increment to ensure the sensor array responds.
Assign the device to its hive by scanning the QR or entering the API code. Match identifiers to your records to avoid misattributed data.
Data path and verification
Ensure a gateway or mobile upload path is active. After assigning, watch the monitoring app for successful uploads and check that recent data appears on the dashboard.
| Step | Action | Expected result |
|---|---|---|
| Discover | Enable device display and scan | Device appears in “Devices in Range” |
| Update | Tap up-arrow for firmware | Progress reaches 100%; version updated |
| Validate | Check battery and live red bars | Sensors respond; battery adequate |
| Assign | Scan QR/API code | Device linked to correct hive |
| Upload | Enable gateway/mobile upload | Data visible in monitoring app |
Tip: Document firmware version and mapping of entrances after setup to simplify future audits and troubleshooting.
Maintenance, troubleshooting, and seasonal care
Routine maintenance keeps the counter reliable across seasons and reduces data gaps. Do short checks weekly during active months and before storage.
Moisture protection, winter removal, and IP53 limits
IP53 shields the unit from dust and spraying liquids at 0–60°. It does not tolerate driving rain, immersion, or snow.
Plan removal before freezing weather. Store units charged and dry to protect the battery and electronics.
Battery life, solar charging, and power optimization
The integrated 330 mAh Li‑Po can run roughly 48 hours with no light. Ensure the 6V/0.2A solar panel gets good sun to recharge daily.
DIY builders can lower consumption by PWM’ing IR LEDs on a separate VCC rail so the sensor draws less power overnight.
- Inspect seals and mounts; reposition or add shielding to avoid water spray.
- Clean lanes gently and verify sensors with a quick pass to confirm accurate bee counts.
- Track battery metrics in the app or with a multimeter; log dates and observations as core information for audits.
- Troubleshoot missed uploads by checking gateway range, firmware state, and connector seating.
- Fix false triggers by adding shade, repainting matte black, and sealing side gaps.
“A short maintenance log links hardware changes to data shifts and speeds troubleshooting.”
Conclusion
,Direction-aware detection from dual sensor lanes gives clear, timestamped records you can use to monitor colony trends.
Recap: Pairing QRE1113 elements with chained 74HC165 shift registers and an Arduino-class controller lets simple code infer inbound and outbound passages so you can reliably count bees without opening the hive.
Both DIY builds and commercial solar units (24 9×9 mm gates, Bluetooth, IP53, ~48 hours runtime) work well. Follow best practices: shade the openings, paint interiors matte black, seal side gaps, and run app diagnostics regularly to confirm each gate.
Keep a solid data path from device to gateway and refine timing windows and debouncing in your firmware to avoid double counts. Log setup details and remove units for winter when conditions exceed IP53 limits to protect sensors and the counter hardware.
Next step: choose a build path, assemble or buy the gear, follow the installation checklist, and start to count bees for continuous, actionable information on colony health.




