Counting Bees With A Raspberry Pi

Even if keeping bees sounds about as wise to you as keeping velociraptors (we all know how that movie went), we have to acknowledge that they are a worthwhile thing to have around. We don’t personally want them around us of course, but we respect those who are willing to keep a hive on their property for the good of the environment. But as it turns out, there are more challenges to keeping bees than not getting stung: you’ve got to keep track of the things too.

Keeping an accurate record of how many bees are coming and going, and when, is a rather tricky problem. Apparently bees don’t like electromagnetic fields, and will flee if they detect them. So putting electronic measuring devices inside of the hive can be an issue. [Mat Kelcey] decided to try counting his bees with computer vision, and so far the results are very promising.

After some training, a Raspberry Pi with a camera can count how many bees are in a given image to within a few percent of the actual number. Getting an accurate count of his bees allows [Mat] to generate fascinating visualizations about his hive’s activity and health. With real-world threats such as colony collapse disorder, this type of hard data can be crucial.

This is a perfect example of a hack which might not pertain to many of us as-is, but still contains a wealth of information which could be applicable to other projects. [Mat] goes into a fantastic amount of detail about the different approaches he tried, what worked, what didn’t, and where he goes from here. So far the only problem he’s having is with the Raspberry Pi: it’s only able to run at one frame per second due to the computational requirements of identifying the bees. But he’s got some ideas to improve the situation.

As it so happens, we’ve covered a few other methods of counting bees in the past, though this is the first one to be entirely vision based. Interestingly, this method is similar to the project to track squirrels in the garden. Albeit without the automatic gun turret part.

Bees In TVs

Bees are a crucial part of the ecosystem – without bees to act as pollinators, many plant species wouldn’t be able to reproduce at all! It’s unfortunate then that bees are struggling to survive in many parts of the world. However, [Louise Cosgrove] is doing her part – building homes for bees in old television sets.

The project started when Louise’s son-in-law left 100 (!) analog TVs at her home, having already recycled the picture tubes. That sounds kind of impolite to us, but we’ll give them the benefit of the doubt and assume they had some sort of agreement. [Louise] realised the empty television cases had plenty of ventilation and would make ideal homes for bees. By filling the empty boxes with natural materials like wood, bamboo and bark, it creates nesting places that the bees can use to lay their eggs.

We’ve seen bees on Hackaday beefore (tee-hee) – like this beehive wired for remote monitoring.

[Thanks to Stuart Longland for the tip!]

Wired Hive Counts Bees, Keeps Them Cozy

The world has a bee problem. Honey bees are a major pollinator for all sorts of tasty crops, but an estimated one-third of all colonies in the US have vanished since 2006. These mass disappearances are collectively known as Colony Collapse Disorder, and everything from pesticides to global warming to a new bee virus has been blamed for bees going MIA. Regardless of the cause, keeping the bees that do remain alive and pollinating is important work, and an intelligent bee hive could go a long way toward that goal.

Normally, bee hives are a black – err, white –  box, where the bees go about their business without revealing much about it. While bees are amazing animals with an incredibly rich social structure that allows them to, for instance, team together to ventilate a too-warm hive with their wings, or gang up on invading predators, they have their limits, and knowing what’s going on in the hive helps the beekeeper to maintain an optimal environment. [Miguel’s] system, which appears to still be in the prototyping phase, aims to provide the beekeeper with data on temperature and humidity within each hive. GPS tagging allows the beekeeper to track where a hive is, which is important since hives are moved around as various crops begin to flower. The system can even keep track of the comings and goings of bees using photoelectric sensors; while [Miguel] doesn’t go into detail, we imagine that aspect working something like this bee counter we featured a few years back. And being from Portugal, [Miguel] has incorporated cork into the design of the hive, a sustainable material available locally and offering great thermal properties.

Sounds like [Miguel] is onto something here. The bees need all the help they can get, and anything that improves their husbandry will go a long way toward keeping the world fed. We’ll be watching to see where [Miguel] takes this system.

THP Semifinalist: Honeybee Hive Monitoring

[Ken] keeps his bees remotely and can’t check on them as often as he might like to. He wanted some way of knowing when they were out of space, because that slows down their nectar collection. He knew he could do this by remotely tracking the weight and internal temperature of the hives.

His first prototype revolved around a postal scale that couldn’t be turned off between readings. This meant that he needed a bigger solar panel and battery than originally intended. For about a week, the hives were sending data to Thingspeak through an Arduino Fio over XBee.

The current iteration measures the load cells with an HX711 24-bit ADC. This sends the scale data to an Apitronics Bee unit, which adds in temperature data from the hives and sends everything to an Apitronics Hive. [Ken] will also stream it to a cloud service so he can monitor them in real-time. [Ken] wants to see as much data as possible and contribute to NASA’s HoneyBeeNet program, so he has a second Bee unit set up to handle a nearby Apitronics weather station.

SpaceWrencherThe project featured in this post is a semifinalist in The Hackaday Prize.

Thumbnail that say The Hacklet

Hacklet #9 Bugs And Fire

9 This week on the Hacklet, we’re spending some time looking at bugs and fire! honeybeeFirst up we have [Noel] who is saving the bees with Bee-O-Neo-Tweet-O. Bees are incredibly important, both to Earth’s ecosystem and the food chain we humans need to survive. Unfortunately bees are also sensitive to some of the chemicals humans dump into the atmosphere. Sometimes it results in colored honey, but more often than not it’s detrimental to the bees.

Neonicotinoids are a class of insecticide that has been causing problems to hives near where they are used. [Noel] is banking on sensors created with bismuth electrodes to detect the chemical near the entrance to hives. The data can be collected by beekeepers all over the world and sent to a central server. He’s using an Arduino Yun as a WiFi connected base station. Each individual hive has an Adafriut Trinket and a 433MHz radio link to send data to the base. [Noel] is even hoping to detect individual bees by the sound of their wings beating.

hivemonitor

[Ken] is keeping his own bees, and wants to monitor more than just chemicals. His honeybee hive monitoring system keeps track of the temperature and weight (and thus the honey produced) by his hives. Rather than buy an expensive load cell setup, [Ken] modified a standard digital bathroom scale to suit his needs. The insects connect to the IOB (Internet of Bees) with a bit of help from the Apitronics platform and a BeagleBone Black. Ken even added a solar-powered weather station with the Apitronics system.

bug-killa[Mike] is taking a slightly different approach. He doesn’t want to save the bugs, he wants to kill the ones that bug him! [Mike] doesn’t want to get his hands dirty, so he’s created Lazy Killer 9000 for easy bug killing. Lazy Killer uses the business end of an electrified fly swatter to do its work. This project wouldn’t be complete without an Arduino, so [Mike] is adding one, as well as a WiFi shield. The entire system will have a friendly interface to turn the juice on. One of the best features of Lazy Killer is the internet connected kill count. [Mike] knows that there aren’t any bugs in the vacuum of space, so he’s entered Lazy Killer in The Hackaday Prize.

fire-charger

From bugs, we move on to Fire! [mr.jb.swe] needed a reliable portable power source. He found it in LiFePO4 batteries, but still needed a way to charge them. Toward that end he’s created The Multicharger, a watt meter and charger which can be powered from solar, wind, or thermometric power. A Powerpot X provides the fire and the power to charge the batteries. [mr.jb.swe’s] charger converts that into the standard constant current->constant voltage charging system needed by lithium chemistry batteries. The Multicharger isn’t a complete battery management system yet, but it’s well on its way.

Unitycandle candles have become a staple at wedding ceremonies.[Quinn] has taken things to the next level and beyond with this take on the classic unity candle. This candle throws fireballs 30 feet into the sky! We covered the candle back in June, but [Quinn] has been busy since then. With over 20 updates, [Quinn] has created one of the most well documented projects on Hackaday.io. Of course, being that this project is dealing with propane and monstrous fires, [Quinn] mentions you shouldn’t try unless you really know what you’re doing. Don’t set any brides on fire! That’s it for this week’s Hacklet! Tune in next week, same hack time, same hack channel, for more of the best of Hackaday.io!

Counting Bees

This is the bee counter which [Hydronics] designed. It’s made to attach to the opening for a hive, and will count the number of bees entering and exiting. We’re not experienced bee keepers ourselves (in fact we’re more of the mind of getting rid of stinging beasties) but we understand their important role in agriculture and ecosystem so we’re glad someone’s making a nice home for them.

Most of the apparatus is a circuit board lined with reflective sensors. There is a double-row of pin sockets on the top of the board which accepts the Teensy+ which monitors those sensors. The bees must pass below this PCB every time they enter or leave the hive, thereby tripping a sensor. In the video after the break [Hydronics] shows off the system with a netbook used to monitor the output. But it sounds like he has plans for an integrated display system in future versions of the bee counter.

Continue reading “Counting Bees”

ATtiny Hacks: BEES! An Electronic Scale To See Who Brings In More Honey.

[MakingThingsWork] wanted an accurate way to keep track of the weight of his beehive, so he decided to build himself a data logging electronic scale. First he ripped the strain gauges from an old electronic scale which he then fitted to his home made beehive base. He then went about designing and building the control board which is based about the Attiny 85 (if you hadn’t guessed by the banner). An instrumentation amplifier was used to amplify the signal from the strain gauge, which is then read by the ADC on the Attiny. It looks like he had some trouble getting consistent results from the scale, so to eliminate the error caused by temperature variations he set up a fixed voltage divider for reference. With this setup the scale can produce results at +/- 0.5lb accuracy, sounds just fine for a system that cost less than $50. The V-usb project software has been used to connect the scale to his PC which he uses to collect and graph the data. All in all a very neat project and by the looks of it, some very productive bees.