Pages: [1]   Go Down
Author Topic: arduino - low power relay, without transistor  (Read 2173 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 124
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this ok to do (digital pin straight to relay coil), as long as the switching coil needs no more than 200mW @ 5V?

Presumably a 5v diode is still necessary?

thanks
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 635
Posts: 34572
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
as long as the switching coil needs no more than 200mW @ 5V?

No the arduino pin can only supply safely about 35mA, so no more than that.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
as long as the switching coil needs no more than 200mW @ 5V?

No the arduino pin can only supply safely about 35mA, so no more than that.

Which equates to about 100mW.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 27363
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are telecom type relays that Arduino's can drive directly, and yes diode is stil needed.
I put 15 or 18 of them on a card for a '1284 chip to drive, with a 1N4148 diode across each coil.
Need to check for coil resistance - want it >= (5V/.035A) = 145, 150 ohm or so and a 5V rated coil,
an example is
http://www.digikey.com/product-detail/en/TSC-105L3H,000/PB1017-ND/1095338
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2927
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are relays with diodes included... I used one one time and forgot about the diode... You can guess the rest, made 300 of those boards and I had to "Eat" them. The relays are made by several outfits including Omron. Yes you can power a relay directly from a processor but it is better not to... for some obvious reasons and some not so obvious... My view is that it isn't a grreat idea and does have some drawbacks but as always IF it works properly and doesn't impact anything else going on then DO IT. Just be aware that some times there are.. Better methods. (engineers make mistakes too, just hundreds of the same one... at a time)

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are relays with diodes included... I used one one time and forgot about the diode... You can guess the rest, made 300 of those boards and I had to "Eat" them. The relays are made by several outfits including Omron. Yes you can power a relay directly from a processor but it is better not to... for some obvious reasons and some not so obvious... My view is that it isn't a grreat idea and does have some drawbacks but as always IF it works properly and doesn't impact anything else going on then DO IT. Just be aware that some times there are.. Better methods. (engineers make mistakes too, just hundreds of the same one... at a time)

Doc

Yum... the taste of crunchy pointless boards.  A taste I know well.  I have some that I use as trays for smaller boards in my reflow oven.  The other hundred or so of them sat in the cupboard... well... I'll build something out of them - a few blobs of hot glue, some twists of wire... Might even make a garden shed with them smiley-wink
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

0
Offline Offline
Full Member
***
Karma: 0
Posts: 124
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

made 300 of those boards and I had to "Eat" them.

Ouch, that's got to hurt.


I found and bought one of these - http://uk.rs-online.com/web/p/solid-state-relays/5356314/ 

Works really well, and only draws ~8mA, straight from an arduino pin
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 107
Posts: 4709
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Better hurry, they're down to their last 32,000 odd  smiley-cool
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 635
Posts: 34572
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
made 300 of those boards and I had to "Eat" them.
My biggest cockup was having to scrap a days production of a set top box because a replacement linear regulator that purchasing "found" oscillated when placed in the circuit.
It was cheaper to scrap 3,000 of them than to have them reworked.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

W = V*A
A = V/W
   = 5V / 0.2W
   = 0.025A
Right?

Well, in Ohm's law, I = V/R.

Arduino digital pins can handle that.
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 635
Posts: 34572
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Right?
No.

W = V*A
A = V/W
A = W / V
   = .2 / 5
   = 0.04A

Arduino digital pins can handle that.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2927
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

NOT I HOPE a Relay coil Direct?... Really kind of a bad Idea, regardless of the current capability of the pin. From an engineering point of view an Inductor of the size of a relay coil is hard to deal with and I know ALL about ALL the techniques to 'Fix" the back EMF pulse from the relay... but that is only one part away (the diode) from the Arduino, not too wise. the simplest and safest solution is a PNP transistor Emitter to Vcc collector to relay coil and base with 4K7 resistor to control port, pull it low to turn on the relay... place a diode across the relay coil cathode to the collector side of the coil and ground the other end (anode of the diode and the other end of the coil). Doing it that way insures that the transistor is off and an open circuit to Vcc. Much safer as now there are 3 parts to provide isolation. An NPN will work in the regular way But one end of the coil Must be connected to Vcc to operate... and then the Back EMF becomes a Lot more Serious to deal with. From an Engineering Standpoint.   IMO

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 27363
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And yet this board worked just fine with this relay
http://www.digikey.com/product-search/en?lang=en&site=us&KeyWords=TSC-105L3H&x=15&y=18
Connects to a keyboard to allow buttons to be  'pressed' vis computer control.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2927
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That wasn't the point, I don't doubt for a minute that it does work and work well, not at all All I said was... "Not real good Engineering" my real point was that you have no "Fault engineering" as I said the only thing that protects anything is the back emf diode on the relay and that a relay coil connected to Vcc directly was more difficult to suppress than the circuit that I described, especially when the other coil lead was connected to the processor. If you are good with it then, GO WITH IT. It Works. all I say here is based on things I have done for many years... like my tag line say's "Based on Many Years of Mistakes", I learned that the easy way is often not the best way, I also learned "That if it Aint Broke Don't Fix It...". My reply wasn't a call for you to rework the project, rather to point out a safer method, usually pursued in the industry so that you might consider other methods in the future. If in any way I offered or appeared to offer criticism Please forgive me that wasn't my intent. For as much as you mighht need advice there are many others who read these posts and my advice was an offering for all, more than any implied disapproval of your work..

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pages: [1]   Go Up
Jump to: