Connect two gpio pins on raspberry pi - Page 1
Forum section: electronics / beginners

author: barryoseven
author_rank: Newbie
timestamp: January 04, 2015, 01:43:25 pm
content: Hi there, Im an EE noob!For a hobby I'm working on a project connecting a RF remote to the raspberry pi.When I press a button, pin 13 and 14 are shorted on the MCU.When I put a jumper cable between the pins, the remote sends it's message.Now the following:Pin 13 and 14 are connected to GPIO 0 and 1.In what state should I put the GPIO pins to simulate the same behaviour?Should I read data from one pin, and send it to the other one or something?Thanks in advance,

author: Paul Moir
author_rank: Frequent Contributor
timestamp: January 04, 2015, 05:27:45 pm
content: Welcome,Unfortunately, your guess is probably better than mine. When you're dealing with an unknown signal like that, you're going to have to investigate it further or provide more information in the hopes someone else has already investigated it. The original button could be matrix scanned or simply pulled high or low. Sometimes the switch will pull the MCU voltage to a particular voltage level to indicate which button has been pressed. Unfortunately the details are important to how you have to hook it up (which way the current flows, when, etc). But chances are you've got it wrong by wiring both pins to the GPIO.If you simply want it to work, forget trying to directly connect it and use something like a reed relay. Don't use an SSR: that possibly won't work.Digikey will sell you one that runs on 3v/6mA which you can directly drive from the pi's GPIO. If you add a transistor and resistor you can drive a 5v coil one which costs less.The other way is to learn about what's coming out of the MCU. You may be able to infer this from the datasheet if you can get a copy by identifying the pins. Perhaps you can figure it out with a multimeter: see what voltages are on pins 14 and 13 with respect to the MCU's ground before and after pressing the button. Unfortunately to get the whole picture (like if they're matrix scanned), you may have to probe these pins with an oscilloscope. It may not be worth the hassle, but it can be fun.

author: Richard Crowley
author_rank: Super Contributor
timestamp: January 04, 2015, 06:40:53 pm
content: We typically use a small FET transistor to simulate a button when doing this kind of hack.The source and drain would be connected to the 13 and 14 pins on the target MCU.And the gate would be connected to an Arduino digital output.Of course, this assumes that the target MCU and the Arduino are sharing a common ground reference.An alternative would be to use an opto-isolator in which case a common ground would not be necessary.This is rather a FAQ on the Auduino forum and has likely been asked and answered scores of times.For example:http://forum.arduino.cc/index.php?topic=27352.0

author: rr100
author_rank: Frequent Contributor
timestamp: January 04, 2015, 06:53:49 pm
content: If you want it simple small relay is they way to go for such a low-power low-frequency application. If you chose the right relay you don't need the transistor. But don't forget about the diode!

author: Paul Moir
author_rank: Frequent Contributor
timestamp: January 04, 2015, 07:10:44 pm
content: The FET solution is very good. I hadn't thought of that. I guess I need to learn not to reinvent the wheel.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 04, 2015, 08:48:42 pm
content: Quote from: barryoseven on January 04, 2015, 01:43:25 pmDo you have a part number for that MCU?It's quite possible that one pin is an input the other is a ground pin.The input may be tied high with a pull up resistor and when you press the button it's pulled low.

author: steve_w
author_rank: Regular Contributor
timestamp: January 06, 2015, 05:35:49 am
content: You haven't supplied enough information to answer the question fully.Is the remote control the input or output?are pins 13 and 14 on the MCU or the raspberry PI?What is the MCU partno?what do you hope to achieve?shorting GPIO 1 to GPIO 0 on the raspberry PI wont do much for you at all. If you want to have the remote control provide an input to the RPI you only need to use one GPIO. send more detail and I can tell you what to do.regardsSteve W