switching comunication pins off

hey everyone,
I have an arduino (1) wich is talking to an led matrix. But I want to connect another arduino (2) to the matrix and disconnect the first arduino. The first arduino should notice then the second one is connected and switch off the switches in the red box on the image. I already tryed using some n-channel mosfets (2N7000) but it wasnt working. I desided to ask for some help here before buying all differend kind of eletronic switches..
Does anyone have any idea what kind of fet or electronic switch will work?

Greetings, Phil

Sorry, clearly an "XY Problem" here! :astonished:

It is possible, but not at all easy, to have two Arduinos share the same output device.

You probably do not want to go down that road, so consider alternatives. Tell us in plain words what you actually want to do, without assuming that "two Arduinos" is the answer. But if it is, buy another LED matrix.

Thank you for the very fast response.
Im not realy good in english, but i try my best :slight_smile:

Ok, lets just remove the second arduino here.

We have an arduino wich should switch off the 3 communication pins whenever i want to. So another device can talk to the matrix. The easiest way i know how it will work is a relay. But i need an eletronic switch to do the job.

I want to use the LedControl.h library for the matrix. I coudnt find a comand in the library that fits my need, so i want to do it on the hardware side.

Phil

Tri-state or open-collector outputs on all devices that drive the matrix would probably work.

Would probably be better, especially in the case of two arduino's, to just have one arduino control the display, and the second communicate with it when something needs to be displayed.

Very unlikely you will find a library with commands to support something like this, since it is so unusual, and generally easier to handle in software instead of hardware.

We have an arduino wich should switch off the 3 communication pins whenever i want to.

Just make those pins INPUT pins, and they are effectively OFF.

Connecting two OUTPUT pins on opposing devices is a good way to destroy one or both Arduinos.

Add a 74HC125 to each Arduino. Have one Arduino control the output enables of each chip - only turn on one chip at a time.

Philter:
We have an Arduino which should switch off the 3 communication pins whenever i want to. So another device can talk to the matrix. The easiest way i know how it will work is a relay. But i need an electronic switch to do the job.

So what is this other device and what is the purpose of the whole arrangement?

As has been pointed out, it is perfectly easy to set the Arduino pins as INPUT, but if the other device cannot do this you simply use a 74HC4066 as a "relay". There is some concern regarding how these devices will be powered on and off.

Philter:
Thank you for the very fast response.
Im not realy good in english, but i try my best :slight_smile:

Ok, lets just remove the second arduino here.

We have an arduino wich should switch off the 3 communication pins whenever i want to. So another device can talk to the matrix. The easiest way i know how it will work is a relay. But i need an eletronic switch to do the job.

I want to use the LedControl.h library for the matrix. I coudnt find a comand in the library that fits my need, so i want to do it on the hardware side.

Phil

But why? This isn't how displays are driven. The display is driven by some controller, and whatever wants
to talk to the display talks to the controller, not to the display - its a black box effectively.

jremington:
Just make those pins INPUT pins, and they are effectively OFF.

I just tried this tip and it works! Cant believe the solution would be this easy :smiley: And this is the cheapest solution too... I thought it was not possible in software..

CrossRoads:
Add a 74HC125 to each Arduino. Have one Arduino control the output enables of each chip - only turn on one chip at a time.

This IC looks promising, maybe I try one on a boring day. For now I have my solution but thank you very much for mentioning the IC.

Paul__B:
So what is this other device and what is the purpose of the whole arrangement?

As has been pointed out, it is perfectly easy to set the Arduino pins as INPUT, but if the other device cannot do this you simply use a 74HC4066 as a "relay". There is some concern regarding how these devices will be powered on and off.

Sorry but I really dont want to waste your time and energie with my XY Problem.
But thank you for repeating what other people already mentioned.

david_2018:
Would probably be better, especially in the case of two arduino's, to just have one arduino control the display, and the second communicate with it when something needs to be displayed.

MarkT:
But why? This isn't how displays are driven. The display is driven by some controller, and whatever wants
to talk to the display talks to the controller, not to the display - its a black box effectively.

I will think about this kind of communication order.. Maybe its better than my plan.

Thanks everyone for the fast answers and hinds!

Phil