Closed YouCanNotBeSerious closed 5 months ago
Found the full datasheet here - there are plenty of 4 page versions around without the protocol detail...
Thanks for the question, I will look into this tomorrow if time permits.
There are two possible ways, as a derived class or a stand alone project, depending if they are more or less close. To be continued
I had a quick look and the register maps are quite different
CHT8305 datasheet (oct 2017 - rev 1.1)
CHT8310 datasheet (april 2023 - rev 1.0)
Temperature and humidity registers are on the same index (but different math) The other registers do not match.
The sensors are too different to make a derived class. Patching the 8305 library with only different math for T and H will result in problems with other registers causing more patches / maintenance.
So the only solution is to design and implement a separate library for the CHT8310. The interfaces could be kept similar where possible of course.
note:
There is a whole family CHT83xx - there might be compatible ones.
A minimal class for the CHT8310 would
Created such a minimal class - https://github.com/RobTillaart/CHT8310 (under development)
@YouCanNotBeSerious Released a 0.1.0 version of the CHT8310 library - https://github.com/RobTillaart/CHT8310 It is pretty minimal and should get you started. If there are problems, please open an issue under that repo.
@YouCanNotBeSerious Released a 0.1.0 version of the CHT8310 library - https://github.com/RobTillaart/CHT8310 It is pretty minimal and should get you started. If there are problems, please open an issue under that repo.
Wow! Thanks - I will test as soon as I ...ahem... repair my temperature sensor hardware (don't ask!). I also have more units arriving any time now if I can't undo my mistake :-)
@YouCanNotBeSerious
Welcome, it is an interesting sensor and by stripping (a copy) of the CHT8305 I had 50% in place. Still it took a few hours to get it to (beta?) release level, and now there is a reasonable base to start the tests.
I close the issue here, so please open an issue under the cht8310 repo to continue the discussion.
Hi -
I am repurposing a generic white label Tuya sensor by changing the BK7231 module out for an ESP32-C3 module, and running custom Ardunio code. The sensors I have use a CHT8310 chip.
I found your work here, and wonder if with the information in this link you would be able to modify the calculation part to support the 8310 sensor ? In that thread are PDF extracts that make It seem like the numbers coming from the sensor are different to the 8305 and "just" need some different math (hopefully it's that simple!)
I also found this code contribution.
Naturally i would test and report back both the 8310 results and use on the ESP32 if you were able to do this.
Thanks!