Connecting to running I2C bus using HI-Z pins (Arduino Nano)

Hello fellow Arduino users!

I have a small to modest (but more to the small side) knowledge of electronics, however this time I prefer to check with you before doing any wrongdoing because there is some expensive boards involved :stuck_out_tongue:

I have a Xilinx UltraScale ZCU104 development board that has two IRPS5401 power management units. My intention is to connect to the PMBus of these chips in order to perform power measurement for my research.

Xilinx and Infineon suggest that I should use a proprietary USB005 dongle to perform these measurements. However, I live in Brazil and I don't know if they'd ship this dongle here, how long it'd take and how much it would cost. Considering our much devaluated currency + very possible import taxes, it is unfortunately out of my budget right now.

The idea that I came up was to use an Arduino Nano to communicate to the PMBus. Apparently someone already had a similar idea ([Solved] I2C transmission using PMBUS on an Avnet Ultrascale developpement board), but my question is more related to the connection.

From what I understood from the ZCU104 schematics, the PMBus lines of the IRPS5401 chips are already connected to pullup resistors, according to the figures below (sorry for possibly bad quality, I can only upload one media file to this post):

I am still a bit afraid of connecting something wrong and frying up this 1000+ euros board. Since the board already supplies the pullup voltage to the I2C bus (which I believe to be 5V), my idea is to deactivate the internal pullups of the atmega328p and let all the bus power come from the ZCU104. From my simple electronics knowledge, there seems to be little source of problems since both Arduino Nano (powered by USB) and the ZCU104 board (powered by a separate power supply) works at a similar voltage, at least in the I2C bus level.

I don´t know what is the starting condition of the arduino nano when I power it up, so my idea was to power the arduino first, set it up to be HI-Z and then perform the connections. More specifically:

  1. Start with everything disconnected and unpowered
  2. Power up the ZCU104 board
  3. Power up the arduino nano (powered through USB connection)
  4. Set PUD bit to disable all pullup resistors:
    MCUCR |= (1 << PUD);
  5. Set the TWI pins to tri-state:
    DDRC &= ~((1 << DDC4) | (1 << DDC5));
    PORTC &= ~((1 << PORTC4) | (1 << PORTC5));
  6. Prepare TWI to work at 100kHz
    TWSR &= ~((1 << TWPS1) | (1 << TWPS0));
    TWBR = 0x48;
  7. Connect the arduino nano to the three-pin header of the ZCU104 board
  8. Enable TWI and start communicating
    TWCR = (1 << TWEN);

My rationale here is that by leaving the TWI pins in tri-state mode, they would be virtually unconnected and offer no harm to the ZCU104 when connecting both. Is my rationale correct? I am afraid of connecting both boards prior to powerup because between the nano power up and the start of my main() function, I don't know what is the state of the TWI pins. Might be overreaction of my part to think on all of that, but I am really concerned on not trying to fry the ZCU104 (the Nano I don't care much though :P)

I appreciate any help. Sorry if this seems too basic, but thank you once again!

Edit: Fig. 2 is showing "PMIC2_VCC" and Fig. 3 is showing "PMIC1_VCC". This is because I took a screenshot from the wrong IRPS5401 to show the voltage generation in Fig. 3. Nonetheless, the PMIC2_VCC circuitry is exactly the same (i.e. replace the word PMIC1_VCC by PMIC2_VCC)

Useful links:

The ZCU104 board: Zynq UltraScale+ MPSoC ZCU104 Evaluation Kit
The USB005 dongle: USB005 - Infineon Technologies

Thank you once again!

Am I correct in thinking that you only want to read traffic on the bus and see what messages are being sent and received?

If I were to do that I think I would use the two interrupt pins on an Arduino UNO to capture changes on the SCL and SDA pins. From that data you can recognize the messages and record them.

1 Like

Hi! Actually I will send PMBus commands from the nano, requesting information from the rails (e.g. voltage, etc.). I do not intend to change any configuration, just read values by issuing commands.

Can you measure the SDA and SCL of the ZCU104 board with a multimeter ?
If they are near 5V, then the internal pullup of the Nano does not matter.

If they are 3.3V and the PMBus signals are directly from the processor, then they might be 3.3V signals only. If they meet the PMBus specifications, then you still can connect a 5V Arduino board to the PMBus.

You have to connect the GND of the Nano to the GND of the ZCU104 board. Since the Nano is connected to a computer, the GND might be connected via the computer to the mains earth ground. That is normally no problem.

1 Like


I've just measured with the multimeter, the SCL pin has a voltage of 4.85V.

So after performing some additional research, apparently it is preferrable to connect the boards while both are off, right? From what I understood, if I attempt to connect the boards while on, even if my pins on the arduino side are configured to HI-Z, there might be parasitic capacitante and/or noise that could momentarily lower the voltage on SDA and start an unwanted I2C/PMBus transaction.

So it seems to me that it is better to perform the connection while both boards are off. From the datasheet, the pins are tri-stated when the board is powered and since the board is using the original arduino bootloader, it seems that the TWI pins are left untouched.

The question that remains now is, which board should I power on first? Powering the ZCU104 board first seems not to be recommended, since 4.85V would be applied on the TWI pins of the arduino which is unpowered, and this is out of specs according to the datasheet. If I power the arduino first, I am afraid of some current running to the ZCU104 and frying something up, I don't know if this is possible but I am trying to not take risks. Maybe is it better to turn the ZCU104 board first and let the arduino for a brief moment receive 4.85V on their TWI pins? I'd be less concerned with a fried arduino than my ZCU104 board :stuck_out_tongue:

thank you for the help!

The I2C bus is a open-drain bus (or open-collector in the past when transistors were used).
That means you may shortcut SDA and SCL to GND and it will do no harm.

Connect the GNDs of both devices and after that, it does not matter.

Arduino first
The Arduino has internal pullup resistors in the range of 30k to 60k. If you turn on the Arduino first, then a very small current will flow into SDA and SCL. It is impossible that such a small current can do harm for a ZCU104 when it is turned off.

ZCU104 first
Maybe there is a glitch and maybe a start condition is issued when SDA is low. I think it does not matter.
A Arduino that is not powered will pull the SDA and SCL to GND via its internal ESD protection diodes. That will stop the I2C bus. Maybe the ZCU104 can detect that. That is no problem, nothing will break.

You can do another test if you are not sure.
Connect a resistor of 10k to SDA and GND of the ZCU104 and measure the voltage of SDA. The voltage should be lower. Do the same for the SCL. Both signals should behave in the same way. You could even calculate the value of the pullup resistors on the ZCU104 board. I read that it is 15k for the PMBus.

1 Like

In general you shouldn’t hot plug devices into a computer unless they are specifically designed to be hot plugable.

This includes the connector you use. The I2C is not designed to be hot plugable.

I suppose you could arrange the socket to have the ground connect first, followed by the 5V, followed by the two signals, like the USB socket, but if you do this and there’s activity on the bus then that transfer will in all probability be disrupted and could cause the logic to lock up and require a reset.

1 Like


yes, I2C is not hot-pluggable but I thought that by putting the pins on HI-Z, the connection with the active I2C bus wouldn't cause any unwanted effect. However, things are not always as simple as we assume :stuck_out_tongue:

I decided to turn on the arduino nano while the ZCU104 is off, to avoid causing any unwanted signalling on the I2C bus. I've measured current and voltage from the nano pins while in HI-Z mode and as expected, there is almost no current and/or voltage that could cause any harm on the ZCU104 board. Then I turn the ZCU104 on and the I2C communication works like a charm.

I just wanted to make sure that I wasn't missing any important point that could cause any current spike on the boards and fry the PMBus interface of the PMUs or worse.

Thank you for all the help!