Do you have pull-up resistors on data lines? They should be 10k or 4k7, or anything in that range.
And, check if your sensor really have address 0x38…
EDIT: maybe i’m missing something, but above picture has SDA connected to D1(SCL) and SCL to D2(SDA)…? Wrong…
Yes, I see that the picture is wrong. I have tried to flip those two pins, but with same result
I’m new to this… pull-up resistors? Is that necessary to have between the board and this sensor?
Isn’t that needed only while switching between 5v and 3.3v? This board delivers 3.3v out of the box
The sensor has printed both 0x38 and 0x39 on it. Tried them both
To bad I didn’t buy more than one. That way I could determine if it’s broken or not.
They are dirt cheap, so it’s not a problem to buy plenty, but it takes 2 months to deliver…
I don’t know what more to do. I have to assume this one is broken. The NodeMCU board seems to work fine otherwise.
The AHT10 datasheet says it supports 0 to 100kHz (400kHz in high speed mode) and the default frequency ESPHome uses is 50kHz. Generally slower is more reliable, but it’s worth at try. I can’t think of anything else.
The datasheet also says the AHT10’s maximum input voltage is 3.6V. You didn’t accidentally power it from 5V at any time did you?
You’re right. But, despite the fact that ESP does have pullups and many sensors have them it did happen to me that sensor didn’t work without them, mostly if cable was too long - in this case 10k is somewhat too high. It worth a try.
The datasheet also says the AHT10’s maximum input voltage is 3.6V. You didn’t accidentally power it from 5V at any time did you?
This can be tested: define two other pins as I2C bus. If inputs 4 and 5 are “gone”, the new ones will work, if not it’s faulty sensor. It’s not mandatory to have GPIO4 and 5 as I2C.
Testet. Same result
Thanks for helping out, guys. But it might just be a case where a $1 gadget just don’t work
I have another board I’ve could have tested it on, but I’m not able to get it to work in ESPHome.
It is called:
UNO R3 Official Box ATMEGA16U2 / UNO+WiFi R3 Original ATMEGA328P Chip CH340G For Arduino UNO R3 Development Board WeMos ESP8266
But I guess that is a story for another day.
You could say my ventures into the ESPHome world has had a bad start.
can your sensor board be powered by just 3.3.v?
maybe it needs 5v
a google image search shows some aht10 breakouts do feature power regulation
but not everyone has this
check your ground connection, sensor may not be properly grounded. I had this issue where there was a difference of 0.5v between the sensor ground and the power supply ground.
hope this helps
So… I have the same problem and I am confused. I’ve spent hours reading several forums, trying different things, but I hope someone can help me. I have a AHT10 as well. I hooked it up to an Arduino Mega with some pull up resistors and it worked the first try. I have an esp8266 NodeMCU that says “LoLin ver 0.1” and on the back it says “New Nodemcu V3”.
I see a “Found no i2c devices!” followed by “Communication with AHT10 failed” a little later.
What I’ve tried:
With and without pull up resistors
Confirmed the sensor is working fine with an Arduino Mega
Swapping the SCL/SDA pins
Tried many different configs, e.g. pins “D1, D2”, “GPIO5, GPIO4”, different frequency (100kHz for instance)
Soldered everything to a perfboard and again triple checked wiring to avoid wonky breadboard issues (regretting this one a little lol)
Wiring:
Wires are as short as they can be. I connected the SDC to D1 and SDA to D2 with 2x 4,7k resistors going to the 3V. VCC connected to the pin that says “3V”, GND pin connected to “G”. I triple checked all the connections with a multimeter and I am sure nothing is shorting, everything seems to be connected exactly as I intended. There is ~3,3V on the VCC pin. It’s wired exactly the same way I used it with the Arduino when it did work, with the only difference being that Arduino runs at 5V. But the AHT10 says it can run 2.2-5.5V so that should be fine.
I also have a MH-Z17C connected to the same NodeMCU on the UART, using VU (5v) and the rx/tx/gnd pins. That one is working fine. I’m using the same ground pin for both the MH-Z17C and the AHT10 but that should also be fine…right? The store where I purchased it, shows the same pinout as is mentioned by @Dal above, except the picture I got does not mention SCL and SDA.
I can’t figure out why I can’t get this to work. There must be something simple I’m overlooking. What am I doing wrong?
I can’t imagine specifically those 2 pins on the NodeMCU are fried. It’s a new NodeMCU and I never used those pins for anything else before. Is there anything I can do with a multimeter to check, or, anything else to debug this further?
Sorry to bump this old thread, but I just wanted to say, that I was also having “Communication with aht10 failed” error, even though address 0x38 showed up on the i2c boot scan!! Which means the wiring is correct.
It turned out that using AHT10 in the config was causing the error, I had to use AHT20 to fix the problem. My module says aht10 on the silkscreen, the chip has aht10 laser engraved into it. But it speaks aht20 with esphome!!
Probably got scammed on AliExpress for buying from a choice seller, instead of my goto freeshipping store. aht20 relabled as aht10 is my guess as to this problem
Yes, this works.
I had the exact same problem, probably bought from the same listing on AliExpress as it says AHT10 on the module and only works with AHT20. Thank you so much, if I hadn’t of seen this message I would have been trying to figure out why it wasn’t working for hours.
Funny a while back I bought this one. Although it is clearly advertised as an AHT20 it is only working as an AHT10. There are no markings on the chips,
f.y.i. information I bought the black one with I2C connector/cable; perhaps the purple does contain the AHT20 chip and/or for the black one they received a new shipment. You never know.
Also compared to the BMP280 the AHT10 is 0,5 Celsius lower. Both readings are a bit higher than the real temperature.
See also a lot of read attempt errors but likely I should have done some additional stuff according to the doc?
[15:30:49][D][aht10:099]: Read attempt 1 at 32ms
[15:30:49][D][aht10:107]: AHT10 is busy, waiting…
[15:30:49][D][aht10:099]: Read attempt 2 at 69ms
[15:30:49][D][aht10:125]: Success at 74ms
sensor:
- platform: aht10 # Use aht10 platform as ESPHome may not have aht20 specific support
variant: AHT20 # Specify the model as AHT20
temperature:
name: "AHT10 Temperature"
id: aht10_temperature
humidity:
name: "AHT10 Humidity"
id: aht10_humidity