Trinket M0 can't drive 3 VDC Relays

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
waleedelmandouh
 
Posts: 27
Joined: Tue Apr 03, 2018 10:09 pm

Trinket M0 can't drive 3 VDC Relays

Post by waleedelmandouh »

Hi, I have a logic that runs on Trinket M0 and tested it using buttons and LEDs. Then i tried it with the outputs driving the coil of 3 VDC relays but the relays will not change status. I tried the relays against the 3.3 V pin and ground, thee relays work. So it's not a problem with the relays. Please help.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Trinket M0 can't drive 3 VDC Relays

Post by adafruit_support_mike »

The Trinket's GPIO pins can only supply about 7mA without being damaged, and most relays want 100mA or more.

Your best choice will be to use a BJT or mosfet to control the relay current, with the Trinket's GPIO pin controlling the transistor.

User avatar
waleedelmandouh
 
Posts: 27
Joined: Tue Apr 03, 2018 10:09 pm

Re: Trinket M0 can't drive 3 VDC Relays

Post by waleedelmandouh »

Is this limitation only for M0? The same design worked with the trinket 5v with no problems.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Trinket M0 can't drive 3 VDC Relays

Post by adafruit_support_bill »

That is a limitation of the M0. The 5v Trinket uses an ATTiny85. The GPIO pins on that are capable of 30mA or more in some cases. That may be sufficient to actuate some smaller relays.

But in general, it is not safe to drive a relay directly from any GPIO pin without at least a diode to protect against the inductive spike when the relay is de-energized.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”