After buying a home with a chicken coop (and not owning any chickens) I decided it would be the perfect place for a mobile weather station. Then I actually got chickens.
There are basically three components to the backbone of my chicken coop electronics:
- Microcontroller
- Battery and management system
- Solar charging
Microcontroller
For the microcontroller, which acts as the brains of the operation, I used a very inexpensive esp8266 board called a WeMos D1 Mini. This is a super easy way to add WiFi control to just about anything that uses electricity, and one of the main advantages of this controller is the ecosystem of 'shields' that plug right on top of or below the WeMos board. Be sure to solder in the double sided headers, so that you get electrical connection both above and below.Battery and Management System
I started by sticking a solderless breadboard onto the inside of a small tupperware container. Then I put in a wemos d1 mini charging shield.I used this battery at first, but then decided to make a bigger one that's got about 4x the storage capacity. Why? Because overkill is underrated.
Solar Charging
To convert power from the solar panel into a form that the battery management system can take, we need to use a voltage converter. Often called a level shifter, buck converter, or battery-eliminating-circuit, this is simply a device that converts from one voltage to another. In this case, we need one that outputs 5v, and takes a range of inputs because the solar panel will produce very different voltages depending on how sunny it is at any given time.This BEC is a very inexpensive way to generate that 5v power, and it takes anywhere from 6 to 28 volts, which should be plenty for a small solar panel (though be sure to check your panels max output). If you use a larger solar panel or stack two together, you should use something like this higher voltage BEC, which can take up to 50v.
WeMos Charging Shield - this manages the battery and charges when it has 5v on the USB input |
WeMos Installed |
I used a cheap solar panel I had from another project. It's a "12v solar panel" which means that it goes up to 17v when the sun is bright. Ensure whatever dc-dc converter you use handles that just fine.
I was too cheap to buy solar panel brackets, so I bent some angle braces from Ace hardware. The coop is facing such that the roof angle tilts East, so I fudged the height of the angle braces to point it more south-facing. Not the best solution, but the best I could think of for $1.97. Roofing screws (with rubber washers relocated underneath the brackets) kept the whole thing waterproof.
Board and charge circuit installed with larger battery |
I decided to mount the tupperware container permanently in the coop, with the lid facing out so that it was at least semi-dust proof and splash resistant.
Installed and ready to go |
Cover removed |
So far I've added a anemometer, connected via the phone line cable in the images above, an ultrasonic sensor in the lid of their food barrel (measure distance as the food level drops inside), a pressure sensor on their water barrel, as well as a door actuator that I designed and 3D printed -- in nylon for durability. Basically allows use of a very low power motor, and adds worm gears for torque and so that the door won't move when the powers off. That way it doesn't run down the battery holding the door open.
Holder Bolts Above Door
Bobbin Provides High Torque Required to Lift the Door
No comments:
Post a Comment