uclemonbee
Posts: 1
Joined: Wed Mar 13, 2019 6:18 pm

Using GPIO for data pass through

Wed Mar 13, 2019 6:29 pm

Hello!

So I'm not too familiar with the pi, my extent of experience with it is powering it on and setting up ssh so I can remotely log a usb-serial cable. Working on a project for work to try to automate some things and my first hurdle is trying to figure out a way to be able to switch inputs for one output. I'm not sure if this is possible using the GPIO pins or not. I don't need the pi to touch the data coming in at all.

What I currently have; 3 different alarm panels right now, each panel has 2 wires (Tx and Rx) I have those data wires connected to a board and I have 1 radio, which I can then connect to the breadboard to connect to the desired panel. Pretty much I'm using the bread board to quickly switch between panels so I do not have to move the wires from one panel to the next everytime.

What I'm trying to do is use the pie to be able to electronically select which panel my radio is connected to. So the pi doesn't need to access the data at all.... just be able to select which panel.

Andyroo
Posts: 4465
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Using GPIO for data pass through

Wed Mar 13, 2019 10:23 pm

You could use something like an IC based DPST (double pole single throw) with the inputs being common across the switches and just select the relevant outputs.

The issues you may need to address are:

1) Voltage
2) Current
3) Resistance of the package itself and the associated circuitry
4) Signal noise and frequency
5) Feedback (both electrical and signal)
6) What happens when you switch from one to another - you would have to 'break' the first switch before 'making' the second.

1st thing you will have to check is the voltage as serial TX/RX can be at any voltage - I've seen 3v, 5v and the traditional +12v/-12v and go from there.

Speed may not be an issue so 2 - 5 may not be a problem (last time I looked at an alarm panel the 'high speed' options was 9600 baud :shock: :roll: :shock: ) You could look to optically isolate the Pi if needed but its unlikely at this speed / voltage if you keep it seperate. Think about ground connection (esp over longer distances) and if your alarm company and insurance do not mind the 'addition'.

You may actually get away with a small relay for each output :)
Need Pi spray - these things are breeding in my house...

xl97
Posts: 127
Joined: Thu Jan 12, 2017 3:34 pm

Re: Using GPIO for data pass through

Thu Mar 14, 2019 7:56 pm

Maybe just use a transistor/mosfet to accomplish this?

I dont have any experience with the RPi GPIIO stuff yet.... but I do on the Arduino platform..

and when its too much voltage/current.. (whatever) usually you use a transistor to 'toggle/switch' things for you.

User avatar
davidcoton
Posts: 4124
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Using GPIO for data pass through

Thu Mar 14, 2019 8:56 pm

xl97 wrote:
Thu Mar 14, 2019 7:56 pm
Maybe just use a transistor/mosfet to accomplish this?
Not in this case. OP is trying to select input from a number of sources.
Signature retired

PhatFil
Posts: 1363
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Using GPIO for data pass through

Thu Mar 14, 2019 11:50 pm

You could use usb/ftdi devices to connect each output serial device to your pi via usb and the input device to the gpio uart.
and perhaps use further gpio pins for buttons to select how you direct the input?

if you must use gpio i found this looking for the pi equivalent of the arduino 'software serial'
https://www.rs-online.com/designspark/r ... are-serial

edit.. costwise tho i think you could buy an arduino mega clone for about the same cost of 3x ftdi devices and iirc the mega board has 3 or 4 x h/w serial ports available over gpio? perhaps a pi isnt the best 'horse for this particular course'

Idahowalker
Posts: 445
Joined: Wed Jan 03, 2018 5:43 pm

Re: Using GPIO for data pass through

Fri Mar 15, 2019 12:48 am

Something along the lines of a CD4066, might even use two or three to make a switch matrix controlled by the RPi.
Without knowing why you are deleting my postings, I will not know how...

Return to “Beginners”