1

I have an Arduino project which involves turning on a couple of devices which require an input voltage in excess of 5 V. I have successfully prototyped it using three Grove-Relay modules.

I now want to move it to a PCB, and space is at a premium. Ideally I would like to just use the relay itself and dispense with the voltage regulation circuitry on that board. My question is whether I can do this.

Is the purpose of that circuitry to allow the relay to be switched by 3.3 V or 5 V because the relay requires 3.3 V, (i.e. steps the voltage down to 3.3 V if in excess of that is supplied to the board)? Or is it required because the 3.3 V output of an Arduino is too variable for the relay to work without it?

ocrdu
  • 8,705
  • 21
  • 30
  • 42
TomTry
  • 11
  • 1
  • What are the loads to control? In some situations you can use photo MOS relays, which are much smaller and can be driven directly by Arduino pins. – Jens Sep 13 '22 at 13:07

2 Answers2

3

The relay on that module is the HLS8L-DC3V-S-C. The datasheet shows that the relay by itself won't accept both 3.3 and 5 V, so there will be electronics to take care of that on the module, probably integrated with the driver mentioned below.

An Arduino pin can only source about 5 or 20 mA, depending on the Arduino type, and this is not enough for the relay's coil current. There will be a simple "power driver" on the module to drive the coil (which could also accept a wider range of voltages than the bare relay can, see above).

There will (hopefully) also be a flyback diode across the coil of the relay on the module, to protect the rest of the circuit.

All this circuitry (for voltage, current, and protection) is necessary to drive a bare mechanical relay properly from an Arduino GPIO pin.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
  • Thanks, I can guarantee that the relay is only supplied with 3.3v but it sounds like even so the current supplied by the Arduino will not be sufficient to trigger the relay. – TomTry Sep 13 '22 at 14:19
  • Sorry, stupid question but where on the data sheet is the coil current that you refer to? – TomTry Sep 13 '22 at 14:21
  • I don't know (it will be in there somewhere), but it will be more than an Arduino's GPIO pin can handle. – ocrdu Sep 13 '22 at 14:25
  • Thanks, no minimum current specified, just minimum voltage so will try and see if it works straight off the pin. – TomTry Sep 13 '22 at 16:04
  • 1
    Don't. You'll fry the pin. First try to activate the relay with a power source and measure the current, or use the coil resistance in the table at the top of page 2 of the datasheet and do the math. – ocrdu Sep 13 '22 at 16:06
  • Ok, will try that. Thanks very much. – TomTry Sep 13 '22 at 18:04
2

Lower voltage relay coils tend to use much more current than higher voltage ones.

So if you have some +5V or +12V available, it is better to use that for your relays. That will use less current. If 3V3 relays are powered from a 3V3 linear regulator, they will use more current than the 5V versions, which will waste more power as heat in the 3V3 regulator.

For example I have a board with 16 of these relays. The 24V version uses 15mA, but the 5V version uses 72mA. I used a 24V supply for the relays, and a 24V to 5V buck converter to power the microcontroller and other logic.

bobflux
  • 70,433
  • 3
  • 83
  • 203
  • Thanks. I can output 5v from the Arduino so if I use a 5v relay does that mean I can do without any voltage regulation between the 5v output of the Arduino and the input to the relay itself? – TomTry Sep 13 '22 at 12:14
  • 2
    No, the microcontroller can't output that current. You need a transistor or a MOSFET to switch the relay, it'll cost a few cents. Where is the arduino 5V power supply coming from? 5V wall wart? – bobflux Sep 13 '22 at 12:15
  • Thanks, the Arduino is getting 10v from a buck converter which is stepping a 24v input down to 10v – TomTry Sep 13 '22 at 16:05
  • 1
    If you have 24V then you can use 24V relays, it will be more efficient. You can use the cheapest available transistor (MMBT3904) with a suitable resistor plus flyback diode and it'll work. Or ULN2003. – bobflux Sep 13 '22 at 16:13