Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:08 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Umite MK.2 DHT22 problems

Author Message
DaveC166
Regular Member

Joined: 13/09/2012
Location: New Zealand
Posts: 44
Posted: 05:29pm 20 Nov 2015
Copy link to clipboard 
Print this post

I have just loaded ver5.0 to a Umite MK2. This umite has 2 DHT22 sensors ,one on a 10 meter cable the other on a 10cm cable. The problem i have With Ver5.0 and Ver4.7 B23 onwards is if i set the CPU speed to 10 or 20 or 30 the temperature variable ocasionaly shows 1000(sensor fail or not present). At CPU speed of 40 or 48 both DHT22's behave.
When the umite was running Ver4.6 the DHT22's were stable with CPU 10 or CPU 20.
I cant go back to Ver4.6 as i use a ILI9341 LCD now
Has any one else had problems with DHT22's or DS18B20's at CPU speeds below 40MHZ
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:24pm 20 Nov 2015
Copy link to clipboard 
Print this post

I can see errors with CPU 10 but so far, no problems with CPU 20 (short leads).

Try different values for the pullup resistor.
If all else fails you can change the CPU speed before reading the sensor and change it back to slow mode afterwards.

Jim
VK7JH
MMedit
 
DaveC166
Regular Member

Joined: 13/09/2012
Location: New Zealand
Posts: 44
Posted: 08:09am 21 Nov 2015
Copy link to clipboard 
Print this post

Thanks TassyJim, my setup reads the DS18B20 and both DHT22's every 60 seconds,I will try CPU 40 at the start of the temperature/humidity subroutine. I recall having to lower the pullup resistor value to get a PICAXE 28x2 to work with a DS18b20 on sheilded cables longer than 8 meters
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 09:26am 21 Nov 2015
Copy link to clipboard 
Print this post

  DaveC166 said   Thanks TassyJim, my setup reads the DS18B20 and both DHT22's every 60 seconds,I will try CPU 40 at the start of the temperature/humidity subroutine. I recall having to lower the pullup resistor value to get a PICAXE 28x2 to work with a DS18b20 on sheilded cables longer than 8 meters

Dave,
longer cables means higher capacitance on the cable. This then requires a lower value pullup resistor to keep the signal from distorting beyond the capability of the devices to decode it.
This same idea applies to speed. Faster speeds on the cable require lower value pullups.
Bob
 
DaveC166
Regular Member

Joined: 13/09/2012
Location: New Zealand
Posts: 44
Posted: 12:48pm 21 Nov 2015
Copy link to clipboard 
Print this post

BobD, are you saying i should try higher value pullups if the CPU speed is lowered ?.
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 02:15pm 21 Nov 2015
Copy link to clipboard 
Print this post

  DaveC166 said   BobD, are you saying i should try higher value pullups if the CPU speed is lowered ?.

No, cpu speed is irrelevant unless changing it changes the cable speed and I don't know if that is the case. Someone else may be able to answer that.

Higher cable capacitance (longer cable runs or multiple devices) requires lower value pullup resistors otherwise the cable capacitance degrades the signals. Think t=RC where higher R gives a longer t.

Lower cable speeds may use a higher value pullup resistor but it is not mandatory. For example: you may wish to use a slow cable but also use a low pullup if you are using a device with parasitic power.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 02:26pm 21 Nov 2015
Copy link to clipboard 
Print this post

  BobD said  cpu speed is irrelevant unless changing it changes the cable speed and I don't know if that is the case. Someone else may be able to answer that.

No, the cable speed stays constant.
Geoff Graham - http://geoffg.net
 
DaveC166
Regular Member

Joined: 13/09/2012
Location: New Zealand
Posts: 44
Posted: 09:47am 22 Nov 2015
Copy link to clipboard 
Print this post

Thanks for the input. What i wanted to know is if anyone else has had problems with DHT22's or DS18B20's on a 28 pin umite MK2 with CPU speeds of 10 ,20 or 30 mhz. I am trying to determine if my batch of DHT22's are dodgey or it is a umite issue.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025