Electronic – IC that would pull output to the ground, perhaps NOT gate


I have a board with four relays on it. It has a standard Vcc, Gnd, and In1-In4 pins. I want to control it with Arduino or in my case an ESP32. However, I noticed that when output pin on my controller is pulled HIGH nothing happens when it's pulled LOW the relay will engage.

This is a problem when the board is reset because of all the relay switches will engage until and this isn't something I want. After some digging, I made this:

Simple inverter

This works as desired, there's always 5V on the relay and the relay is disengaged all the time. When I output a signal to the base of the Q1 it will pull the output to the ground and the relay will engage.

Right now I have four of these relays and pretty soon I'll have more. So, I'd like to solve this with an IC. In particular, I was looking at the IC7404 which is a bunch of NOT gates, however, I am not sure this will solve my problem.

So, is there an IC that would pull the output to the ground when the signal is present on the input? Will 7404 work and I'm just not seeing something? 🙂

Edit: This is the relay module I am using. I wasn't able to find any useful data sheets on it.

Best Answer

The fact that relays are actuating at reset when pins should be in a high impedance mode is worrisome, and something that you need to fully understand in order to validate your system and fix it.

Edit: now that it is clear that this is a software bug in your code, to solve the inadvertent drive low during starting, configure the pin's output data register bit to high before you set the pin to be an output.

That said, a literal answer to your original question would be a chip containing several open collector inverters.

The 74xx05 is an example.

The 74xx06 is similar but allows applying acceptable voltage to the output even when this exceeds the supply voltage, for example you can operate the part on 3.3v but pull down outputs from 5v.

But these are not the solution to your actual problem.