Closed Plombir18 closed 1 year ago
any feedback is greatly appreciated...
Dear Sirs,
After thorough analysis I found a problem with the delivered SGP41 sensors.
Initial situation: new project in VS code PlatformIO ESP32-S3 with the included Sensirion library Sensirion I2C SGP41@^0.1.0, code and serial output attached. All sensors were used on the same hardware with the same wiring and same code.
Serial number OK: SerialNumber:0x000003D8DB01
Serial numbers NOK: 1) SerialNumber:0x000001936FB5 2) SerialNumber:0x0000019371B1 3) SerialNumber:0x0000019373E1 4) SerialNumber:0x0000019370AD 5) SerialNumber:0x000001937505
Please review why the configured NOK sensors do not provide any data values. The function SensirionI2CCommunication::receiveFrame() returns a zero in the variable _numBytes for the NOK sensors. SGP41_ESP32.zip
Hi @Plombir18
Thanks for the request. Most of the time "Not enough data received" is due to some kind of unstable I2C connection.
Since one sensor works, but in general your connection is very unstable your connection might have a lot of noise or insufficient/unstable power supply. This would also explain why reading the serial number works and the measurements not. When you start the measurement (e.g. through self-test or measure) the heater on the sensor will be activated which draw much more peak current. A capacitor of 1uF for decoupling as described on the SGP41 datasheet on Page 8 might help.
Sensirion_Gas_Sensors_Datasheet_SGP41.pdf
The standard I2C pins for ESP32 are 21 (SDA) and 22 (SCL). We always take this pins for testing. I am not sure how your hardware setup looks like. An easier solution might be to test with another connection cable and check if you have the same behavior if you use the default I2C pins for ESP32.
With the code itself I don't see any issue. When time permits I will also test if I can reproduce the issue when I connect an SGP41 to the pins 37 and 38.
The problem could be identified. The cause is the assembly of development parts instead of production parts by the PCB assembly service provider.
Hello,
I have installed Sensirion I2C SGP41 lib in a new project, but still I don't manage to read any sensor values. The SGP41 is connected to ESP32-S3 with SDA pin 37 and SCL pin 38. I can read the serial number but the sensor data values are blank.
Does anyone have any idea what is going wrong here?
Thanks in advance Alex
Code:
Monitor output: