Pages: [1]   Go Down
Author Topic: using a 5v relay with arduino  (Read 1954 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 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!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: May 26, 2011, 05:30:34 pm by retrolefty » Logged

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

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!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

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

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 27, 2011, 01:15:16 pm by Daanii » Logged

Pages: [1]   Go Up
Jump to: