I2C Pull-up Resistors - Collin’s Lab Notes

  Переглядів 70,219

Adafruit Industries

Adafruit Industries

2 роки тому

I2C can pull a signal low, but it needs a little help on the high notes #adafruit #collinslabnotes
Find all the I2C at Adafruit:
www.adafruit.com/?q=I2C&sort=...
Visit the Adafruit shop online - www.adafruit.com
-----------------------------------------
LIVE CHAT IS HERE! adafru.it/discord
Adafruit on Instagram: / adafruit
Subscribe to Adafruit on UKposts: adafru.it/subscribe
New tutorials on the Adafruit Learning System: learn.adafruit.com/
-----------------------------------------

КОМЕНТАРІ: 26
@mojo_jojo
@mojo_jojo 2 роки тому
Two sentences and I finally understand what 'open drain' means :)
@GordonChil
@GordonChil 2 роки тому
I like that these are showing up on my feed. Most of this I don’t understand. I’m just a lowly software dev.
@stm32user
@stm32user 2 роки тому
Shorts is super. Keep it up
@martingerhardsoos
@martingerhardsoos 10 місяців тому
Needed this info. Thx
@GaryVolts
@GaryVolts 2 роки тому
The SCL signal doesn't have to be open drain unless you are making a multi-master system which I've personally never seen done. You can just drive SCL high and low from the bus master and save the resistor. You'll get better edges for your clock and one less part to boot.
@xslr
@xslr 2 роки тому
How does one achieve that? Can this be done by configuring the scl pin to push-pull while configuring the master‘s pins?
@GaryVolts
@GaryVolts 2 роки тому
@@xslr yes, that is correct.
@NavinF
@NavinF 2 роки тому
Sounds kinda sketchy. What happens when it goes out of sync and two devices pull in opposite directions? Edit: Oh I see, you meant just the clock line, not the shared data line. Still, the I2C standard lets device pull the clock low (“clock stretching”) until its ready to respond. You can only skip that resistor and drive the line high if you’re sure that the device doesn’t do this. Otherwise, your pin will release the magic smoke.
@GaryVolts
@GaryVolts 2 роки тому
@@NavinF Ya I just mean the clock line and I hadn't heard about any clock stretching parts until you mentioned it.
@pizzasub3194
@pizzasub3194 2 роки тому
I don’t know what’s going on in these shorts but they’re entertaining
@ShonTolliverMusic
@ShonTolliverMusic 2 роки тому
Well then I'm sitting next to you in class bc don't know what's going on either but I know I like it.
@pgmelectronics9117
@pgmelectronics9117 2 роки тому
Great video 💯 helpful
@michaelproust7891
@michaelproust7891 Рік тому
Thanks, great information, could you please explain the determination of speed of an IC, has it to do with a crystal in the circuit?
@MMuraseofSandvich
@MMuraseofSandvich 2 роки тому
Fantastic description of "open drain".
@VoltageVentures145
@VoltageVentures145 Місяць тому
The faster the bus speed = the lower the resistor value. The slower the bus speed = the higher the resistor value. An open drain can only drive the bus low, this is why the a need for a pull-up resistor, 2.2k to 10k, I love this type of video, thank you for sharing 👍 ❤️
@taranagnew436
@taranagnew436 2 роки тому
do you use i2c pull-ups when you want a signal to always go high when you use it and go low when it sends the data?
@perwestermark8920
@perwestermark8920 2 роки тому
When using totem-pole drive, where the chip has strong drive both high and low, you can't connect two outputs because they would fight. But I2C uses what is called wire-or. The resistor is not strong. It represents a weak pull up. So when the master (normally a microcontroller) sends, it can override the resistor and pull the wire low. And when the other side (sensor, memory or whatever) responds, the microcontroller holds its pin in idle (allowing the signal to float high) and the other side is free to send by pulsing the wire low. So many senders can share the same wire to transmit as long as there is a protocol to decide who may send at any specific time. And for I2C, the master supplies an address in any query, to inform the specific device the to process the query and respond with an answer.
@Dragon-xd9em
@Dragon-xd9em 2 роки тому
Nc
@DoctorWhom
@DoctorWhom 2 роки тому
what would be too much for a pullup value? I noticed that some of the humidity sensors have 4.7k pullups, wondering if two sets of 4.7k pullups would be fine on a 3.3v circuit. Would the result near 2.2k be fine?
@xslr
@xslr 2 роки тому
It depends on the capacitance of the bus and the signal rise times (bus speed) you need to hit. In the end, you would try different values and scope the lines to see if you meet the desired rise times.
@cbqpisk
@cbqpisk 2 роки тому
Sorry for asking. If pull up resistors are good to have then why we don't have built in resistors on controller boards or on sensor modules boards?
@geekgee
@geekgee 2 роки тому
Adafruit and SparkFun generally do on their sensor breakout boards... usually 10k and 4.7k respectively if I recall.
@GaryVolts
@GaryVolts 2 роки тому
Because I2C bus is meant to drive multiple sensors, so if each one has its own pull up, the parallel pull ups will be too strong the the open drain of the bus master.
@cbqpisk
@cbqpisk 2 роки тому
Ok perfect, thanks for your answers.
@perwestermark8920
@perwestermark8920 2 роки тому
@@GaryVolts Open drain just means the output has no capacity to draw the signal high. It doesn't tell what capacity a pin has to force the signal low. Open drain (FET) or open-collector (bipolar) is implemented with a single transistor between signal and ground. No transistor from signal to supply voltage. But most chips can sink a lot. Just that "a lot" also means extra current consumption. Which is bad if the device is run on batteries. So the goal is to use as big pull up resistor as possible that gives acceptable signal quality - not because the chips are too weak to sink the line but to reduce the power consumption when the line is held low. 3V3 supply and 2k2 resistor means about 1.5 mA consumed just to hold the line low.
@dfazen89
@dfazen89 2 роки тому
Thank god nerds like this exists lol I love technology and electronics but wooooosh this was right over my head homie
How to use Pushbuttons with Arduino. Pull up vs Pull down resistors
10:36
I2C Hardware & PCB Design - Phil's Lab #132
34:50
Phil’s Lab
Переглядів 33 тис.
How to get a FREE HYPERCHARGE SKIN!
02:07
Brawl Stars
Переглядів 14 млн
I2C Long Distance - Collin’s Lab Notes #adafruit #collinslabnotes
1:00
Adafruit Industries
Переглядів 111 тис.
How to work with Open Collector outputs
12:56
Making Stuff with Chris DeHut
Переглядів 5 тис.
Mini Reflow Test Run - Collin’s Lab Notes #adafruit #collinslabnotes
1:00
Adafruit Industries
Переглядів 285 тис.
Pull-up and pull-down resistors
3:42
Julian Edgar
Переглядів 46 тис.
Decoupling Capacitors - Collin’s Lab Notes #adafruit #collinslabnotes
1:00
Adafruit Industries
Переглядів 155 тис.
I2C and SPI on a PCB Explained!
15:34
Altium Academy
Переглядів 132 тис.
What Is Pull Up Resistor & Pull Down Resistor | Deeply A To Z Explain
13:23
Local Mobile Engineer
Переглядів 14 тис.
Phototransistor - Collin’s Lab Notes #adafruit #collinslabnotes
1:00
Adafruit Industries
Переглядів 120 тис.
I2C Addresses - Collin’s Lab Notes #adafruit #collinslabnotes
1:00
Adafruit Industries
Переглядів 108 тис.
Cách sửa này được không các bạn?
1:00
Cơ Khí Toàn Nghĩa
Переглядів 859 тис.
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Переглядів 987 тис.
Phone sees the future ! 📲🫣👽
0:38
BOGDANCHIKI
Переглядів 11 млн
Лучший телефон на андроиде?
0:25
Опросный
Переглядів 114 тис.