Monday 11 April 2016

The HivePi Camera!


Autopsy saws are very difficult to come by in Cairo. To buy one you need to be a certified dive instructor with at least 150 years experience in extracting raw minerals from mushrooms.

Today I'll be talking about my Hive Camera. 

Mashroo3 hive
Beeso Hive 1
Some background... My brother started to keep bees a couple of years ago. It's something he's wanted to do since he was a child. So at long last he got his silent partners to cough up some money for some hives, and start an apiary.

Bees are fascinating insects, they act together as a community for protection, survival, resource management, and general buzzing around annoying the odd middle aged person into dropping their drink, spilling said drink onto neighboring middle aged people, freaking out a few others in a cascade effect panicking a whole group of people (who under normal circumstances would be enjoying a sunny Sunday afternoon) from under a canopy into a pond, or in the worst case scenario; sting an unsuspecting bystander and consequently dying shortly afterwards. We also (kind of) steal their food supply and call it honey.

A very large swarm of bees that has settled
Generally bees act as a group, unless they are outside a hive, or have some disease. The male bees (the drones-- Haploid genomes) fertilize the Queen bee (Diploid genome) which consequently lays fertilized eggs for female worker bees (Also Diploid genomes). Any unfertilized eggs develop into Haploid drones (if they are allowed to by the worker bees--- in the winter, when resources are low they are murdered by the womenfolk! -- As are diploid drones). Generally the Queen never leaves the hive except to have sex, which she does with multiple partners. A swarm of workers protects her guided by her scent, and sometimes a new colony is formed when he highness decides she's not going back to mum's place.

Newly occupied frame

Anyway, to cut a long story short, this year, we replenished our hives (bought new colonies). Sometimes they don't like where they live so they decide to go apartment hunting. One such colony decided to find an empty box (used for demonstration) to settle in. I was just mucking about in our garden and lo and behold there were bees in there.



Not being at all interested in bees, I thought it would be really cool to spy on them. And so, with a raspberry pi in hand, I set forth to disturb their nest of femininity and intrude the harem......


After testing the raspicam I bought, I decided it needed to be focused a little better. After all what good was checking on the ladies if the image was going to be fuzzy? There are apparently 2 ways to do this. One being to twist the lens on the raspicam to adjust the focus, and the other way is to stick a lens on top of the raspicam making it's effective focal point closer.

Raspicam with a 4+ diopter lens on a mount
Being the electronics destructor that I am, I opted for option 2. I had previously purchased a set of 52mm lenses for a cannon DSLR lens that allow you to come disturbingly close to your subject. It's great if you want to make people feel a little awkward. And it makes for good photography! People's grimaces are a spectacular way to capture human emotion... The images however aren't as appealing to everyone.

ANYHOW... I've tried 4+ diopter and the "macro" lens, and both work well for different distances. I found that the macro one, allows for a real closeup to the hive frame.

The Kit... with connectors

So here is a list of the essentials so far: 

- a Raspberry pi 2 ( an A+ would have sufficed, but can you believe I can't find one!)
- A 5mp Raspicam
- An extra long raspicam cable (the longer the better)
- Wi-fi dongle
- Long USB power cable
- 10000mAh power block.
- A suitable hive
- A suitable light source
------------------------------------------I also added
- An electronic Hygrometer/thermometer (grove) from FutureElectronics
- A laptop
- Protective gear (for the hive)
- A tripod

So I may have fumbled on the light source... I had to choose something that isn't too bright, or something that will get too hot... so I made a custom LED fixture. However... it's not very bright, to the point where I can't really see anything. I tried putting my phone inside the hive in the hope that the flash light would show something when I covered the lid, but it was pointed to the wrong direction. So the solution I guess is more LEDs with a reflector, which presents a size problem, but we'll cross that bridge when we come to it.

The LEDs on both sides

The Wiring

Sunday 10 April 2016

A LONG long time ago !

SO, it's been a while since I blogged last. For reasons I might go into, I've been a little busy, learning about the Raspberry Pi, and building different things with it. My latest is a Hive camera, which I have a video for now (But won't post until tomorrow).

I've also successfully built a couple of rovers that can be controlled over a wi-fi connection. I've also tried to control them over the popular (and cheapish --in Cairo) nrf24L01+ radio transceiver, with little luck (But only because I'm very impatient as you might expect).

Also there is the programming, quite a steep curve.

So anyhow, here are some pictures of the inventions/copies.

This is the KodiBot. Basically the Legopi running Kodi. I had to make it a little more friendly for my Nephew.