0

I'm making a project and i'm trying to send bits from an Arduino to another Arduino with the digital pins. So my setup are 2 Arduino's connected with a jumper. I connected the grounds and they have both a different power supply. Now I tried this set-up and as soon as I connect the output pin to the input pin from the other Arduino the voltage lowers from 5V to 2.6V so we can't detect our bits. Anybody an idea how to solve this problem?

Thanks in advance!

Kind regards, Manu

  • 2
    Schematic and code? – Majenko Mar 25 '15 at 16:34
  • Do they both have the same voltage supply? – MrPhooky Mar 25 '15 at 16:36
  • Well, it could be the bad case of two NOT floating PSs with different ground levels. – Eugene Sh. Mar 25 '15 at 16:37
  • Or a simple case of two outputs connected together, driving different levels. – Eugene Sh. Mar 25 '15 at 16:41
  • How did you measure the 2.6v you're talking about? (Also, you probably should add a resistor in between, just in case the voltages between the 2 arduino's are not exactly the same). – Gerben Mar 25 '15 at 20:35
1

As you are trying to communicate with two arduinos I will suggest you to use some sort of standard communication protocol such as Two wire interface or I2c. There is the Wire.h library you can use and it has also a reference on the main Arduino site. If you have different necessity and want to carry on with you're methods you need to specify in more depth the connections you have made. As for now I can guess that the output is being connected to ground or some sort of load and that might be the reason you are seeing a drop out of voltage. But it might be also the case that you're output pin is changing so fast that the multimeter is not capable of reading the high state correctly

0

I would suggest sticking a transistor in between - use a layout like http://en.wikipedia.org/wiki/Transistor#/media/File:Transistor_Simple_Circuit_Diagram_with_NPN_Labels.svg (from the wiki page on transistor).

Note that Vout should be connected to the input pin on one arduino, and Vin should connect, via a resistor, to the output pin on the other arduino.

Just to confirm, the labels are reversed from what you will expect them to be.

The 2 resistors can be anything > 1kOhm.

This still depends on the common ground.

Note that common ground may not be a good idea if they are generated from the same power source - I've found ground from two USB ports on the same laptop to be at different levels, so current will flow out from one port, and in the other, probably damaging the laptop, if the two grounds are connected.

0

As Harry mentioned better to use some communication lines like UART or I2C or SPI. If you dont have them available then use digital i/os but make sure their pull up and pull down resistors are correctly configured. If it is input just set as pull up and for output set as output pin. Regards, Pathik

  • Please do not repeat what others have already said as it leads to clutter on the site. – Anonymous Penguin Mar 28 '15 at 15:31
0

First of all, I cannot say if your protocol will work or not since I don't have the details. However, switching protocols will give you the same result. Also, you do not need a transistor for this usage.

The solution is to connect the grounds of the different power sources. Since voltage is relative, having the grounds disconnected will lead one device to think that the voltage is higher/lower than the other one thinks (they have different reference point).

0

Are you sure one pins is configured as input? If one would be output high and the other output low you basically get a short circuit: from Vcc through the top FET of the high output, through the wire to the other Arduino, and into the lower FET of the low output, and back to ground.
If the short circuit were perfect the voltage would drop to zero, but both FETs have a non-zero resistance, which makes them a voltage divider.

One way to protect your Arduino against this (such a short circuit does damage the I/O circuits!) is to place a 1 kΩ series resistor between the pins. Since an input pin won't draw any current there won't be a voltage drop across the resistor either.

I wouldn't use Harry's I2C, because it's probably too complicated for your needs. (I don't know what data you want to exchange). A simple connection is the UART: one transmit line and one receive line. It's true that the UART is used for the USB communication, but that connection goes via a set of resistors, so that another controller using the bus should be able to override the USB's signals.

If you have a long distance between the Arduino's you'll want RS232 level shifters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.