Hi there!
I'm on a project were I am going to have a lot of different I2C devices talking to one arduino. I thought about designing a PCB which connects all those devices and has one I2C "output" to the arduino. I think this would make connecting the sensors easier, I could just plug them in and out on this board.
So far so good. But what about pull-ups? Do I need one on the "output", or does every device need seperate pull-ups? What if there are already pull-ups on the device itself?
Thanks!
1 Like
Are you connecting the devices in the same i2C bus?
The normal situation for I2C is that the Master has the pullup resistors, and the Slaves have not.
If your Slave devices are Arduino boards with internal pullup resistors of about 50k, that will be okay. If every Slave has 10k, and you have 20 Slaves, the combined pullup value will be too much pullup.
I agree completely with the last post. You only need 1 resistor in each line of the I2C bus.
If you have a mix of 3.3V and 5V devices, make sure that your pullups are only to 3.3V.
I understood that using I2C on Arduinos, one doesn't need pullups since those are already installed on the Arduino pins. I read that somewhere recently but not sure where that was.
I have a breadboard with 4x I2C devices with no pullups, connected to A4 and A5 on my Uno, and all seems ok. (That's an adafruit oled display, 2x EEPROMS, and a DS1307. )
Should I use pullups?- did I misunderstand about the built-in pullups? Is it just luck that mine work?
I understood that using I2C on Arduinos, one doesn't need pullups since those are already installed on the Arduino pins. I read that somewhere recently but not sure where that was.
Only on the Mega, Uno does not. Others, I haven't looked.
4.7K pullup will yield much more consistent signals than the weak pullups in the 328P chip.
No pullups here:
10K pullups to 5V at the top of the page:
I have found that when using a Nano 3 (328 based, like Uno) and using just one i2c slave with short connections, I did not need external pullups. However, using a Pro Micro (32u4 based, like Leonardo) it would not work in the same circuit until I added external pullups (I used 4K7). I have used i2c on other microcontrollers (non atmel) and always needed external pullups, so I think the 328 is the exception.
One device, nearby, could likely work. 4 devices and wires, need the external help.
The acid test is to look at the signals on a scope. It is quite clear that when just using the internal pull ups on an arduino the signals are very very bad and are on the verge if not working.
The arduino is no exception to things needing a pull up.