View Categories

Connecting the Sleepy Pi 2 Expansion IO

3 min read

Expansion Headers #

The Sleepy Pi 2 exposes a mixture of Raspberry Pi GPIO and also Arduino I/O to the outside world.

Raspberry Pi GPIO #

The Sleepy Pi 2 is compatible with either 26-pin or 40-pin Raspberry Pi’s and optionally uses the following Raspberry Pi GPIO lines:

  • GPIO 2: i2c-SDA – i2c bus available for communication with RTC and Arduino
  • GPIO 3: i2c-SCL – i2c bus available for communication with RTC and Arduino
  • GPIO 14: Serial RXD – used for programming the Arduino
  • GPIO 15: Serial TXD – used for programming the Arduino
  • GPIO 22: Arduino Reset line – used for programming
  • GPIO 23: RTC Alarm – Active low RTC alarm output
  • GPIO 24: General purpose / Handshake – Command Pi Shutdown
  • GPIO 25: General purpose / Handshake – Pi is Running

Most of these lines are not exclusively for use with the Sleepy Pi 2 and can be used for other things if required. You can if you want reduce the GPIO count to zero if required. In the next section, I’ll describe reducing the GPIO load.

Modifying the GPIO pinout #

If you look at each of the GPIO lines it can be seen that in certain applications, you can dispense with using them. The Sleepy Pi 2 has been designed with minimal GPIO impact in mind, but retains compatibility with Sleepy Pi 1.

As an example, you can have a Zero GPIO load. In this case, we don’t use the i2c communications to talk to either the RTC or the Arduino. We don’t program the Arduino or communicate with it over the serial link. Instead we program the Arduino offline via the Programming Adapter – we also disconnect GPIO 22 Reset via a solder jumper. We are not interested in the GPIO 23 Alarm, GPIO 24 or GPIO 25 Handshaking which we can disconnect with solder jumpers. We use the Current Monitor to determine when the Raspberry Pi is operating and when it is awaiting shutdown.

Between the Zero GPIO load and a Full GPIO load, you can decide which GPIO pins are required by your application and in some cases solder jumpers are available to physically disconnect the pins from the Raspberry PI GPIO connector.

GPIO Solder Jumpers #

Sleepy Pi 2 GPIO Solder Jumpers
Sleepy Pi 2 GPIO Solder Jumpers

The solder jumpers are as follows:

  • SJ2: (Open) GPIO 23 or /Alarm line (active low) from the RTC
  • SJ3: (Closed) GPIO 22 Arduino Reset. Functionality can also be obtained by GPIO expander chip
  • SJ4: (Closed) GPIO 22 Command Pi to Shutdown. Used for handshaking
  • SJ5: (Closed) GPIO 25 Pi is Running. Used for handshaking
  • SJ7: (Open) GPIO expander chip connect to Command Pi to Shutdown

Removing solder on these jumpers will disconnect the relevant pin. The default settings for solder jumpers are shown in brackets and on the diagram and are used to maintain software compatibility with Sleepy Pi 1.

Blanket Expansion Connections #

The Sleepy Pi 2 has a number of expansion connections as shown below:

Prototyping Blanket Expansion Connections
Prototyping Blanket Expansion Connections

You can solder directly to these pins or use a set of expansion headers and prototyping blanket to add extra soldering options.

Sleepy Pi 2 Expansion Connections
Sleepy Pi 2 Expansion Connections

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping Cart
Scroll to Top