Diy Lidar DTOF Sensor for Smart Closet
Creating a diy lidar sensor for a smart closet is an practical project that can enhance automation in smart homes. While true LiDAR systems are complex and expensive, you can build a simplified ToF-based object detection system using affordable components, ideal for detecting when someone opens the closet door or when clothing items are removed/added.
Project Goal:
Detect presence of people or clothing inside a smart closet using a ToF lidar sensor, enabling automation like:
Auto-lighting
Inventory tracking
Notifications when clothes are taken
Integration with voice assistants
Components Needed
PU20A DTOF Lidar Sensor: Measures 20m distance via time-of-flight, accurate up to 3cm, 200HZ frequency, low cost at $10.
Automation Integration Ideas
Once the short range lidar sensor detects movement, you can integrate it with:
1. Smart Lighting
Use an ESP32-controlled relay or smart bulb.
Turn on lights when someone opens the closet.
2. Mobile App Notification
Example: “Closet opened at 8:30 PM.”
3. Inventory Tracking
Add multiple ToF laser sensors at different heights/shelves.
Detect when items are removed/added based on changes in distance profiles.
Store data in a cloud database.
4. Voice Assistant Control
Integrate with Alexa Skills Kit or Google Assistant Actions.
Say: “Hey Google, what’s in my closet?” → query inventory via API.
Physical Installation Tips
1. Mount the lidar distance sensor near the top center of the closet, angled downward.
2. Avoid direct sunlight or reflective surfaces.
3. Use a small 3D-printed bracket for stability.
4. Place the ESP32 outside the closet to avoid interference from electronics.
Alternative: Use Multiple Diy Lidar Sensors for Better Accuracy
For better detection:
Use two ToF sensors at different angles (left/right).
Compare readings to reduce false positives.
Implement simple logic: Only trigger if both sensors detect motion.
DIY Lidar ToF Smart Closet System
Distance sensing via ToF
Person/clothing detection
Wi-Fi connectivity
Automation lighting alerts
Low cost < $30
Open-source and DIY-friendly
While this isn’t a full LiDAR system like those in autonomous vehicles, the PU20A ToF lidar laser sensor provides excellent proximity sensing for smart closets. With minimal hardware and code, you can create a smart, responsive, energy-efficient closet that enhances daily life.
Let Seakeda know if you’d like:
A lidar sensor datasheet?
Smaple and wholesale price?
A 3D file and integration?
Post time: Jul-27-2026

