LSM6DS3TR-C not responding to I2C on custom PCB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 12:19 PM
Hello!
I recently designed a custom PCB with an LSM6DS3TR-C IMU. However, it doesn't seem like it responds to I2C and I wonder if anyone could take a quick look at the schematic I have for it to see if I've done a misstake. VCC in the schematic is 3.3V.
Help appreciated :)
Solved! Go to Solution.
- Labels:
-
Accelerometers
-
Gyroscopes
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-26 11:04 AM
@victorhook wrote:I am not using external pullups for the SDA/SCL ?
Definitely a Bad Idea - internal pullups are far too weak (too high resistance) for reliable I2C
@victorhook wrote:My guess is that the logic analyzer has stronger pullups or something, thus making it work when it's connected. Does this sound reasonable?
Certainly.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 1:14 PM
Pin 7 is missing, it should be connected to GND. Perhaps it's just hidden. Otherwise, looks good.
See if you can see SDA/SCL on a scope. If you're using STM32/HAL, not that the slave address should be left-shifted one bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-26 10:58 AM - edited ‎2024-09-26 11:27 AM
Hello, thanks for your response :)
I connected a logic analyzer and it turns out that it indeed works with this analyzer connected, but not without it. I am not using external pullups for the SDA/SCL which I think is the problem. It doesn't seem to be enough with the internal ones in the mcu (STM32C011F6)... My guess is that the logic analyzer has stronger pullups or something, thus making it work when it's connected. Does this sound reasonable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-26 11:04 AM
Not really. Logic analyzers should be very high impedance and should not pull one way or another in general, although the cheaper ones will.
I2C needs external pullups of ~2 kOhm or so for normal speeds. If you only have internal pullups, can set the clock speed to 10 kHz or so and it should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-26 11:04 AM
@victorhook wrote:I am not using external pullups for the SDA/SCL ?
Definitely a Bad Idea - internal pullups are far too weak (too high resistance) for reliable I2C
@victorhook wrote:My guess is that the logic analyzer has stronger pullups or something, thus making it work when it's connected. Does this sound reasonable?
Certainly.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-26 11:30 AM
I tried lowering the clock speed to <10khz but unfortunately it doesn't seem to work neither.
A bit annoying, as the pcb is a badge, and I don't think I can patch it in a hidden fasion... Oh well, let's hope I never forget the pull-ups in the future!
Thanks for your input.
