25 September 2013

Arduino chicken door project taking shape in hardware

You may recall last year we built a chicken coop. Well, since then it's been a daily chore to open and close it dawn and dusk to keep the chickens in and other critters out. I mentioned last October that I was using a microcontroller to automate this task, so now I'm finally soldering it together:

 

As I mentioned earlier in this blog, I'm also making a smart swamp cooler controller, but as winter approaches getting up to let the chickens out in the snow makes this project a little more urgent though.

Some people like to etch their own printed circuit boards. I've never tried it, but I understand the acid used is nasty stuff. So, I just bought some "perfboard" which is basically a universal circuit board. Connections are made on the bottom side by globs of solder or in the case of my +5VDC rail, a random chunk of wire (a clipped lead from a resistor, I like things that are free). Topside, I made connections with little bits of 24AWG Cat5 wires. (Cat5 is cheap and I had some laying around.)

The project consists of the Atmel Atmega328 AVR microcontroller (the rectangle on the bottom right of the brown board), a ChronoDot real-time clock (blue circle top left), a voltage regulator (green sticky uppy thing top middle), and a twin relay module (off to the right, connected by wires). Not shown are a red and a green LED that I'll aim at the (human) house so we can see if the door is open (red) or closed (green) by looking out the window. Also not shown is the $10 thrift store cordless drill that will actually raise and lower the door by turning a threaded rod like a screw drive garage door opener.

The blue rectangle sitting separately and with the green and white wires coming off it is an Arduino Nano, which is used to download my program from my PC and into the Atmega microcontroller.

The whole thing will be powered by a solar cell (the kind sold to keep your car's battery from going dead) and a little 12V motorcycle battery. To save on battery power, the microcontroller actually spends most of it's time asleep -- only waking once per second to get the date and the time of day from the ChronoDot, calculate the current position of the sun for my latitude and longitude using the TimeLord library, and based on that information activate the relay module to run the motor and raise or lower the door if appropriate. Whew!


The brass brillo pad you see in the pic is something new to me, a waterless soldering iron tip cleaner. It works as well as a wet sponge, and doesn't turn my soldering iron's tip black as much as water does. I also purchased a "sal ammoniac" block to clean built-up black stuff of the iron tip. Makes a lot of smoke and actually works (if the iron is hot enough); these two items should save me some money on buying new iron tips all the time.

No comments: