Go Down

Topic: A Digital Beehive: A scientific study proposal. (Read 7647 times) previous topic - next topic

Deamiter

This is super exciting to me, kasslloyd, because I've spent the last year relearning electronics (from a few courses in university) and building remote hive monitoring equipment!

I'm never going to be able to cover everything in a post like this, but check out www.hackerbee.com and maybe send me an email at my username @gmail.com as I'd love to chat on the phone.  I'm by no means an expert, but I'm about to deploy a system that sounds very similar to yours in the next week or two (minus the temp sensors, although I toyed with that idea).

I've also been working with Hydronics (at the Instructables link) to revise his bee counter design.  Basically, I just designed it to pulse the LEDs only while their corresponding sensors are being read.  That allows a massive reduction in power consumption (important since I have to run my sensors off a solar panel and battery)!  I have a prototype board assembled that I think is functional, and once I've found a couple hours to verify it's working, I'll be ordering a full-length board.

Anyway, I built my prototype bee hive data collection around an Adams CPWPlus220 scale, but it's much too expensive and doesn't do exactly what I want.  I've got it logging 2 temperatures (one will be in the hive and one to measure ambient temperature) as well as weight, and it will send the data back to the internet via XBee radios.  My bees are coming this weekend, so I'm just doing some final testing, but the system seems to be running reliably in my lab.  You can see the data output at http://thingspeak.com/channels/3004

Finally, starting in June, I'll be putting together the pieces to design an open sourced bee hive scale that should interface nicely with Arduino.  It will simply include three load cells, an ADC, and a cheap little microcontroller, so I'm hoping to put it together for under $75 (under $50 if I can make more than a couple).  I've published most of the app notes that I've used to design the system on my blog, so you can learn most of what I know.  I'm not sure it'll be the most accurate, and I KNOW it won't be the best engineered, but it'll be as cheap as I can manage with a target of a 0.1kg accuracy (hopefully including temperature sensitivity and drift).

Eventually, I'll get my existing, working system documented -- hopefully within the next couple weeks as I work on installing a solar panel out at the bee clearing and get the scale running in the field.  Then I hope to get a working prototype of the low-power bee counter and build another hive scale prototype around a cheaper custom scale that uses less power, and interfaces nicely with Arduino!

kasslloyd

Clemens, True... Michael Mietz used the TMP275 sensor, and it as far as I can tell ended up burried in the wax. I see your point that measuring the air temp in the hive is useful too. I can incorporate a sensor along the edge of frames where the bees are less likely to encapsulate in wax (they tend to avoid the edges), and/or put one up by the connector at the top of the frame for the air temp between the frames. and put some of the Waterproof DS18B20 probes that he sells. I was going to get one at least for soil temperature. I'm sure the stainless casing will act as a small heat sink and slow it's response time. I'm going to be putting a bee counter device infront of the hive as well, so I could incorporate temp sensors into that arduino there to log the air tempature right at the opening. I donno. It's really about money here, the more sensors the more money. ;-) Then the issue of trying to interpret all that data once it's collected. I'm game for logging any and everything we can. I'm just getting affraid this is beyond my ability to design/wire. And I definitely don't have the ability to create the files to make custom circuit boards, never used that software before. So at some point I'm going to probably beg/ask/hope someone with knowledge here will want to join in and help with the more technical stuff.. lol.

GoForSmoke, there is just one hive we're collecting this kind of data from. It sits on the digital scale, so there is an outlet already wired out by the hive for that scale. The hive sits under a roof shelter to protect the scale so power isn't an issue on-site. Real-time clock modules are ok, but they drift over time I think, after a year of data collection they may not exactly agree with the base computer the scale is logging with or the other devices. :P But it may not be that big of a deal in drift, probably a minute difference is probably more than OK for our purposes between the data sets.

GoForSmoke

Potting a temperature sensor in epoxy doesn't waterproof it?

I try to tell ya, a board is not necessary for an AVR doing simple things like this.

How many ways would you like to update the RTC on a regular basis? Cable, wifi, IR remote, keypad and LCD,..... but I assume the hive will be visited more than once a year.



Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

kasslloyd

Well yea... I can make my own board... I guess... getting a circuit board designed isn't cheap and doing it all on prototype boards isn't exactly neat... *sigh*

Yea, in epoxy it's waterproof and beeproof.

I donno, yea it's visited a lot, my professor is entirely electronics deficient, so he wouldn't really know how to do anything without training him, and taking a laptop out to the hive to update the times would be inconvenient. an LCD with keypad to change the time would be good if there was an easy way to do that.. I don't know anything about that? I'd prefer leaning to automated solutions than doing more tinkering with it than necessary. Swapping SD cards is about as much interaction then I'd prefer. :P


GoForSmoke

You will have to have a way to set time.

Cheapest would be plugging a laptop you already have that time is correct (check via internet before going out) via USB and run a quick program written in Processing (free PC language that is what Arduino IDE is based on, they go together well) to do the job without user needing to type a thing.

An LCD and keypad cost a big hand full of sensors but could make time set about like time set on a microwave.

If you epoxy with a bit of cloth, especially glass cloth but cotton is good, the result will be much stronger even if a thinner coat. Remember that if you ever do any glue jobs that have to take pulling, bending or twisting force.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

kasslloyd

After the initial uploading of the sketch, which should set the time, how much drift (seconds/month/year/whatever) can you expect from one of these RTC modules?

GoForSmoke

In this thread are 2 RTC's compared:
http://forums.adafruit.com/viewtopic.php?f=8&t=22895

I find this post to be the most informative. Highlight is mine:

Quote

Re: Accurate clocks: DS1307 vs. ChronoDot

Postby JBeale ยป Fri Sep 16, 2011 12:52 pm
from http://datasheets.maxim-ic.com/en/ds/DS1307.pdf
"CLOCK ACCURACY
The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was trimmed. Additional error will be added by crystal frequency drift caused by temperature shifts."

The datasheet as far as I can see, makes no claims about actual accuracy of the clock, reasonable since it's up to the user's circuit to insure correct crystal and matching caps.

By contrast, the DS3231 chip in the ChronoDot has its own crystal and caps internally, so they have control over the complete timing circuit and can make a specific claim about accuracy (+/-2 ppm over 0-40 C).
http://pdfserv.maxim-ic.com/en/ds/DS3231.pdf



Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

wildbill

Quote
A further metric is that by internal monitoring of the hive temperature you can estimate brood size (amount of new bees being raised). This requires a HUGE amount of temperature sensors to be installed within the hive. Here's where the feasibility problem and issues comes in. I'd be looking at the temperature sensor Texas Instruments TMP275 which allows for up to 8 sensors to be tied together within a bus. If we go with 8 sensors per frame, 10 frames per box, we'd be looking at 80 sensors per brood box, and the hive can eventually have 3 or 4 brood boxes once mature. So 240 to 320 temperature senors would need to be captured from 30 to 40 data buses each with 8 sensors.


How much variation do you expect across these sensors? That seems like overkill, at least to a non-beekeeper.

afremont



How much variation do you expect across these sensors? That seems like overkill, at least to a non-beekeeper.


I'd like to see some more information on that too.  I get the idea that the OP will be able to determine what's happening where in the hive by temperature zoning.  I was always under the impression that the entire hive was kept at a constant temperature, but obviously this must not be the case.

With such a large number of sensors looking for slight variations, the system will be drowning in noise and device variations.  I would imagine that each sensor might need specific calibration against a known base device so that an error formula can be applied to the output of the sensor.

@OP,  I haven't been ignoring you, I just was busy with tax junk and some other things.  I also needed to read thru the thread.  I need to do that again since I kinda flew thru it all. 

I find bees amazing, my dad and his dad have raised them.  I am allergic and I live in the deep south so I can't really risk getting a hive full of africanized variants that could take a notion to kill me.  Otherwise I'd love to be able to study them like this.
Experience, it's what you get when you were expecting something else.

kasslloyd

GoForSmoke, the DS3231 chip sounds like exactly what we need for these data loggers. And the circuit for it appears pretty simple too, which is good for me. ;-)

wildbill, bees need to keep their developing larvae at specific temperatures. 34-35C is what is necessary, and theres actually some research that shows that on the lower end of that bees develop for one purpose and higher end develop for another, i.e. they can produce different kinds of workers based on tempature of just one degree. Regardless of that, the key range for brood development is that tempature. Other parts of the hive, honey storage, is not so temperature critical so they don't actively regulate tempature in those parts of the hive. So if you can temperature profile a hive you can roughly (key word is roughly) gestimate the brood size.

Sources:
http://www.pnas.org/content/100/12/7343.full.pdf
http://jeb.biologists.org/content/206/23/4217.full.pdf

afremont, thanks for taking the time to look over my proposal. I'm expecting to know if I get my full grant or just partial funding (which probably can't support 3D temp profiling, where full would) by the end of the month. I'm going to need assistance in designing circuits, or boards. I have some help already but any and all people who want to help with the project is welcome. :) I want to keep this thread going with updates as we go and all relevant circuits, boards, files and code to help anyone else who wants to do what I'm doing.

I agree that bees definitely need studying, they're EXTREMELY important for the health of our plants, ecology and us! Plus even if this isn't ground-breaking research, its good for undergraduates to learn the process of experiment design, data collection, and analysis. ;-)

With the sensor it should have a variance of 0.5C, correct? Would calibration of each sensor help? Is each off a specific amount that could be corrected if you knew the offset? Or is it random/variable?

Ultimately the range I'm looking for is 33-36C or 34-35C. It's a fairly narrow range, but it's not fractional of a degree but whole degrees. Obviously I need high precision sensors, but I can't afford EXPENSIVE sensors. The $1/sensor range is about my limit.

GoForSmoke

The cheap sensors are 2x closer at detecting change as they are at  absolute temperature.

If your school has an Electronic Engineer department or a Physics department then check with them, they might know or cook up something you can use.

A pyrometer is based on rock that electrically polarizes when exposed to heat with the amount of polarization dependent on the temperature, sensitive enough to detect body heat. The expensive part is the electronics to read that as absolute temperature yet a PIR detector that uses the same principle gets around that expense by comparing output from 2 different pyrometers to look for difference. Suppose you had one looking in the hive and one outside, then if you have outside temperature known closely (1 expensive sensor) you can work with the comparative readings of many cheaper sensors inside versus the well known outside -- which would need calibration. You won't be able to use the PIR movement sensors as the two eyes on those are too close, but the principle may be something the physicists and EE's might get their own project out of.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

afremont



afremont, thanks for taking the time to look over my proposal. I'm expecting to know if I get my full grant or just partial funding (which probably can't support 3D temp profiling, where full would) by the end of the month. I'm going to need assistance in designing circuits, or boards. I have some help already but any and all people who want to help with the project is welcome. :) I want to keep this thread going with updates as we go and all relevant circuits, boards, files and code to help anyone else who wants to do what I'm doing.

I agree that bees definitely need studying, they're EXTREMELY important for the health of our plants, ecology and us! Plus even if this isn't ground-breaking research, its good for undergraduates to learn the process of experiment design, data collection, and analysis. ;-)

With the sensor it should have a variance of 0.5C, correct? Would calibration of each sensor help? Is each off a specific amount that could be corrected if you knew the offset? Or is it random/variable?

Ultimately the range I'm looking for is 33-36C or 34-35C. It's a fairly narrow range, but it's not fractional of a degree but whole degrees. Obviously I need high precision sensors, but I can't afford EXPENSIVE sensors. The $1/sensor range is about my limit.



I would plan on calibrating each device before installation so that you know what the real temp is.  Accuracy and precision are two different things, you probably already know.  The sensor might be off by a fixed amount from .5 to 3C depending upon the specific sensor resulting in fairly poor absolute accuracy, but precision and relative accuracy might be very high in that a .1 degree change really is a .1 degree change to a high degree.  I think you'll care a lot more about the fractional degrees than you might think.  Once you graph some logs of temps measured to a tenth of a degree you will see interesting cycles in the data that you would otherwise have missed.

Experience, it's what you get when you were expecting something else.

kasslloyd

I'd be happy to get fractional degree changes with these sensors, i just didn''t think it was possible. :)

afremont

The linear sensors like LM34 and LM35 are 10mV/degree so if you have mV resolution with the ADC you can get 1/10 degree readings.  As long as the measured temp is less than about 110F, the LM34 can be read using the INTERNAL ADC reference getting you .1F resolution.  That's what I do for my indoor sensor.  You can always create and expanded scale for a narrow area by amplifying and shifting the signal from the sensor.  The Dallas 1-wire sensors give up to four bits after the decimal place for a resolution of .0625 degrees C.
Experience, it's what you get when you were expecting something else.

kasslloyd

First step, crazy me spent like a day and night figureing out Fritzing, and attempted(?) to create a shield for a Uno that will serve as the weather station.

http://fritzing.org/projects/fsu-weather-station/

It's obviously conceptual, not built, don't have the parts, just melding a bunch of circuits together to get one board.

* Has a separate board that will hold the SD card and a OLED display for quick view of the weather/time.
* Has header to link a GPS module to use to get accurate time.
* Has RTC chip
* incorporates all the sensors discussed so far:
  * RJ-11 jacks for the wind speed/direction and rainfall sensors
  * Barometric pressure I2C breakout board
  * Light sensor
  * Three DS18B20 (one on board and two headers for off-board water proof sensors, one to be a wet bulb sensor, and one for soil temp)
  * The humidity sensor SHT75 was suggested would probably interfere with the other I2C sensors, so a I2C multiplex chip was added to separate it out on a separate bus (PCA9540BD)

More eyes I can get on this large circuit the better.. the breadboard layout is how I built it, so it's somewhat make sense there, I can't figure out how to get the schematic view to do the autotrace, probably need to rearrange the stuff far better then I have. The PCB view though works, and I tweaked the silkscreen layers, added some logos.

Go Up