Raspoulette: Solar‑Powered Autonomous Coop Door System Prototype
Hi everyone,
When I saw a Raspberry Pi contest, I decided to turn an idea I’d had for a while into a tangible prototype—meet Raspoulette.
Raspoulette is an autonomous, solar‑powered system that opens a coop door when sunlight arrives and closes it when the light fades. Below is a step‑by‑step guide that covers everything from the hardware you’ll need to the software that makes it work.
What you’ll need:
- Solar interruptor – 1× 12 V relay, 1× LDR, 1× 1 MΩ potentiometer, 4× resistors (180 kΩ, 10 kΩ, 100 Ω, 4.7 kΩ), 3× NPN transistors (e.g., BC547), 1× diode
- Voltage regulator – LM7805, large electrolytic capacitor, male micro‑USB pin
- Motor controller – L293, 12 V DC motor
- Hardware parts – 10‑L bottle, old printer for the rail system, old drill battery, PVC tube, Raspberry Pi (Model B recommended, Model A works too), tape, wooden pieces
- Software – Python
Step 1: Solar Interruptor
The interruptor’s role is two‑fold: it powers the Raspberry Pi on or off based on light levels, and it triggers the Python script at startup.
The circuit uses a voltage divider made of the LDR and the 180 kΩ resistor (plus the potentiometer for calibration). When light hits the LDR, the divider raises the base voltage of the first transistor, allowing the second and third transistors to conduct. The resulting current energises the relay coil, which turns the Pi on.
By adjusting the potentiometer you can set the light threshold that activates the relay.
To launch the script automatically, add the following line to /etc/rc.local before the exit 0 line:
sudo python /home/pi/Poulerail.py
With this in place, the Pi will start the Poulerail.py script every time it powers up.
Step 2: Voltage Regulator
Raspberry Pi requires a steady 5 V supply. The LM7805 is a simple, reliable linear regulator that drops the input voltage to 5 V. Place a large electrolytic capacitor on the output to smooth the current and prevent voltage spikes.
Download the LM7805 datasheet (350 KB) for pin‑out and application notes.
Step 3: Motor Controller
We use a standard 12 V DC motor controlled by an L293 motor driver. The L293 is inexpensive, easy to wire, and provides sufficient current for the motor.
Connection summary:
- Pin 8: +12 V (motor supply)
- Pin 2: Raspberry Pi output (control signal)
- Pin 7: Raspberry Pi output (control signal)
- Pin 1: Enable
- Pin 16: +5 V (L293 supply)
- Pins 4, 5, 12, 13: Ground
- Pins 3 & 6: Motor inputs (forward/reverse)
Refer to the L293 datasheet (204 KB) for full pinout and wiring diagrams.
Once everything is assembled, the Raspoulette will automatically open the coop door when the sun rises and close it at dusk, all powered by solar energy.
Manufacturing process
- Why Rapid Prototyping is Essential for Successful Product Development
- Variable Reluctance Motors: Types, Operation, and Applications
- Simple Pi Robot – Build a 2‑WD Autonomous Rover with Raspberry Pi
- Comprehensive Bipolar Stepper Motor Library for Arduino
- SmartWay: Comprehensive Kit for Vibrating Motor, RGB LED, GPS Module & Arduino MKR Fox 1200 Projects
- M1 Rover: Outdoor Autonomous Robot for Rough Terrain
- Prototyping Explained: The Key Validation Step for Startups
- Key Elements of Physical Prototyping for Product Development
- Understanding Linear Motors: From Electrical Energy to Precise Linear Motion
- Servo Motors Explained: How They Work and Why They Matter