Connecting GPIO1 to GPIO2 Raspberry Pi

I was also wondering about the why a loop back on the one device.
If this is a pi with a full OS and you are trying to trigger one application using GPIOx via a 2nd application using GPIOy could you not just do that in software?

1 Like

I have a few of these but they’re not bi-directional. Once I scale up from just two GPIOs I’ll have a rats nest of wires and ICs.

Trying to guide a program while running; I’m still deciding on the exact behavior.
Where did launching programs come from?

Lots of technical discussion here so not getting into that.

But gotta ask @Pixmusix WHY would you do this.
The micro has control of both GPIOs, so whatever you are doing could be done in software inside the micro. It is a waste of 2 ports. Even if it was two threads or two programs each using a different port, passing info is much more efficient in software.

Having said that I have connected the GPIO from one micro to the GPIO of another micro (same type of micro), so can be done. Both ports on the same micro, probably not a problem, as long as one is input and the other output.

Regards
Jim

1 Like

I’m thinking about patch boards. We use them a lot in music.
The truth is I don’t yet fully understand what I want; I’m still sketching.

In the sim we’re referring to there are resistors in line preventing the short. However the logic levels in falstad have inf impedance so no current flows between them. There not designed to be used the way I’m using them. That’s ok. It was just a demo of a concept. :slight_smile:

If it was a pi running linux then its programs that are running talking to the GPIOx pins. In the past I have seen people try to trigger things via a form of loop back… so this was just a guess.

1 Like

Sorry, We must be talking about another post or you have forgot to post another pic

Unless I am going blind, in the sim pics posted there are NO, ZERO, ZILCH resistors between the 2 GPIO ports. Sure there is a resistor to ground (Why) but NONE between ports. If you have one port HIGH and one port LOW you have a short between HIGH and LOW. Nothing in the way of current control in between.
Cheers Bob

I think you’re talking about GPIO22 (out) and 23 (in)

The one I think Michael and I were discussing is 21 and 22 which are both output, connected through the PNP and 2k ohms.

1 Like

If you put what you are talking about or delete the pics we might be all on the same page here. The pics show NO resistor and you have not stated that you are no longer referring to the info on the pics.

That is a reference you made AFTER the pics.
And Yes, I am talking about 22 and 23 and they are both directly connected. NOT via a 2.2k resistor. That is exactly how you depicted the connection in both pics.
All yours
Cheers Bob

AND there has been no mention of 21 and 22 as a pair since you published those pics of your simulation. So you will have to excuse me for assuming the pics were the current state of play.

1 Like

Hi Pix
My humble apologies
I eventually found the reference to 21. In the small print at the top of the pic. I am afraid I only clocked the “3.3V” and went no further.

I am just as confused as ever. Why connect an output there. It will do nothing. The transistor base (22 & 23) have to be low before the transistor turns on then what. The almost 3.3V will or should appear across the 10k resistor to ground. Then what??? Nothing that I can see.

Going in circles a bit I think.
Cheers Bob

2 Likes

It was just an idea for a gate. The vision was that if 22 or 23 output a HIGH they seize up the PNP and protect the rest o the circuit. It doesn’t work it 22 is out LOW, so it’s ultimately a half measure.

Pixmusix, The logic of what you are trying confuses me. I think you’re trying to ‘simulate’ something that would make more sense if you used a couple of push buttons.

Are you using pin 13 to ‘sense’ the state of some external input(s)? What will be connected in the real world, because an external push button (or two) may be better way to simulate it/them.

Simply on the logic, you turn on pin 22 and later want to know that state it is in, so you could just read the pin again, or set a variable in your code (‘pin22_satus’) to ‘true’ when on and ‘false’ when off.

Dave

Ahh I see what you want to do now.
Excellent idea and makes sense.

Hope you get it working well.
Cheers
Jim

2 Likes

Hey @Pixmusix,

I’m still trying to fully understand the exact logic you’re aiming for, but a relatively safe approach would be to route each GPIO line through a protective buffer IC before bringing it back to the Pi. There are plenty of different buffer and driver IC options out there, and it could be worth exploring to see if a few fit your use case.

I might not have the whole picture of your design yet, but once you’ve got the signals buffered, you can start doing some really interesting things with logic gates and routing.

Hi Pix

It might help, for me anyway, if you could tell me exactly what a “patch board” is or what you intend it to be.

I know what a patch “cord” is but a board escapes me
Thanks
Cheers Bob

1 Like

So this is a patch bay. My brain is very comfortable with them, and I use them to route traffic between scripts and drivers on my network. I’ve been wondering about using the Pi as a network manager or maybe in some kind of music fx patcher… not sure.

The confusion here is that I’m not goal orientated right now, I’m was just staring at my Pi 400 and looked at the GPIO pins and said to myself:

“oh! they kinda look like my patchbays… I wonder if I could … naah I’d probably need lots of resistors and mess… well actually maybe not :man_shrugging: … hmmmmm”

So I hit some datasheets and the datasheets didn’t really talk about it, which is usually a red flag, and so I jumped online to see if someone knew anything about it.

This isn’t really for anything specific…

Anyhow, Michael answered my question with his comprehensive list of options and then even found me a schematic of the internals. The internals have op amps which means I can do it but my code has to be robust to avoid shorts between two outputs.

I think what you are looking at might be termed a ‘Crossbar Switch’. You have (some number) N outputs and want to connected them to (some other group of) M inputs, and vary this according to programmatic control sequence.

Do some searching around that.

Dave

Hi Pix

So now we have a patch “bay”. Make up your mind here
I would know them a patch “panel” and the coloured cables patch “cords” or “cables”

And Yes, I am very familiar with this sort of thing, even the XL connector type of patch.

The top ones look like audio TRS types which would have a “Line” side (top) and “Equipment” side (bottom) . The patch 'Cable" breaks the through circuit when inserted. Mostly there is a third row above which is a Line side bridging connection which does not break the circuit. As the name implies this provides a connection for a bridging instrument to monitor the active circuit.

Sometimes this sort of thing is used for + and - DC keying and due to the mechanical structure of these “jacks” there is a very real chance of a short between + and - when the patch cables are inserted and withdrawn. In this case the wiring is reversed on one side and the “Cables” are cross connected. This has to be known and planned for during system design and the audio and DC cables kept separated or identified. If you can put up with audio phase reversals this does not matter but most professional installations cannot tolerate reversals in odd parts of the system so great care is exercised.

I have seen and installed hundreds of these. Quite a few broadcast and TV stations
The original instal of CH 10 studios Sydney
Headed up instal team and commissioning
Rebuild CH 10 News Facility.
Broadcom House, Ultimo Sydney
Temporary studio CH 10 Perth
Permanent studio CH 10 Perth
Cut over from temporary to permanent studio CH 10 Perth
Various Broadcast studio and transmitter sites all over the country
HF transmitter facilities.
just to name a few.
In fact most places where this sort of thing is used.

Notably, in all the many hundreds of installations and systems that I have seen and worked on NEVER have I come across an active patch panel that requires OpAmps etc. Every one has been passive. The active bits are always in Distribution Amps (usually 1 input 8 outputs) A/V matrix switchers and the like. NEVER in the actual “Patch Panel”
Cheers Bob.

1 Like

Hi Pix

I have just searched 3 times and I can’t find any post of a schematic of any patch panel “internals”. Maybe I have missed something. Or much in the way of options if it comes to that.
I would be very interested in this schematic. The only schematic I found is a breakdown of a RPi GPIO arrangement. That is NOT a patch panel.
Cheers Bob

1 Like

just to clarify. I’m not building a patch panel, I’m just taking inspiration.
I’m thinking about how the GPIOs of a Pi, or maybe a breadboard, could be like a patchbay or patchboard. Patchbays don’t have Op amps, but the pi schematic that Michael found does :slight_smile:

my design is similar for sure, although converting GPIOs to a matrix isn’t super fun.
I had this other idea of using fets as gates but I dunno it’s too much.

1 Like

Hi Pix.
I think I am getting it. You want something like the breakout boards where all the GPIOs are brought out to terminal block for easy connection. Only in a “patch panel” sort of arrangement.

Your problem here is the very high input and output impedances involved. Little antennas everywhere. OpAmp buffers would fix most of that BUT GPIOs are a 2 way street which to be versatile would have to be accommodated. Very complex. There might be ICs that will do this job. Some line drivers that have a reasonable low output Z and a decent fan out might be pressed into service like an RS232 or RS485 driver. The RS485 one is half duplex so would be bi directional.
Cheers Bob
Would still like to see that schematic of an active patch panel with OpAmps.

1 Like