Pages: [1]   Go Down
Author Topic: Need a basic component to open/close 12v, controlled by a 3.3v signal  (Read 1448 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone, help me find a basic component!

I have a 12v remote (it's a garage opener) with a simple push button. I want to take that button out, and put something that can be controlled by a 3.3v Arduino (power sources are separate).

Something simple: Arduino sends a '0', circuit opens, '1', circuit closes.
I wanted a cheap component, but all I can find are $5+ relays that are way overkill for this.

What would you use?
Note: separate grounds, these are two independent circuits.
Logged

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

Quote
What would you use?
Note: separate grounds, these are two independent circuits.

What I would use is a simple inexpensive 5vdc reed relay. It only requires around 10ma of coil current so can be directly wired to a arduino output pin. If used one should also wire a diode across the coil terminals with the cathode lead wired towards the output pin terminal.

 http://www.allelectronics.com/make-a-store/item/RLY-541/5-VDC-SPST-N.O.-DIP-REED-RELAY/1.html
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An opto isolator may also be suitable. You'd need to measure the voltage across the push button when it is open and current flow through it when closed to see if this is a viable solution.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

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

Thanks for the tips. I'm running the atmega328 standalone on 3.3v and couldn't find a reed switch triggered by that voltage, so I'm going to try the optocoupler.

One concern with the optoc is the voltage drop it causes. I replaced the pushbutton with progressively higher resistors, and found that the garage opener was okay with drops of up to 1.6v. Picked an optoc with a forward drop of 1.2v.

Cheers
Logged

Offline Offline
Edison Member
*
Karma: 23
Posts: 1173
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are replacing a switch, a relay is the "safest" unless you completely understand what the switch is doing in the circuit/schematic (i.e pulling a voltage up or down, or part of a matrix, etc.)

Is there any reason you can't connect the grounds?  Usually, you can.   Isolation requires either an optoisolator or relay.  (Transformers can isolate AC, but not DC.)

If you can connect the grounds, a xx2003 chip is less than $1 USD (assuming you don't have to pay shipping).   This chip can boost the signal and/or drive a 5V or 12V relay (up to 7 relays) if supplied with the appropriate voltage.  And, it can be driven by an optoisolator if needed.   Be aware that the 2003 is an inverter...  A high on the input "pulls-down" the output.    (If wired correctly, pulling-down the output can turn-on the relay.)


Logged

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

I wasn't quite sure of what the button did at first, so I thought it'd be best to keep the Arduino separate from the garage opener remote.

Turns out, all the button does is connect the circuit to ground ( battery — ). I'm actually curious as to why they place the switch between the radio electronics and ground, instead of between Vdd and the electronics. Doesn't matter since this is DC?

I might try to run everything off the 12v battery, with a voltage regulator for the Arduino. That way I'd get common ground and could use a MOSFET as a switch?

Thanks for the tips!
Logged

Offline Offline
God Member
*****
Karma: 3
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can tie the ground of the 12V to the ground of the Arduino. Then you can drive a MOSFET (like the BS170, at 29 cents a pop) to open/close the 12V circuit. You'll also want a resistor from pinout to gate, and another resistor from gate to ground (to make sure it turns off under all circumstances). At 5 cents each, you're still looking at a BOM under half a dollar :-)
Logged

Pages: [1]   Go Up
Jump to: