Calibration Guide
Calibrating UltimateSensor Mini v2 improves presence detection, zone tracking and environmental readings. The Mini v2 uses both HLK-LD2412 and HLK-LD2450 mmWave radar modules on standard hardware, plus SCD41, SGP41, BH1750 and optional SPS30 sensors. If the optional HLK-LD2460 upgrade is installed, it replaces the LD2450 module.
Mini v2 has no barometric pressure sensor, no microphone, no speaker and no PIR sensor.
What You Can Calibrate
| Sensor | Used For | Calibration / Tuning |
|---|---|---|
| HLK-LD2412 | Sensitive presence, still presence and micro-movement | Dynamic background correction and distance gates |
| HLK-LD2450 | Target tracking, X/Y position, zones | Tracking Zone boundaries and presence timeout |
| HLK-LD2460 | Optional replacement for LD2450 tracking radar | Mounting compensation, detection sector and shared Room Designer polygon zones |
| SCD41 | CO2, temperature, humidity | Manual CO2 calibration and firmware-level offsets |
| SGP41 | VOC and NOx index | Usually self-adapting; requires clean-air runtime |
| BH1750 | Ambient light in lux | Optional lux correction in ESPHome |
| SPS30 | PM1, PM2.5, PM4, PM10 | Optional reference comparison if installed |
mmWave Radar Tuning
Mini v2 combines two radar modules:
- LD2412 is best for reliable room occupancy and still presence.
- LD2450 is best for zones, target position and multi-target tracking on standard hardware.
- LD2460 is an optional tracking upgrade that replaces LD2450 and uses target 1-5 X/Y/Distance/Angle entities plus shared Room Designer polygon zones.
Tune LD2412 first. After room occupancy is stable, tune LD2450 zones or follow the LD2460 Upgrade Guide for physical orientation, mounting compensation, the hardware detection sector and Room Designer zones.
LD2412 Background Calibration
Run this when the room shows occupied while nobody is there.
- Make the room completely empty.
- Remove pets and stop moving objects such as fans, curtains or robot vacuums.
- Open Home Assistant.
- Go to Settings -> Devices & services -> ESPHome.
- Open your UltimateSensor Mini v2.
- Enable the button LD2412 Dynamic Background Correction if you have not done so yet. It is disabled by default; you find it under the disabled entities of the device.
- Press LD2412 Dynamic Background Correction.
- Wait until the diagnostic entity with the same name has turned off before entering the room again.
Important: if someone is in the room during background correction, the radar can learn that person as part of the background.
LD2412 Distance Gates
The LD2412 uses distance gates. Each gate represents a distance segment. With the common 0.75 m resolution:
| Gate | Approximate Distance |
|---|---|
| 1 | 0.75 - 1.5 m |
| 2 | 1.5 - 2.25 m |
| 3 | 2.25 - 3.0 m |
| 4 | 3.0 - 3.75 m |
| 5 | 3.75 - 4.5 m |
| 6 | 4.5 - 5.25 m |
| 7 | 5.25 - 6.0 m |
| 8+ | Further range, often more likely to detect through walls |
Set LD2412 Maximum Distance Gate to match the room. If the sensor detects through a wall, lower the maximum gate.
LD2412 Timeout and Energy
| Setting | Meaning |
|---|---|
| LD2412 Presence Timeout | How long presence remains active after detection stops |
| LD2412 Moving Energy | Signal strength of a moving target |
| LD2412 Still Energy | Signal strength of a still target |
The standard firmware does not expose per-gate thresholds. Tune with the distance gates, and check the energy values with the room empty.
LD2450 Zone Tuning
The LD2450 tracks targets in X/Y coordinates. Use it for desk zones, couch zones or ignoring a doorway.
If your Mini v2 has the optional LD2460 upgrade, skip the native LD2450 zone
controls and use the LD2460 Upgrade Guide. LD2460 physically
replaces LD2450 and requires matching *-ld2460.yaml firmware.
Coordinate System
Sensor (0,0)
|
-X <---+---> +X
|
v
+Y distance
Zone Example
For a 3 m wide by 4 m deep area:
| Setting | Value |
|---|---|
Tracking Zone 1 X1 |
-1500 |
Tracking Zone 1 X2 |
1500 |
Tracking Zone 1 Y1 |
0 |
Tracking Zone 1 Y2 |
4000 |
Values are usually in millimeters. If you see targets outside the room, tighten the Tracking Zone 1 X1/Y1/X2/Y2 boundaries and lower the LD2412 Maximum Distance Gate for the real room size.
Common Radar Problems
| Problem | Likely Cause | Fix |
|---|---|---|
| Always occupied | Background not learned, fan, pet, adjacent room | Run LD2412 background correction and reduce max gate |
| Detects through wall | Radar range too far | Lower LD2412 max gate and tighten LD2450 zones, or reduce the LD2460 detection sector and Room Designer zones |
| Misses someone sitting still | Distance gates too tight or timeout too short | Check LD2412 Maximum Distance Gate, LD2412 Presence Timeout and Occupancy Off Delay |
| Zone triggers at doorway | Zone too wide or too deep | Tighten the active LD2450 zone or LD2460 Room Designer polygon/exclusion zone |
| Multiple targets unstable | Reflection or zone edge | Reduce zone size and avoid reflective surfaces |
CO2 Calibration
Mini v2 uses the Sensirion SCD41 for CO2, temperature and humidity. Automatic self-calibration is on; it works best when the room is aired well now and then. Use the steps below when readings stay off.
Manual Fresh-Air Calibration
- Ventilate the room well for at least 3 minutes, or place the sensor in fresh outdoor air within WiFi range.
- Wait until the reading is stable.
- In Home Assistant, open the Mini v2 device.
- Press CO2 Manual Calibration. This button is disabled by default, so enable it first. It sets the sensor to 420 ppm.
- Verify that fresh-air readings settle around 400-430 ppm.
Do not calibrate in a room with people present or poor ventilation.
CO2 Reference
| CO2 Level | Meaning |
|---|---|
| 400-450 ppm | Fresh outdoor air |
| 600-800 ppm | Good to acceptable indoor air |
| 1000 ppm | Ventilation recommended |
| 1200 ppm | Ventilation needed |
| 2000+ ppm | Poor air quality |
Temperature and Humidity
Temperature and humidity can be affected by enclosure heat, sunlight, nearby electronics or poor airflow. Mini v2 firmware has two correction layers:
| Method | Where | Best For |
|---|---|---|
| Firmware substitution | ESPHome YAML before flashing | Final, repeatable temperature compensation |
| Home Assistant offset | Device configuration entities | Quick per-device fine tuning without reflashing |
The current Mini v2 firmware uses the SCD41 temperature_offset setting for the main self-heating compensation. This is the preferred place for permanent temperature correction because the SCD41 also uses this value internally when compensating humidity.
The default Mini v2 value is below. The SCD41 subtracts this value from its reading, so a higher value gives a lower temperature.
substitutions:
scd41_temperature_offset: "10.2"
Home Assistant also exposes these configuration entities on the device page:
- Temperature Offset - adds a small correction to the displayed
SCD41 Temperature. - Humidity Offset - adds a small correction to the displayed
SCD41 Humidity.
These Home Assistant offsets are stored on the device and restored after reboot. They are useful for quick testing or small site-specific corrections, but for a permanent setup we recommend putting the final temperature correction in the ESPHome substitution and reflashing. This keeps the firmware self-contained and avoids hidden corrections that are easy to forget later.
Recommended Workflow
- Update to the current Mini v2 firmware.
- Keep Temperature Offset and Humidity Offset in Home Assistant at
0. - Place a reliable thermometer/hygrometer near the sensor.
- Wait at least 20-30 minutes for both readings to stabilize.
- Compare the reference values with
SCD41 TemperatureandSCD41 Humidity. - If temperature is structurally off, follow the ESPHome customization steps, adjust
scd41_temperature_offset, and reflash. - After temperature is correct, only use Humidity Offset if humidity still needs a small final correction.
Temperature Substitution Examples
If SCD41 Temperature reads 1.0 °C too high, raise the substitution by 1.0:
substitutions:
scd41_temperature_offset: "11.2" # default 10.2 + 1.0
If SCD41 Temperature reads 0.8 °C too low, lower the substitution by 0.8:
substitutions:
scd41_temperature_offset: "9.4" # default 10.2 - 0.8
Do not correct the same temperature error twice. If you change scd41_temperature_offset, reset the Home Assistant Temperature Offset back to 0.
Home Assistant Fine Tuning
Use the Home Assistant offsets when you want to test quickly or cannot reflash immediately:
- Open the Mini v2 device in Home Assistant.
- Find Temperature Offset or Humidity Offset under the configuration entities.
- Enter the correction you want to add to the displayed reading.
Examples:
- Sensor reads 24.5 °C, reference is 23.8 °C: set Temperature Offset to
-0.7, or preferably raisescd41_temperature_offsetby0.7and keep the HA offset at0. - Sensor reads 48% RH, reference is 52% RH: set Humidity Offset to
4.
For humidity, first make sure temperature is correct. Relative humidity is temperature-dependent, so a wrong temperature correction can also make humidity look wrong.
If you are not familiar with ESPHome YAML yet, use the Home Assistant offsets first. When you want to make the correction permanent, follow the Firmware Guide to adopt the Mini v2, edit the substitution and upload the firmware again.
VOC and NOx
The SGP41 reports VOC and NOx index values. These are relative air-quality indexes, not direct ppm values. After flashing or moving the sensor, allow several hours of normal operation before judging the readings.
Light Sensor
The BH1750 lux sensor is factory calibrated. If you need an exact match with another lux meter, adopt the device in ESPHome and apply a correction filter to the illuminance sensor.
Optional SPS30
If your Mini v2 has the SPS30 module, compare PM readings with a trusted reference device only after the sensor has warmed up and has stable airflow around the housing.
Best Practices
- Tune radar with the room empty first.
- Limit radar range to the actual room size.
- With LD2460 upgrade firmware, tune physical placement, the hardware detection sector and shared Room Designer polygon or exclusion zones.
- Avoid direct sunlight, radiators and strong airflow.
- Recalibrate CO2 after moving the sensor.
- Keep notes of changed settings and offsets.