Suggestion required to drive 5v relay directly using arduino uno IO PIns?

Hi,

I wanted to drive a relay which is 5v and 70 ohms which comes to approx 72 mA. directly through arduino uno IO Pins. As I already studied that atmega 328, can provide around 40 mA through one pin, why can't I connect two pins together and get as 80 mA and to actuate the coil, I would give two digitalWrite functions like

digitalWrite(x, HIGH);
digitalWrite(y, HIGH);// both iO pins going to relay coil
delay(1000);
digitalWrite(x, LOW);
digitalWrite(y, LOW);// both iO pins going to relay coil
delay(1000);

both x and y pins would be shorted together, would this work? I dont want to use transistor to drive a relay, hence trying other ways to do it,

Also, to add, it works well with single IO pin too, but after one month the relay didn't work, so, just wanted to know whether this 2 pin thing will work for long time

An Arduino output pin can safely drive a 20mA load, forget about the Absolute Maximum Rating.

Connect the Arduino output to a BJT or MOSFET to drive the relay.

Also, inductive DC loads should use a kickback diode across the coil.

You may use a COTS Arduino relay module

An Arduino output pin can safely drive a 20mA load, forget about the Absolute 
Maximum Rating.

Connect the Arduino output to a BJT or MOSFET to drive the relay.

Also, inductive DC loads should use a kickback diode across the coil.

I am in the process of making a circuit which uses less money and less components as a challenge, tried with connecting using one IO PIn directly to 5v relay module worked well for 1 month before relay failed. so just wondering if I could use 4 pins together to power up relay, as I have no other use with other IO Pins, yeah fly back diodes are already part of the circuit, just wanted to eliminate the use of transistors, thats it and it should be reliable too..

You may use a COTS Arduino relay module

yes, I am aware of using opto couplers to power up relay, but just that I dont want to go for extra electronic components,

How long does the circuit have to last before it fails and you have the expense of replacing components?

If your circuit needs to last longer than a short time, then trying to avoid "extra" components would be a false economy.

If you connect more than one pin to the relay, there's no guarantee they will share the current equally, resulting in one of them failing first, followed by the others.

To ensure the current is shared between multiple pins, you could add a resistor to each pin. For 4 pins you would need 4 resistors, so it would be simpler to use only one pin, one transistor and one resistor.

1 Like

Makes some good sense, I guess,

This stuck my head little hard enough to convince myself that my plan will lead to bad money saving strategy, will go for transistor itself. Let God reward everyone out here to spend their precious time in helping me out.

Do not forget the diode that was mentioned by @LarryD . Without that, the Arduino will be damaged, whichever way you connect it to the relay.

Also, what device is the relay controlling? If it is low voltage DC, then perhaps a transistor can be used instead of the relay?

1 Like

relay is controlling 500 watts motor pump

This falls into the category of "if you have to ask, then you probably shouldn't do it" :slight_smile:

It's certainly possible to do it safely using the method PaulB outlined, but I'd be hard pressed to find a suitable reason. Transistors are so cheap that even if you were making many thousands of units, the savings would be miniscule. The only reason I'd contemplate this is if I was trying to build something with only the parts I had on hand and I was somehow out of transistors.

1 Like

the best is to use a static relay
a fewmainput and output A.

I take a pint of Guinness :nerd_face:

Ok, that does not sound like low voltage DC, sounds like 120~250V AC, so a relay is a good solution. But are your relay contacts rated high enough for this?

And there is a constant danger that the interference from switching could cause the Arduino to randomly reset. We get a problem like this once a week, and there is no simple cure as a lot depends on circuit layout and getting a quality relay. Then using a snubber to try and dampen the rate of rise of voltage per unit time.

Yeah, I am using JQC3FC -DC 5V RELAY, it drives 1hp motor very well for more than 1.5 hour duration in one stretch

datasheet for that relay

let me know your thoughts please

If you are going to be tying multiple output pins together, do not use digitalWrite, that will have a slight delay between pins, causing some to be high and others low at the same time. Instead directly write to the output port, with all output pins on a single port.

How many times is it switched on / off during that time.

You haven't given us all the information about the motor. What is the voltage?
At 120V your relay will be switching 4 Amps, but at 240V it is only switching 2 Amps.

my relay switched on 1hp motor at 230 volts, for 1.5 hour duration continuously without disconnecting, which means motor ran for 1.5 hour full.

Will it always do this? if so what is the point of the project. I wanted to know because you will only get problems on switching off your relay.

it worked for nearly 45 days, switching on and off once a day, I was completely illliterate and connected the relay directly to arduino IO Pin, now shifting my plans to connect to freewheeling diode and using a transistor to excite the relay. thats it, and also while doing this I should be economical

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.