Coder Social home page Coder Social logo

Comments (4)

Plombir18 avatar Plombir18 commented on June 9, 2024

any feedback is greatly appreciated...

from arduino-i2c-sgp41.

Plombir18 avatar Plombir18 commented on June 9, 2024

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.
Debug_NOK
Serial_monitor_NOK
Serial_monitor_OK
SGP41_ESP32.zip

from arduino-i2c-sgp41.

psachs avatar psachs commented on June 9, 2024

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.

from arduino-i2c-sgp41.

Plombir18 avatar Plombir18 commented on June 9, 2024

The problem could be identified. The cause is the assembly of development parts instead of production parts by the PCB assembly service provider.

from arduino-i2c-sgp41.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.