-
Notifications
You must be signed in to change notification settings - Fork 47
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
AM2320 sensor not found #33
Comments
Well vader ... your thoughts are strong, very strong and poweful, but you still need a tray 😄 |
Well, I was changing the orig. wire library with yours in ESPeasy. There is a scan function which looks like this: with this: The orig. code works and find all sensors, yours find all, except the AM2320. For what reason ever.... :-/ |
I guess it is some timing issue... probably the AM2320 is not 100% within the i2c spec ( |
From the data sheet: Step one: Wake Sensor Maybe the >800µs is the problem...??? |
Well, I've already tried to go through this chinglish datasheet... just horrible :-/ Btw, I just saw that you are using only But with this kind of datasheet and without a scope it's shooting in the dark... |
Yes, the datasheet is a bit scary. They are talking about an I2C address of 0xB8, but it is 0x5C. :-/ Ok, I'll try with brzo_i2c_write(.) .... |
Hi. Why is this not working? You wrote, that brzo_i2c_ACK_polling should normally not be used. So what I'm doing wrong? BTW: Did you get the sensor? |
The sensors are on their way from China to Switzerland, as I said I will then check with my scope what is going on. |
I had the same problem with AM2320, but solved it by adding another pair of begindTransmission / endTransmission. My solution: Maybe I should add, that some AM2320 have been running on some boards without problems. So I'm convinced it is a timing-issue combined with AM2320 production spread. |
In short: In details After that i2c communication works in a normal way. Note the 10 msec delay after wake-up sequence, according to this line here Then, the second sequence in details So in the wake-up sequence, the device is not acknowledging the slave address, i.e. the i2c master gets an NACK. And then, it is expected by the AM2320 that the master pulls SDA low. The AM2320 will then stretch the clock as long as it is waking up. Above you can see that it stretches the clock after 9th cycle for about 75 usec. According to i2c standard, if an i2c master does not receive an ACK, it means that the slave with given address is not present on the i2c bus. Therefore, the master will not transfer any bytes to this slave (address)—simply because this slave was not responding. This is exaclty how The only way to make this sensor working correctly with |
Ah, ok. Thanks for clearing this. But I kick the crappy sensor into trash, that goes by far faster than writing a special code for it... ;-) |
Hi. With wire library the sensor is found.
The text was updated successfully, but these errors were encountered: