How to get 3.3v or 5v i2c devices work?

A place to talk about all the Operating Systems, Software & Hardware
Post Reply
User avatar
wureka
Posts: 3
Joined: Sat Mar 02, 2019 2:10 pm

Sun Mar 03, 2019 1:09 am

Hi,
I just bought an Alpha.
I have some i2c devices such as 9250MPU (3.3v), LIDAR-Lite v3 (5v)
I want to directlly control the above devices from intel CPU (not through Leonardo), so I think the i2c block may work.
However, i2c on Alpha only provides 1.8v voltage.
What should I do in order to make the above devices work with Alpha ?

User avatar
Lutz
Posts: 214
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Sun Mar 03, 2019 11:06 am

1.
You need additional hardware, a level translator.
For example the MAX3373

2.
You need a driver for the I2C pins of the Intel CPU.
For Linux there should be such a thing, but I am not sure.
For Windows we are all still looking for the drivers...
LattePanda hasn't said anything about it yet. Since the introduction of the "Classic" we wait for these drivers...

User avatar
ccs_hello
Posts: 440
Joined: Sat Oct 13, 2018 9:16 pm

Sun Mar 03, 2019 11:58 am

Usa PCA9306 level shifter designed for I2C applications.

User avatar
ccs_hello
Posts: 440
Joined: Sat Oct 13, 2018 9:16 pm

Mon Mar 04, 2019 2:01 pm

Another (and IMHO easier) method is to use FT232H (USB to I2C, SPI, JTAG) breakout board to do the work.
Search fleabay FT232H CJMCU to buy the product (about $7 each, shipped.)

User avatar
wureka
Posts: 3
Joined: Sat Mar 02, 2019 2:10 pm

Fri Mar 08, 2019 8:54 am

Lutz wrote:
Sun Mar 03, 2019 11:06 am
1.
You need additional hardware, a level translator.
For example the MAX3373

2.
You need a driver for the I2C pins of the Intel CPU.
For Linux there should be such a thing, but I am not sure.
For Windows we are all still looking for the drivers...
LattePanda hasn't said anything about it yet. Since the introduction of the "Classic" we wait for these drivers...
I use Ubuntu 18.04 LTS 64bit.
When I execute below command:
sudo i2cdetect -l
the console display below information:
i2c-3 i2c i915 gmbus dpc I2C adapter
i2c-1 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-6 i2c DPDDC-C I2C adapter
i2c-4 i2c i915 gmbus dpb I2C adapter
i2c-2 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-0 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-5 i2c i915 gmbus dpd I2C adapter
So, which one of the above i2c interfaces matches to the below red box?
lattepanda-alpha-i2c.png
lattepanda-alpha-i2c.png (314 KiB) Viewed 1273 times
Thanks

User avatar
FelixH
Posts: 3
Joined: Mon May 06, 2019 9:36 am

Mon May 06, 2019 1:56 pm

These are i2c buses that are used for display control

Code: Select all

i2c-3 i2c i915 gmbus dpc I2C adapter
i2c-6 i2c DPDDC-C I2C adapter
i2c-4 i2c i915 gmbus dpb I2C adapter
i2c-5 i2c i915 gmbus dpd I2C adapter
So it has to be one of these

Code: Select all

i2c-2 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-1 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-0 i2c Synopsys DesignWare I2C adapter I2C adapter
Beware that the numbering does not seems to be consistent/stable (Im using an Latte Panda alpha 800 with Ubuntu 18.04):

Code: Select all

i2c-3	i2c       	DPDDC-C                         	I2C adapter
i2c-1	i2c       	i915 gmbus dpb                  	I2C adapter
i2c-6	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-4	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
i2c-2	i2c       	i915 gmbus dpd                  	I2C adapter
i2c-0	i2c       	i915 gmbus dpc                  	I2C adapter
i2c-5	i2c       	Synopsys DesignWare I2C adapter 	I2C adapter
The name given here is infact simply the driver that has been loaded for the bus, which is - https://github.com/torvalds/linux/blob/ ... e-master.c

Some Questions from me:
  • Where is it defined that the i2c bus can only handle 1.8V? http://docs.lattepanda.com/content/alph ... ayability/
  • Whats the chip that is actually driving the bus - is it the CPU itself? (Is there a datasheet for the io part of the CPU?)
  • Any other updates - how is your progress using the internal i2c?

User avatar
ccs_hello
Posts: 440
Joined: Sat Oct 13, 2018 9:16 pm

Mon May 06, 2019 2:18 pm

re: I2C 1.8V

See diagram from LP Alpha itself
http://docs.lattepanda.com/content/alph ... ayability/ first picture over there
(which is: https://i.imgur.com/kor7zdt.png )

Q2
A2: it's from Intel CPU
datasheet: download from Intel datasheet (3 volumes, totaling more than thousand pages)

User avatar
FelixH
Posts: 3
Joined: Mon May 06, 2019 9:36 am

Mon May 06, 2019 4:13 pm

ccs_hello wrote:
Mon May 06, 2019 2:18 pm
re: I2C 1.8V

See diagram from LP Alpha itself
http://docs.lattepanda.com/content/alph ... ayability/ first picture over there
(which is: https://i.imgur.com/kor7zdt.png )

Q2
A2: it's from Intel CPU
datasheet: download from Intel datasheet (3 volumes, totaling more than thousand pages)
Thanks

For the original question:
Some devices such as the 9250MPU support setting of the IO Voltage. The 9250 allows to set VDDIO down to 1.71 V. So as long as you connect this pin to 1.8V provided by the Panda I2C should work.
Most breakout boards hardwire this to VDD so you might have to remove/change some connections. Also make sure to remove any pullups up to VDD on the I2C lanes.

Post Reply