Principle and goals

The GPIO shield features:
- An I2C connector (GND, 3.3V or 5V, SDA, SCL)
Use the I2C bus
- Two buttons (RS 718-2405 ) closing a GPIO to GND ( GPIO 13 and 26 on pins 33 and 37 to GND)
Add a physical button
- One Darlington array ( ULQ2803A RS 168-8906) delivering 8 outputs at desired voltage. The choice is between 5Vdc (pin 2); 3Vdc (pin 1); input Vin.
- A jumper to select the voltage for the GPIO outputs through the Darlington array
- A jumper to select whether 5Vin should be connected to GPIO or only to the Darlington
- output / input for plain 5Vdc/Gnd
- output for plain 3V3dc/Gnd
Ethoscope GPIO PCB v1.3

The three pins labelled jumper should be used to decide whether the Darlington array will operate at 5Vdc (connecting middle with lower pin) or 3.3Vdc (connecting middle with upper pin). Keep in mind that at 3.3V the GPIO can output no more than 50mA for the entire rail. If a larger load is needed, the Darlington should operate on the 5V source and voltage scaled down as needed through a regulator or resistor. By default, the 5V is drawn from the 5V in-connection on the bottom left side but by soldering the solder-jumper on the reverse of the board the board will output the GPIO 5V. The Vcc for the I2C connector can also be chosen between 3.3V and 5V soldering the appropriate connections together on the left of the GPIO. The connector labelled as “ribbon” mirrors the first 6 pins of the GPIO and should be used to connect the ribbon cable that goes to the lightbox.

Annotated version of the PCB above
ethoscope_GPIO_Shield_V1.21_gerber.zip
Components
- 1 Darlington Array ULN2803A (Farnell, RS) or 1 NPN transistor BS170
- 2 tactile switches (Farnell, RS, Adafruit)
- 1 GPIO connector (Farnell, RS)
- 1 6 way Ribbon cable wire to board connector (Farnell, RS)
- 1 6way ribbon cable (Farnell, RS)
- 1 6way ribbon cable connector for the light box side (RS)
- 1 100Ohm resistor (used for light control)
- 1 Cree 3.3V 1W LED at 30000k lumen (Aliexpress)
Software control
Button Listener