View Single Post
  #66  
Old 26-01-2018, 09:18 PM
GRM (Graham)
Registered User

GRM is offline
 
Join Date: Jan 2018
Location: Ormond, Australia
Posts: 6
Jaycar Dew Heater Project

Hello Everyone,

My wife bought a Dew strap for Xmas, not realising it needed a Dew controller. After searching the internet, I settled on the Jaycar Arduino Dew Heater project. [www.jaycar.com.au]. This is my first Arduino project and the first time since the early 90's I have tried programming, therefore I thought I'd take the easy way out and build an established kit with existing code.

However, the code from the website kept on giving me Checksum errors when reading the DHT11 module. After further research, I was able to modify the code to get around the Checksum error. See below

Offending code was
if(DHT11.getStatus()==IDDHTLIB_OK){
ambtemp=DHT11.getCelsius()*10;
ambhum=DHT11.getHumidity()*10;
dptemp=DHT11.getDewPointSlow()*10;
}else{
thermerror=thermerror|2;
}


Changed to
ambtemp=DHT11.getCelsius()*10;
Serial.print("C Ambtemp: "); Serial.write((ambtemp/10)%10+'0');Serial.print("C AmbHum: ");

ambhum=DHT11.getHumidity()*10;
Serial.write((ambhum/10)%10+'0');Serial.print("% dptemp: ");

dptemp=DHT11.getDewPointSlow()*10;
Serial.write((dptemp/10)%10+'0');

// Check if any reads failed and exit early (to try again).
if (isnan(ambhum) || isnan(ambtemp) || isnan(dptemp)) {
Serial.println("Failed to read from DHT sensor!");
thermerror=thermerror|2;
return;
}


This got me around the CRC error but Ambient Temperature, Humidity and Dew point still weren't displaying itself onto the LCD screen.

Further research I discovered that it wasn't uncommon to have issues reading the DHT11 module. In fact many libraries have been written to try to overcome this. Therefore I decided to try some of the different libraries. Without going into too much detail, I settled on the DHT.H library. I was able to get the LCD screen to display everything once the code was modified to suit the new library.

I don't know if the code is perfect as I am dubious on the Dew Point reading its given and welcome feedback. Anyway, attached is the full modified code for the Jaycar Dew Heater kit using he DHT.H library. Hope this helps anyone who also decided to try it and found similar issues.


Kind Regards

Graham Galea.
Attached Thumbnails
Click for full-size image (IMG_1484.jpg)
207.9 KB95 views
Attached Files
File Type: zip Telescope_Dew_Heater-DHT_h_library.ino.zip (5.8 KB, 20 views)

Last edited by GRM; 26-01-2018 at 09:52 PM.
Reply With Quote