How to connect a 5V I2C device to T4.1?

zapta

Well-known member
Hi everybody,

I need to connect Garmin Lidar to a Teensy 4.1 via I2C. The lidar specification says it operates on 5V so I presume this are also its I2C levels.

Any suggestion on how to connect it to a Teensy 4.1 which operates on 3.3V ? Do I need some level converters or a naive connection should work since the Lidar is an input on the SCL and an input/open-drain (?) on the DAT and therefore doesn't pull any signal to 4V? (I am have no clue).

If a level converter is required, references to ICs or even better small modules that do that will be greatly appreciated.

Also Garmin recommend a 680uf filtering capacitor. Is it ok to attach such a large capacitor to the 5V output of the T41? Will that be safe to the teensy and the usb attached computer?

Thanks.
 
There are various level shifters that are made for I2C. You want a level shifter that is bi-directional. Here is the one I used to use when I still used 5v I2C devices:

Sometimes I would use pull-up resistors (2.2K between each of the SCL and SDA pins to 3.3v), sometimes not. I would try it without the resistors first.

On this one, hook the Teensy's 3.3v to the LV pin, hook the SDA to the L1 pin and SCL to the L2 pin. Hook 5v to the HV pin. Hook the SDA pin from the Garmin to pin H1 and the SCL pin from the Garmin to pin H2. Hook up the Garmin ground to a Teensy ground pin.

Adafruit and Sparkfun also have their own version of the level shifter:

I'll let others answer the questions about capacitors.
 
The lidar specification says it operates on 5V so I presume this are also its I2C levels.

A couple years ago I made a I2C test board with several devices. One was a Garmin lidar sensor. It needed 5V power but worked fine with 3.3V signals on I2C.

lidar.jpg

Difficult to know if you have the same one. But unless they've made major changes, it probably will work with 3.3V signals when powered from 5 volts.


Also Garmin recommend a 680uf filtering capacitor. Is it ok to attach such a large capacitor to the 5V output of the T41? Will that be safe to the teensy and the usb attached computer?

The USB spec says 10uF maximum for direct connection. On that test board I used the USB current limit chip to give power to the large capacitor and lidar, same part as on Teensy 3.6 and Teensy 4.1.
 
It needed 5V power but worked fine with 3.3V signals on I2C

Yes, it does, I am using the Garmin Lidar Lite arduino library, direct connection to the T4.2, with an additional I2C device onboard (MPU6050) and it all seems to work. Obviously the Garmin library is hard coded to use the default I2C bus. Seems to be a pattern.
 
Back
Top