Projectvorm:Experimental
Periode:2013
Aktiviteiten:Schematic, PCB layout, Python scripting, assembly
TechnologieŽn:Raspberry Pi, Linux, Python, PIC

Introduction:

Power, GPS and I/O for R-Pi

This module integrates a rugged power supply, various real-world inputs and outputs, a GPS receiver with Glonass capability and a shutdown+watchdog circuit. All ready to use on the Raspberry Pi GPIO expansion header. Further expansion is made accessible through two GROVE connections. This allows for a variety of digital or I²C based peripheral modules, such as switches, LEDs and I²C-based MEMS sensors.

Specifications:

  • Mixed mode GPS+Glonass receiver uBlox IT530M with 1PPS LED
  • 8-36V power supply 5V/2A
  • 2 Digital/digital inputs with 3V analog range
  • 2 Analog inputs with 30V range
  • 4-channel 12-bit A/D converter on I²C bus
  • 2 Low-side protected outputs, Icont=1.2A, VDS=60V, RDS=500mΩ
  • Soft-power control and system watchdog (works only with above power source, not with USB!)
  • Remote controlled power on & off
  • 8-way 3.5mm screw terminals for power and I/O
  • Fakra connector for GNSS antenna
  • GROVE-compatible (Seeed Studio) I²C and GPIO connections
  • Second I²C header with the Pi VCC (3.3V, max 50mA), to our standard
  • Zener diodes to clamp the Pi input signals to 3.3V (Groove I/O, I²C, Remote-in)
  • Size 56x40mm
  • Fixation hole if used with Pi rev2

Description:

The soft-power and watchdog are enabled by a small Python script that is run from rc.local. This script interfaces with the circuit using GPIO4. Most of the time, this signal is configured as input, so the script can monitor the status of the remote-control signal [RMT] on pin 3 of the screw terminals. Every 250 milliseconds, the GPIO is momentarily changed to an output having opposite logic polarity as the actual input signal. This overrides the fairly high impedance input signal, and results in the pulse for the watchdog controller (a tiny PIC10F320) to reset the guard time. After power-on the watchdog timer sleeps for 4 seconds to prevent signal bounce from starting this shutdown watchdog. After these 4 seconds the watchdog waits for the first pulse before the actual watchdog is enabled. This enables an arbitrary long boottime, or no watchdog script at all. Actually, without the script, the power supply works almost as any other power supply, which runs until the input power is cut. However, it still needs a 'start' pulse on the RMT input before the power will turn on.

It is also possible to start the system with a short pulse, and initiate shutdown with a second pulse. This way, the Pi works just like a regular PC with a soft power switch. The start pulse should last no longer than until the start of the watchdog script. The stop pulse should last no longer than the actual shutdown of the system, or the system will simply restart.

When the Raspberry Pi shuts down, the script is stopped, hence the pulses stop as well. After 16 seconds, results in a reset pulse from the watchdog monitor, that reset pulse disables the 5V regulator, which shuts the Pi down. After the 5V has dropped enough to disable the watchdog IC, the power control depends on the Remote input signal. If still high, the Pi will restart, otherwise it stays off until the next activation of the Remote input signal.

Note that this power control method does not support the reboot command. The hardware will hard reset the Pi after 16 seconds of missing watchdog reset pulses, and that is not enough for a reboot of the Raspberry Pi. As a substitute, an ordinary shutdown will result in a reboot if the RMT input signal is still active.

CPU load of the script is less that measurable; both ps -p <pid> -o %cpu and top -p <pid> display a CPU usage of 0.0%, with top showing 0.3% incidentally.

Todo: modify the watchdog script such that the time between the reset pulses depends on the CPU load. This changes the watchdog activity LED into a CPU load monitor, such as is very common on embedded controllers.

Minimalistic PiPower:

No GPS, no power supply and no GPIO, just the power controller and a power switch to control the power to the Raspberry Pi. Also a header to connect a remote power softswitch. Power input is a second micro-USB connector for 5V.

Availability:

Work in progress

Item: Description: Status: Price: Action:
69-108-100PiPower expansion module for Raspberry Pi with PSU, GPS and I/O. Includes antennaPreorder only€ 80 ex VAT
69-108-200PiPower expansion module, including the Raspberry Pi model B and ready-to-run 4GB SD imagePreorder only€ 125 ex VAT
69-108-101PiSwitch expansion module for Raspberry Pi, free worldwide shippingPreorder only€ 20 ex VAT