This is a model of a seedy chicken motel controlled by a PIC16F13145. Your laydies will bask in the lap of luxury as the PIC meets their every need and desire. Red lights, automated doors, no judgment.
This project was off to a nice start when I accidentally shorted my PIC16F13145.
I used AI to help write the code, but it required a lot of troubleshooting, and since I can't test it now I'm not going to include it today. Look for complete code in future updates! Read on for a summary of all the features included.
The PIC & Lay is equipped with a motorized roll-up door. It opens at dawn and closes at dusk like any respectable henhouse door, but also includes a current monitor to stop it from moving if it starts hitting any serious resistance. This should keep it from closing on any chickens. It will attempt to close once more in 5 minutes and notify the pimp -aka farmer- if the door isn't at the correct limit point at that time.
When the door is closed a motion sensor monitors the vicinity for intruders. If any are detected the PIC plays a loud recording of a dog barking. It also shoots water in the direction of the motion and sends a notification if it happens too often.
Food and water levels are monitored by sensors. The PIC has the ability to open a water valve to fill the water, but in winter the pipes would freeze so instead it just notifies the farmer that chores are pending.
Each chicken is fitted with an RFID legband by his pimp and an IR sensor at the door detects whether the chicken is entering or exiting. Chickens like to go home at dark but sometimes free range means they don't make it home. If one is not accounted for by closing time the door stays open for an extra half hour and the exterior lights come on. All chicken traffic will be recorded by the PIC for future subpoenas.
Chickens cluck a lot when they are laying eggs, but also if they are stuck or injured. Any continuous clucking sounds lasting longer than ten seconds will automatically trigger an egg alert.
The nesting boxes are equipped with small cameras that look for egg shaped blobs or motion. Any detected eggs will trigger a notification. The touchscreen allows the farmer to record the number of eggs collected each day. A setting hen will send the farmer a happy dance gif and start the calendar to predict the arrival of the fuzzy little bundles.
A temperature sensor tells the PIC to turn on a water warmer if the air drops below freezing. It also tells the PIC to close the window louvers on cold days and to open then on warm days. If it gets too hot in the palace a fan will turn on.
Chickens are messy and farmers are forgetful. A methane detector let's the farmer know when it's way past time to clean the place up.
In Winter the daylight hours grow too short for egg production. To remedy this the PIC will count the number of hours between opening and closing. If it hasn't been long enough an interior light will come on for just the right amount of time to keep the lay-dies happy and healthy.
In the future perhaps a cricket or worm farm can be automated so that a few can be released into different chicken feeder toys each day for environmental enrichment. However, before that can happen my PIC is going to have to upgrade to some other communications type because it's running out of I/O!