Analyzing non-standard signals

arduino uno logic analyzer saleae DHT11 temperature

View the decoded non-standard signal from the graph produced by Saleae to read temperature from a DHT11 sensor.

Capture the signal in Saleae:

All signals

Manually decoding the signal gives us:

0010 0110 0000 0000 0001 1100 0000 0000 0100 0010
RH MSB    RH LSB    T MSB     T LSB     Checksum

Take the temperature MSB which is 0001 1100 in binary and 28 in decimal, which is the same as what is shown i the serial monitor.

Code

Download code
#include "DHT.h"

#define DHTPIN 7
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  Serial.println("Start DHT11");

  dht.begin();
}

void loop() {
  delay(2000);

  float t = dht.readTemperature();

  if (isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Serial.print("Temperature: ");
  Serial.println(t);
}

Serial console

Serial output from the firmware.

Analyzing non-standard signals serial console

Schematic

Wire up the hardware accordingly

Analyzing non-standard signals schematic

References