Pages: [1] 2   Go Down
Author Topic: About relays?  (Read 2701 times)
0 Members and 1 Guest are viewing this topic.
Santa Catarina, Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i want to make arduino control a 12v motor, but i want it to rotate left and right, i wanna make it with 2 5v relays. Here is the diagram, i draw it, and "relé" is relay in portuguese. Those arrows are diodes.

direct link: http://s4.postimage.org/945iwwpox/001.png
So, my question is, will it work and be safe?
The relays are 5v so the High signal from arduino should turn it on right? But there's that reverse current on the relay, will those diodes protect the arduino from this? If don't, how should i make the circuit?
Thanks, sorry if my english is bad :s
The portuguese forum is too inactive
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3112
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The portuguese forum is too inactive

I did reply to this very question there...
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Santa Catarina, Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did reply to this very question there...
I Know but just want to see what people here answer :)
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3112
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a bit more time now...

Here's a schematic and a complete thread about it.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1196698219/15
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How much current do the relays need to activate?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Cesar_BRX

I check your schematic, so you are using 1 SPDT 5 V relay, to control a 12 V motor. The motor is it going CW or CCW ? ( clock wise or counter clock wise ) If it just CC & CCW, and no stoping, well a DPDT relay will work better. OR you want CC & CCW and Stop/Go, you need 1 SPDT relay ( stop/go ) and 1 DPDT relay ( CC & CCW ) and check the link to how to connect the relay properly.
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unless they are very small relays, you'll need a driver circuit. Those diodes will not rally protect the Arduino. This is the way it's usually done:

http://www.flickr.com/photos/anachrocomputer/3242387876/

If you've got lots of relays (up to smiley-cool, it may be easier to use a driver chip like the ULN2803.

Also note that, with the two single-pole relays that you've shown, it's very easy for the power supply to be shorted. A software bug or startup glitch could do it. better to use a double-pole double-throw (DPDT) relay cross-connected to reverse the polarity, and a single-pole relay to switch on or off.  That way, it can't short.
Logged

0
Offline Offline
Shannon Member
****
Karma: 161
Posts: 10445
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i want to make arduino control a 12v motor, but i want it to rotate left and right, i wanna make it with 2 5v relays. Here is the diagram, i draw it, and "relé" is relay in portuguese. Those arrows are diodes.

direct link: http://s4.postimage.org/945iwwpox/001.png
So, my question is, will it work and be safe?
The relays are 5v so the High signal from arduino should turn it on right? But there's that reverse current on the relay, will those diodes protect the arduino from this? If don't, how should i make the circuit?
Thanks, sorry if my english is bad :s
The portuguese forum is too inactive

No it won't work, it will destroy the diodes and the Arduino.

The diodes must be back-to-back with the relay windings (in parallel and connected cathode to positive end).  They are needed because if you don't provide a path for the current when switching the relay off it will generate a very high voltage and fry all the semiconductors connected to it.  This is because inductors (coils) don't like the current changing fast and will dump all their magnetic energy into the circuit to prevent this.

Look at the guides for connecting a relay to the Arduino and make sure the diode is in the right place.

Also what is the current rating for the relay coils?  If more than 30mA then again it won't work and you risk destroying the Arduino as Arduino pins can only source and sink 30mA or so without overloading.

You need to make sure the relay contacts can handle the current the motors take at start up (many times the idle current) or they may weld together.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You ask about safety, learn about Solid State Relays.
Logged

Santa Catarina, Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MarkT, Thanks now i really understand how it works with your explanation, it's better to know you can't do something when you know WHY you can't do it. So, thanks.
Anachrocomputer, this relay tou talked is like this?

http://www.techitoutuk.com/knowledge/electronics/symbols/relaydpdt.gif
I made some experiments on proteus isis, and it looks really nice, much more simple. And just 1 relay with this one ↑
The on/off i made with a transistor like this:

http://s4.postimage.org/9quiecnwx/001.jpg
Unfortunately I already bought the relays, but just to know. Is there a problem with the on/off part? , because the high or low sing from arduino is 3,3v-5v and on the collector-emitter is 12v. Is there a problem with that?
Also i don't know exactaly the coil thing, that's what is written on the relay:
Model: fangke JQC-3F(T73)
Cont:10A 120vac
Coil:5vdc
i'm pretty sure it can handle.
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 30
Posts: 2246
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pretty bad translations in the datasheet. "Small-scaly power hit the electromagnetic relay".

The datasheet says that the coil resistance is 70 ohms, so you need 5V / 70ohms = 71 milliamps to switch it. The Arduino is only capable of sourcing 40ma per pin so that is why you need the transistor.

The DPDT relay you have posted would be the correct relay to use in the future. Your motor power would be connected to the 2nd and 3rd pins on the top, the motor connected to the 2nd and 4th pin on the bottom, and the 3rd pin connected to the 4th and 5th pin connected to the 2nd (the "cross" Anachro mentioned). This probably won't make sense unless you draw a diagram and think it out.
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, the link you gave to a .gif image failed, with a routing error.

The JPEG image is OK, but it shows that you've got the 12V transistor's emitter and collector reversed.  Also, you'll need resistors in the base connections of both transistors (otherwise, you may damage the transistors).

Remember to connect the ground from the 12V power supply to the ground of the Arduino!
Logged

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

Quote
The Arduino is only capable of sourcing 40ma per pin so that is why you need the transistor.

Just to be clear, the arduino's output pins can deliver more current than this but in doing so it will damage the chip. So you must take measures to keep the current below 40mA. Some people mistakenly believe that the arduino can supply 40mA and has a circuit that limits the current to that. 
Logged

Santa Catarina, Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry i forgot to drew the resistors, i already know that.
How do you mean that the 12v transistor is reversed? In Proteus isis, it works with the collector and emmiter, reversed or not, but always NPN, with the arrow pointing to outside. Doesn't matter if the arrow is pointing outside down, or outside up, it works. Is this in real life? or just in Proteus?
And the transistor thing, i alredy aksked, but again, in the on/off transistor, doens't matter the base is 5v, and the collector and emmiter are 12v ?
Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ Cesar_BRX

Please check this site about properly use transistors. http://www.electronics-tutorials.ws/transistor/tran_4.html

You have a 5 V relay. So connect a +5 at one of the relay coil and the other coil connect to the collector. Don't forget a reverse connect diode ( cathode at 5 V - anode at collector ) and a base resistor about 1 K to 4.7 K.

The 12 V is the motor circuit.

Hope you understand.
Logged

Pages: [1] 2   Go Up
Jump to: