I2C - Pull-up Resistor? Power Input?

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

I2C - Pull-up Resistor? Power Input?

Post by UncleMoki »

Two questions (CP Classic):
  • Are pull-up resistors required between the data and clock lines? I tried it with and without and both seem to work. This is my first time using I2C.
  • Datasheet says you can't use the VBATT for voltage input but I swear I saw the CP light-up when I accidentally put power on VBATT.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C - Pull-up Resistor? Power Input?

Post by adafruit_support_bill »

Are pull-up resistors required between the data and clock lines? I tried it with and without and both seem to work. This is my first time using I2C.
That depends on what device you are interfacing with. All of our i2c breakout boards have pull-ups installed, so additional pullups are not required.

Code: Select all

Datasheet says you can't use the VBATT for voltage input
"Shouldn't" is probably more technically precise. There are no diodes protecting VBATT from reverse polarity. So a mistake there could fry the board.

User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

Re: I2C - Pull-up Resistor? Power Input?

Post by UncleMoki »

Thanks for the reply. Attempting to interface with Feather Huzzah ESP8266 + MusicMaker Wing (Adabox004).

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C - Pull-up Resistor? Power Input?

Post by adafruit_support_bill »

The MusicMaker wing has pullups. One set of pullups on the bus is sufficient for most applications.

User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

Re: I2C - Pull-up Resistor? Power Input?

Post by UncleMoki »

Ok, thanks again.

Curious, without the MusicMaker Wing would pullups be required? For future ref, is there something in the datasheets for these or other boards to help me know when a pull-up is required?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C - Pull-up Resistor? Power Input?

Post by adafruit_support_bill »

For the most part, processors do not have i2c pullups. Our i2c devices (that includes: Breakouts, Wings, Shields, Pi Plates, HATs etc.) all have 10K pullups.

One exception for processors would be the Raspberry Pi. It does have i2c pullups. But they are relatively weak, so it doesn't hurt to have external ones in addition.

The 10K pullups we use on the devices are slightly weak as well. But more than adequate for short distances. This allows you to put 3 or 4 of them on the same bus with no ill effects. If you start getting 5 or more on the same bus, the combined pullups may be too strong, so you may need to remove some. But very few projects use that many i2c devices on the same bus.

User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

Re: I2C - Pull-up Resistor? Power Input?

Post by UncleMoki »

Ok, thanks ... trying to see the 10K pull-ups on the schematics/datasheets for both (just to help me digest ... EE wannabe) but wasn't having much luck. When in doubt, sounds like it wouldn't hurt to add a modest Rp of 4.7k or so.

As for power, for now I'm using the CP's VBATT to power the Feather+Wing BATT. It seems to work when the CP is connected to USB (5V). I tried using the CP's 3.3V pad to power the Feather+Wing but the Feather+Wing didn't seem to like that. I'd prefer to power the CP from the Feather+Wing, but not sure how to do that or if that's even a good idea (current). Maybe better to have them both pull from a common voltage source? Basically trying to see if I can make the setup portable. Any advice/suggestions?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C - Pull-up Resistor? Power Input?

Post by adafruit_support_bill »

I'd prefer to power the CP from the Feather+Wing,
You should be able to take a JST cable like this: https://www.adafruit.com/product/261
And solder it to the GND and BAT pins on the Feather.

Then you can plug that into the JST connector on the CP.

User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

Re: I2C - Pull-up Resistor? Power Input?

Post by UncleMoki »

Awesome, thanks ... that's exactly what I wanted to do! Can't wait to share the final product in the Adabox forum!

User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

Re: I2C - Pull-up Resistor? Power Input?

Post by UncleMoki »

Sorry to bump this. While I wait for my JST-PH connectors to arrive, can I power the Circuit Playground and Feather from two different power sources (some combo of USB, Lipo/LiIon or AA)? Guessing I just have to wire their grounds together so they share a common ground?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C - Pull-up Resistor? Power Input?

Post by adafruit_support_bill »

That is possible - as long as you have a common ground for a signal reference between them.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”