Hi @richardfreeman, thank you for your interest. No we’re not closed for the winter - the bees are still bringing in some Himmilayan Balsam pollen and the queen is still laying. However you can see from the temperature profile across the cluster that the area with brood (above about 32.5C) has contracted quite a bit since mid July.
I’m going to keep monitoring through the winter to see how the cluster shrinks and see when they start to grow in the spring.
At some stage I’m going to swap the optical sensor for a second microphone so I can subtract background noises. When I have enough data I’ll do some pattern analysis - K means or Kohonen mapping to start with for data “compression” and clustering for classification. I’ve been thinking about putting the classifier onto the Spark so I can send the temperature profile and audio classification straight to an Android phone but at the moment the FFT is a bottleneck.
The GPRS variant is on hold until I’ve seen how I get on with the (not bee related) noise cancellation project - I’m getting more of the bits I need for this today having cooked an ST2012 audio amp last week.
I just wanted to chime in here with data length that you can store the data in 12 bit values (a 12 bit array). Normally you would be able to do this with bit fields, but you can’t do that with the spark compiler (issue filed).
I will be writing a library fairly soon to make this simpler for people, as it is something I would like to do.
On a separate note: @phec – can you post your working UDP code and python code in a gist? I would like to make a few libraries for doing UDP on the spark. If the code at the beginning of this topic is your final iteration, could you let me know?
Edit: I’m looking for a simple way to push data to a server through UDP – and this looks like the right place to look!
I’ve put the latest version with the primitive watchdog into a Gist. There is the spark cpp file, the python file that runs on a Raspberry Pi to control the Spark and a very short python script to plot out the daily audio measurements.
BeeMonitorGist
@CloudformDesign, if you are pulling together what you can find on UDP you may be interested in:
EnergyMonitorGist
which seems more reliable probably because it has a more robust WjFi link. I expect that the code uses functions that have been renamed in the latest version of the core software but I haven’t had to recompile so they are still the old version. To squeeze the data into the available space I converted the ADC data to 8 bits.
Having slowed the optical sample rate down to 666Hz I’m getting something that looks a bit more sensible out of the optical data:
This shows the variation in light level in the hive (the light source is daylight coming through the entrance) as a spectrogram. The flat periods are nighttime. The increases in higher frequency content are presumably greater bee activity and are accompanied by a lower DC light level since the entrance is partly obscured.
Someone has pointed out this Hackaday project which does something similar.
Hey Phec!
Great Work what you’ve done! I used some of your information to get the Fast Fourier transformation working on the spark core. It’s able to calculate about 400 samples. I’m wondering why you can’t get beyond 490 samples with your code only capturing and sending the samples. Maybe worth looking into the kiss_fft data structure for the fft_input.
More about that on opensourcebeehives.net
keep tuned!
Ron
Any news on the kit there @phec and how it faired over the winter? Hope all is well. Yours, Richard
@richardfreeman, I’m afraid the Spark didn’t survive the winter. I couldn’t open the hive to check the hardware until a couple of weeks ago. It turns out that the Spark itself and the software are running fine but the WiFi range has dropped substantially to the level where I can’t communicate with the Spark when it is more than a few meters away from the house and nowhere near the beehives. It is the WiFi module/Spark rather than the antenna that is causing the problem.
At about the time I got this particular Spark - May 2014 I see that there was quite a bit of activity on this forum with people having trouble with cores that seemed dead on arrival and I think the eventual fix was to dry the cores out. I suspect that over winter the humidity got the better of the WiFi module.
I’ve ordered an Electron with all the solar goodies, so the bee monitoring will probably be on hold until the Electron arrives in the autumn though I will also think about whether I can redesign the Spark layout so that I can swap Sparks without having to open up the beehive.
@phec, you may need to consider a heated enclosure for the Core/Electron to prevent moisture from building up. Or, perhaps potting the device to create a hermetic seal.
@peekay123, yes - good point. Heating is tricky to engineer with only a solar power supply. Hermetic sealing looks the route to pursue.
The bees keep the centre of the hive a steady 30C and the humidity between 50 and 60% but this area is inaccessible as a site for the electronics.
Looking at dewpoint tables for 60%RH at 30C gives me a dewpoint of 21C.
The Spark, located just below the cluster, was between 25C and 30C for the whole summer and into the autumn. However early in October when the ambient humidity was high the Spark temperature dropped to below 20C and a few days later I lost WiFi. I guess in hindsight failure was pretty much guaranteed.
When I first put the Spark in the beehive in the late spring the bee colony was very small. The Spark temperature dropped well below 20C every night until the colony grew bigger but the ambient humidity was low and the small cluster of bees was far enough from the Spark not to affect it as a source of moisture. In contrast by October the ambient humidity was high and the cluster of bees extended quite close to the Spark.
I think your hermetically sealed suggestion is my best avenue. I won’t have a problem sinking any heat from the Spark as it only operates intermittently. I’ve already found from the PV/battery box that sits outside the hive that I’ll need to pay careful attention to effective sealing of the the power, antenna and data leads. Maybe I’ll try the experiment with a relatively cheap Photon first.
@phec, great points all around. You are not the first who will be considering potting the P0/P1 so it will be interesting to read about your experience. Where I am located (Ottawa, Canada) the temperature and humidity range is insane and hermetic sealing or enclosure heating are the only options. The sealing of the other components is another challenge as you pointed out.
I was talking to a very active beekeeping society on Saturday. They are interested in digging further into this technology. Unfortunately I see that the pictures have disappeared from this post (they were large).
I will look out my originals and forward a dropbox or onedrive link by private message if requested.
Yes, I don’t think I have any here at the moment @phec - maybe you could grab these from Google’s cache instead? Was it a group affiliated to the BBKA? I have found many local groups reticent about getting involved. We have the first version of the www.beelab.org kit coming out soon I hope - watch this space!