Making a Mini Beast Habitat – Raspberry Pi Style!

My wife wafted a leaflet under my nose that Lincoln had had from school @YsgolBrynHedydd about a Mini-Beast Habitat competition. That’s how it all started. Firstly, its the kind of task that’s right up my street as it involves Lincoln and insects. Not to mention its a COMPETITION. Not that i’m competitive or anything!

So the idea behind the task was to make a mini beast habitat fit for an insect (albeit slow moving from what I can gather, you know, snail, beetle, mere wood louse, that kind of thing) The task involves hunting for recyclable stuff to make the habitat with and then put a range of materials in there to see which habitat particular beasts prefer – grass, pebbles, leaves etc.

So with an old, large Rice Krispie box ready for a makeover, I got thinking how we could make a habitat that not only wins a place in the nature area but also one that would stand out from the crowd. If I was an arts or crafts teacher I am sure it would have been adorned with all manner of paper mache attire, glued and painted in glorified poster paint technicolor. But seeing as I am an IT/Computing teacher, I had to get some tech in there somewhere!

Initially I did a quick sketch and wrote a list of things to consider, I explained to Lincoln why these things were important as we planned our project. He is just happy he gets to play with a Raspberry Pi in the process!
Initial Design


I figured the wifi wouldnt be a problem but as a precaution we emailed Lincoln’s headteacher who confirmed we would be ok and added it sounded really exciting and interesting. Green light, we’re off!

During Saturday 26th October 2013 I spent a lot of the day messing about with “motion” probably one of, if not the best pieces of software for streaming video, thus turning a Raspberry Pi into a webcam server. The problem was finding a camera that was compatible. We quickly discovered, a nice Creative Labs one was NOT compatible, but a cheap and cheerful £4.99 webcam from B&M Bargains works quite nicely.

Just for completeness at this stage, we made sure our Belkin wireless dongle was going to play nicely with the Pi and yes, it worked first time with little to no effort, next job, powering the Pi for large periods of time without external influence. I did lots of research and found that there was half a chance that it could be done using a Solar Powered battery, however from the research it was a bit hit and miss. Bearing in mind this was a competition I could not risk something not working so I purchased a battery pack that would do the trick. This device has a large enough capacity to power the low consumption of the Pi and its 2 devices for a couple of days before it needs to be charged, by which point the learning/observing will have taken place.

All the pieces of tech were now in place, just had to test them all. On the home network things worked fine, the Motion daemon runs at startup and everything was working as it should. Knowing the school use IOS devices, our next task was to do a bit more research to see if there was an app capable of streaming the video content from the Pi. Having discovered Internet Explorer/Chrome and Safari all hate streaming MPEG video from the Pi (Firefox works fine) I thought we were in for a tricky time. Luckily we found a FREE app called iCamViewer which does the job of streaming the video perfectly!


Configuring iCamViewer

The next stage was to actually make the habitat that was going to become the Big Brother of the insect world. In true Geek style, we decorated the cereal box with graphics from Minecraft which we painstakingly cut out and stuck to the box. The camera was then nestled securely inside a Milky Bar Buttons Tube which was also camouflaged Minecraft-esque!

Photo 29-10-2013 16 41 57

Photo 29-10-2013 18 47 45

Photo 29-10-2013 18 47 28

Photo 29-10-2013 18 43 58

Photo 29-10-2013 17 24 56

Photo 29-10-2013 17 07 30

The biggest considerations at this point were how to weather protect the electrical equipment and also where best to place the camera to get the best possible viewing of our bugs! We decided that little plastic tubs would be suitable to shelter the Pi and its power source.

Photo 29-10-2013 17 30 24

Once the habitat was completely decorated we secured all the technology in first so that we could then hide it with materials that would become the habitat.

Photo 29-10-2013 18 59 08

Photo 29-10-2013 19 17 45

Photo 29-10-2013 21 06 19

Photo 29-10-2013 21 06 49

Photo 29-10-2013 21 06 39

We then went on the hunt for materials to put inside the habitat. Scissors and wires down and hats and coats on for this job.

Photo 28-10-2013 15 52 57

Photo 28-10-2013 15 53 04

We glued leaves to the base inside and then placed small plastic tubs “bottom to bottom” inside so grass could go in one and bamboo on the other. After letting it all dry out, a layer of thick cardboard was glued on the underside to strengthen the habitat as it was quite heavy.

Time to test it! We located a friendly little bug in the garden in the form of a snail that was hanging around outside, personally I think it had seen the construction work going on and had his/her eyes on moving in!!
Photo 01-11-2013 13 29 26

Photo 01-11-2013 13 29 35

Photo 01-11-2013 13 29 44

The snail seemed to like it so now it was time for lights, camera, and action as the iCamViewer App was loaded up and the Raspberry Pi was switched on.

Photo 01-11-2013 17 42 00

Photo 01-11-2013 17 41 02

Photo 01-11-2013 17 37 02

That was it, it was all complete, tested, and working. The last job was to get it connected to the network at Ysgol Bryn Hedydd. Thankfully the Head and Mrs Edge were very helpful and I managed to set it up the day before the closing date. Phew!

And here is Lincoln posing proudly with his certificate for 1st Place. He worked very hard on it and I now have a Coco Pops box waiting to be converted so we can have one at home too!

Does anyone know if there is a gap in the real-estate market for insect inhabited properties? If there is Heard & Son could be on to a winner!

Photo 06-11-2013 16 37 05

Hope you enjoyed the post, feel free to get in touch if you would like to tackle a similar topic, I would be more than happy to help and give advice, particularly with the setting up of a Raspberry Pi etc.


24 thoughts on “Making a Mini Beast Habitat – Raspberry Pi Style!

  1. Love seeing this kind of work! I remember seeing your son do the “so easy a 3 year old can do it!” video last year–wish I would have had these kinds of opportunities as a young kid! Thanks so much for writing this up and sharing it!

  2. what kind of processor load does motion produce? I found that on my model As motion would max out the processor and prevent other apps (and wifi) from working. Model B rev2 seems to cope ok.

    1. I did have to mess about with the config file a little bit and not every webcam is supported which makes it look like motion isn’t working. The largest output with the camera I used was 320X240

  3. Hi Allen/Lincoln,
    Great Project, great team!
    Following your obvious expertise and research, I have just ordered a Powergen battery pack. For my first Pi hardware Project I’m hoping to do something remotely, a weather station, bird watcher etc. locating the Pi outside. I’d like to keep the Powergen battery charged using a solar panel but have little to no expertise in amps n ohms! Would you be able to recommend a solar charging system or advise on what to be looking for? Or a reliable / reputable on-line source to reference?
    Keep up the great work kid(s)! 😉

    1. Hi,

      Thanks for your comments, we loved this project. The reason I didn’t do the whole solar powered thing is because I too was not sure it would keep up and being a competition I didn’t want it to fail.

      However, assuming the battery is fully charged to start with I would have thought any mini usb solar panel would give the powergen a trickle charge. Not sure if consumption would outrun the input from the solar panel however but good luck and let me know how you get on!!

  4. This is genius! Well done for such a great project – I’ve been thinking of getting a Pi for our kids, so this has sold the idea to me! Only thing I can’t quite get my head around (though I’ve not used a PI yet) is how you get the webcam footage onto your viewing device (you used an iPhone?) – you mentioned the iCamviewer software, and you have a wifi dongle in the Pi – so is it easy to make the software see the Pi through the wifi – excuse my ignorance, I’d just love to make one of these!!

    1. Yes it’s very easy. Once the pi and motion video is running, an ios device on the same network can see it easily through the icamviewer app. Good luck with your future endeavours with a raspberry pi!

  5. Hi
    just read this – great project! a fox has just had a litter in my Dad’s shed and would like to set up remote webcam to monitor them using our raspberry pi. Can you let me know how to set up motion daemon on the raspberry pi? would stream to ipad/iphone so will download the app.

  6. Hoping this is still monitored, I have a question. Did the webcam steam continuously or did you have some sort of motion capture device? Would you need another device for motion capture?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s