2
\$\begingroup\$

I have attached a few sensors and an LCD display, all of them having an I2C interface, to my raspberry pi, and written a software on the pi to read/write them. Right now, I have a network daemon running on the pi to retrieve data to my PC, and control the display from the PC. I would like to, if possible, omit the pi, and control the devices from the PC directly.

The PC has several /dev/i2c* devices, and I can use i2cdetect to list them:

root:~# i2cdetect  -l
i2c-3   smbus       SMBus PIIX4 adapter port 4 at 0b00  SMBus adapter
i2c-1   smbus       SMBus PIIX4 adapter port 2 at 0b00  SMBus adapter
i2c-6   i2c         NVIDIA i2c adapter 5 at 8:00.0      I2C adapter
i2c-4   i2c         NVIDIA i2c adapter 1 at 8:00.0      I2C adapter
i2c-2   smbus       SMBus PIIX4 adapter port 3 at 0b00  SMBus adapter
i2c-0   smbus       SMBus PIIX4 adapter port 0 at 0b00  SMBus adapter
i2c-7   i2c         NVIDIA i2c adapter 6 at 8:00.0      I2C adapter
i2c-5   i2c         NVIDIA i2c adapter 3 at 8:00.0      I2C adapter

So, there are some I2C adapters on the Southbridge, and some more on the video card.

Are any of those likely to be "visible" somewhere I can get to them without having to solder my mainboard? If so, where would I have to look? i2cdetect -y finds several devices attached to i2c-0, but none to i2c-1, i2c-2 and i2c-3, so I guess using one of the latter should be safe to use as long as I'm not adding any other peripherals which might use them.

\$\endgroup\$
2
\$\begingroup\$

Yes, this should be possible. The PCs do often have several I2C ports exposed to the outer world:

The DDC pins on HDMI, DVI or VGA are actually using I2C. I have successfully controlled an IO expander chip through this as a PoC a few years ago, also powering it through the power pins there originally meant to power the DDC identification ROM.

The I2C devices mentioning NVidia in the name are likely for DDC on the various video output ports. Finding which bus maps to which output port will likely be a trial-and-error process. Or you can try scanning all available I2C busses for a device on your known address.

You could make a simple breakout board with say a HDMI connector hooking it up to your whatever, and only use the DDC-related pins. It should be rather convenient too, with only a single cable.

So yes, this should be possible, if perhaps a little janky.

\$\endgroup\$
1
  • \$\begingroup\$ In fact, attaching a monitor to the otherwise unused mainboard video connectors makes i2c devices pop up on the PIIX4 buses, so I can and will use those as all the real monitors are on the Nvidia card. \$\endgroup\$ – Guntram Blohm Feb 20 '20 at 10:18

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.