more G-Labs products

Author Topic: DHT11  (Read 2843 times)

December 15, 2014, 10:58:39 PM
Read 2843 times

StatX

  • **
  • Information
  • Jr. Member
  • Posts: 30
I've connected DHT11 sensor to pin 16 (GPIO23) it has resistor betwean VCC and GND 4K7 and it dosnt work :/

Any ideas ?

December 15, 2014, 11:13:43 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
you don't need such resistor (that is for DS18B20).
Also change the pin in the program code.

g.

December 15, 2014, 11:21:37 PM
Reply #2

StatX

  • **
  • Information
  • Jr. Member
  • Posts: 30
but this DHT is on a board with that resistor soldered in.

why i need to change the pin in program? the DHT is phisically connected to that pin at the monent.

December 15, 2014, 11:24:40 PM
Reply #3

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
well the pin is the correct one, so I was mistake you don't need to change it.
The program is supposed to work with a "naked" DHT-11 directly connected to RPi, so can't tell why it's not working with your dht-11 board.

Cheers,
g.

December 16, 2014, 07:53:28 AM
Reply #4

StatX

  • **
  • Information
  • Jr. Member
  • Posts: 30
So You say i dont need the 4k7 resistor?
If so i will try to unsolder it when i will be back from work.

December 16, 2014, 12:51:52 PM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Well the DHT-22 app is working with one resistor and one capacitor on the little board... since I don't know much of electronics can't tell if is the resistor the problem for the DHT-11, but I can tell how it is working for me.

Cheers,
g.

December 16, 2014, 03:16:38 PM
Reply #6

StatX

  • **
  • Information
  • Jr. Member
  • Posts: 30
hmm i unsoldered the onboard 4k7 resistor on DHT11 board and nothing changed, still no values :/
also tried to add 10k resistor but still nothing.
« Last Edit: December 16, 2014, 03:38:30 PM by StatX »

December 16, 2014, 04:19:02 PM
Reply #7

jshan

  • ***
  • Information
  • Full Member
  • Posts: 71
This thread may have some useful information for you:
http://www.homegenie.it/forum/index.php?topic=269.msg2671#msg2671
and should work for the DHT11 (as well as the DHT22).
« Last Edit: December 16, 2014, 04:23:29 PM by jshan »

December 16, 2014, 04:32:08 PM
Reply #8

StatX

  • **
  • Information
  • Jr. Member
  • Posts: 30
I've read this post already and i know the issue with the data pooling time i have 10s pause, I connected my DHT-11 sensor to arduino ran a simple program to test if it is working, and with arduino with 1s pooling it's working perfect. but With RasPi it isn't

December 16, 2014, 06:05:41 PM
Reply #9

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
That is a pull up/pull down resistor.  If you don't have one, the value on the GPIO could float and cause unexpected results.  Raspi may not need it, but the Arduino certainly does.  The board you bought sounds like one that Adafruit sells that is ready to work with an Arduino out of the box.  This should work with Raspi too.

December 16, 2014, 07:57:53 PM
Reply #10

StatX

  • **
  • Information
  • Jr. Member
  • Posts: 30
Ok the sensor is working i added the 4k7 resistor as it should be because without it sensor showed weird data I am adding my program ( its changed DHT22 Prog). Maybe someone else want to test it :)