Go Down

Topic: using a 5v relay with arduino (Read 2274 times) previous topic - next topic

treebykooba

hello,
I just went to radio shack and got this relay http://www.datasheetdir.com/OMR-C-105H-V000+Discretes

it's spst, 5v...rated .5a at 125v
the normal current is 20mA so i can control it with the arduino, no?
i just have no idea how to make a circuit for it
i just want to turn some buttons on and off on a digital photo frame.
i know i probably need a diode somewhere...i don't need a transistor though, correct?

                        3
1----------------2
                       4

it's shaped like the above thing...right now i have the arduino going into pin one and i don't know what else to do...i don't know where to power the thing or ground it or anything..the data sheet doesn't give me much as you can see...i've never used a relay before so any help would be much apreciated!

thanks!

retrolefty

#1
May 27, 2011, 12:28 am Last Edit: May 27, 2011, 12:30 am by retrolefty Reason: 1
Quote

                       3
1----------------2
                      4

it's shaped like the above thing...right now i have the arduino going into pin one and i don't know what else to do...i don't know where to power the thing or ground it or anything..the data sheet doesn't give me much as you can see...i've never used a relay before so any help would be much apreciated!



I couldn't find the spec on your link that shows 20ma coil current draw, but if it's a fact then you can drive the relay coil directly from an Arduino output pin. Your can wire it with pin 3 (of the relay) to a arduino output pin, then pin 4 would wire to a ground pin. Then a transient protection diode should be wired right at the relay with the cathode of the diode wired to pin 3 and the anode to pin 4. Pins 1 and 2 are the relay contacts that can wire to the circuit you are controlling.

Lefty

treebykooba

Thanks so much for your help! I'll wire this up tomorrow morning...i'm curious....how did you know what pins go where? I couldnt tell any of that from the data sheet...
Thanks again!

retrolefty


Thanks so much for your help! I'll wire this up tomorrow morning...i'm curious....how did you know what pins go where? I couldnt tell any of that from the data sheet...
Thanks again!


From the datasheet. It's a poorly written datasheet but the diagram showing what looks like a resistor (which represents the coil) give one a hint of the wiring setup.

Lefty

js23

The back of the bag has a "data sheet" on it. That explains how to wire it up clearly. It looks like this is the one you bought: http://www.radioshack.com/product/index.jsp?productId=2062479&filterName=Type&filterValue=SPST

treebykooba

that's the one...but the connection diagram made no sense to me...there are no ground or 5v symbols on there saying which pin to ground...nothing anywhere says you need a diode.
there is a resistor symbol and a switch symbol and some open circles...that's it...

Daanii

#6
May 27, 2011, 07:15 pm Last Edit: May 27, 2011, 08:15 pm by Daanii Reason: 1
This is a reed relay, activated by a magnet. There's no coil.

EDIT: As pointed out below, it looks like I'm wrong on this.

Go Up