TCA9535 Relay issue

Thread Starter

fanzypantzy

Joined Feb 21, 2022
2
Hi,

I have a TCA9535PWR and I think I've done a design mistake.
This is the chip itself.

1706534187940.png

The design of the relays connected to it.

1706534275869.png
Whenever I first turn the GPIO pin to be output it's already turned on, and it turns off when I put the PIN to be HIGH on the ESP32
My question is: is this an error in the design or the TCA9535 library I am using?
 

eetech00

Joined Jun 8, 2013
4,705
As designed, When the gpio is low, current will flow thru the opto and turn on Q1.
Remove DI1. Replace R18 with 10k
Connect a 100k pull down resistor from the base of Q1 to ground.
 

sghioto

Joined Dec 31, 2017
8,634
Might consider changing R18 to about 139 ohms so there is enough current (5mA) to see the LED.
Or re-arrange the circuit so the LED is in parallel with the gpio pin or relay coil.
Possibly depending on the brigtness required. The LED I tested with is a 3mm super bright red LED easily visible at 1ma.
The TS didn't mention anything about the LED. Not sure it was a simulation or actual test.
 

eetech00

Joined Jun 8, 2013
4,705
Possibly depending on the brigtness required. The LED I tested with is a 3mm super bright red LED easily visible at 1ma.
The TS didn't mention anything about the LED. Not sure it was a simulation or actual test.
Understood.
My comments were based on the part numbers shown on the TS schematic.
 

sghioto

Joined Dec 31, 2017
8,634
Understood.
My comments were based on the part numbers shown on the TS schematic.
I looked up that part # as well. I saw where it said tested at 5 ma. It also stated it was a brilliant red LED so maybe it will work OK at 1ma. I'm sure the TS can figure it out if not, hopefully.:)
 
Top