5v relay and motor


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

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.

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?

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.

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.

....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. ([u]Ohm's Law[/u] 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.

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. ;) 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.

[quote author=Runaway Pancake link=topic=105887.msg794532#msg794532 date=1337040294] It's diodes (flyback diodes) across the coils (relay coils). The contacts are the switch part/s. [/quote]

Yeah, terminology confusion there. The coils.

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!

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

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

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).