Sending and Receiving Signals between 2 Arduino Pro Minis

I'm rather new to electronics and working on a project where I need one arduino to send a boolean signal to another arduino so it can make a decision. I have researched and found many implementations of digitalWrite and digitalRead that would do this.

However, my situation has two unique attributes:

  1. The arduino receiving the signal will sometimes not have power. I could not find if sending a signal through digitalWrite to the receiving controller would fry it if the receiving controller is not powered.

  2. The receiving arduino cannot be powered by the sending arduino at all. Does sending 5V through digitalWrite to an input pin of a receiving arduino power it?

If there is a better method of communication between these two arduinos that anyone knows that satisfies the above criteria please let me know. I've looked online and could not find one.

P.s. they cannot communicate through the serial ports as I am already using the to communicate through the USB.

Thanks for the help!

I wouldn't call using digitalWrite() and digitalRead() really research... That should be pretty simple commands after using blink.

  1. Yes, it can damage the Arduino. It's called phantom power. EEVblog has a great video on it.

  2. And that is what happens then.

But the solution is simple, just add a 100k between the Arduino output and the Arduino input.

Thank you for your input. Can you give a quick explanation of why adding a 100k resistor in between the two arduinos will solve it? Does it just reduce current to the point where it would not damage the microcontroller?

srich36:
2. The receiving arduino cannot be powered by the sending arduino at all. Does sending 5V through digitalWrite to an input pin of a receiving arduino power it?

Another way is to buffer the signal from the Sending Arduino, using a transistor that is powered, on the collector side, by the Receiving Arduino's power source (this can be via a INPUT_PULLUP). That way, if the Receiving arduino is NOT powered, the signal from the Sending Arduino will not reach the Receiving Arduino. This will logically invert the signal, so you will need to invert it in software on the Receiving end.

Also, if the Arduinos need to be isolated, you could use an OptoCoupler. Here are a couple of examples:

I arbitrarily chose the Arduino pin numbers. On the Receiving Arduino, be sure to set the pinMode on the receiving pin to INPUT_PULLUP.

srich36:
P.s. they cannot communicate through the serial ports as I am already using the to communicate through the USB.

There is something called Software Serial: https://www.arduino.cc/en/Reference/SoftwareSerial
Software Serial would allow you to send serial data on "regular" Arduino pins (i.e. pins other than the hardware serial pins), even if the hardware serial pins are in use -- in other words, it's possible to have more than one functional serial port.

BUT, do you really need the complexity of a Serial port? If all you need to do is send a binary bit, then isn't just toggling a Digital Output enough?

srich36:
Can you give a quick explanation of why adding a 100k resistor in between the two arduinos will solve it?

Because, 100k will limit current to the Receiving Arduino enough to prevent the phantom voltage to reach a high enough level to power the Receiving Arduino. BUT, because an Arduino Digital Input has a resistance on the order of 100MΩ [100 MILLION Ohms!], 100kΩ is like zero ohms in comparison -- they are, essentially, electrically the same -- in other words, 100k is SO MUCH SMALLER than 100M, it makes the difference between 100k and 0Ω, like trying to see the individual Planets in our Solar System, from Alpha Centauri! [Ok, that's an exaggeration! But you get the idea, right?]

srich36:
Can you give a quick explanation of why adding a 100k resistor in between the two arduinos will solve it? Does it just reduce current to the point where it would not damage the microcontroller?

Exactly! :slight_smile:

You could also never make the sending pin HIGH. That's what the transistor circuit of ReverseEMF does. But you don't even need a transistor for that, you can make the sending Arduino switch between LOW and floating (INPUT). The HIGH state is made by the receiving Arduino by turning on the internal pull up. Only down side to this, there is no protection for errors on your side. If you accidentally make the sending pin HIGH while the receiving Arduino is off you can still damage it. While a simple resistor makes it fool proof with a single component. You can also use a diode to do the same.

An opto can also be used but because the OP came with directly connecting the IO in the first place I think that's overkill.

Same for SoftwareSerial indeed. If you want full communication between the two I would rather use I2C instead of SoftwareSerial because that's a hardware peripheral.

And a small note, all above options except the diode and opto option are only suitable for short distances because of noise. The diode and opto option can be made low impedance to reduce noise.

septillion:

  1. Yes, it can damage the Arduino. It's called phantom power. EEVblog has a great video on it.

Link to the video: EEVblog #831

Wow thanks for all the help! I'll definitely dive deeper into all these options to figure it out!