How to connect the sensor DHT11?


#1

Can I connect a humidity sensor DHT11 to the usual conclusion imp002 example pin6? If not why not? And what is necessary to connect it to receive data from the?

Thank you!


#2

Found an example for the sensor DHT22 and STM32 - http://catethysis.ru/dht22-moisture-termometer-stm32/. The algorithm works they have the same with DHT11. STM32 have used normal output configured to output first, and then to the input, as I understand it. Is it possible to conclude imp002 use as well?


#3

The DHT11 is in our library of reference implementations https://github.com/electricimp/reference/tree/master/hardware/DHT11 . Looks like you need to use SPI to talk to it, so pin6 isn’t going to work.

Peter


#4

I too am trying to get a DHT11 working with Electric Imp, specifically with a 005 board. Two questions:

  1. Will the github code work with a 005 board?
  2. Should it be a 10k resistor or a 1k resistor? Read Me and .nut file disagree.

#5

It should work with an 005 board, but given that it uses a strange protocol that we are faking out with SPI, YMMV. It has not been tested.

1k is fine.

To be honest though, there are plenty of much better, more accurate, easier to use temp/humidity sensors than the DHT11 these days.


#6

Yeah, I have ordered the one you recommended in another thread on this topic (well, its drop-in successor). I guess I’ll just wait for it to arrive.

The 005 did give me one reading initially, first thing. Just one. 30% humidity, 27 degrees Celsius. Since then, it’s been all zeroes no matter what I do. But that very first reading gives me a glimmer of hope that it could be done. Probably not worth the hassle, though.

Thanks, Hugo.