Skip to content
Jaakko Koivuniemi edited this page Oct 11, 2014 · 7 revisions

Switching mode power supply for Raspberry Pi. The 12 V battery is connected to the screw terminals on left. The USB A connector outputs about 5.2 V. Alternatively the 5 V DC can be taken from the screw terminals on right. The green LED indicates that voltage is present at output. The 100 uH toroidal inductor is designed for about 3 A current output. The microfuse behind the USB connector is fast type with maximum 2 A output current.

The PIC processor 12F675 is used to switch the power supply on/off. It can be programmed to wake up the power supply after a given time interval. Timing is based on the PIC internal 4 MHz oscillator so it is not very accurate. The Raspberry Pi can talk to the power supply with I2C bus with low speed 20 kHz clock cycle. The modular 4P4C connector is used for that. In the sleep mode with the Raspberry Pi powered down the PIC and level shifting FETs consume about 0.9 mA current.

Simple transistor circuit is used to sample the battery voltage. The read value is likely to shift with temperature and thus it needs to be interpreted at the Raspberry Pi.

A separate pull up resistor with optional capacitor could be added to the red button on right if false button pressings are detected due to noise.

The service (daemon) 'pipicpowerd' needs to be running at the Raspberry Pi. See the manual page of pipicpowerd(1) for different configuration options and how to calibrate the voltage reading.

The PIC12F675 needs to be programmed outside of the PCB. The 5 pin header on bottom left works correctly only for reading the chip unless some components are unsoldered from the board. The general purpose assembly code 'pic12si2c.asm' can be used directly or new code can be written too.

You can’t perform that action at this time.