Garryb
Posts: 3
Joined: Sat Aug 10, 2019 10:37 pm

Issues with gpio

Sat Aug 10, 2019 10:43 pm

Hey,
I have a remote control with several pad butts on it and i want to be able to simulate pushing multiple ones. I have been able to simulate pressing each one but when i solder both of them up the board seems to get confused and only presses one button.

Im using gpio pins 4 & 26 (wiring pi numbering) and am using a rpi3 model b. Also, it seems (from my limited knowledge) to be a pull up circuit. I.e. the command 'gpio write 4 1' means off and 'gpio write 4 0' means on.

Image:
https://ibb.co/q7gDkkV
[TL;DR]
With this, I can successfully simulate clicking number '4'. If i remove it and do the same to another button, that button will work. If i soldee both, the remote seems to get confused and wont press the right button.

any help is greatly appreciated.

User avatar
neilgl
Posts: 947
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Issues with gpio

Sun Aug 11, 2019 8:32 am

Are you sure you have the correct pins? From the photo, topmost black wire is on ground and second black wire is on physical pin 16 (BCM 23). The white wire is on physical pin 20 - ground again.

Also I would use push on DuPont cables rather than soldering to the pins, makes it easier to change.

pcmanbob
Posts: 6898
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Issues with gpio

Sun Aug 11, 2019 10:10 am

Hi.

You can't simulate pressing button on your pcb using gpio pins like that, because you are connecting the ground and 3.3v of the pi to the other circuit.

You need to drive a switch using the gpio that you can then use to make the connection across the existing switch on the circuit board.

The simplest way to do this is using a relay , the pi gpio drives the relay and the relay contact is connected across the switch on the pcb,

you can also do this using opto-isloators but when using them you need to know which way the voltage is flowing on the switch so you can connect the transistor side of the opto-isolator the right way round.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

drgeoff
Posts: 9803
Joined: Wed Jan 25, 2012 6:39 pm

Re: Issues with gpio

Sun Aug 11, 2019 1:45 pm

Remotes with more than a few buttons often use a matrix arrangement. For those, you cannot emulate key presses by a simple pull to ground.

Garryb
Posts: 3
Joined: Sat Aug 10, 2019 10:37 pm

Re: Issues with gpio

Sun Aug 11, 2019 6:46 pm

neilgl wrote:
Sun Aug 11, 2019 8:32 am
Are you sure you have the correct pins? From the photo, topmost black wire is on ground and second black wire is on physical pin 16 (BCM 23). The white wire is on physical pin 20 - ground again.
Yes, that's simply a result of me testing things. The only wires that are connected are the two black wires seen in the pic.
drgeoff wrote: Remotes with more than a few buttons often use a matrix arrangement. For those, you cannot emulate key presses by a simple pull to ground.
Ahh ok, is there anyway for it to be done then?

btw, ik the soldering is pretty terrible but it's a result of me desoldering and resoldering like 20 times until I finally realized what was going on (only one button at a time would work correctly) lol

User avatar
neilgl
Posts: 947
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Issues with gpio

Sun Aug 11, 2019 7:02 pm

Ah are we trying to get the remote control to output something e.g infrared commands to TV / Satellite box?

Garryb
Posts: 3
Joined: Sat Aug 10, 2019 10:37 pm

Re: Issues with gpio

Sun Aug 11, 2019 7:20 pm

neilgl wrote:
Sun Aug 11, 2019 7:02 pm
Ah are we trying to get the remote control to output something e.g infrared commands to TV / Satellite box?
It's actually a garage door opener with a keypin. My idea was to program it to a single number (4 in the pic above). Simulate pressing 4 the correct number of times and then hit the up/down button (the two pads that a really close together btm. right of pic) to activate the garage.

link to owner's manual (https://cdn2.hubspot.net/hubfs/2432366/ ... Keypad.pdf)

Ik i could just buy another remote without a keypin but I'm mostly doing this to learn why it is/is not possible (im a beginner when it comes to gpio). I thought it would be a good learning material to try and wire up all (or most of the buttons) then have a webpage to have you put in the correct keys. The web page (local only) would then attempt to input whatever the user entered and submit it to the remote.

At this point I'd be fine with just faking it (validating web side) and only having the two necessary buttons tbh tho

pcmanbob
Posts: 6898
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Issues with gpio

Mon Aug 12, 2019 12:04 am

Garryb wrote:
Sun Aug 11, 2019 6:46 pm


Ahh ok, is there anyway for it to be done then?
As I said in my post above
pcmanbob wrote:
Sun Aug 11, 2019 10:10 am
you can do it using a relay driven from the gpio using one for each switch on the remote or an opto -isolator in place of the relay but you will need to get the transistor output of the opto-isolator polarity correct to match the switch on the remote , again one opto-isolator for each switch
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Troubleshooting”