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

Add I2C Sensor (Asair) AHT10 / AHT15 (Temperatur/Humidity) #7596

Closed
ludwich66 opened this issue Jan 24, 2020 · 22 comments
Closed

Add I2C Sensor (Asair) AHT10 / AHT15 (Temperatur/Humidity) #7596

ludwich66 opened this issue Jan 24, 2020 · 22 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@ludwich66
Copy link

ludwich66 commented Jan 24, 2020

Have you looked for this feature in other issues and in the docs?
Yes
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
No
Describe the solution you'd like
A clear and concise description of what you want to happen.
Add a new I2C Temp/Humidity Sensor equal to BMP280

Library on Github

Datasheet

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
find on Github link
(Please, remember to close the issue when the problem has been addressed)
AHT10

@ascillato2 ascillato2 added the feature request (devs?) Action - awaiting response from developers label Jan 25, 2020
@device111
Copy link
Contributor

Hi,
you can try my fork but its not tested yet and i'm not verry similar with C-Programming.
I'm waiting for Hardware to test it.

@ludwich66
Copy link
Author

ludwich66 commented Feb 18, 2020

Hi device111 I do not see a light way to compile your fork.
Is it possible to send me an precompiled binary?
My Platform is an ESP 8266 12F

@device111
Copy link
Contributor

Hi ludwich,
here is it:

tasmota.zip

@device111
Copy link
Contributor

Cool!
thank you for the test!

ok, i have looked in the datasheet. The AHT series have no CHIP-ID. So there is no difference between the two Chips. I can call it AHT10/15.

I will change the repo and send you a new Version.
So it would be great that you can test for a couple of hours, to see if its stable.

@device111
Copy link
Contributor

Hi ludwich,

sounds good. No, at the moment is only working with one sensor Address. (0x38). If the libary works good, i will try to implemented both Adresses in the libary with autosearch.
I will check the humidity formula, if its wrong.

You can send me an Email, to perform more tests an we don't spam this thread: device@gmx.at
Here the new Version:
tasmota.zip

@device111
Copy link
Contributor

Here is the first try to autosearch and poll both sensors with 0x38 and 0x39.
Believe me, i don't no if that works... :-)

if no Display of sensors on the website, give me the console log from startup.

tasmota.zip

@device111
Copy link
Contributor

ok, formula for humidity is ok. I think there is the senor itself. It's a verry cheap sensor and has no calibration table to use.
one thing i found...at the moment i initialize the sensor with the "calibration" bit:

grafik

i dont' no what this happens but in the original repo from Thinary its the same and i found no Infos about the calibration Bit in the Datasheet.
ok, let us test if the other function works.. :-)

arendst added a commit that referenced this issue Feb 20, 2020
Add initial support for Sensors AHT10 and AHT15 by Martin Wagner (#7596)
@device111
Copy link
Contributor

device111 commented Feb 25, 2020

Issue finished with #7797

@ascillato2 ascillato2 added enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended and removed feature request (devs?) Action - awaiting response from developers labels Feb 26, 2020
@catalintabirca
Copy link
Contributor

testing a AHT10 sensor on a Sonoff Basic. it replaced a BME280. loadAvg has gone up from 20 to 27-30. just letting you know. olso, any chance for better resolution?

@device111
Copy link
Contributor

there is nothing optimized in this initial Source but you can not compare the BME280 with this cheap china sensor. This Sensor has answer time over 75ms and the documentaion is not realy complete.
If i had time, will release a better Version in the next view days, with better timing and Dual address support.
At the moment ludwich66 is testing the new source.

@crashdown79
Copy link

After trying the precompiled binary from @device111 i´ve tried now to compile it my self.
Unfortunately the result is that the sensor reading stays at Temp: 21.0°C and Humidty 29.0 for all time while it seems work normal with the precompiled bin. Could not find where could be the error. Do you have suggestions what/where i can check?
On a WEMOS D1 mini with Arduino 1.8.12 and 8.1.0.11(tasmota)

Source changes:
Excluded: // #define USE_ADE7953
Included: #define USE_AHT1x

{"StatusFWR":{"Version":"8.1.0.11(tasmota)","BuildDateTime":"2020-03-15T18:36:47","Boot":31,"Core":"2_5_2","SDK":"2.2.1(cfd48f3)","Hardware":"ESP8266EX","CR":"334/699"}}

{"StatusSNS":{"Time":"2020-03-15T18:44:25","AHT1x":{"Temperature":21.0,"Humidity":29.0},"TempUnit":"C"}}

@device111
Copy link
Contributor

Do you have other I2C Sensors wired or only AHT10?

@crashdown79
Copy link

Only one AHT10 on D2 = SDA and D1 = SCL

@device111
Copy link
Contributor

ok, try to change the delay(80); to delay(100); in
xsns_63_aht1x.ino (row 64)
and compile.

@crashdown79
Copy link

crashdown79 commented Mar 15, 2020

seems to have other problems, neither with delay(80) nor delay(100) none of my 5 AHT10´s works now with the Wemos (not in parallel, one at a time, while a BME280 for comparison works directly)

Also tried https://github.com/enjoyneering/AHT10/tree/master/examples/AHT10_Any_MCU_Serial
there i´m able to produce valid values.

@device111
Copy link
Contributor

Try the new code in the dev. Version.

and update your Core Version to a newer one,
2_5_2 ist old. We have 2.6.3 or 2.7 dev.:

{"StatusFWR":{"Version":"8.1.0.11(tasmota)","BuildDateTime":"2020-03-15T18:36:47","Boot":31,"Core":"2_5_2","SDK":"2.2.1(cfd48f3)","Hardware":"ESP8266EX","CR":"334/699"}}

@crashdown79
Copy link

Now it works :-)

12:02:27 MQT: stat/aht10_C88C20/STATUS = {"Status":{"Module":18,"FriendlyName":["aht10"],"Topic":"aht10_C88C20","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
12:02:27 MQT: stat/aht10_C88C20/STATUS2 = {"StatusFWR":{"Version":"8.2.0(tasmota)","BuildDateTime":"2020-03-21T12:00:23","Boot":31,"Core":"2_6_3","SDK":"2.2.2-dev(38a443e)","Hardware":"ESP8266EX","CR":"331/699"}}
12:02:27 MQT: stat/aht10_C88C20/STATUS10 = {"StatusSNS":{"Time":"2020-03-21T12:02:27","AHT1X-0x38":{"Temperature":25.8,"Humidity":37.0,"DewPoint":10.0},"TempUnit":"C"}}
12:02:27 MQT: stat/aht10_C88C20/STATUS11 = {"StatusSTS":{"Time":"2020-03-21T12:02:27","Uptime":"0T00:00:49","UptimeSec":49,"Heap":22,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":32,"MqttCount":1,"Wifi":{"AP":1,"SSId":"cdciot","BSSId":"9C:C7:A6:42:C6:5A","Channel":11,"RSSI":58,"Signal":-71,"LinkCount":1,"Downtime":"0T00:00:08"}}}

I´ve updated the Core to 2.6.3 and used the new 8.2.0 tasmota. It works prety smoth with all of my sensors.
Thank you verry much guys. You really do a great job with tasmota. I love it.

@alexandru2052
Copy link

you can share the tasmota compilation with other users???thanks!

@crashdown79
Copy link

crashdown79 commented Jun 19, 2021 via email

@Tiny2910
Copy link

Tiny2910 commented Jan 8, 2022

@crashdown79 Tried almost everything using your binary, but still unable to make AHT10 work. Can you help me locate the problem. I'm using wemos D1 mini.

@crashdown79
Copy link

@Tiny2910 what does your setup look like? I´d described it in more details some time ago: https://crashdown.de/2020/05/01/wemos-d1-mini-on-tasmota-with-aht10-sensor/

@crashdown79
Copy link

for the interested, i´ve updated to new tasmota 14.1.0.3 with active AHT10
https://github.com/crashdown79/tasmota-aht10/releases/tag/tasmota

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

7 participants