Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

RuntimeError: SDA or SCL needs a pull up
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RuntimeError: SDA or SCL needs a pull up

by CarabinaEnthusiast on Mon Apr 12, 2021 7:55 am

I have a Metro M0 Express, connected to an unbranded servo shield, with 12 servos. I got this error and did a bit of research to find that these pins needs resistors to function correctly, I believe? However, they are usually built into the board. I don't know if this is an issue with the Metro M0 Express or the servo board. Am I able to just add in resistors across the SDA/SCL pins and 5V?

Any help would be appreciated.

CarabinaEnthusiast
 
Posts: 2
Joined: Mon Apr 12, 2021 7:52 am

Re: RuntimeError: SDA or SCL needs a pull up

by dastels on Mon Apr 12, 2021 11:54 am

Yes, the I2C signal need pullups. Adafruit I2C breakouts include pullups, but none of the MCU boards do.

I suspect that the servo shield doesn't include them. If so, adding a 10K resister between SDA and 3.3v and between SCL and 3.3v whould do the job. 3.3v since the SAMD21 on the Metro M0 is a 3.3v MCU and the I2C pins are 3.3v signals. Actually, that's another thing to check. Does the shield support 3.3v logic? If it is an older shield designed for the UNO et.al. it might be 5v-only.

Dave

dastels
 
Posts: 7969
Joined: Tue Oct 20, 2015 3:22 pm

Re: RuntimeError: SDA or SCL needs a pull up

by CarabinaEnthusiast on Mon Apr 12, 2021 12:00 pm

Thank you, it is rated for 3.3V but was very cheap so it probably just doesn't have any pull up resistors. Do you know if a 5K resistor would work or is it specifically 10K?

CarabinaEnthusiast
 
Posts: 2
Joined: Mon Apr 12, 2021 7:52 am

Re: RuntimeError: SDA or SCL needs a pull up

by dastels on Mon Apr 12, 2021 12:54 pm

5k may be too small (i.e. offer too strong of a pullup). All the Adafruit board I've seen have used 10K, so there's likely a good reason for that value... and it's a really common value.

Dave

dastels
 
Posts: 7969
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.