The Kippencam -- starting a new project
04 Jun 2012
I have started a new project: I want to make a webcam in the chicken coop. The poor chickens are out there all day, out of sight of the house. And when we’re away, it would be good to be able to check on them now and then, and make sure that they’re not getting up to any mischief. Wouldn’t it be cool to be able to snap pictures when they’re up to no good (like eating that mouse they found, or jumping over the fence, again….)? And it would be a great step towards all kinds of cool automation projects, starting with automatic door closing at night.
- To be self-powered: no running power lines through the garden
- Wireless connection to the house: no running ethernet cables either
- At least one webcam, preferably HDTV quality, preferably extension to 3 cameras to be possible in the future
- Reasonably self-managing and low-maintenance
- Low cost: we’re getting married this year
The main idea for this project came from “How to set up a solar powered webcam server using NanosG20 running Debian” by Janisalnis on instructables.
Building from this idea, janisalnis already makes the recommendation that modern routers are a much smarter way to go. And on his homepage there are many examples of the results of his great projects. There, he links a presentation that really drew my attention. He is a really creative guy!
On one slide, he refers to the TP-LINK WR703N, a small router with less than 1W power consumption, yet quite a powerful CPU and USB 2.0! He already refers to a list of possibilities, like HD webcams, USB audio and Arduino linking. Cool stuff! Shockingly enough, these powerful machines sell on ebay for less than EUR20 !!
And I have played with OpenWRT before, so this is starting to look like a great thing. The first two TL-WR703N’s have been ordered, cannot wait for them to get here from Hong Kong!
UPDATE: I later learned that there is a slightly larger, but largely similar router that can be bought in Europe for a bit more money (but without the long wait): the TL-MR3020. I already had my orders for the smaller one in, but maybe it can be an option for later.
Some reading on the TL-WR703N
- OpenWRT wiki with all kinds of hardware details
- Another wiki page with the related and very similar router MR3020
- A forum discussion that shows how to do I2C with the WR703N. This means that we can control all kinds of hardware without messy Arduino links. I am definitely going to try this.
- Loads of instructables presentations by janisalnis that include a plethora of step-by-step guides on everything from hardware to software.
- A great introduction into the fun of the TL-WR703N by the Embedded Times.
- A slightly messy piece in the OpenWRT wiki on I2C
- A Finnish site that mentions the external antenna: This is something I will need to do.
- Forum entry that details the external antenna method
- If I manage to screw up the firmware, we may need this to recover (serial port)
- On hackup.net, there are some nice articles about using OpenWRT for controlling hardware. This article details one way to use a USB stick for storage, and installing Ruby (without serial support)
- A great writeup on adding extra internal usb ports. I will probably just go with an external hub. Why squeeze everything into a small space for this project?
- A detailed list of stuff on hardware control using the WR703N, including Arduino connection and cross-compiling
- A writeup of getting usb audio to work (cool)
The chicken coop is located in the garden behind my house. This could be ~50 meters from the current location of the main wireless router. Also, the signal needs to pass through several brick walls. All in all, there is no chance that we will have a connection using any simple method. Indeed, even my MacBook (which has a great antenna) does not get a connection in most of the garden.
So how to get this to work? I will probably add a cantenna to the WR703 in the garden to get good reception and either move the main wireless router to a better location (the attic?) or set up a repeater somewhere in the house, possibly also with a cantenna. This will take some experimentation.
For the start of the project, I will go with direct solar powering from the panels. No storage. Once the principle has been proven, I will be charging a battery. I did some research on Open Source solar charge controller projects with the idea of making my own charger. While there are some very nice designs around, I really prefer to go with a proven technology. I want the development of the camera to be the fun part, not the screwing with a battery charger. Ultimate efficiency is also not a parameter for me, so I will probably go with either one of these 2 options:
- Steca SOLSUM 6.6F (from Conrad probably)
- MorningStar SHS6 (probably from Sunnyside on Marktplaats)
And realistically, at around EUR 20 a piece, there is not a lot to lose.
Solar panel prices have dropped a lot recently. The cheap made-in-China panels are dropping close to the EUR 1 per Watt-peak mark at the moment. Of course, I have learned from reading, that the cheap suppliers can be quite optimistic regarding their specified Watt-peak values. So in fact the more expensive panels from ‘real’ manufacturers are supposed to be worth the extra cash. For me, a factor was the availability of reasonably priced small panels on the Ebay was good. I purchased 2x 30W panels from Enjoy Solar in Bremen, and will see how they perform. NOTE: There seem to be many sellers on ebay that do get very good reviews, but also rack up significant negative comments. Be sure to check the negative comments for a seller before you buy. I nearly fell for a promising-looking seller, which clearly does not take after-sales care as seriously as any (German!) seller should…
- How to use an external USB stick as root filesystem. I’m not sure how this could affect flash wear: at the moment I will use a cheap memory stick and just see what happens.
- How to enable USB storage, including how to format the partitions for efficiency.
- A very concise list of instructions to get a WR703N up and going. Probably not going to use, because it avoids USB stick usage, and why would I?
- Janisalnis’ short description of installing OpenWRT onto a USB stick: a useful start.