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

Grove DHT22 (AM2302) and I2C LCD do not work together #1110

Open
nkrkv opened this Issue Mar 12, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@nkrkv
Copy link
Member

nkrkv commented Mar 12, 2018

The problem reported on the forum

Steps to reproduce

  1. Build a circuit with Grove DHT22 on port D2 and a text I2C display
  2. Make a program to show temperature and humidity from the sensor on the screen
  3. Upload

Expected behavior

LCD shows actual values

Actual behavior

LCD shows zeros for both T and RH

Details

It was verified another very similar AM2301 sensor works fine with an I²C display, but it looks like AM2302 differs somehow.

Help from one who has following is required:

  • Grove DHT22
  • I²C Text LCD
  • C++ knowledge and Arduino debug skills

The following yet to be done:

  • Confirm or decline the bug
  • Find the root cause
@maroelawerner

This comment has been minimized.

Copy link

maroelawerner commented Oct 17, 2018

I have the same problem. Tested DHT22 sensor using the Arduino IDE and the DHTlib and it works well. Using XOD it just shows values of 0.00.

@evgenykochetkov

This comment has been minimized.

Copy link
Contributor

evgenykochetkov commented Oct 17, 2018

@maroelawerner, did you use XOD v0.25.0?

EDIT: Also, if UPD pin was set to Continuously, please try connecting xod/core/clock to with IVAL set to 2 to it.

@maroelawerner

This comment has been minimized.

Copy link

maroelawerner commented Oct 18, 2018

no, v0.24.1

@maroelawerner

This comment has been minimized.

Copy link

maroelawerner commented Oct 18, 2018

I have upgraded to V0.25.0 and tried out you recommendation.
Still the same.
BTW. The original project had a square wave generator connected to the UPD.

@nkrkv

This comment has been minimized.

Copy link
Member

nkrkv commented Oct 19, 2018

Would you share your .xodball as is and list the hardware you’re using: the controller board, and the exact sensor model?

@maroelawerner

This comment has been minimized.

Copy link

maroelawerner commented Oct 20, 2018

Hi,

I'm using an Arduino clone and an AM2302.

I have attached some pictures showing you the details of the setup.
I have also have pictures of the oscilloscope traces. With the XOD download, there is just a high level after a short low. With the Arduino IDE download, that works without changing the hardware at all, you can see the exchange of data taking place. It looks like the request to send data is not handled properly by the XOD code.

temp-humid.xodball.zip
osc5
osc4
screenshot_20181020_140247
20181020_124713
20181020_124641

@maroelawerner

This comment has been minimized.

Copy link

maroelawerner commented Oct 20, 2018

missed one picture
osc3

@evgenykochetkov

This comment has been minimized.

Copy link
Contributor

evgenykochetkov commented Oct 23, 2018

@maroelawerner, thanks for the detailed report!

That still looks a lot like xod/common-hardware/dht2x-thermometer from v0.24.x🤔
Don't you by any chance have an old version of xod/common-hardware in your ~/xod/__lib__?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment