Go Down

Topic: switching comunication pins off (Read 262 times) previous topic - next topic

Philter

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


Paul__B


jremington

#2
Aug 18, 2019, 12:54 am Last Edit: Aug 18, 2019, 01:02 am by jremington
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.

Philter

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

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

david_2018

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.

jremington

Quote
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.

CrossRoads

#6
Aug 18, 2019, 03:46 am Last Edit: Aug 18, 2019, 03:53 am by 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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Paul__B

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.

MarkT

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

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.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Philter

#9
Aug 19, 2019, 12:11 am Last Edit: Aug 19, 2019, 12:12 am by Philter
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  :D And this is the cheapest solution too... I thought it was not possible in software..

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.


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.

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.
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

Go Up