Go Down

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

GoForSmoke

You could put the ID into the AVR program as data and have a function to "print it out".

I believe that Afremont has practical experience with DS18B20's. He certainly does with 1-wire.

If it was me, I'd have the sensors in each frame with a molex connector to one AVR per box. 


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

kasslloyd

#16
Apr 15, 2013, 03:17 am Last Edit: Apr 15, 2013, 03:30 am by kasslloyd Reason: 1
Probably have to be something smaller than molex, the frames dimensions are not exactly huge. There would be enough area on the top to carve out and put a circuit board in and then epoxy it in to seal it off from water and secure it... A frame top is 1 1/8" wide and 17 5/8" long. The circuit would need to be pretty skinny to fit embed into the top. Attached is some dimensions of hive boxes and frames. For the brood chambers we'd be using the large size (9 1/8" deep frames).

(here's a source to help understand a hive construction: http://www.beesource.com/resources/usda/types-of-hives-and-hive-equipment/ )

Oops, I thought an AVR per frame... per box is more reasonable. Any good way to give a frame, regardless of which box/position it's plugged in a unique ID that is readable along with all the sensors on that frame?

kasslloyd

#17
Apr 15, 2013, 03:41 am Last Edit: Apr 15, 2013, 03:45 am by kasslloyd Reason: 1
It seems 1-wire devices include a unique ID with them, if that's the case if theres 8 1-wire temp sensors per frame, then if you can pull that unique ID then a unique ID could be generated for the whole board by using those 8 ID's of the chips? Is this feasible?

If that's not doable then maybe this chip: DS2401 it's specificly designed for 1-wire to provide a unique ID, http://pdfserv.maximintegrated.com/en/ds/DS2401.pdf

GoForSmoke

Quote
It seems 1-wire devices include a unique ID with them, if that's the case if theres 8 1-wire temp sensors per frame, then if you can pull that unique ID then a unique ID could be generated for the whole board by using those 8 ID's of the chips? Is this feasible?


Entirely. I'd go with the ID of the 1st device since it's unique and likely 8 bytes or more.

Have you PM'd Afremont?

Here's a USB business card that uses a surface mount ATtiny85, just so you have an idea of size.

http://www.frank-zhao.com/cache/usbbusinesscard.php

The Tiny85 is 8 pins of what the 328P is 28 pins. The surface mount versions are all thin.

The DS18B20 is a bit bigger than a match head. They can be made right into a thin cable.

You could take through-hole AVR's, bend the legs out to the sides and connect the ones you need with female jumpers or female crimp connectors on wires. Solder if you dare, use heat-shrink if you don't. You don't _need_ a board. You only need power, ground, a bypass cap, and whatever pins connect to your sensors. You don't need 16 MHz external crystal either, you can run on the internal 8 MHz oscillator and divide that down to use less power. Epoxy that, it won't be 1/2" thick.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

kasslloyd

Yea I sent a PM.

If its just an AVR per box, then it's size is irrelevent, since it can be outside of the hive, just put a connector on the outside of the box that goes in to connect to each of the frames. Then the AVR for the box can be safely mounted outside. If it's per frame, then that will need some tiny chips, which would be an issue I think. :-\

There will need to be a way for the AVR to tell each frame apart, without any mixups, even if the order of frames change.

I would then assume the AVR's for the boxes would then connect to an Arduino that will read via a serial line the temp data out? Or, we could just actually burn the Arduino patform onto individual AVR's per box, then connect all those back up to the central computer and write a simple program that reads out the temp data every 10 minutes and saves it as a CSV, that would be the ideal?

We could run several Cat5 cables from the hive back into the house, then put individual serial lines on those wires, then connect it all up via USB-to-Serial connectors inside, then a small program to read out those datas and write to a CSV... nothing complex here, just needs to be stable ;-\


Retroplayer

Consider the use of RFID temperature sensors. Each one would have a unique ID, completely wireless, no power needed. And they would follow the frames around regardless of where you put them. You pretty much just encapsulate them and drop them wherever you want.

You may need a RFID reader per box, though because the range of RFID is generally limited (however, there are ways around that.)

http://www.phaseivengr.com/p4main/Sensors/WirelessTemperatureSensors.aspx

GoForSmoke

#21
Apr 15, 2013, 12:35 pm Last Edit: Apr 15, 2013, 12:37 pm by GoForSmoke Reason: 1

Yea I sent a PM.

If its just an AVR per box, then it's size is irrelevent, since it can be outside of the hive, just put a connector on the outside of the box that goes in to connect to each of the frames. Then the AVR for the box can be safely mounted outside. If it's per frame, then that will need some tiny chips, which would be an issue I think. :-\


This is where my understanding of Dallas 1-wire is not so good. AFAIK the 1-wire library only reads on 1 pin but I don't see why an AVR can't keep up with a few such wires. If it's 1:1 then go with Tiny AVR's, I bought 10 years ago from Mouser for $1.30-some each.

Quote
There will need to be a way for the AVR to tell each frame apart, without any mixups, even if the order of frames change.


The DS18B20 ID of the 1st sensor in the frame is not good enough?

Quote
I would then assume the AVR's for the boxes would then connect to an Arduino that will read via a serial line the temp data out? Or, we could just actually burn the Arduino patform onto individual AVR's


Arduino boards are development boards. UNO costs about $25. UNO chip costs about $2.50. The board has the USB chip and USB jack and power regulator, clock crystals and connectors that you don't need as long as you can supply regulated power, solid ground, be happy at 8 MHz or less and not want USB.
The chip is a complete self-contained small computer. Load the code and wire it up, that's all it takes. Add what you need, in-deed.

Quote
per box, then connect all those back up to the central computer and write a simple program that reads out the temp data every 10 minutes and saves it as a CSV, that would be the ideal?

We could run several Cat5 cables from the hive back into the house, then put individual serial lines on those wires, then connect it all up via USB-to-Serial connectors inside, then a small program to read out those datas and write to a CSV... nothing complex here, just needs to be stable ;-\


You can add an SD card to each hive and swap out chips as you do the physical inspections you will be doing anyway. I get SD modules from LC Tech in China, below costs I see on eBay. If you're okay about soldering, a micro-SD to full SD adapter (the thing they usually sell with a micro-SD chip so it can fit & work in a full size slot) can be turned into a module with a few resistors for voltage dividers.. that you only need for 5V operation. If you run your AVR's at 3.3V (I think you can at 8 MHz, know you can't at 16.) then you can wire the SD adapter direct.
I think that SD would be cheaper than long cable runs and the chips you'd need to handle the extra voltage required for long cable runs. Also with cables, you need something running all the time to receive data.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

kasslloyd

The main issue here is the data needs correlated with other data sets by a timestamp, so the weight for example, and weather data, and bee counter, all need the same time stamp. Easiest way I think is to collect it all from the same computer. If everything is collecting on it's own then it's easy for these things to drift since they're not extremely accurate clocks.. ;-\

As for RFID chips... they'd have to be cheap (~$1 each) and I don't think they are.


terryking228

Quote
Yourduino wants $1.50 for a single DS18B20. Want to bet Terry King would give you a volume discount on 100+?
http://yourduino.com/sunshop2/index.php?l=product_detail&p=134


Yes, I'll do that; Kass, you'll see an email from me soon. 

About DS18B20; you can put MANY on a cable with +5, Gnd and Signal wires. Some have used shielded twisted pair with the shield as ground.  The occasional bypass capacitor from +5 to ground is a good idea.

Usually cable capacitance and distance/delay are issues, but in your case both are small.

Since your time per update is "long" there is not problem with an individual DS18B20 taking 500ms or so to return value, and I expect that you could put dozens of DS18B20s on one circuit. So maybe your architecture is the occasional master frame, with 3-pin connectors that point up and down on several 'slave' (Drone?) frames. You could probably use simple .1 inch IC type sockets and pins for low cost. The internal hive environment is pretty benign, right?? 

Some DS18B20 info on the http://ArduinoInfo.Info WIKI here: http://arduino-info.wikispaces.com/Brick-Temperature-DS18B20

I expect you could actually have one Arduino (possibly a Mega) external to the hive, and simply cable to the DS18B20's..  It Would Be Nice if every frame was identical.  At frame build time you would document the individual DS18B20 IDs. Then you can read any sensor and know where it is, and build a 3-D map of temperature.

Let us know what you're thinking about all this...


DISCLAIMER: Mentioned stuff from my own shop...
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Clemens

#24
Apr 16, 2013, 12:47 am Last Edit: Apr 16, 2013, 01:11 am by Clemens Reason: 1
Do you know the HOBOS project at the University of Wuerzburg?

http://www.hobos.de/en/students/hobos-data/beehive.html
http://www.hobos.de/en/students/hobos-live/chart.html

For commercial hive scales have a look at http://hackerbee.com/2012/10/02/meeting-about-bee-hive-monitoring/#comment-21 there is an overviews about existing solutions - most in Germany. Or have a look at http://arduino.cc/forum/index.php/topic,113534.0.html


GoForSmoke

Kasslloyd, do you think there's room to make frames with different sensor and control layouts so that over time possible improvements or alternatives could be tested?
Think of it as allowing for sooner than later evolution.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

kasslloyd

Terry, Thanks for the gracious offer and help with our project. The internal hive environment is.. well.. probably not ideal for electronics. There's decent humidity as they cure the new nector to honey, and any small gaps (6mm or less usually) bees seal with propolis, a resinous material. They also seal up any larger gaps with wax. Space clearances around the frames and between frames and the walls is pretty small as well so it's very cramped inside. Water can in theory get in, but the hive we're studying will be protected under the roof of a small shelter, it sits on a scale and that needs protected from the rain.

After discussing it with my professor the largest he'd ever go with this hive is two large super boxes, and several smaller boxes for collecting honey. (a queen excluder is placed between the brood supers and honey super so she can't get in there to lay eggs, so the workers only store honey up there.) So 1 arduino is probably good. By recording the ID of each sensor on the frames before hand, then we can with paperwork keep track of where a frame was in the boxes at any time and where it gets moved too. So as long as the CSV file logs the ID of the frame, probably ID of first sensor, then we can organize things.

Clemens, yea I've looked at HOBOS, they seem to be getting FAR more funding then we could ever hope, one of their cameras is probably more than we can hope, lol. We've been collecting weight data for two years now using an Adam Equipment GFK 660A digital scale, they offer a software package that you can log the weight into a CSV file at specified intervals. Doubt theres any easy way to make an arduino interface it, it uses a serial connection, but yea. We're fine with keeping that setup for the weight, we just have a serial cable ran to the house from the hive, and a power line ran to the hive for the scale. So power isn't an issue at the hive site.

GoForSmoke, It may be possible. The temp sensors are not cheap and in bulk it's still going to be a lot of dollars for the sensors alone, that combined with finding someone to design the circuits, the circuit boards, cost of getting boards made, and the other equipment, we may not have much money for exploring alternative designs. We're basing our design off of another experiment (http://mietz.imkerforum.de/) so we're not going in blind on design, but alternative ideas would be helpful. The bees generally don't build hive out to the edges of the frame, so putting sensors on the edges would generally be a waste, and they generally start putting brood cells in the center of a frame, so biasing our measurements toward the center seems to make sense.

Do you have suggestions?

kasslloyd

#27
Apr 16, 2013, 09:59 pm Last Edit: Apr 16, 2013, 10:07 pm by kasslloyd Reason: 1

This is where my understanding of Dallas 1-wire is not so good. AFAIK the 1-wire library only reads on 1 pin but I don't see why an AVR can't keep up with a few such wires. If it's 1:1 then go with Tiny AVR's, I bought 10 years ago from Mouser for $1.30-some each.


I think for at most we'd be using 160 sensors (two boxes, 80 per box) that 1 arduino can probably be setup to query all those sensors. We only need a temp reading every 10 minutes or so per, at most 5 minutes, I think that even with that number of sensors it can read them all out.

Quote
The DS18B20 ID of the 1st sensor in the frame is not good enough?


Yea, I wasn't thinking that the chips had an ID that you can get out of them, now that I know they can that's more than sufficent to tell the frames apart.

Quote
Arduino boards are development boards. UNO costs about $25. UNO chip costs about $2.50. The board has the USB chip and USB jack and power regulator, clock crystals and connectors that you don't need as long as you can supply regulated power, solid ground, be happy at 8 MHz or less and not want USB.
The chip is a complete self-contained small computer. Load the code and wire it up, that's all it takes. Add what you need, in-deed.


If i have a good wiring diagram I can probably translate that into a custom board for this, instead of buying prebuilt arduinos. But the cost of a prebuilt one is probably not bad, that and they're likely to be more reliable than one with my noob skills could make, and it's easy to replace if it fails since buying another is trivial. We're looking to make sure it's easy to replace a failed piece of hardware, so off-the-shelf stuff would be preferred over custom stuff, custom stuff will need to have extras made initially so they're ready to be swapped if something fails.

Quote
You can add an SD card to each hive and swap out chips as you do the physical inspections you will be doing anyway. I get SD modules from LC Tech in China, below costs I see on eBay. If you're okay about soldering, a micro-SD to full SD adapter (the thing they usually sell with a micro-SD chip so it can fit & work in a full size slot) can be turned into a module with a few resistors for voltage dividers.. that you only need for 5V operation. If you run your AVR's at 3.3V (I think you can at 8 MHz, know you can't at 16.) then you can wire the SD adapter direct.
I think that SD would be cheaper than long cable runs and the chips you'd need to handle the extra voltage required for long cable runs. Also with cables, you need something running all the time to receive data.


Yea... SD cards could probably work. There is a laptop that is running all the time anyway collecting the weight measurements from the scale. So having a computer on to collect data isn't an issue. Alternatively we could get a Raspberry Pi that sits at the scale site and have it collect data from the hive and timestamp everything with it's central clock.

It would be nice if someone could figure out a way to get the scale data and have a Raspbery Pi read it or arduino.. lol. But that isn't necessary. I'm trying to think of something crazy, like a WWVB receiver that way everything is timecoded to the atomic clock, then probably one for USB on the PC that will also synch it' s clock. Then everything will have the same time stamps.

Just making this more complex I'm affraid... lol. :-\

Clemens

I think it depends really on the goal you have with the temperature sensors. Michael (from http://mietz.imkerforum.de) included the sensors--I think it was some TI stuff with I2C--in the comb foundation. This may be good for (old) brood measuring, but is not helpful for monitoring small and fast changing temperature differences, e.g. as they occur in pre-swarming. The especially with honey cells coated sensors do react very slow, nectar / honey, pollen absorb temperature and so you will not get the real degree between the combs.

GoForSmoke

Time... RTC modules are pretty cheap if you shop. In fact, if you do a deal with Yourduino (Terry King) for the DS18B20's, see about Real Time Clock modules as well. Bigger deal should get bigger discount?
Worst thing I find about Yourduino is that the prices are so low the shipping ends up a larger part of the total, but I guess he could raise prices so that wouldn't be true.

If you run cables then you should be able to use them to power the data collectors. You could also run time signal through the cables.
How many hives will you be getting data from at once? Each will give how many bytes of data per hour? And I feel sure that you will need at least 12V for long cable data transmission, but my experience on that is old and that may no longer be true.

Can you get the temperature of the air the bees circulate, even just at the exits?
Can you put pyrometers above the space between the frames? You *might* not have to do them all if you can extrapolate from the ones that have both.

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

Go Up