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+AHT2X no data to retrieve regarding Air Quality (NOT RELATED TO ESPHOME) #4

Open
ale-ben opened this issue Oct 9, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@ale-ben
Copy link
Owner

ale-ben commented Oct 9, 2023

ENS160+AHT2X connected I2C.
AHT2X works perfectly, ENS160 most of the times does not provide data.

SparkFun Indoor Air Quality Sensor - ENS160 library has a checkDataStatus() function that checks the flag in the sensor for new data availability and the function most of the times return false.

DFRobot_ENS160 library does not have _checkDataStatus() and most of the times returns 0 on all values.

Suspect a defective sensor, waiting for seller to reply to understand if wiring is correct.

@ale-ben ale-ben added the bug Something isn't working label Oct 9, 2023
@ale-ben
Copy link
Owner Author

ale-ben commented Oct 9, 2023

Possible sensor replacements:

@ghsensdev
Copy link

Does it mean you do not suggest buying this sensor?
Have someone tried the Adafruit breakboard with this sensor?

@ale-ben
Copy link
Owner Author

ale-ben commented Oct 9, 2023

Not what I mean, in fact I am considering replacing this sensor with a sparkfun ENS160+BME combo shield.

It's just that this specific sensor (AHT2X+ENS160) is giving me problems, I tried contacting the seller to understand if I made some mistake but as of now "DFRobot_ENS160" lib most of the times returns 0 on all values and "SparkFun Indoor Air Quality Sensor - ENS160" lib returns "no data to retrieve".

Keep in mind this is an academic project so there is a non zero probability that I'm making a mistake somewhere...

Will update issue to be more specific, sorry for the misunderstanding

@ale-ben ale-ben changed the title ENS160 air quality not working ENS160+AHT2X no data to retrieve regarding Air Quality Oct 9, 2023
@ghsensdev
Copy link

When you are talking about "returns 0 on all values", which values do you want to get?
Does your bug block the merge into esphome?

@ale-ben
Copy link
Owner Author

ale-ben commented Oct 9, 2023

Referring to all data provided by ENS160 (AQI, TVOC, eCO2, status).

It actually has nothing to do with esphome, I referenced the PR here as a way to keep track of my steps (since I was trying the implementation used there) but I forgot that GitHub keeps track of everywhere a PR has been mentioned...

As soon as I realized that my mention was appearing in the PR I removed the mention from here (but unfortunately it is still there)

@ale-ben
Copy link
Owner Author

ale-ben commented Oct 9, 2023

This is in no way a problem related to the ESPHome implementation of ENS160, which, by the way, works perfectly (in my case returns the same error as the SparkFun lib but in less time)

@ghsensdev
Copy link

Have you tried the software on the official home page of the sensor: https://downloads.sciosense.com/ens160/

@ale-ben
Copy link
Owner Author

ale-ben commented Oct 10, 2023

I'm looking into it but as far as I understand I would need an I2C to USB converter and I have none

@ale-ben
Copy link
Owner Author

ale-ben commented Oct 10, 2023

unless i make one using esp32

@ale-ben ale-ben changed the title ENS160+AHT2X no data to retrieve regarding Air Quality ENS160+AHT2X no data to retrieve regarding Air Quality (NOT RELATED TO ESPHOME) Oct 10, 2023
@ghsensdev
Copy link

ghsensdev commented Oct 10, 2023

If you use the sensor in ENS160_OPMODE_CUSTOM mode then only raw resistance values will be reported as I read somewhere. Do you use it in ENS160_OPMODE_STD mode?

@ale-ben
Copy link
Owner Author

ale-ben commented Oct 16, 2023

Sorry for the late reply...
Can't find that mode in SparkFun_ENS160 lib.
Only modes I have are

#define SFE_ENS160_DEEP_SLEEP 0x00
#define SFE_ENS160_IDLE 0x01
#define SFE_ENS160_STANDARD 0x02
#define SFE_ENS160_RESET 0xF0```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: 🆕 New
Development

No branches or pull requests

2 participants