ale-ben / Olive-Turtle

GNU General Public License v3.0
0 stars 0 forks source link

ENS160+AHT2X no data to retrieve regarding Air Quality (NOT RELATED TO ESPHOME) #4

Open ale-ben opened 11 months ago

ale-ben commented 11 months ago

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.

_DFRobotENS160 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 commented 11 months ago

Possible sensor replacements:

ghsensdev commented 11 months ago

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

ale-ben commented 11 months ago

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

ghsensdev commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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

ale-ben commented 11 months ago

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 commented 11 months ago

unless i make one using esp32

ghsensdev commented 11 months ago

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 commented 10 months ago

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```