RAYPCB · ENGINEERING GUIDE
DHT11 vs DHT22: Interface, Timing and Sensor Selection
DHT11 versus DHT22 is a comparison of temperature/humidity sensing requirements, interface timing and procurement identity. DHT22-class devices are commonly selected for a broader measurement range than familiar DHT11 modules, but a part name or case color is not enough to establish the specifications of the unit being purchased. Match the exact manufacturer, model and manual revision to the project.
This page gives a practical comparison and a read-interval worksheet. It also explains why requesting data faster cannot create fresh environmental measurements. For the broader temperature measurement chain, continue to the digital thermometer circuit guide; humidity used in air-quality monitoring has additional compensation and airflow context.

Compare documented versions before wiring the board
Adafruit's documentation for the versions it describes lists DHT11 at 0–50°C and 20–80% RH, and DHT22/AM2302 at −40–80°C and 0–100% RH. It gives maximum request rates of 1 Hz and 0.5 Hz respectively. These are useful legacy comparison points, not universal guarantees for every module sold under those labels. Use the purchased part's current documentation for the actual design limits.
Accuracy must retain its conditions and distinction from range. A sensor can report across a broad range while having different error limits within it. The ASAIR AM2302 manual includes condition-dependent accuracy information and distinguishes normal operation from extended exposure. Do not compress all of that into a single unexplained plus/minus number beside a marketing range.
Pin count and board form also vary between bare sensors, wired assemblies and breakout modules. A module can include a pull-up or other components absent from a bare sensor. Confirm pin numbering from the actual drawing, including any unused pin, and verify how the interface is powered. Physical similarity does not establish drop-in compatibility.
Documented legacy versions: comparison starting points
| Item | DHT11 described by Adafruit | DHT22/AM2302 described by Adafruit |
|---|---|---|
| Temperature range | 0–50°C | −40–80°C |
| Humidity range | 20–80% RH | 0–100% RH |
| Request-rate ceiling | 1 Hz | 0.5 Hz |
| Production decision | Verify purchased model/manual | Verify purchased model/manual |
Understand the timing-sensitive data interface
The common DHT-style interface encodes information in pulse timing on a data line. It is not interchangeable with an I²C bus merely because a document labels a pin SDA. Use the exact protocol and timing requirements of the selected device. The host must release and observe the line correctly rather than drive against the sensor.
Pull-up selection and logic voltage must be compatible with both devices and the installed wiring. Cable capacitance and rise time can affect pulse interpretation. A library that works on a short demonstration lead may fail with a different controller, operating system or cable. Confirm electrical levels before troubleshooting software by repeated retries.
The host implementation needs a reliable timing method for its platform. Interrupts, background tasks and scheduling can disturb a software-timed read. An invalid checksum or timeout should produce an explicit invalid result, not a fabricated humidity value. Preserve diagnostics during development so electrical and timing faults can be distinguished.
| Review item | What to establish |
|---|---|
| Identity | Manufacturer, exact module and manual revision; no case-color assumptions. |
| Limits | Range, accuracy conditions and environmental exposure restrictions. |
| Timing | Startup, read interval, host timing and returned-data age. |
| Installation | Air path, local heating, cable and compatible materials. |
| Acceptance | Communication test versus controlled environmental calibration. |
Separate read requests from fresh measurements
The ASAIR AM2302 V1.0 manual calls for at least two seconds between reads and a startup settling interval exceeding two seconds. It also explains that a returned value can represent the preceding measurement. These details matter when interpreting timestamps and when restarting a sensor after a long idle period. They should not be replaced by a faster polling loop.
The worksheet compares your entered documented interval with the requested interval. If the minimum is two seconds and the host requests every second, it flags the request rate as too fast. Its count is an arithmetic comparison over the chosen observation duration; startup delays, retries and the sensor's internal data pipeline are excluded.
Label the time at which the host received a value separately from the time the physical quantity was sensed when that distinction matters. Repeating a stored result many times can produce a smooth graph without adding information. Keep data age or validity in the application rather than assuming every successful function call represents a new observation.

Sensor polling interval comparison
Sensor polling interval comparison
Use the current inputs and keep the assumptions
Load the example to inspect its units, then clear it before entering your own revision. Example values are deliberately labeled assumptions. Complete every field; an empty numeric input is not zero. Record the operating condition behind a value rather than copying the first number found on a component summary. For a comparison, keep the measurement boundary and units consistent.
Calculate after checking the inputs. Any edit invalidates the old result and disables its report download until you calculate again. An edited example remains identified as an example. Results and reports are generated locally without uploading a circuit or populating Contact. Attach the downloaded text manually if it helps explain the question. You can request a review directly without completing the tool.
| Input | What to establish before using it |
|---|---|
| Review reference | Nonconfidential revision label. |
| Documented minimum read interval · s | Use the exact sensor revision datasheet, not a library default. |
| Requested read interval · s | MCU polling request; faster requests do not create fresh conversions. |
| Observation interval · h | Rate comparison only; startup delay and retries are excluded. |
Place the sensor where the desired air reaches it
Relative humidity depends on temperature, so a sensor warmed by a regulator or processor may not represent the surrounding air as intended. The enclosure opening, air path and nearby materials influence response. A board layout that is electrically correct can still measure a local pocket rather than the customer's target environment.
Avoid treating a grille or coating as an automatic environmental solution. Protecting electronics while leaving a humidity-sensitive element exposed requires a construction suited to the sensor and installation. Materials that absorb moisture or emit contaminants can change behavior. Follow the actual sensor's assembly and storage instructions when selecting adhesives, cleaning and packaging.
Define whether the sensor is inside the equipment, on an external lead or in a separate probe. These arrangements can have different temperature gradients and response times. For a field controller that also reads soil moisture, keep the atmospheric measurement distinct from the soil probe's calibration and installation conditions.
Make the selection from the customer requirement
Use DHT11-class or DHT22-class hardware only if its documented range, error and response satisfy the application. A low-cost educational logger has different requirements from an instrument making a contractual measurement claim. If the required evidence or interface behavior is unsuitable, evaluate another documented sensor family instead of assuming software calibration will solve every limitation.
A newer sensor with a clocked interface may simplify host integration, but it still needs electrical and environmental review. Check availability, package, mounting, supply, conversion and handling requirements. Changing sensor families can require more than a driver-library replacement. Preserve the decision criteria so purchasing does not substitute an apparently similar module without engineering review.
Prototype using the actual supply, cable and enclosure where practical. Compare against an appropriate reference under controlled conditions and allow the system to stabilize. A breath test demonstrates response but does not establish accuracy. Record the method and avoid using one uncharacterized sensor as a calibration standard for another.
Release hardware, firmware and acceptance together
Specify the exact sensor assembly, connector, pull-up arrangement and host logic voltage in the released files. Include firmware or library version, configured sensor type, read interval and invalid-data behavior. If the code changes how it caches results, review the timestamp and display behavior as well as basic communication.
For production, distinguish communication checks from environmental calibration. A fixture that verifies a plausible reading at room conditions may detect gross faults but cannot prove the complete humidity and temperature error envelope. State the requested test scope and any calibration requirement explicitly in the RFQ.
RAYPCB can review a defined sensor PCB or assembly package with those files and quantities. Identify the unresolved question, such as enclosure placement, cable interface or repeatable test setup. The worksheet can document the polling assumption, while the selected sensor manual and measured system behavior establish whether the finished product meets the customer's needs.
Validate the installed measurement chain
The sensor measures a local physical condition through a particular mounting and signal path. Its nominal resolution is not the accuracy of the installed system. Define the quantity, reference, useful response time and environment before deciding that a high-rate output or a long decimal value is meaningful.
Preserve raw observations, calibration coefficients and the conditions under which they were obtained. Check intermediate points and relevant environmental changes rather than only fitting endpoints. Separate invalid, stale and out-of-range data from valid low readings. Manufacturing tests should verify the electrical and assembly tasks actually agreed; field calibration and application validation need their own methods. Keep personal or confidential project details out of public worksheet labels and attach controlled records through the normal inquiry process.
Standards, source context and limits
Use the exact device revision and application conditions when applying manufacturer guidance. Reference designs are evidence about a specified implementation, not automatic validation of a modified board. Workmanship inspection, functional verification, product safety and application performance are different acceptance tasks. Public summaries do not replace the applicable licensed standards or a project-specific acceptance specification.
For fabrication scope and the agreed construction requirements, see PCB manufacturing.