Two computers, Two Arduinos - Electrical Safety Question

Hello!

I am looking to implement a project where two Arduinos are connected together in a controller/delegate fashion while also both being connected via USB to two separate computers (each Arduino connected to a single computer). The Controller Arduino and Delegate Arduino would both be powered via the USB interface of Computer 1 (at least, they would be when Computer 2 is off). My question is - would I be risking damage to the USB ports of either computer by having them connected to the Arduinos in this manner? Would this work and be safe? Should diodes be placed in this setup somewhere to mitigate the risk of damage? I assume USB ports generally have protective diodes but I'm not sure if the voltage supply from the two computers would potentially conflict with each other and causes issues.

Notes:
These aren't the specific Arduinos I would be using.
The data connection between the two will be I2C.
My intention is to pull the ~4.5V (USB supplied) from the delegate Arduino to power the Controller Arduino.
The controller Arduino will also likely have an RTC module connected via I2C.

Thank you so much for your input! This is an awesome community!

There are several possible problems with that setup, and a couple of general worries you should be aware of:

  1. Avoid direct connections between pins on a powered Arduino with pins on an unpowered Arduino. You can damage both Arduinos doing so. If you can't avoid that, put a 10K resistor in the lead to limit the current from the powered Arduino to the unpowered Arduino.

  2. Computers on different branches of the AC power line can have conflicting neutral voltages ("ground loops"), which can damage both computers if there is any electrical connection between them.

  3. The "5V" USB voltage will not be the same on two computers, leading to possible conflicts.

The safest approach to connect two Arduinos on different circuits is complete electrical isolation using optoisolators. They are cheap and effective, but won't work with I2C.

I would avoid I2C for this purpose and use a serial UART connection instead. UART communications are much easier to implement, in any case.

Also, 5V into a Vin pin will not work.

The Vin pin requires 7 to 9V.

Thanks for the quick responses! I'm extremely new to the world of Arduino (most of my electronics experience comes from building quadcopters) and so I have a lot of knowledge gaps.

Will optocouplers work with softserial? My understanding is that my boards only have a single UART and that is being used for the USB connection. Would the optocouplers work to solve those issues (provided that a separate power supply be used to power the controller when computer 2 is off)?

It's getting late and my brain is slowing down. Thanks again for the responses!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.