direct driving relais from GPIO

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

direct driving relais from GPIO

#1 Post by giorgino » 11 Nov 2024, 18:57

Hi, in my project, I need to control at least four relays. Since I aim to keep the module compact, I am designing a custom PCB (EasyEDA seems to be a great platform for this). I’d like to avoid using any separate “Relay Module Development Board” by connecting the components directly on the board.

Do you know of an ideal chip to use as a relay driver? I hope to connect the GPIO pins directly to this driver and avoid the need for level shifters.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: direct driving relais from GPIO

#2 Post by TD-er » 11 Nov 2024, 19:31

You don't need a chip.
You can simply use some transistor.
Just make sure to add a diode anti-parallel to the relais coil as a coil which is no longer carrying current will try to keep the magnetic field the same and thus generates really high voltages when you switch it 'off'.

Just one of the first results on Google when searching for "relay schematic"
Image

giorgino
Normal user
Posts: 122
Joined: 24 Oct 2022, 21:06

Re: direct driving relais from GPIO

#3 Post by giorgino » 11 Nov 2024, 19:53

why do you exclude something more compact? relais could become eight... I've seen the ULN2003 or the TBD62083APG. Is there something better?

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: direct driving relais from GPIO

#4 Post by TD-er » 11 Nov 2024, 22:37

Well it is not really a matter of 'excluding' but rather to keep it simple.
The ULN2003 is also rather bulky.
It does have the diode included, as long as you also connect the COM pin to the supply voltage for the relais.
There is nothing against using that chip.
Just keep in mind that you probably can't use all 7 at the same time to switch 7 relais on at once as it will probably draw more current than the "E" pin can handle.
With a transistor per relais (or 2 or more in a single package) you don't have this limitation.

The same applies to TBD62083APG.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 0 guests