Pages: [1] 2   Go Down
Author Topic: Connect Gate Remote Board Directly to Arduino...?  (Read 1301 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

When it comes to specifics of electronics I'm a bit of a noob, and as such, looking for a little help / guidance.

I've got an arduino uno with ethernet shield, reed sensor, and relay module all connected up and working great for opening / closing my garage door, detecting open/close status, etc.  

What I would like to do next, is, given there is also a security gate just outside my complex, I would like to take an extra remote that I have, and connect the remote's board directly to my arduino uno to mimic the button press, so that I can issue a gate toggle programtically.  This seems to be the most "eloquent" way for me to pull this off, i.e, I can't monkey with the gate operator to install another arduino with wireless connectivity to trip a relay to open the gate, and I think it is kludgy to try and rig up a mechanical device to actually press the button on the remote, so this is the direction I would like to head.

However, given my electronics noobiness, I'm not 100% clear how I would go about interfacing the arduino with the remote board.  The board has the standard momentary switch on it you typically see in arduino starter kits, and I hooked up a multimeter to the varying 2 points on the board where the button is connected, and when selecting various alternate points on the board, w/o pushing the button, I get what appears to be about 4V DC (I didn't expect to see anything until I actually pushed the bottom, btw).

Any kickstarter tips, points in the right direction, etc, would be greatly appreciated.

Thanks!
« Last Edit: November 13, 2012, 02:24:12 pm by JsChiSurf » Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 244
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've done this before open the case of the remote and find if the buttons are high going low most time that the case I then soldered a NPN most any work I had  2n3904

solder the collector to the high side and emitter to the ground side  put a 1k resistor on the base
 tie the ground of the remote to the ground of your arduino and hook the 1K to a digital pin.
Logged

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

Thanks be80be for the reply, this helps IMMENSELY!

I think, based on my multimeter readings that it is definitely going high to low, correct?  I.E, I see the current when testing 2 pins w/o a button press, and it goes away when holding the button down.

Keeping in mind my noob status, how did I determine which side where the button connects is high versus ground? Once I can figure that out, I think I'm good to go with your instructions!
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 244
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You got her right just use the transistor as a switch you shouldn't need a resistor on the collector
but I would look see what's on your button
Logged

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

Okay, now I'm confused.

Originally you said to put a 1k resistor between the base of the NPN and the digital i/o on the arduino.  But in the most recent reply you said I shouldn't need a resistor on the collector...?

And I'm still hoping for some guidance on understanding which is high side side versus ground side on the remote board.

Thanks!

« Last Edit: November 13, 2012, 07:49:13 pm by JsChiSurf » Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 244
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let me show you what i'm saying


* hack.JPG (56.13 KB, 883x429 - viewed 28 times.)
« Last Edit: November 13, 2012, 07:53:54 pm by be80be » Logged

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

Thanks.

So, to confirm, in your diagram, your positive from the board is connected to the NPN collector.

Ground from the board goes to the NPN emitter.

1k resistor between base and digital i/o of arduino.

What about ground from board to arduino?  I'm realizing in your original reply you mentioned "tie ground of remote to ground of arduino", but you also mentioned "solder emitter to ground side".  I don't see this in the drawing.

Sorry for so many questions.  Just want to make sure I actually understand what I'm doing before I do it :-)

EDIT: Attached, for your reference, is a photo of the remote board with the 4 pins for the momentary button circled.



Thanks for your help.
« Last Edit: November 13, 2012, 09:00:01 pm by JsChiSurf » Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 244
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yours is a lot easier to figure out then My board you can see thee parts. lol
Just place the NPN pins collector and emitter to ground and hook the base to the arduino with a resistor 1k or higher and you should be able to make it work just as the button did.  

Your button is easy if you test it one side is high and one side should be ground just solder the collector to the high side of the button and solder the emitter to the low side of the button and you'll be good to go
« Last Edit: November 13, 2012, 10:57:00 pm by be80be » Logged

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

Okay, I've essentially re-drawn on my own board what you provided previously, but I'm just covering my bases here.

Here's my proposed setup:



If I hold the board to the light, I can see the red lead headed to the bottom right pin in the photo above, so this should tell me (even w/o a multimeter, which I've tested as well), that this is my "high" and therefore, my solder point for the NPN collector.

One of the other pins that doesn't read out any volts is going to be my low (ground), and the NPN Emitter gets soldered to it.

NPN base is getting connected to one of the Arduino I/O's with a resistor between.

All good so far, right (hopefully)?

Under such a setup, I'm not using the Arduino itself to supply any power (I think where some of my initial confusion came from between us), and as such, the 9V battery remains in my setup to supply the needed power.  Correct?



« Last Edit: November 14, 2012, 11:27:06 am by JsChiSurf » Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 244
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep you need power Just make sure you tie the grounds to the remote Ground to the ground on the arduino need to be tied.

And you don't hook the emitter to any thing but the switch low side and it will work  

Here I made a video showing the hack. I'm toggling the npn with the battery for now

« Last Edit: November 14, 2012, 01:22:46 pm by be80be » Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1866
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Another easy way to do this is to use an opto-isolator like 4N35 or PC817. 

Take a look on the ArduinoInfo.Info WIKI:

http://arduino-info.wikispaces.com/Popular-ICs  and scroll to OPTO-ELECTRONIC IC'S

These are less than 50 cents each and you don't have to worry about "What is grounded"...

Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

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

Interesting.

So, looking at the PDF for the 4N25, I would just use connectors 4,5,6, with 6, base, going to my Arduino I/O.  Do I still need a resistor between base and the Arduino?

Connections 1,2,3 would not be used for anything?

Thanks.
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1866
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The way the 4N35 works is you turn the LED inside it on and that turns on the transistor.

So pins 1 and 2 are an LED. You need a series current limiting resistor, say 180 to 330 ohms or so and drive it from arduino just like any LED.

That turns the transistor ON.. So you can use pin 5 (+) and pin 4 (-) to connect where the switch is / was.

Make sense??
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

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

Thanks.  I'm getting there.  Bear with me, I'm very "green" with the electronics side.

In this setup, then, I was clearly off on my thinking, as pin 6 is unused.  I'm good, per your reply on 4 & 5.

The only thing that confused me in your statement is that pins 1 AND 2 are for the LED.  Is that 1 for the I/O slot, the other for ground from the Arduino?  And, the resistor is between the Arduino I/O slot and Pin 1, right?

Assuming I'm on the same page, it would seem to make sense to just go with the PC817, since it has just the 4 pins I need and nothing else.
« Last Edit: November 15, 2012, 11:02:26 pm by JsChiSurf » Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1866
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Easiest way is:

220 ohm (approx) resistor from Arduino I/O Pin to Pin 1 4N35
4N35 Pin 2 to ground. 
..just like any LED...

PC817 should be fine...  this is not a critical application.
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Pages: [1] 2   Go Up
Jump to: