Digital output to digital inputs

Hello,

I need to do to connect digital output of one arduino to digital input of many other arduinos (e.g. to have one arduino "activate" others).

I think I cannot just connect output to inputs directly, right?
What do I need to do?

Thanks!

If both system works at the same voltage, yes, you can make direct connection, just add a resistor like 2.2k in between to limit current and stay safe.

Ciao, Ale.

Maybe 'wake on interrupt' could be what you need.

Or I2C or Serial or PWM or lasers or whatever...

It's a typical XY-problem. Why do you think you need to do that?

Ow and keep in mind you can't power another Arduino from an Arduino.

I think I cannot just connect output to inputs directly, right?

Yes but remember to also connect the common grounds together.

While some people advise a series resistor for safety I would not. But if you insist on using one then it should be more like 180R not 2K2, especially when you are connecting one output to more than one input.

I don't see anything wrong with 2k2... The input resistance of a pin is like nothing IF the Arduino is powered on. The resistor is there to protect the Arduino if it's turned off and you feed power into a IO pin. See EEVblog. I would say 180R is just to low to be sure you don't exceed the maximum rating.

I think Grumpy_Mike has allowed for the drop in voltage when sourcing current and rise from GND when sinking current. Using (4.2-0.80)/180 gives 18.9mA.

Regarding the Due, I think the developers at Arduino should have watched that video and maybe they wouldn't have shorted several pairs of pins on the R3 board.

Hmm ... if having to choose between watching it or discontinuing the board, I can see some reasoning for their decision.

EDIT: Of course, shorting several pins is not a problem providing they both don't become outputs and driven to opposite states. Yeah, that's the "safety" part of the question ... shorting could be OK for a given application, but not good idea for a development board sold to the masses.

The resistor is there to protect the Arduino if it's turned off and you feed power into a IO pin. See EEVblog.

So don't do it. Parasitic powering is a well known effect, the rule is that you never connect powered and un-powered systems together.

I don't believe in such a "nanny state" solution in place of just a tiny bit of knowledge. It is like trying to foresee all possible idiotic screw ups. You can't do it some one will always out stupid you no matter what you do. The only solution is education. Not stabilizers on your Harley Davidson.

Thanks fellows.

Sorry for not being clear...
Here is what I am trying to do, some sort of communication network:

Based on some of your answers it appears it could be done.

I asked the question because I was worried on how many collumns and rows of arduinos can I put in the "network" without any extra equipment.

What on earth are you trying to build??? An ATmega data center?

If they are all powered in common and close together and unidirectional, no problem.

If powered separately then you have to prevent parasitic powering as has been mentioned, somehow.

If bidrectional you have to prevent two outputs fighting each other.

Most the issues can be solved with open-drain outputs, which can be done programmatically or via diodes
and external pull-up resistors.

Series resistor is a simple way to protect against damage if parasite powering (limit the current to a fraction of
mA then nothing bad can happen).

Can I protect it with a diode instead of resistor, e.g. a LED?

l00p1n6:
Can I protect it with a diode instead of resistor, e.g. a LED?

No.

Oh Mike, I disagree! given the possibility that the LED might fuse before arduino(s) in the path ......
Hmm, well, that's not much protection, is it?
Never mind, you're right.

go ahead burn up a few. marvelous learning opportunity, eh?

I would try with resistors, but I just dont see the math behind using resistors, since both input and outputs are connected to arduino pins. :frowning:

Two reasons

  • To protect from phantom power if one of the two is powered off. Not a problem if they always share the same power supply

  • To protect them from you when you fuck up and set the pins on both boards to output. One being LOW, one being HIGH...

To protect them from you when you fuck up and set the pins on both boards to output. One being LOW, one being HIGH...

Not a problem if you are not a fucking idiot.