Pages: [1]   Go Down
Author Topic: 5v relay and motor  (Read 1309 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 1
Posts: 142
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello,

I am trying to reverse the polarity of a motor using 4 little 5v SPST reed relays (because they're quiet). I built up a circuit with 4 relays in four arduino pins....two that are positive, ground and two that are ground, positive. I built the circuit, using diodes across the relay coils and everything. I was powering the motor separately with an 8v, .5amp powersupply and was powering the arduino with USB. Everything was working fine. I took out the USB and powered the arduino using the 8v, .5amp powersupply into the Vin pin. I let it run for awhile and everything was going fine. I came back, and the powersupply was broken and the circuit didn't work any more. I tried powering the arduino and motor sperately and still nothing....really strange things are happening....when I have the PSU in, I get a normal reading, when I hook it up to the circuit board, I get no voltage coming out when it's in the power/ground rails of the circuit board.

does anyone know what could be going on here? it's strange behavior....the only thing i could think of is that the PSU wasn't regulated and was giving me more amperage than .5 and the relays were getting stuck. but i pulled them out and they are still working....do you think this circuit might work if i had a regulated PSU that was a steady .5amps as .5amps is the max current the relays can take....

these are the relays i'm using: http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1860070_-1
Logged

Offline Offline
Sr. Member
****
Karma: 3
Posts: 250
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If what your saying is you hooked 8 volts to the arduino and are by passing the regulator.
If that's right you may of cooked it.


* Unosmall_Cooked.jpg (284.96 KB, 1044x754 - viewed 44 times.)
« Last Edit: May 14, 2012, 06:34:52 pm by be80be » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18806
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually Vin only bypasses the reverse polarity diode. It seems more likely to me that you may be getting spikes from the relays. Do you have diodes over the contacts?
Logged


Offline Offline
Faraday Member
**
Karma: 65
Posts: 2528
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do you have diodes over the contacts?

It's diodes (flyback diodes) across the coils (relay coils).
The contacts are the switch part/s.

Sorry, really, I don't mean to come off as some jerk for that.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Edison Member
*
Karma: 34
Posts: 1318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What's the current rating on the motor?    The motor will pull more current at start-up, so if you don't have the maximum current rating, I'd assume it's going to take 2 or 3 times as much during start-up or reversal. 

Without seeing your schematic I'm guessing, but it might be possible that one of your relays failed and got "stuck-on".  That would likely cause a short when you switch to the other direction. Or there could be something wrong in your sketch that's turning-on the wrong relays and shorting-out the power supply.  (i.e. Like maybe it's "trying" to run both directions at the same time...)

It you might need to turn-off ALL of the relays for 100mS or so when you change directions, do make sure the ones that are off are really off.

 
Quote
....do you think this circuit might work if i had a regulated PSU that was a steady .5amps as .5amps is the max current the relays can take....
The current isn't "regulated".  A regulated power supply has regulated-constant voltage, and the current depends on the load resistance/impedance.    The otput current rating on a power supply is the maximum or "worst case".     You are more likely to find over-current protection in a regulated supply, but not all regulated supplies have it.   (Ohm's Law describes the relationship between current, voltage, and resistance.)

Sometimes the power-supply current is limited, or there is some short-circuit protection  so that the power supply doesn't die if you ''pull" too much current.    Sometimes there is an internal fuse that blows.   Sometimes you can replace the fuse, but wall-wart supplies are usually molded/sealed so you can't change it.      Next  time,  you can add an external  fuse yourself.  Ideally, you'd have some safety margin, like a 1/2 Amp fuse on a 1 Amp power supply, so you can be pretty sure the fuse blows before the power supply blows. 

Quote
I tried powering the arduino and motor sperately and still nothing....
Does the motor run by itself?  i.e. Just the motor hooked to 8V with no relays and no Arduino?   Maybe the motor shorted-out and that's what fried the power supply.

Do you have a multimeter to check if the relays are stuck?  Or if they are working at all?

It also wouldn't hurt to hook-up some LEDs.  You could hook-up LEDs to the relay coils and to the relay contacts to "see" what the Arduino & relays are doing.  And/or you could hook-up 2 LEDs in oppisite directions to simulate motor-direction.  (With current-limiting resistors in series with all LEDs, of course.)

You can try hooking-up the motor & relays without the Arduino and connect the relay-coils to 5V manually.

P.S.
It's not unusual to burn-up parts when you are experimenting & prototyping.  It happens to professional engineers from time-to-time too.    Hopefully, you don't fry expensive parts (like Arduinos & power supplies) too often. smiley-wink     As you get more experience, it should happen less, and you can learn tricks like low voltage/current testing with meters & LEDs 1st, etc. And, testing of the more-rugged high-power circuitry (relays & motors, etc.) separately 1st, etc. 

P.P.S.
If you don't have a meter, Jameco has them for about $10.   And, if you have an extra LED and ~1K resistor, make yourself a little voltage-tester probe.   A 1k resisor will work with most "normal" DC voltages.  Then, next time you order parts, order yourself an "extra" meter-probe and a clip so you can build a "real" voltage-probe.  I built one with a red LED and a green LED, to test for positive & negative voltages.   

Sometimes a simple LED probe can be handier than a meter, especially it the signal is switching or "blinking".  But, you still need a meter to measure voltage, as well as for measuring/checking resistance & current.
« Last Edit: May 14, 2012, 08:17:33 pm by DVDdoug » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18806
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's diodes (flyback diodes) across the coils (relay coils).
The contacts are the switch part/s.

Yeah, terminology confusion there. The coils.
Logged


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

ok i do have diodes across all my coils and i just tested them and they work. i desoldered two relays and now the circuit works. so i'm going to replace those relays and see if it works again. any other ideas? thanks so much for all the replies!
Logged

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

i replaced the two relays. still getting the same problem. all the relays work. all the diodes work...i can hear the little reed relays making their clicks and everything. but when i hook up four to the arduino and then attach the external power (in this case 6v 300mA, and also a different adjustable one trying all different voltages and 500mA), the powersupply gets no reading on the multimeter...i don't even have the motor hooked up yet.... when i detach the power supply from the circuit, i get a reading again. What is going on?! This is all I have attached.

The relays are wired as such:

pin 1 - 6v, 300mA in

pin 2 - negative diode in, also connected to arduino pin

pin 3 - positive end of diode, also connected to gnd

pin 4 - going to motor
« Last Edit: May 15, 2012, 09:46:52 am by treebykooba » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18806
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like you have shorted something. Can you draw a diagram or take a clear photo?
Logged


Chester, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect your relays have built-in suppression diodes and, as such, the coil connections will be polarity sensitive - if these are connected incorrectly the internal diode will be forward-biased - pulling your power supply voltage down.

Compare the full part number of your relays (pay particular attention to the last few digits) with the information in the datasheet to confirm diodes (or not).
« Last Edit: May 15, 2012, 04:31:10 pm by Eriba » Logged

“Everything should be made as simple as possible, but no simpler.”

Pages: [1]   Go Up
Jump to: