Raspberry Juice

From BitWizard Wiki
Revision as of 15:33, 31 July 2014 by Rew (talk | contribs) (→‎Use)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The Raspberry Juice board


Overview

The Raspberry Juice serves as a power switch for the Raspberry Pi. This expansion board can turn the power on or off at a scheduled time.

Specifications

The Juice always uses about 2mA/10mW. The board is rated for a maximum current of 1A.

Use

The Raspberry Juice can be found using I2C or SPI at address 0xA4, and has the following read ports: All times are in ms, and are 32 bits in size.

Port Returned value (in milliseconds)
0x20 Time until power off
0x21 Time until power on
0x30 button active 0: don't react to button press. 1: react to button press (default), others: undefined.
0x31 external input active 0: inactive (default), 1: active, others: undefined.
0x32 external input polarity 0: active low (default), 1: active high, others: undefined.
0x33 power set on/off state 0: off, 1: on, others: undefined.
0x38 button active powerupstate 0: don't react to button press. 1: react to button press (default), others: undefined.
0x39 external input active powerupstate 0: inactive (default), 1: active, others: undefined.
0x3a external input polarity powerupstate 0: active low (default), 1: active high, others: undefined.
0x3b power set on/off state powerupstate 0: off, 1: on, others: undefined.

Additionally, the following can be written to the Juice:

Port Effect
0x20 Set the time in milliseconds until power off
0x21 Set the time in milliseconds until power on
0x30 button active 0: don't react to button press. 1: react to button press (default), others: undefined.
0x31 external input active 0: inactive (default), 1: active, others: undefined.
0x32 external input polarity 0: active low (default), 1: active high, others: undefined.
0x33 power set on/off state 0: off, 1: on, others: undefined.
0x38 button active powerupstate 0: don't react to button press. 1: react to button press (default), others: undefined.
0x39 external input active powerupstate 0: inactive (default), 1: active, others: undefined.
0x3a external input polarity powerupstate 0: active low (default), 1: active high, others: undefined.
0x3b power set on/off state powerupstate 0: off, 1: on, others: undefined.

So, for instance, writing 10000 to port 0x21 and 1000 to 0x20 will cut the power in 1 second, and then turn on the power 9 seconds later.