Why Arduino Crashed?
Вставка
- Опубліковано 11 лип 2024
- I explore the need of using pull-up resistors on the SCL and SDA pins of I2C devices to prevent causing arduino to crash/freeze.
Components:
- Resistor Kit 38 Values 1% 1(600Pack): amzn.to/2xfelzm
- Rigol DS1054Z Digital Oscilloscope: amzn.to/2C5ZwD7
Note: As an Amazon Associate I earn from qualifying purchases.
Website: www.interlinkknight.com/
Patreon: / interlinkknight - Наука та технологія
Man, you really saved my project. I'm so glad that I found your video. Thank you very much
That's great. I'm glad i could help
I never suspected it would be this bad. That might explain why sometimes my EPS8266 based temperature/humidity sensors running on 2 AA's mysteriously freeze or report incoherent values.
Nice to see a new video! Good info!
:)
Good information
Very good to know! Thanks!
Thanks nice info
i subscribed.
Thanks. I will use it now)
I designed a big project with a little oled display like the one you are showing
And some time it freeze, if I well understood what you are explaining, a little 1K resistance can stop the problem ?
Thank you for your great video
yes
Thank you for the answer 😊
this is great info!!! Thanks!
Question: How would you connect multiple i2c devices and pull them up?
You connect multiple devices the same way as connecting 1 device. But if we are talking about many devices, like 10, then you might not need any pullup resistor because i2c modules usually have their own pullup resistor.
@@interlinkknight so I would only need 1 set of resistors on the bus? and when I get to 10 or more, they may not be necessary. At that point will it hurt if they are there? I would I determine if I need more or less pull-up resistance? and just subscribed :D
Since I2C devices connect in the same line you only need one resistor for the sda pin and one for scl.
If you have many devices, it might create problems if you add pull-up resistors.
The way to be sure is to look at the signal with an oscilloscope, but don't worry too much about it. It doesn't have to be perfect.
@@interlinkknight thank you! that help clear it in my mine!
Hello where to place pull-up resistors? Close to the arduino or close to the display? I have almost 50 cm long cable. And second thing is why arduino freezes only when I power it up from the external switching source. If I power it up through the USB - PC OLED display works just fine. Any idea?
I don't know
Hello there I am using stm32f446re as controller. oled screen freezes and does not come back after reset. If I throw a resistor will it be a solution?
I suppose. Only one way to find out
I am facing problem but I don't know exactly what's the cause for it . I am building a waypoint navigation robot but arduino mega freeze when motors starts running, but without motors arduino mega runs for infinite time. So sir can u help me with this to fix it. Thank you
I am also using hmc5883l magnetometer with i2c communication to determine heading
Did you put the pull up resistors?
@@interlinkknight No sir , but controller freezes only when motor start running. So I thought something has to be done with motor.
Will having pull up resistor fix my problem?
Maybe, yes. Try it
@@interlinkknight I am using level shifter, data sheet says it has pull-up resistor
Can we "unfreez" it?
Pressing the reset button or doing a power cycle
@@interlinkknight No, like in software. I found that wire.setWireTimeout will do the trick to unfreeze arduino.
Good to know
I wonder if the SPI bus suffers the same way....
I am not an expert but from what I know we don't need resistors for the SPI protocol. They work differently.