Howto measure BUS rise time + variable pullup resistor

Hi all.

I previously posted this followup question in another post, but I guess the question was too off topic

I would like to measure the rise time of a BUS communication cable which could be I2C, SPI or any other communication type. In my case I will be using I2C with 9V buffer, but in principal this question applies to any other communication type as well.

In principal, I will be using a resistor with trimpot R2 in series to have an adjustable pullup resistor (See image 1 below). R1 is the the minimum resistance required when using the shortest communication cable, it also serves as a safeguard to prevent a short circuit. R2 is the adjustable trimpot rated to the maximum resistance calculated for the longest cable situation.

Image 1
image1

My communication cable can vary considerably, I would like to create a method to measure the rise time using an Arduino to then setup the right value of the trim pot, optionally even read the trimpot value too. However, I do not want the measurements to pulldown the bus or negatively influence the readings.

Image 2 shows my initial flawed thought, but I think that setup would react like a pulldown resistor on the BUS, or not?

Image 2.. Initial idea
image2

The idea was to add a voltage divider at 2) between trimpot & ground to measure the voltage at the trimpot, thus being able to calculating the total pulldown resistor value. But, the voltage divider would also act as a pulldown resistor?

A second voltage divider 3) between bus and GND would measure the voltage rise over time... again this would act like a pulldown resistor. In general, reading the voltage is preferred over just High/Low readings (the high/low values of components can differ)

Even adding a transistor to isolate the voltage dividers after setup would not really help, as the readings during setup are influenced. I also was contemplating measuring the voltage difference between bus and +9V instead of ground, but again, it would be like adding a resistor in parallel to the pullup resistor.

So my question is, how does one measure rise time with an Arduino without negatively influencing a BUS reading?

Mike

Simple answer: use a scope.

You will never want a reasonable resistor between a bus and connected outputs because it will not only slow down the rise and fall times but also will reduce the signal swing (s/n ratio).

Available bus extenders add active pull up/down transistors that speed up a detected level change until a safe level is reached.

Thanks Diettrich.

Oscilloscope is a nice thing to have, question is then would it be worth it. Obviously a oscilloscope also influences the signals to a degree. I did have a look at some input circuit diagrams from oscilliscopes now, they tend to use high Ohm resistors (10MOhm) and some capacitors.

Other thought I had was, measuring the potential differential between BUS and +9V to calculate the rise time (Image3)... but the bus side would be ground then and adding an additional 10MOhm resistor would mean I need amplification... and then it becomes complicated...

Image3
Image3

I guess your right... get an oscilloscope and rather provide easy accessible connectors to the PCB for the probe. The added costs for 50 PCBs would also cost as much as an oscilloscope but be less flexible.