feat(at581x): Add support fo AT581x RADAR presence sensor (found in esp32-s3-box-3 sensor dock)#644
Merged
Conversation
…sp32-s3-box-3 sensor dock)
|
✅Static analysis result - no issues found! ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new
espp::At581xcomponent: a driver for the AT581X (AirTouch) 5.8 GHz microwave-radar human-presence / motion sensor. This is the radar found on modules such as the MoreSense MS58-3909S68U4, including the one on theESP32-S3-BOX-3 sensor / dock board (I2C
SDA=GPIO41,SCL=GPIO40, address0x28, presence output onGPIO21).The driver (
BasePeripheral<>, header-only) configures the chip over I2C — RF frequency, detection distance/sensitivity (threshold), gain, power consumption, and trigger/protect/self-check timing — following the AT581X datasheet and theEspressif & ESPHome reference drivers. It exposes runtime setters (
set_sensing_distance,set_gain,set_trigger_keep_time),set_rf_enabled,reset, andallowed_frequencies_mhz()/allowed_power_ua()validators. Presence/motion isreported on the chip's active-high output GPIO (held for
trigger_keep_time), so the example wires that pin to anespp::Interrupt.Included:
components/at581x/—include/at581x.hpp,CMakeLists.txt,idf_component.yml,README.md.components/at581x/example/— configures the radar over I2C and reports presence. When the ESP32-S3-BOX-3 hardware profile is selected (default on esp32s3), it additionally uses theesp-boxBSP to render live radar statuson the screen via LVGL (color-coded presence label + detection count + sensing distance). The radar is placed on
I2C_NUM_1in that mode to avoid colliding with the box's internal I2C bus (I2C_NUM_0, GPIO8/18).presencecategory —doc/en/presence/{index.rst, at581x.rst, at581x_example.md}— registered indoc/en/index.rst;doc/Doxyfileupdated (INPUT+EXAMPLE_PATH)..github/workflows/build.yml(added the example to the build matrix, target esp32s3) and.github/workflows/upload_components.yml(addedcomponents/at581xto the registry upload).Note on scope: the AT581X is a binary presence/motion detector — its only true output is the presence GPIO; the I2C interface is configuration-only and does not expose distance/velocity/signal-strength. The "sensing distance" is a detection
threshold, not a measurement.
Motivation and Context
The ESP32-S3-BOX-3 sensor dock includes an AT581X radar for human-presence detection, but espp had no driver for it. This adds first-class support so espp users (especially on the BOX-3) can configure the radar and react to presence/motion,
with an on-screen demo for the BOX-3.
How has this been tested?
v6.0) foresp32s3:esp-boxBSP + LVGL display path active (radar on I2C_NUM_1 @ 41/40, output interrupt on GPIO21). Binary fits the app partition.build.ymland that the DoxyfileINPUT/EXAMPLE_PATHentries resolve the\snippetreference.Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Types of changes
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.