chipKIT® Development Platform

Inspired by Arduino™

communication dht11

Created Mon, 29 Aug 2016 19:38:46 +0000 by Sanduino


Sanduino

Mon, 29 Aug 2016 19:38:46 +0000

Hello: some days I'm trying to communicate with sensor DHT11 ago. inside loop () it includes these statements

pinMode(DHT11PIN, OUTPUT); digitalWrite(DHT11PIN, LOW); delay(20); digitalWrite(DHT11PIN, HIGH); delayMicroseconds(40); pinMode(DHT11PIN, INPUT);

what they do: chipKIT sends a level of 0 [V] 20 [us] and then 3V3 by 40 [us] to request communication. Then put the entry into high impedance state awaiting a response, the sensor should respond with 0 [V] by 80 [us] and other 3v3 with 80 [us] and then 40 bit data. With the oscilloscope I see chipKIT sends the request, but when this pin communication gets as input to await the response of the sensor, the output is high indefinidadmente state. Why does this happen. Will the pic32 of chipKIT is with pull-up resistors and not let the sensor put the pin on 0 [V]. Do I have to put a resitencia pull_down ?. Any advice or suggestion will be well received regards :D Daniel


majenko

Mon, 29 Aug 2016 20:09:23 +0000

Do you have a 4.7K pullup resistor on the data line to +3.3V? That is required for proper operation.


Sanduino

Sun, 04 Sep 2016 22:23:59 +0000

The problem was I had tried to feed the sensor from the same port I/O pins as outputs setting pinMode (VCCPIN, OUTPUT); pinMode (GNDPIN, OUTPUT); and writing HIGH (source) and LOW (sink) respectively. If I take directly from chipKIT GND, pin Sensor Data begins to successfully send 40 bits of it. To replace the resistance of 4k7 did the following pinMode (pin, INPUT_PULLUP); Thanks for your interest and rapid response regards Daniel