Schorschi
Posts: 220
Joined: Thu Nov 22, 2012 9:38 pm

Relay Breakout Module with Opto-Isolation is uln2003a needed?

Mon Apr 15, 2019 3:47 am

When using a relay breakout module with Opto-Isolation is an uln2003a needed? I am also using a GPIO expansion module driven by i2C, i.e. a PCF8475 module, and the relay can be low or high triggered (nice feature to have), so I don't see any benefit to using an uln2003a between the PCF8475 and the replay module. Or am I missing something of importance? Oh, and relays use separate PS, with no common GND between relay PS and Pi control logic circuit. If I was driving motors or such, then sure uln2003a would be needed, but not with a opto-isolation relay, right?

pcmanbob
Posts: 6197
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Relay Breakout Module with Opto-Isolation is uln2003a needed?

Mon Apr 15, 2019 9:20 am

The reason people use a ULN2003A or a ULN2803A to drive relay boards is because the relay boards use 5v for the control circuit and active low,

which means the pi gpio being 3.3v can turn the relays on but not off.

see here : viewtopic.php?f=91&t=83372&p=1225448#p1225448

So if your PCF8475 is capable of outputting 5v then there would be no need for any other interfacing.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
Burngate
Posts: 5884
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Relay Breakout Module with Opto-Isolation is uln2003a needed?

Mon Apr 15, 2019 10:22 am

Google tells me you meant PCF8574, which can sink 10mA (when low) but only source 100μA (when high)

ULN2003, ULN2803, etc. are Darlington arrays. They're effectively high-gain NPN bipolar transistors.
They don't take any current when their input is low, but to turn them on they need upwards of 1mA to turn them on.

So you may find the PCF8574 cannot successfully drive a ULN2003A

The I2C bus on the Pi runs from 3v3, so the maximum high is 3v3.
The PCF8574 can run on 3v3 so can be driven from the Pi. It may or may not read the I2C bus correctly with 5v as its Vdd

The problem then comes down to: can your relay module use 3v3 for its input side?

Return to “Advanced users”