# Trouble on switching a 3V relay with Arduino digital pins

I am using the Arduino Ethernet with POE and I am in trouble when I have to enable my relay by using a digital pin. What I would like to make is to start a motor by using a relay, which relay is switched with a Arduino digital pin.

My relay is the following (3V):

My circuit is the following:

My sketch is as-like the following:

#define pinRelay 5

void setup() {
pinMode(pinRelay, OUTPUT);
...
}

void loop() {
...
digitalWrite(pinRelay, HIGH);
delay(5000);
digitalWrite(pinRelay, LOW);
delay(5000);
...
}


When the digitalWrite(pinRelay, HIGH) runs then I listen a weak click come from the relay but it doesn't work as expected: the COM/POLE (Common) doesn't switch from NC (Normally Close) to the NO (Normally Open) so the current doesn't pass and the motor doesn't start. However if I connect the wire directly to the 3.3V (or the 5V) power source pin on the Arduino board it works as expected and the motor start moving.

What is the problem? Why the relay doesn't work as expected?

Note I: I also tried with pins other than 5, but the result is the same.

Note II: By measuring the Voltage between the pinRelay and the Ground with my multimeter, the output is around 4V.

Note III: I read a lot of posts on the Web that may be similar to my issue, but I have not yet figured out what the problem really is.

• The Arduino probably can't deliver enough current to the relay to trigger it properly. Have a look at the many answers on this site involving driving a relay via a transistor from an Arduino. – pjc50 Sep 3 '13 at 14:00
• 1: That picture is not a schematic and therefore doesn't really show what exactly is connected to what. 2: It may be called a "sketch" in the arduino world, but this is a electrical engineering site. Learn the right terms when communicating in the real world. – Olin Lathrop Sep 3 '13 at 14:10
• From the data sheet at gfinder.findernet.com//assets/Series/356/S36EN.pdf we can learn that your relay requires about 120 ma, or about 3 times what an Arduino pin is rated to supply. If you measure the voltage across the relay coil itself, you will likely find it well less than intended, as there's effectively only about 25 ohms of resistance there. Also beware that the 3.3v regulator on your board probably can't handle this load, and even if it could you would not want to put a relay on a logic supply without heavy filtering. – Chris Stratton Sep 3 '13 at 14:53
• @ChrisStratton the Arduino Ethernet has a 1 Amp 3.3v buck regulator. It can handle it just fine. – Passerby Sep 3 '13 at 15:23
• @ChrisStratton You are talking about back EMF of the relay. Putting it on the loggic supply is not the best option (although the diode and if needed a snubber network should work), but as the relay is rated at 3V, the easier solution would be to put a linear regulator at the "upstream supply". But that would add a good dissipation, so before talking about a switching regulator, its better to use a relay with an upstream rated voltage coil. – Diego C Nascimento Sep 4 '13 at 18:15

The Arduino pins can only source a small amount of current (40mA per pin, 200mA total). You will want to use a low side switch with a transistor to satisfy the current demand of your relay. My go-to circuit for this problem is as follows (using a 1N4001 diode and a 2N3904 transistor).

simulate this circuit – Schematic created using CircuitLab

• Just to fill out the answer some more, the Arduino Ethernet with POE has a LM2734 (or LM2736) switching buck regulator for the 3.3v from vin. Unlike the older Arduinos which used the 50mA 3.3v output from the FTDI serial ics, or the Arduino Uno with the 150mA LM2734, the Arduino Ethernet's 3.3v regulator is up to 1 AMP. Which will do nicely for the relay. – Passerby Sep 3 '13 at 15:22

Heres the relay datasheet:

http://gfinder.findernet.com//assets/Series/356/S36EN.pdf

According to the table (Coil specification) on Page 3 for the 3V coil, the recommended operating voltage range is 2.2V to 3.9V.

The current consumption is approximate 120mA (at 3V) what is much for the Arduino pins, then if you put 5V the current is even greater, and can damage the Arduino pins.