Go Down

Topic: Digital output to digital inputs (Read 1 time) previous topic - next topic

l00p1n6

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!

ilguargua

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.

Southpark

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

septillion

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.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Grumpy_Mike

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

septillion

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.

Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

dlloyd

#6
Jul 06, 2016, 02:21 pm Last Edit: Jul 06, 2016, 02:35 pm by dlloyd
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.

Grumpy_Mike

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

l00p1n6

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.

septillion

What on earth are you trying to build??? An ATmega data center?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

MarkT

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

l00p1n6

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

Grumpy_Mike

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

123Splat

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?

l00p1n6

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

Go Up