i2c booster chip required - Page 1
Forum section: electronics / general

author: imk
author_rank: Regular Contributor
timestamp: February 13, 2022, 11:06:29 pm
content: HelloI have a STM32F411CE project that uses nine VL53L0X ToF distance sensors and a single MPU6050 Gyro chip that need to share the same i2c bus.Problems is the input capacitance of the nine VL53L0X chips really loads to i2c buss.To the point where the rise time of the i2c clk is too slow for the MPU6050 to initialize reliably.I can unplug the buss that goes to the nine VL53L0X's and the MPU6050 boots fine every time :-)I have even cobbled together a Three VL53L0X solution and it works with the MPU6050 just fine.So i need a chip that i can insert into the i2c buss that will either drive the nine VL53L0X's.Or wire it the other way to increase the i2c clk risetime to the MPU6050 so it will boot reliably.I have had a google and found the Ti P82B715P but it seems to be used in designs that use Two of P82B715P's.However, as my i2c buss is only 150mm of wire using a pair of P82B715P is over kill, plus i am tight on space.Any ideas please?Many thanks in advance imk

author: isometrik
author_rank: Regular Contributor
timestamp: February 13, 2022, 11:30:49 pm
content: You could use an I2C multiplexer/switch that would connect a lower number of I2C devices to your STM32F411CE's I2C bus at any given time.Examples:https://www.nxp.com/products/interfaces/ic-spi-serial-interface-devices/ic-multiplexers-switches:MC_41851

author: langwadt
author_rank: Super Contributor
timestamp: February 13, 2022, 11:32:36 pm
content: what's the size of your pull resistors? I2C is rated for something like 400pF even in fast mode

author: lucazader
author_rank: Regular Contributor
timestamp: February 13, 2022, 11:37:01 pm
content: I would start by looking at the size of your pull up resistors as langwadt mentioned.I would also consider spreading the i2c devices over multiple i2c busses as the F411CE does have 3 i2c busses, and or just seperate the IMU from the TOF devices onto different busses. This would require the usage of more pins so would be design dependant on if you have free pins.

author: imk
author_rank: Regular Contributor
timestamp: February 13, 2022, 11:39:33 pm
content: Hello isometrikHad look at recommendations list and the PCA9540B 1:2 buss looks like it will do the job nicely, thanks for the heads up.Many thanks imk

author: imk
author_rank: Regular Contributor
timestamp: February 13, 2022, 11:48:59 pm
content: Hello langwadt & lucazaderWith many thanks for the replies.Tried to decrees pullup to 5ma and still not enough to increase the clk rise time to under the MPU6050 300ns required.Yet the VL53L0X seems happy with the 500ns i see on the buss.As for using the 2nd or 3rd i2c busses in the STM32 this would be my ideal choice but I am out of pins.Many thanks for the input imk

author: langwadt
author_rank: Super Contributor
timestamp: February 14, 2022, 01:02:33 am
content: what voltage is the source for the pullups? seems unlikely that 10 devices can add up to +400pF

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 01:20:32 am
content: Quote from: langwadt on February 14, 2022, 01:02:33 amrunning 3.3v, see attached photo of nine VL53L0X sensor hub

author: Siwastaja
author_rank: Super Contributor
timestamp: February 14, 2022, 07:59:08 am
content: Smaller pull-up value.Reduce bus speed.Segment it to two separate buses, use two separate I2C peripherals. If you have only one, pick a next larger MCU with two I2Cs. This way, you also utilize parallelism, getting the speed back by being able to communicate with any two sensors at the same time.

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 10:27:22 am
content: Quote from: Siwastaja on February 14, 2022, 07:59:08 amHave tried smallest resistor i can pulling up at 5mm, beyond that system would not boot.Have reduced buss speed to 10khz and still same as it is rise time problem.Can't use bigger chip and board is made and no spare legs.Only solution is a i2c buss buffer to isolate the nine VL53L0X from the MPU6050.Thought a PCA9540BDP would do it but just had good read of its spec don't think it is solution i am looking for.Any ideas for a i2c buss booster/isolator chip please?imk

author: Ian.M
author_rank: Super Contributor
timestamp: February 14, 2022, 10:56:49 am
content: You can also run the pullups from a higher voltage and Schottky clamp SDA and SCL to the 3.3V rail (which *MUST* *ALWAYS* be able to safely sink the total pullup current, otherwise you need different clamping), which depending on the available voltage, can get you a significantly faster risetime for minimal extra cost (a single common cathode dual Schottky). Don't forget to recalculate the pullups to get the desired max. current from the higher supply voltage.

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 12:01:27 pm
content: Hello All,Bit more research and have ordered some TCA9517 chips which look like they will be a solution.Will let you know when soldering and testing is completed, wish me luck :-)imk

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 14, 2022, 12:22:28 pm
content: Quote from: Ian.M on February 14, 2022, 10:56:49 amOr probably more practical, use a current source (e.g. a pair of PNPs), to the same end. This about halves the risetime for the same current flow.What does the scope say about risetime? Is it enough margin to bother going after? If not -- use multiple buses.Tim

author: tumbleweed
author_rank: Newbie
timestamp: February 14, 2022, 12:50:45 pm
content: You might try the LTC4311 I2C/SMBus rise-time accelerator. It's an active current source that works pretty well for overcoming load conditions on the bus.

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 01:49:59 pm
content: cheap scope says

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 14, 2022, 02:19:21 pm
content: What am I seeing?Tim

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 02:25:22 pm
content: captures are the i2c buss with and without the nine array of vl53l0x'sHence mpu6050 boots reliably without them on the buss and unpredictable with the extra i2c buss load

author: Siwastaja
author_rank: Super Contributor
timestamp: February 14, 2022, 04:06:57 pm
content: Seems you run it at about 400kHz. Slow it down. I2C devices sample "in the middle" or something like that; slowing the bus clock down is the standard solution against higher load capacitance. If it doesn't help, something else is going on. I can notice some signal integrity issues on the traces, quite a lot of unwanted coupling (although it could be just measurement artifact). I2C is designed to work on-board, preferably on a ground plane. If you use wires, grounding is important. Can you tell us which signal each color of wire in that earlier photo is?Again, what is the value of pull-up resistor? 5mA and 5mm are not values of resistance. The unit of resistance is Ohm. What do you actually use?

author: sicco
author_rank: Regular Contributor
timestamp: February 14, 2022, 04:32:48 pm
content: What is the length of the I2C wires? The scope traces have a hint: the falling edges are not an edge from hi to low, but are bouncing a little bit. That bounce may be seen by the I2C slave as an extra clock cycle on the SCL line, and then…Does the problem disappear when all the I2C and GND wires are kept short (< 20 cm) with no other wires, not even a dead (open) end wire attached to it?So the root cause of your problem may well be the transmission line effect from wires: no edge can ever travel faster than speed of light from point A to B. If A (Mictrocontroller) and B (sensors) are 3 meters apart then… Decent characteristic impedance line termination with I2C is not really possible, so you’ll have to keep wires short.Adding caps to reduce edge steepness, with a bit of series R from the pins that drive SCL, may also help.Some microcontrollers allow pin configurable output slew rates, impedances etc.Hysteresis enabled for the receive SCL signal?

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 06:12:03 pm
content: Hello all and many thanks for the post.Yes there are some noise artifacts on the scope that are i think due to the scope gnd to project 0v rail being rather long.Currently the pullup is 2k but i have taken it as low as 690 ohm, hence the 4mA to 5mA.i have also tried a 82 ohm resistor in series with the i2c buss to the vl53l0x's in order to eliminate some of the reactance.But it didn't help the main problem which is the vl53l0x's sharing same buss as the mpu6050Wire length from the STM32 mcu to the array of vl53l0x's, i guess is in total 200mm as it is (Kynar) wired in a star arrangement, see image above.As for buss speed i have tried is a low as 10kHz but it the mpu605 requires risetime of less 300ns clkGreen clk and Yellow data.As for the LTC4311 i had look and uk supplies are zero other than ebay at £9 each, ouch.So I am going to try the TCA9517's I have on order to drive the array of vl53l0x's and let the mpu6050 chat directly on the mcu buss.This i hope should fix the MPU6050 risetime unreliable boot issue.Thanks again for all the help imk

author: Siwastaja
author_rank: Super Contributor
timestamp: February 14, 2022, 06:26:44 pm
content: By seeing the photo, I'm a bit worried about the signal ground. If the black one is the only GND, it's hanging far from the other signal lines. SDA and SCL would both need their own ground wires to prevent SDA/SCL coupling to each other, and to prevent ringing possibly causing false triggering.Around 690 ohms (or slightly more, maybe 1k) indeed is pretty optimum for speed, if you go any lower you start compromising noise margin by increased zero level because the I2C drivers do not have zero output resistance.I'm not convinced your problem is with capacitive loading. I suspect you have a signal integrity issue.

author: Carel
author_rank: Regular Contributor
timestamp: February 14, 2022, 07:23:22 pm
content: Just a thought. Have you tried the whole system with read/write to 1 chip or did you go full steam with everything?I have a streaming system, but I have to separate the streams for different chips by the task manager, just because a start condition for one stream doesn't work following direct on a stop condition. A repeated start off course works. Nice "feature".Start with low frequency with 1 chip and increase the problems from there.

author: imk
author_rank: Regular Contributor
timestamp: February 14, 2022, 07:37:41 pm
content: Quote from: Carel on February 14, 2022, 07:23:22 pmHello CarelI have a breadboard with three VL53 sensors and the mpu6050 that i used to test and write the code on.Now i have put 9 VL53 on the i2c buss the, they and extra capacitance have pulled the risetime down.So yes tested on less chip, hence i am pretty confident that driving the nine LV53 and extra buss driver will fix this problem.Then on to the next, all part of the development, prototype adventure :-)many thanks imk