Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENS160 sensor support package #119

Open
mbz4 opened this issue May 22, 2024 · 3 comments
Open

ENS160 sensor support package #119

mbz4 opened this issue May 22, 2024 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@mbz4
Copy link
Collaborator

mbz4 commented May 22, 2024

This is a very affordable gas sensor but a pain to work with.

Using this board for building the support package, and it features both the ENS160 (gas; driver target) and a AHT2X (temp, humidity; follow-on driver target) built-in:

Image

This instructables guide details more on how to set it up:
https://www.instructables.com/ENS160-AHT21-Sensor-for-Arduino/

...where this link to aliexpress shows the board retails at ~3USD:
https://www.aliexpress.us/w/wholesale-ens160%2Baht21.html?spm=a2g0o.detail.search.0

Here is the ENS160 product page (sciosense):
https://www.sciosense.com/ens16x-digital-metal-oxide-multi-gas-sensor-family/

And the ENS160 datasheet:
https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf

Sciosense prepared this official (arduino) driver:
https://github.com/sciosense/ens16x-arduino

And it is also on Platformio Registry here:
https://registry.platformio.org/libraries/sciosense/ScioSense_ENS16x (tested partially working)

There is also this driver:
https://registry.platformio.org/libraries/dfrobot/DFRobot_ENS160
(tested also partially working .-.)

The major pain with this sensor is the 24 hour initial startup phase: the device must be powered non-stop during this period.
In case of any power interruption, the timer resets...

While testing, the sensor did not yield usable measurements but perhaps after several iterations of the initial phase it might start producing useful data.

@mbz4 mbz4 converted this from a draft issue May 22, 2024
@mbz4 mbz4 self-assigned this May 22, 2024
@mbz4 mbz4 added bug Something isn't working enhancement New feature or request labels May 22, 2024
@mbz4
Copy link
Collaborator Author

mbz4 commented May 22, 2024

Official ENS161 Evaluation Kit V1, sold on Mouser ( ~40 EUR):
https://eu.mouser.com/ProductDetail/ScioSense/ENS161-Evaluation-Kit-V1?qs=17ckDYBRdel4dMyrxJwCbw%3D%3D

Image

Adding this comment for reference - note the 10x price difference between official eval sensor and aliexpress.

@mbz4
Copy link
Collaborator Author

mbz4 commented May 23, 2024

Tested all PlatformIO registry listed libraries for the ENS160:

  • adafruit/ENS160 - Adafruit Fork@^3.0.1
  • sparkfun/SparkFun Indoor Air Quality Sensor - ENS160@^1.1.0
  • sciosense/ScioSense_ENS16x@^1.0.0
  • dfrobot/DFRobot_ENS160@^1.0.1
    • ran sensor for 30 hours to solve assumed initial startup phase (24 hrs burn in)
      • result the same - AQI unknown, measurements all 0.

Not one worked with the aliexpress board.
Assuming the sensor board at hand may be defective.

Will prepare the IoTempower driver with the DFRobot_ENS160 library.
For the AHT2X can also test libraries (separate item).

@mbz4
Copy link
Collaborator Author

mbz4 commented May 23, 2024

rather incoherent behaviour

momentarily functioning: (with sciosense library - adjusted address, interrupts)
Image

...but only 10 seconds later:
Image

I like the DFRobot MIT licensed library the most because its organized in a sensible manner... but it also does not result in anything usable... although once or twice it did work ok...

Image

I think it will take a lot of time to get this 3 EUR sensor working... reliably...
IoTempower driver next...

@mbz4 mbz4 moved this from Backlog 🔜 to Todo 📝 in IoTempower Task Manager May 23, 2024
@mbz4 mbz4 moved this from Todo 📝 to In Progress 🏗️ in IoTempower Task Manager Jun 29, 2024
@mbz4 mbz4 moved this from In Progress 🏗️ to Todo 📝 in IoTempower Task Manager Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Todo 📝
Development

No branches or pull requests

1 participant