Driving Relays or higher loads with the IO Pi
Using the IO Pi Plus or Zero with relays or opto-isolators
Created: 05/11/2016 | Last Updated: 02/02/2019
The output from the IO expansion boards can drive up to 25mA per channel but to drive higher loads such as relays or some opto-isolators you will need to boost the output using a transistor or mosfets.
The circuit below shows how you can operate a 5V coil relay using either a GPIO output from the Raspberry Pi or using one of the output pins on the IO Pi and IO Pi Zero boards.
Driving opto-isolators with the IO Pi Plus/Zero
If you would like to connect an opto-isolator to the IO Pi, you can remove the relay and protection diode and connect a series resistor in line with the opto-isolator in place of the relay.
You can use our LED Calculator https://www.abelectronics.co.uk/tools/resistor-led-calc.aspx to find the correct series resistor to use with your opto-isolator.