Skip to main content
shopping_basket Basket 0
Login

When to use I2C pull-up jumpers on Pmod HAT adapter?

I am looking to connect a Pmod HYGRO module to an RPi 3B through a Pmod HAT. The Pmod HYGRO uses the I2C protocol, and I understand that this requires pull-up resistors on the SCL/SDA lines. However, from what I've read, the RPi has built in resistors to handle this, and I'm wondering when I would use the pull-up jumpers on the Pmod HAT?

Upvote 0 Votes

Comments

June 12, 2020 07:44

Hi, A Raspberry Pi has on-board pull-ups for the I2C bus, so should not require any more. The value of 1.8Kohm seems a bit low, but I assume this is so it can cope with >1MHz clock speeds and many Slaves if necessary. A possible problem with older add-on modules is that the lines are pulled-up to +3.3V. For example the popular SRF08 ultrasonic rangefinder operates at +5V. Fortunately, at least at the lower I2C clocks of 100 and 400kHz, the SRF08 will still work with 3.3V SDA/SCL signals thanks to those passive pull-ups.
Your Pmod module has convenient jumper links to connect pull-ups if required. In your RPi case leave them disconnected.
Boss may have more of a problem as Click modules seem to have the resistors soldered in. That's OK if the host MCU board does not have pull-ups and that's the case with MikroElektronika boards. But if you need multiple Clicks on the same bus, then it's out with the soldering iron to remove those unwanted pull-ups - too many in parallel might cause an overload of the bus driver on the MCU chip.
I'm just about to publish the next article in the series Boss kindly mentioned which covers these and other practical aspects of I2C interfacing.

June 12, 2020 07:43

@Bill Marshall Thanks, I may just be lucky with no pull-ups on the Nano. It will make a nice change... I was lucky with the Click board in that it has a SM 0ohm to select 3V3 or 5V operation. But all it does is select an alternative connector pin! I guess there's logic in there somewhere for their standard.

June 10, 2020 10:09

Hi Douglas, I'm currently looking at using some I2C Click modules with the Arduino Nano and the info out there is confusing.
My take on this is that normally only one set of pull-ups should generally be used, however as you add more I2C devices the line capacitance increases and you may need to add additional resistors or lower the resistance of the existing pull-ups to achieve the required rise time, hence you can use Pmod HAT ones then.
Also if your I2C drive did not have pull-ups the module ones could be used.
Seems it's a select on test scenario where the pull-ups need to match the load capacitance and the speed you require to get the required rise time... no wonder they came out with SPI.

I2C has moved on since I last used it when everything was 5V, now you also have to be aware of 3V3 modules and check pin ratings and take care if you have a 5V I2C drive.

I liked Bill Marshall's overview of I2C https://www.rs-online.com/designspark/catching-a-bus-basic-serial-communication-part-4-i2c it is interesting how it developed.

June 10, 2020 10:00

@Boss Here is a nice app note from Texas Instruments discussing selection of appropriate I2C bus pull-up resistors: http://www.ti.com/lit/an/slva689/slva689.pdf

June 12, 2020 07:43

@BradLevy thanks Brad, yes I have been looking at that. The one I have been studying closer just as it affects me! is http://ww1.microchip.com/downloads/en/DeviceDoc/MCP9600-Data-Sheet-Errata-80000741C.pdf it would appear 'my' chip will suffer from intermittent I2C behaviour.... It pays to read the chip Errata... my chip date code purchased last month is 1821 which is pre the fix date code 1845 Last thing I wanted was erratic behaviour that's not my own!

June 10, 2020 10:01

@Boss Thanks for your helpful reply!

DesignSpark Electrical Logolinkedin