Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Temperature Sensor Options
#4

Hi everyone

Well I sourced some "genuine" DHT22 AM2302 following my inability to source any replacement SHT1X sensors.

Sadly I get some very strange outputs. I get no humidity data and temperatures range from -200 degrees to + 100 degrees.

I have four sensors and all give the same variable output.

I downloaded a fresh copy of the TX software version 7.0_b003 and ensured the correct sensor is set and the DHTxx library matches and ensured my Arduino program is compiling in version 1.6.21 for AVR boards.

I have run the debug mode on the TX board and provided below the serial output from this test. You will note the very first reading is correct before things go off script, the same pattern of numbers is repeated after the board is reset.

Any tips on what I am doing wrong with this sensor having not used it before?

I am thinking that it might be a library issue with the DHTxx. I have successfully got an Arduino Nano to successfully provide regular serial data outputs from these sensors using a different code and DHT library.

 
Quote:Serial Output from TX board in Debug mode:

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 27.40  Hum: 59.20
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 274.00  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 118.56  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: -125.12  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 59.52  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: -60.16  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 53.76  Hum: 0.00

-- RESET BOARD ---

Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 27.40  Hum: 59.70
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 274.00  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: 118.56  Hum: 0.00
 
Sending ID0...
  Sensor 0 - Temp: 0.00  Hum: 0.00
  Sensor 1 - Temp: -125.12  Hum: 0.00
 
Code:
// --------------------------------------------------------------------------------------
//    WeatherDuino Pro2 Universal TX AT328 - Version: 7.0_b003
//           Start of user configurable options
// --------------------------------------------------------------------------------------


// --------------------------------------------------------------------------------------
//   Define ID and TX unit number
// --------------------------------------------------------------------------------------
#define Station_ID  0xA1    // Must be equal to your RX Unit (Value from 0x00 to 0xFF)  
#define Unit_ID        1    // If you use only one TX unit define it as Unit_ID = 0
                            // For a second TX unit, define it as Unit_ID = 1

// --------------------------------------------------------------------------------------
//   Define type of Temperature / Humidity sensor used as Sensor 0 and / or Sensor 1
// --------------------------------------------------------------------------------------
#define TH_SENSOR0  9      // [SENSOR 0] - 0 for SHT2x sensor, 1 for SHT31 sensor, 2 for HTU21 sensor, 9 for Not Used
#define TH_SENSOR1  1      // [SENSOR 1] - 0 for SHT1x sensor, 1 for DHT22 sensor, 9 for Not Used


Attached Files Image(s)
       
Reply


Messages In This Thread
Temperature Sensor Options - by Palmyweather - 10-12-2023, 03:27
RE: Temperature Sensor Options - by Shred - 11-12-2023, 10:43
RE: Temperature Sensor Options - by werk_ag - 17-12-2023, 00:48
RE: Temperature Sensor Options - by Palmyweather - 22-12-2023, 20:07
RE: Temperature Sensor Options - by werk_ag - 28-12-2023, 23:21
RE: Temperature Sensor Options - by Palmyweather - 29-12-2023, 08:43
RE: Temperature Sensor Options - by werk_ag - 30-12-2023, 04:54
RE: Temperature Sensor Options - by Palmyweather - 30-12-2023, 08:37
RE: Temperature Sensor Options - by werk_ag - 31-12-2023, 00:05
RE: Temperature Sensor Options - by Palmyweather - 31-12-2023, 06:11
RE: Temperature Sensor Options - by Palmyweather - 30-12-2023, 08:40
RE: Temperature Sensor Options - by Palmyweather - 31-12-2023, 06:26
RE: Temperature Sensor Options - by werk_ag - 04-01-2024, 06:13
RE: Temperature Sensor Options - by Palmyweather - 04-01-2024, 09:22
RE: Temperature Sensor Options - by werk_ag - 05-01-2024, 03:30
RE: Temperature Sensor Options - by Palmyweather - 05-01-2024, 07:47
RE: Temperature Sensor Options - by werk_ag - 08-01-2024, 19:43
RE: Temperature Sensor Options - by Palmyweather - 09-01-2024, 08:46
RE: Temperature Sensor Options - by Palmyweather - 15-01-2024, 00:15
RE: Temperature Sensor Options - by werk_ag - 15-01-2024, 01:54
RE: Temperature Sensor Options - by Franco - 14-04-2026, 03:18



Users browsing this thread: 1 Guest(s)