I2C Raspberry-Arduino and I2C Arduino-INA219

Hello everyone,

I would like to use several arduino as slave with a raspberry as master, all with I2C communication. I would also like to use an INA219 current sensor that communicates with the arduino (see diagram below).

The problem is that the communication between the arduino and the INA219 is also via I2C. I also have the constraint of using the raspberry only to communicate with the arduino. This means that I would have to have two separate buses.
Given my lack of knowledge in this area, do you know a method to achieve this kind of assembly? I have already done some research without much result. I have the impression that this is impossible. Thank you in advance for your help!

INA219: Library Reference | Adafruit INA219 Current Sensor Breakout | Adafruit Learning System

What for the arduinos in that scheme? Why you don't want to connect INA219 to Raspberry directly?

if for some reason you require the UNOs why not connect them to the USB ports and communicate using serial IO?

Mea culpa my schematic is done. I want to use at least 20 arduino's. The sensor in question can only have 4 different addresses and I need at least one per Arduino. That's why I can't use USB.

It looks like a lot of problems to me, hopefully it is only going to be one unit. I2C was not designed to be cobbled together like that, it was designed to communicate with chips on the same board. There are many other methods available. My preference is CAN, it is not expensive, I can add a CAN MPC2515 module for less then $2.00 per node using my favorite china supplier. I usually get them when they offer free shipping. These can be on a bus over 1000 feet in length. As far as the actual communication control etc that is done with the module. It will transfer 8 bytes in a single packet. Error detections, priority, etc is already built in. You can do similar things with RS485 and other protocols. Nice part there is no master so if one node goes down the others keep on going. If you pi failed you go down. The ASC712 will give you an analog output, no I2C.

consider I2C multiplexors???
how far apart are the UNOs? how long are the cables connecting the I2C devices?
once you get over a metre you can have problems
consider RS485 which can have cables over 1000metres

Thank you very much for your answer!

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