I have discovered that there are relays like these available on the market that trigger at 3.75 V and have coil resistance above 370 ohm. I assume this would mean about 14 mA or about that might be within allowed limits of Raspberry PI.

How good is the idea to drive these relays directly from GPIO, without the amplifying transistor?

There are few similar questions of the site but I think they do not address this group of relays. If not, I would build a circuit as described here but I need a quick and very reliable solution, so less components may help.

  • \$\begingroup\$ That all looks a bit risky. This page suggests that low may be as high as 0.6 V and high as low as 2.4 V. They don't specify what current those values are for so it could be worse at 14 mA. Pay particular attention to the section "Pi GPIO input voltage and output current limitations". The total current is limited to 50 mA. \$\endgroup\$ – Transistor Dec 31 '19 at 23:09
  • 2
    \$\begingroup\$ No. This is a very bad idea and it's silly to try to save the few cents of on a transistor. Also you definitely do not want to run a relay off the pi's very sensitive 3v3 rail. \$\endgroup\$ – Chris Stratton Dec 31 '19 at 23:19
  • \$\begingroup\$ Reliable, low cost: High drives relay: Jellybean NPN. 1k to 10k resistor say from I/O pin to base. Ground emitter. Relay collector to V+. Diode (eg 1N4148) across relay coil non conducting when relay on (Cathode to V+). || Low drives relay - use PNP. swap V+ and Ground connections to transistor. \$\endgroup\$ – Russell McMahon Jan 1 at 19:41

The "3.75V" types are designed for 5V nominal so forget those. They need about 4V to operate reliably and the RPi will give less than 3.3V.

The 3V nominal types have a 137 ohm coil and will draw about 20-24mA from a 3.3V supply. That's too much to drive safely from the Raspberry Pi GPIO output. You could use a CMOS buffer but it would make a lot more sense to use a small MOSFET or BJT.

Note: You could parallel two outputs configured to maximum (16mA) drive and it would probably be okay if you can ensure that the outputs are always in exactly the same state. Not a chance I would like to take. The relay would get about 2.8V minimum and they need 2.6 so they'd be okay.

  • \$\begingroup\$ I estimate 10mW dissipation driving 137 Ohms tied to 3.3V .WHy do you consider that unsafe? even the datasheet says safe to drive from CMOS logic direct \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jan 1 at 0:33
  • 2
    \$\begingroup\$ A Pi is NOT CMOS logic in this sense, and anyway the Pi (or rather the briadcom chip in it) datasheet is the only final authority. The parts you show state a guranteed drive current of 18 mA at 2.9V. Is that enough for the relay? \$\endgroup\$ – Wouter van Ooijen Jan 1 at 1:26
  • \$\begingroup\$ @TonyStewartSunnyskyguyEE75 There are failure modes related to excessive current density in the metal conductors on the chip. Accentuated at at high temperatures, and that chip runs hot. Not immediate failure but over time. \$\endgroup\$ – Spehro Pefhany Jan 1 at 4:02
  • \$\begingroup\$ @WoutervanOoijen The Zol proves they belong in the same CMOS family as all other 3.6V logic for the GPIO drivers \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jan 1 at 5:22
  • 1
    \$\begingroup\$ Who is The Zol and how can she know that Broadcom manufactures (and will continue to manufacture!) something that is not required by the datasheet they (Broadcom) publish? \$\endgroup\$ – Wouter van Ooijen Jan 1 at 9:00

1) You chose the 5V Relay and not the correct 3V Relay. It should be 137 Ω and thus on low side drive + 22 Ω = 159 Ω so 3.3V/159Ω= 21 mA and Pd =21mA*3.3V = 68 mW of which 22/159Ω 14% is dissipated by the CPU GPIO port. The minimum voltage Umin = 2.25V, Umax= 8.8V so safe.

These Relays are designed for 3V, 5V CMOS logic "Directly triggerable with TTL standard modules such as 74ALS, 74HCT and 74ACT" (from spec) so which part are you concerned about?

Raspberry Pi uses the same CMOS as all other 3.6V logic such as those below; Which can easily drive the 3V Relay with a reverse flyback small diode to Vdd.

enter image description here

Although not widely documented , CMOS is made from FETs with RdsOn that depends on Vdd max to prevent excessive cross-conduction current during switching. It also increases max transition frequency due to fix load C and T=RC rise times. It also reduces static power dissipation with \$P_D=I^2R_{dsOn}\$ as higher current drivers. Normally the current limits are given to allow noise-free safe voltage margins for CMOS input threshold variations.

All 5.5V Logic families are designed around 50 to 66Ω nominal for Zol= Vol/Iol while Zoh is often the same but may be higher in some families and both have a worst case tolerance of 50% over temp.

Of course as in all CMOS & FETs when operated at lower voltage RdsOn will rise.

All 3.6 V Logic Families are designed around 22 to 33Ω nominal for Zol and Zoh may be the same or slightly higher for natural characteristics of same size PFETs.

Raspberry Pi's specs are below as you see are also consistent.

enter image description here

  • \$\begingroup\$ "Directly triggerable with TTL standard modules such as ALS, HCT and ACT" but what is the Raspberry PI GPIO pin? \$\endgroup\$ – h22 Dec 31 '19 at 23:33
  • \$\begingroup\$ rPi is 3.6V logic which can drive more current than 5.5V logic \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jan 1 at 0:39
  • 1
    \$\begingroup\$ The incomplete datasheets for RPi were always source of frustration re GPIO limits, and Broadcom datasheets are under NDA, which is even worse. The common consensus within RPi users is 16mA per pin and 50mA total per 3.3V rail. This is definitely insufficient to drive 24mA relay safely. \$\endgroup\$ – Maple Jan 1 at 2:29
  • \$\begingroup\$ @Maple the relays must activate with 16mA and they are designed for 5V logic which has twice the Zol. Try again. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jan 1 at 5:47
  • 1
    \$\begingroup\$ It may fully be this may work, I eventually decided to put a transistor for piece or mind. \$\endgroup\$ – h22 Jan 2 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.