Introduction: Raspoulette Prototype

Hi guys,

When i see a raspberry pi contest i decide to make a prototype of an idea i had for few time, let me present my Raspoulette!

I will try to explain how to make an amazing Raspoulette!
Raspoulette is an autonomous solar powered closing systeme coop's door based on raspberry pi. It's mean that Raspoulette open the coop's door when the sunlight is coming and close the door when is gone. To save energy i will explain how to make a twilight switch.

But first of all, what you need for this project :

solar interruptor :
-1 relay 12v dc
-1 LDR
-1 potentiometer 1M
-4 resistance r1=180k r2=10k r3=100 r4=4.7k
-3 transistor npn (bc547 like)
-1 diode

Voltage regulator :
-LM7805
-1 big capacitor
-male micro usb pin

Motor controller :
-1 L293
-12V Dc motor

Hardware part :
-1 big 10liters bottle
-1 old printer to take the rail systeme with the motor
-1 old drill's batery
-1 piece of PVC tube
-Your Raspberry pi (I use model B but you probably can use a model A)
-tape
-some piece of wood

Software part :
-python

Step 1: Solar Interruptor

For the interruptor we have to make an electric part to turn up and  turn off the raspberry, and also shell part to begin the python software.

This is the eletronic part explanation : 
The first transistor will be blocked or not dependind the "divising bridge" composed by LDR and r1 (180k)+potentiometer. If there is enought light the 3 transistors conduct and energy can pass trought relay's coil and active it.

If you are playing with the potentiometer you are able to configure how light you want to activate the relay. 

And to begin the software it's really easy, just type this on the shell :
sudo nano /etc/rc.local
then you can type on the last line :
sudo python /your_file_directory/Poulerail.py

The next time you will turn on your Raspberry, the software will begin automaticly


Step 2: Voltage Regulator

Raspberry need regulate voltage of 5V, that's why we use LM7805 that drop this voltage.

It the simplest voltage regulator that you can find. We just add condensator to be sure to have a really proper and soft curent.

Here you find the lm7805 datasheet.

Step 3: Motor Controller

We use DCmotor  because it's the simplest solution, you just have to use the l293, it's DC motor controller, not the cheapest one but easy to find and efficient.

I join the datasheet if you want more information.

In this case we just use pin :
8 : +12V (motor)
2 : Rpi out
7 : Rpi out
1 : enable
16 : +5V (l293)
4, 5, 12, 13 : Ground
3 : Motor in
6 : Motor in

Step 4: Hardware Part - Raspberry

I guess you know how Rpi works, i'll not tell you how GPIO are usefull and how use them.

We use this pin :
1 : 3.3V
2 : 5V
6 : Ground
8 : enable
12 : LDR
16 : L293 in
18 : L293 in

Just a point about LDR system :
Time charge's condensator will change depending how LDR's resistance is big, and we mesure this value on pin 12.
It should seem little bit abstract but i really don't know how explain it with my bad english..

Step 5: Software Part - Python

So, this is the software i made to control opening and closing of the door. I'm really new in python, and i'm sure you can do it better than me, but this one is working!
You really can improve it and share!

Step 6: Packaging

This is really easy and stupid part,
i just cutted the bottle in 2 parts, screwed 2 piece of wood on the bottom and fixed a printer's rail in the wood.
then i fixed 2 set square on the bottle to screw it at the chicken coop.

About the battery i used an old drill's battery. When you open it you find 10 battery 1.2V 1.8A. It's a really good deal for us! I put it in 2two little part of pvc tube, sold two piece of cable on + an - and glu everything to don't have any short circuit.

Finally i glu all my circuit part on a tupperware to the it from masture.

Step 7: The Solar Charger

To be as autonomous as possible, Raspoulette got is own solar charger, the easiest way I know is constant curent charge at Capacitance/10. In this exemple we use 1200mah battery, so the constant charge is at maximum 120mah.
this circuit drive a constant curent of 120mah, it's possible to change it to another value for your battery, with a modification of the second resistor. The resistor is equal to 0.7 / your current. In this exemple 0.7 / 0.12 = 5.83 ohm. I took a 5.6 ohm.

Step 8: Conclusion

Ok ,
That's just a prototype, everything is working well, so i will now do it better, and i post it in few days!

Enjoy and comment!

Pierre.

Raspberry Pi Contest

Participated in the
Raspberry Pi Contest