Schluggi / AIOsense

ESPHome based all-in-one sensor
https://aiosense.readthedocs.io/en/latest/
MIT License
125 stars 22 forks source link

Too many I²C pull-up resistors #44

Closed florianmulatz closed 1 year ago

florianmulatz commented 1 year ago

Category

There should be an info that the two resistors R1/R2 must not be populated when using the I²C modules BME280/BME680. I got quite bad readings because I soldered them on the board in the beginning - sometimes no values were entered at all at startup - I had to do several restarts.

Maybe I'm missing something or misinterpreting something - but since I removed the two resistors, everything works fine.

Cheers

Schluggi commented 1 year ago

These resistors are necessary for I²C in general. They pull-up the signal to define the I²C master.

Which ESP do you use? Could you send a picture of your module where I can see the onboard resistors on the module?

florianmulatz commented 1 year ago

I'm using the new C3 Lolin ESP32. BME680 is exactly this module --> https://de.aliexpress.com/item/1005001621661986.html?spm=a2g0o.order_list.order_list_main.5.21ef5c5fHqQz76&gatewayAdapt=glo2deu

Schluggi commented 1 year ago

You might be right. I will analyze this in detail in a few days.

cptbucky commented 1 year ago

I have had an odd behaviour that might be related whilst using the C3 Lolin ESP32, the PIR is unresponsive, always reporting detected.

Thanks for the above, I will try removing the resistors as I have 2 AIOSense boards setup with consistent behaviour (no I²C issues though!) and one custom D1 Mini ESP8266 that works. I haven't added the surface mount capacitor.

If entirely unrelated, please let me know and I'll raise a new issue.

Updated The issue persists with an ESP32 D1 Mini and removing the resistors has no impact so I'll raise an issue.

s-gordon commented 1 year ago

I've seen this behaviour with ESP32 D1 Minis and Lolin C3 Minis and the BME280 when fixed to the board. Typically failed I2C scans, or odd errors in the log. Multiple restarts and re-installing firmware eventually fixed it. I'd put this down to bad soldering as I had done this using solder paste and a hot air gun, but it may be similar to what others have reported here.

Schluggi commented 1 year ago

Please take a look here: https://github.com/Schluggi/AIOsense/discussions/51

I'll explain the issue later this day in detail.

Schluggi commented 1 year ago

We need I²C pull-up resistors to make I²C to work. But since every module has there own pull-ups, we ending up with too many pull-ups which can resolve in bad readings.

I spotted pull-ups on your BME-module as well as on the light module. So yes you're right you can remove the onboard resistors as long as don't use the SMD-BME module only.

Maybe it would be nice to remove the SMD parts completely. That's why I'm started the poll: https://github.com/Schluggi/AIOsense/discussions/51.

Schluggi commented 1 year ago

@florianmulatz I just added this to the docs.

Again: Thank you for noticing :)