TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Internal pull-up resistors are insufficient for I2C

14 pointsby JoshMcguiganover 2 years ago

6 comments

JoshMcguiganover 2 years ago
I was using I2C for the first time, as part of a brushess ESC project, and had to learn the hard way that internal (to the mcu) pull-up resistors would not work at any reasonable (for my needs) communication speed.<p>This post compares the performance of the circuit using the internal pull-up resistors against external 1kohm resistors, including plots showing the improved signal quality.
评论 #34673277 未加载
pie314isiover 2 years ago
Sometimes you can get away with just guessing pull-ups, but sometimes you need to calculate them. Drive strength, speed, line capacitance, line length, number of devices, supply voltage, threshold levels... it&#x27;s all stuff you take into account when designing for I2C properly.<p>Reading the datasheets for both devices would probably avoid the problem.
thinknubpadover 2 years ago
Anecdata: seems like internal pullups are usually 10s of kΩs, maybe 20-50kΩ. Most sensor boards that I see use 4.7kΩ, and work with 400KHz-1MHz &quot;fast-mode+&quot;.<p>So 1kΩ is safe, but might be a bit on the aggressive side. At 3.3V, 1KΩ to ground burns 3.3mA, and there are two pull-ups per I2C bus.
评论 #34673911 未加载
评论 #34673265 未加载
scotty79over 2 years ago
Recently I investigated how to use MCP23017 to have a lot of GPIO pins (to interface with old laptop keyboard).<p>It seems that pulling up I2C pins with 4.7kOhm resistors is a way to go:<p><a href="https:&#x2F;&#x2F;tronixstuff.com&#x2F;2011&#x2F;08&#x2F;26&#x2F;arduino-mcp23017-tutorial&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tronixstuff.com&#x2F;2011&#x2F;08&#x2F;26&#x2F;arduino-mcp23017-tutorial...</a>
Ccecilover 2 years ago
This actually just bit us on a project recently that has a comparator with an open drain output. STM32H7 internal pullups are in the area of 40k ohm. Datasheet for the comparator called for 1-10k ohm.<p>I can absolutely see I2C having issues even more...but for different reasons.
jrexiliusover 2 years ago
I&#x27;ve gone back and forth on using external resistors for I2C and have read a lot of conflicting views on it. I think this is another to add to the pile, but I&#x27;m leaning towards putting them on PCB designs by default now..
评论 #34672662 未加载