Feed Raspberry Pi with AA batteries
Warning : This article has been automatically translated by Bing Translate
Danger : This article has been automatically translated by Bing Translate
Caveat : This article has been automatically translated by Bing Translate
Raspberry Pi is a resourceful device, Lightweight and can easily be integrated into a draft electronic and mobile. It then becomes interesting to power it on something other than an electrical outlet.
For those seeking information on the Raspberry ft power cord other than the USB, You can find many speaking blogs of the subject. An excellent article in French here and any other as well in French here.
Using battery Lipo tempted me good but seemed a little less convenient than go through AA standard batteries.
The time here is what I put in place :
The batteries are Ni-MH conventional batteries, 4 are the 1.2V – 2300mAh and 2 are the 1.2V – 2100mAh.
In addition to these batteries, you are going to need very little material :
- A housing 6 batteries (here)
- A limiter of voltage LM2596 you can find here
- A voltmeter/ammeter
- A flat screwdriver
- A micro USB connector (optional we will see why after). Home I cut the wire of a loader to retrieve the socket.
Here is the material image
The principle of the LM2596 is simple (that's surely why I managed assembly !), It takes as input a voltage of 4V to 35V (continuous) and will regulate the output between 1.23V and 30V. The output voltage must be at least 1V below input voltage. Hence the need of 6 batteries not 4, otherwise very quickly the Raspberry may also turn off.
For Assembly, It's simple, the Red wire of the battery box on the IN the LM2596, the black wire on the IN-. Install the batteries and use the voltmeter to measure the voltage input :
8.99V for 6 1.2V batteries …. I understand too much but at least it's not zero !
Next step : adjust the output voltage. It is the little screw on the blue block. You screw to reach the 5V
Rest to add to our mounting the microphone USB socket.
I could connect directly to the GPIO ports (in 5V) but in this case, It is not the protection fuse and as I am no expert I did not take risk !
The final cut is so I find pretty basic :
Regarding the autonomy, by putting a script at boot adding all the 20 seconds at the end of a file, time system has managed to keep a little more of 12 hours. I didn't know if my batteries were loaded to the maximum.
#! /usr/bin/python import time if __name__ == "__main__": myfile = open("/testup.txt","w") nowTime = time.strftime("%Y/%m/%d-%H:%M:%S") myfile.write(nowTime 'n') myfile = open("/testup.txt","a") While True: nowTime = time.strftime("%Y/%m/%d-%H:%M:%S") myfile = open("/testup.txt","a") myfile.write(nowTime 'n') myfile.close() time.sleep(20)
Next step, recharge the batteries but test with type temperature sensors, distance or LEDs. And go search for techniques to save energy.
So, I think that for less than €5 you can easily have a montage to make your precious mobile for your projects.