Wednesday 28 January 2009

FieldCam - A Solar Powered 3G Wireless Webcam!

Of course, the first thing to do when you buy a field is to set up a webcam in it so you can see what's going on - well, maybe that's not the norm, but it seemed like a fun project and a great way to bring the field "alive" for the family. The final plan is to have a digital frame on the wall in the kitchen, which updates with the latest picture from the field, but first we have to get some pictures somehow.

So, where to begin. The field has no power, and obviously no internet...

Power can be solved to a degree with batteries and solar panels, and I've done some playing around with those before so it seems an obvious place to start. For size and cost reasons I picked up a 12Ah battery from Maplin (about £30), and a 15W panel (and 5A charge controller) from ebay (about £70). I found some figures to suggest that a 15W panel should provide 6Ah of power on a sunny day, so that seemed to fit well with the battery at least. Of course, bigger would definitely prove to be better in both cases, but these should do for now.



One of the decisions I made early on was to conserve power and bandwidth by turning the whole system on every so often, taking a photo, sending it, then powering down. I had a breakthrough here when I discovered the REUK site, a great resource for bits for renewable energy projects.
The guy who runs the site, Neil, also builds custom circuits and very quickly created a module for me which would power-up every hour, check that the voltage of the battery was 12v or above and if so, flip a relay to provide power to the rest of the system. After 15 minutes the relay opens again, and the system powers- down. If the voltage is less than 12v then we just skip that cycle, and give the battery another hour to build up charge. 15 minutes was chosen for reasons that made sense at the time, but actually is far longer than the system needs to be on. I've since asked Neil to re-program the chip on the board to only stay on for 5 minutes - which should give me more photos per day before the battery goes flat.

Internet access is provided by a 3G USB modem - on a Pay-as-you-go plan from 3, for just £10 a month.  I did some tests using a laptop in the field (field tests?!) and found that 3 gave me much better results than O2, which barely worked, and I also liked the lack of commitment in a PAYG plan - so 3 it is.

The USB modem is plugged into a clever little router that 3 sell for about £70 - the Huawei D100 - this can be configured to auto-dial the internet through the USB modem. It also has a network port and a WiFi network built-in.

There was a little wrinkle in that the D100 has a soft-switch, which needs to be pressed after the unit is powered before it will turn on. That foxed me for a while, but then I opened the unit up and soldered some flying leads around the soft-switch. Quickly shorting those together did the same job as pressing the switch (obviously I guess, but I needed to check). Now all I needed to do was automate this shorting process after power is applied to the D100. A quick email to Neil at REUK, resulted in a solution in the post the next day. This module waits 2 seconds after it is powered up, then closes a relay for 0.5 second then goes to sleep, with the relay open. I wired this into the D100 supply and the flying leads around the switch, and sure enough - my modified D100 automatically goes online after it gets powered up without me needing to press the "soft" power button. My rough measurements suggest that the D100 draws about 200mA when its up and running - with 3G and WiFi turned on. That seems good to me.

The final part of the solution is the camera, which needs to be outdoor-proof, IP capable, and be able to schedule a send of a photo preferably by email.
I chose the Y-Cam Black and its weatherproof shell, for about £150 all told. This is one bit of the solution that I think might be over-specified - the Y-Cam Black has night vision, which might be cool so we can see the field at night. And it has WiFi, which I first thought I needed but actually don't use, preferring a wired network connection straight into the router. The biggest issue I have with the Y-Cam  (aside from its bulky ugliness) is its current use, which I measured at about 300mA - and that is with WiFi off and in the day time, so the night vision LEDs are turned off. On the upside, it turns on and finds a network without any fuss, and can be scheduled to take and send a photo to an email address, so it does the job. I will look out for another cheaper and hopefully less hungry camera for this project though, as I can always make use the Y-Cam at home.

So, to recap - the FieldCam has a battery which is topped up by a solar panel. Every hour it powers up, checks the battery level and if that is ok (over 12v), flips a relay to provide power to a mobile internet router and a camera. The camera in turn is set to take a photo and send it to an email address (through the router) some time later. Then it all switches off and hopefully charges up a bit and the cycle starts again.

The final part of the assembly was a big waterproof box to put it in, which again came from ebay - I think its real job is to keep extension leads dry when you plug your Christmas lights in - but it was the right size and a reasonable price.

Here's all the kit in the box - ready for deployment. The battery is easy to spot, then the two blue relays on the custom mmodules. The D100 router is underneath to the right, and the camera and solar panel are out of the box, not in shot.


The plan is to leave this gear in a field and have it send photos to me while its unattended, so I've got to worry a little bit about making it and its parts robust and secure. I did this by making a sort of wooden sledge, which has the advatange that I can carry it, but its quite big and awkward to carry very far.

The picture here shows the sled in my garden, prior to deployment. The waterproof box sits on an old decking tile, underneath the solar panel. A strut goes across the lid of the box, so a screwdriver is needed to get inside and see what's going on. Hopefully this will prove enough to discourage any casual walkers who stumbles across the set-up!

Friday 16 January 2009

A little piece of Wales


Just before Christmas we finalised the purchase of a small field, a few miles from our house in Chepstow. The field is 3 acres, and located at Trellech Grange - about 15 minutes away, and 100 yards or so from the Fountain Inn!

So, why buy a field? Good question - and one that many have asked! One reason is investment, it just seems more fun than having money sitting in the bank, and should at the very least hold its value, if not grow over time.

The other reason is just that its somewhere to go to do projects and have fun - we've got a few ideas - like planting apple trees to make juice and cider, planting some trees to make a small woodland, digging a wildlife pond and of course its somewhere to go camping too! And as the kids get older, I'm sure we'll find more and more things to do with our own little piece of Wales!