0

I have connection like on the screenscreen I have 12 arduinos. Each of them has one general 12V power supply. The problem is when i connect one of the Arduino supply (while all scheme works) Raspberry pi i2c pins burns. Already 2 broken raspberry. I guess it because the supply jack connect "plus" at first and then "minus". So while we have "plus" connected, the electrons run through i2c connection to the "ground". Please, help to resolve this. Thanks!

  • What logic level does the arduino provide? RPi is not 5 V tolerant, wich is quite common for atmegas, but I don't know how it is on arduino. – Sim Son Nov 22 '18 at 18:45
  • I2c pins are in tristate (high impedance) and therefore will not sink any current as long as they are supplied with legal voltage. Got your pins destroyed immediately when plugging in or did it take a while? How did you actually determin that they are "burnt"? – Sim Son Nov 22 '18 at 18:51
  • @SimSon, Raspberry Pi is master and Arduino is slaves. Each Arduino has LED matrix connected through shield. Raspberry pi read json file from server and send command to fire some letter on specify Arduino. I check my i2c just by i2cdetect -y 1. No one device (but 5 devices was connected) and all chips on the raspberry pi have higher temperature then before this situation. – Dzam Nov 22 '18 at 18:56
1

Most Arduino models are 5V. If you use the default Arduino I2C (wire) software internal pull-ups to 5V are set on SDA and SCL. This means you are pumping 5V into the Pi's SDA and SCL GPIO. The Pi's GPIO are only 3V3 tolerant. 5V will eventually destroy the GPIO and then the Pi.

|improve this answer|||||
  • This construction works 3 days without any interruption. The problem only if I want to plug/unplug the supply of one of the Arduino while this scheme works. – Dzam Nov 22 '18 at 19:00
  • @Dzam If you want it to last more than 3 days you need to stop pumping 5V into the Pi. You need to change the Arduino software to disable the I2C pull-ups. – joan Nov 22 '18 at 19:12
1

I²C is open-drain (NOT tri-state) and you can safely connect devices to the Pi (regardless of their nominal operating voltage) provided it does not have pullups to 5V - which AFAIK is the case for the Arduino. Open-drain can ONLY pull the voltage to Gnd - the only supply comes from the pullup resistors.

BUT the Pi output voltage levels may be marginal so it is a good idea to use level shifters; I have used the Pi with many 5V devices using I²C without level shifters.

There are however errors in your wiring. I²C requires 3 connections; SDA, SCL AND Gnd. You should directly connect the Arduino Gnd to the Pi Gnd and not rely on a tenuous path through the power supply.

It is also inadvisable to remove/connect power to a device which is connected to the Pi (or any other circuit).

The state of the Arduino pins will be indeterminate during boot. Most devices initialise as inputs, so should be safe, but there are no guarantees.

There are better ways of interfacing to the Arduino I²C is a poor solution - it is designed for short range on-board communication.

|improve this answer|||||
  • > You should directly connect the Arduino Gnd to the Pi Gnd and not rely on a tenuous path through the power supply. It works if I connect only one Arduino, but for more then one, if one of them has plugged supply - my rapberry will be connected with this supply ground. So, I will be have the same issue. – Dzam Nov 23 '18 at 10:13
  • @Dzam The Gnd of ALL devices should be connected - preferably by the shortest direct path, ideally avoiding loops - this means NOT connecting the Pi to your 12V supply. This is standard engineering practice. All 3 wires should ideally be routed by the same path. You are of course free to continue to use the existing unreliable power connection. You do not understand the failure mechanism, which is probably due to the whole Arduino floating at 12V for a brief period. – Milliways Nov 23 '18 at 10:21
  • you mean this don't solve my problem, but just for standard practice? ( I am asking for clear understanding) – Dzam Nov 23 '18 at 10:25

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.