Hi Team Nordic,
According to the AM2302 (DHT22) datasheet, the data pin will be pulled to high state in idle state. But in my case, when i am reading the data pin before even sending any signal to the sensor, i am reading 0 on the data pin. I am using p0.07 (pin 9 ) as data pin. VCC -> 5V, GND -> GND.
Am i not reading the pin correctly or is it a communication protocol error that i have to figure out?
Please find attached the image with output.
I do not have any experience with the DHT22, but I noticed that it needs a supply voltage of minimum 3.3 V. Which supply voltage do you use?
It looks like you are reading the pin correctly (you cannot really go wrong with nrf_gpio_pin_read() as all it does is read the state of the pin). Have you looked at the signal on the pin using an oscilloscope? That way you would know what signal is actually there.
I am supplying on board 5V to the sensor. I will check what is going wrong with this.
arshdeep said: I am using p0.07 (pin 9 ) as data pin. VCC -> 5V, GND -> GND.
Trying to describe circuit connections in words is a waste of time. Please post a schematic (aka "circuit diagram").
You haven't said what Nordic part you're using, but the Absolute Maximum voltage at any IO pin on the nRF52832 is 3.9V - I expect others are similar ...
I am using nrf52832 DK .
arshdeep said:I am using nrf52832 DK
So the Absolute Maximum voltage at any IO is 3.9V, then!
What does the DHT-22 datasheet say about the voltage it outputs to its DATA pin ... ?