2
\$\begingroup\$

I want to be able to activate three 5 V relays using one Arduino Uno. I'm afraid the Uno won't be able to supply enough current (or voltage?) to activate the relays, so I will need an external supply. I still want to use the digital pins on the Uno for control, so using transistors might be appropriate. However, I am unsure how to design the circuit. Would something like this work?

schematic

simulate this circuit – Schematic created using CircuitLab

where D1, D2 and D3 are the Uno's digital pins (either HIGH or LOW). I have designed very few transistor circuits before. Do I need any resistors in series with the MOSFETs? If so, how can I calculate the values? Should I use MOSFETs or BJTs for this purpose?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Please change from high side MOSFETs to low side and add a diode in anti-parallel across each relay coil to make your life simpler. \$\endgroup\$ Commented Apr 3, 2023 at 12:48
  • \$\begingroup\$ how much current is needed by each relay? \$\endgroup\$ Commented Apr 3, 2023 at 12:54
  • \$\begingroup\$ provided the current is okay, You can look up how to control a relay with an Arduino and just make 3 copies of that circuit. It is not quite the same as what you've drawn here. \$\endgroup\$ Commented Apr 3, 2023 at 12:55

1 Answer 1

3
\$\begingroup\$

Your approach won't work well, because MOSFETs are driven relative to their source. Since the source needs to be at 5 V to turn-on the relays, the gate would need to be at a higher potential of about 10 V. UNO's outputs don't go that high :)

Instead, use those N-MOSFETs as low-side switches:

schematic

simulate this circuit – Schematic created using CircuitLab

Each MOSFET needs an anti-kickback diode directly between the coil terminals:

schematic

simulate this circuit

\$\endgroup\$
7
  • \$\begingroup\$ Thank you very much for this good answer. Just to be sure, the Uno and the external supply has to have same ground, right? Also, could you clarify why a 1uF capacitor is needed in parallel with the relay and MOSFET? \$\endgroup\$ Commented Apr 3, 2023 at 13:00
  • 1
    \$\begingroup\$ @Carl Yes, the UNO and 5V coil supply grounds need to be connected. The coil voltage can also be higher than 5V - that will make the coil currents smaller. E.g. if you have 12V available and 12V relays, then the circuit doesn't change at all. \$\endgroup\$ Commented Apr 3, 2023 at 13:07
  • 1
    \$\begingroup\$ @Kubahasn'tforgottenMonica Why would he coil currents be smaller for a 12V relay than a 5V relay? Does this have something to do with the coil resistance of the different relays? \$\endgroup\$ Commented Apr 3, 2023 at 13:25
  • 1
    \$\begingroup\$ @Carl Yes. Usually a given size of a relay has a fixed power rating of the coil. So the higher the coil voltage rating, the higher the coil resistance, and the lower the coil current. \$\endgroup\$ Commented Apr 3, 2023 at 17:24
  • 2
    \$\begingroup\$ @jonathanjo One less thing to worry about with an NMOS - no need to put base resistors or buy transistors with base resistors. \$\endgroup\$ Commented Apr 3, 2023 at 17:25

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.