A Proteus setup for Arduino UNO R3 + DHT11


Here’s a ready-to-run Proteus setup for Arduino UNO R3 + DHT11 (with code, wiring, and sim tips).
1) What to place in Proteus
DHT11 sensor (the 4-pin DIP model or the 3-pin module—either is fine)
10 kΩ pull-up resistor (Data → 5V) if you use the raw 4-pin DHT11
Virtual Terminal (to see
Serial
output)Power rails: +5V and GND
Tip: Double-click the DHT11 in Proteus and set its Temperature and Humidity properties (e.g., 25 °C, 55 %RH) to simulate different readings.
2) Wiring (UNO R3 ↔ DHT11)
For the 4-pin DHT11 (facing the grill/front, pins left→right: VCC, DATA, NC, GND):
DHT11 VCC → 5V
DHT11 DATA → UNO D2
DHT11 GND → GND
10 kΩ from DATA → 5V (pull-up)
For a 3-pin DHT11 module (usually VCC–DATA–GND):
- VCC → 5V, DATA → D2, GND → GND (module usually has onboard pull-up)
Virtual Terminal:
UNO TX (D1) → VT RX
UNO GND → VT GND
Set VT baud to 9600
UNO settings in Proteus:
- Double-click UNO → Program File = your compiled
.hex
, Clock = 16 MHz
3) Arduino code (uses Adafruit DHT library)
Install libraries (Arduino IDE → Library Manager):
DHT sensor library (by Adafruit)
Adafruit Unified Sensor
#include <DHT.h>
#define DHTPIN 2 // DHT11 data on UNO D2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
dht.begin(); // initializes timing for DHT
pinMode(LED_BUILTIN, OUTPUT);
Serial.println(F("DHT11 test (UNO R3 + Proteus)"));
}
void loop() {
// DHT11 max ~1 Hz; read every 2s for reliability
static unsigned long last = 0;
if (millis() - last < 2000) return;
last = millis();
float h = dht.readHumidity();
float t = dht.readTemperature(); // °C
float f = dht.readTemperature(true); // °F
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println(F("DHT11 read failed"));
// quick error blink
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
return;
}
// Compute heat index as an example
float hi = dht.computeHeatIndex(f, h); // in °F
float hiC = (hi - 32) * 5.0 / 9.0;
Serial.print(F("T: ")); Serial.print(t, 1); Serial.print(F(" °C "));
Serial.print(F("H: ")); Serial.print(h, 1); Serial.print(F(" %RH "));
Serial.print(F("HI: ")); Serial.print(hiC, 1); Serial.println(F(" °C"));
// good read blink
digitalWrite(LED_BUILTIN, HIGH); delay(40);
digitalWrite(LED_BUILTIN, LOW);
}
4) Get the HEX & run in Proteus
Arduino IDE 2.x: Sketch → Export compiled Binary
→ use YourSketch.ino.hex
.
Load that HEX into the UNO in Proteus → set Clock 16 MHz → press Run ▶️.
Open the Virtual Terminal (9600 baud) to see temperature/humidity/heat-index prints.
5) Troubleshooting (DHT11 + Proteus)
No readings / “read failed”: ensure pull-up on DATA (10 kΩ) or use a 3-pin module; keep D2 pin correct; don’t read faster than once per 2 s.
Garbled serial: mismatch baud—set VT to 9600 and don’t connect UNO RX (D0) unless needed.
Program halts: wrong board/clock → recompile for Arduino Uno and set 16 MHz in Proteus.
Flat values: edit the DHT11 model’s Temperature/Humidity properties to new values and rerun.
Subscribe to my newsletter
Read articles from ampheo directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
