• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
All-In-One Smart Home Sensor Case V1 3D Printer File Image 1
All-In-One Smart Home Sensor Case V1 3D Printer File Image 2
All-In-One Smart Home Sensor Case V1 3D Printer File Image 3
All-In-One Smart Home Sensor Case V1 3D Printer File Image 4
All-In-One Smart Home Sensor Case V1 3D Printer File Image 5
All-In-One Smart Home Sensor Case V1 3D Printer File Image 6
All-In-One Smart Home Sensor Case V1 3D Printer File Image 7
All-In-One Smart Home Sensor Case V1 3D Printer File Image 8
All-In-One Smart Home Sensor Case V1 3D Printer File Image 9
All-In-One Smart Home Sensor Case V1 3D Printer File Image 10
All-In-One Smart Home Sensor Case V1 3D Printer File Image 11
All-In-One Smart Home Sensor Case V1 3D Printer File Image 12
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 1
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 2
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 3
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 4
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 5
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 6
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 7
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 8
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 9
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 10
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 11
All-In-One Smart Home Sensor Case V1 3D Printer File Thumbnail 12

All-In-One Smart Home Sensor Case V1

DerGary avatarDerGary

August 29, 2025

makerworld-icon
DescriptionCommentsTags

Description

I released V2 of this Sensor Case with D1 Mini and Super Mini support here. I recommend using V2 instead of V1.

Please read the disclaimer at the bottom before printing.

 

Hello everyone 👋, this has been one of my biggest projects so far. If you have any questions about the project please ask them in the comments then I can answer them and everyone can learn from that. 

 

When I started building my smart home, I realized that most devices only cover very specific use cases. To get full functionality in each room, you usually need to buy multiple different devices.

 

My goal with this project was to create the ultimate DIY smart home sensor device that integrates all the essential sensors needed to achieve the following:

🎯 Goals:

  1. Control the lighting in a room by turning it on when motion is detected and keeping it on as long as someone is present (even if the person is not moving).
  2. Monitor the brightness in the room and only turn lights on if needed (and off again when no longer required).
  3. Measure air quality, humidity, and temperature.
  4. Use Bluetooth to track a person’s smartphone and thereby determine which room they are in, so the smart home can react accordingly.
  5. Keep the footprint as small as possible.
  6. Powered by a single cable. USB-C in particular.
  7. Ensure the design is unobtrusive and blends seamlessly into the living room.
  8. Integrate with Home Assistant.
  9. No cloud dependency.

🔢 Steps:

  1. Source all the parts from the shopping list
  2. Print the enclosure
  3. Solder all sensors to the esp
  4. Flash the ESP with the software and verify that all sensors work (connect it to your Home Assistant instance to monitor them).
  5. Assemble the sensors and ESP into the enclosure.
  6. Place the device in its designated spot.
  7. After a few minutes, calibrate the sensors and re-flash the software.
  8. Create your Home Assistant automations using the sensors.

🛒 Shopping List

You can also buy the parts from other sites. If you don’t mind waiting, AliExpress is usually cheaper. I’ve listed the exact products I used because I can confirm they worked for me.

NameHintLink
ESP32 (form factor as shown)Must use this form factor. There’s also a Micro-USB variant, but I haven’t tested it with the case. If you still have Micro-USB cables, you can try it.Amazon
Power Supply (PSU)Any low-power PSU you already have should work. Otherwise, buy a simple one.Amazon

Temperatur Sensor

BME280 or BME680

- BME680 air quality readings may not be reliable (see Disclaimer). 
- Must include male pin header.
BME280
BME680
Screws
  • BME280/BME680 = 1x M2.5x3mm
  • Presence Sensor Shield = 3x M2x3mm
  • Motion Sensor HC-SR501 = 2x M1.7x3mm
  • Brightness Sensor BH170 = 2x M1.7x3mm
  • ESP32 = 4x M1.7x5mm
  • 1x M3x5-10mm for the ball head mount.

You might use M2 for the sensors but the BME sensor cutouts are too big for M2 head and will fall through.

Amazon

Brightness Sensor 

BH1750

Works flawlessly for me

It must contain the 5 male pin header as we need this in another step

Amazon
Motion Sensor HC-SR501The sensor case is specifically designed for a motion sensor with this form factor. I know they are not the best, but they are reasonably cheap, see Disclaimer for more detailsAmazon
Presence Sensor LD2410B
  • The sensor case is specifically designed for a presence sensor with this form factor. I experienced that they are not the best, but they are reasonably cheap, see Disclaimer for more details.
  • The soldering points of this sensor are smaller than the ones of the other sensor and the esp. It is very hard to remove the pins. I would advise to buy the variant without the pins. 
  • It might be possible to use jumper wires here so you don't have to solder, but the pins are smaller than the standard jumper wire ones and need the appropriate smaller jumper wires. 
Aliexpress
CablesI used 22 AWG wireAliexpress
Long USB CableChoose length to fit your setup.Aliexpress
Filament
  • I printed my case in Kingroon White PLA, but that filament is relatively translucent, that's why you can see the presence sensor through the case. That may change with different filament. I am solely using it because it is very cheap, you can use bambu labs filament of course.
  • I printed the brightness sensor cover out of translucent PLA. Translucent PETG might work even better but PLA works fine for me.

Kingroon White PLA

 

Elegoo Transparent PLA

Cable Distribution (Proto Boards)I broke something off proto boards that I got lying around and used that to distribute the cables which needed to go to multiple sensors. I added a link to something similar. You can try a different approach. I might use WAGO clamps in the future, but I don't know if they will fit into the current case. Don't try to solder every cable from every sensor directly to the ESP as this will be a mess 😅Aliexpress
Jumper CablesWill be used to connect the ESP32 which is screwed to the back, to the proto boards that are attached to the front part of the enclosure. This enables us to separate front and back without unscrewing everything.Amazon

You also need:

  • A soldering iron (and soldering skills)
  • Solder
  • Wire stripping tool
  • Side cutters to trim the cables
  • Screwdriver
  • Pliers
  • Desoldering pump (optional)
  • Multimeter (optional if you trust your soldering skills)

🖨️ Print Instructions:

  • Material: PLA/PETG
  • Layer Height: 0.20 mm
  • Nozzle: 0.4 mm
  • Infill: 15–20 %
  • Walls: 2
  • Divider: print upright with a brim, flat side on the build plate. If you orient it differently, it won’t print correctly.
  • Brightness sensor shield: print with transparent material, or omit it entirely. It’s not required but hides the sensor a bit and improves the look.

🔢 Assembly Instructions:

  1. Desolder ESP32 pins (mandatory):
    The ESP will not fit in the enclosure with the headers installed.
    • Cut the black spacers into chunks of 4–5 pins and remove them with pliers.
    • Clamp the ESP in a vise (I use a printable vise from Thingiverse).
    • Desolder the pins and pull them out with pliers. It’s also possible to heat the solder and pull the pins with pliers without a desoldering pump.
  2. Desolder Motion sensor (HC-SR501) pins:
    • Remove the pin spacers with pliers.
    • Clamp the motion sensor in a vise.
    • Desolder and remove the pins. It’s also possible to heat the solder and pull the pins with pliers without a desoldering pump.
  3. Desolder Presence sensor (LD2410B) pins (only if you bought the pinned version or if you are not using jumper wires here):
    • Remove the pin spacers with pliers.
    • Clamp the presence sensor in a vise.
    • Desolder and remove the pins. Avoid using a desoldering pump here — it’s easy to accidentally desolder components right next to the pins.
  4. Break a 5×3 matrix from the proto board — for motion and presence sensors.
  5. Break a 4×3 matrix from the proto board — for brightness and temperature sensors.
  6. Cut wires to length
    1. ESP → 5-pin distribution proto board (use jumper wires with a female pin header on one end)

      ColorPin

      Length (mm)

      excluding the pin header

      YellowGPIO2765
      Grey/WhiteGND (from the site where the GPIO27 is)70
      Black5V75
      GreenTXD50
      OrangeRXD50
    2. ESP → 4-pin distribution proto board (use jumper wires with a female pin header on one end)

      ColorPin

      Length (mm)

      excluding the pin header

      BrownGPIO22110
      ViolettGPIO21100
      Red3.3V130
      Grey/WhiteGND (from the Site where the RXD pin is)100
    3. 5-pin distribution proto board → motion sensor

      ColorPinLength (mm)
      YellowOutput45
      Grey/WhiteGND45
      Black5V45
    4. 5-pin distribution proto board → presence sensor

      ColorPinLength (mm)
      Grey/WhiteGND70
      Black5V70
      GreenRXD70
      OrangeTXD70
    5. 4-pin distribution proto board → brightness sensor

      ColorPinLength (mm)
      BrownSCL30
      ViolettSDA30
      Red3.3V30
      Grey/WhiteGND30
    6. 4-pin distribution proto board → temperature sensor

      ColorPinLength (mm)
      BrownSCL55
      ViolettSDA55
      Red3.3V55
      Grey/WhiteGND55
  7. Make sure to tin the wire ends
  8. Solder the 5-pin male header (from the brightness sensor kit) to the 5×3 proto board.
  9. Solder the 4-pin male header (from the temperature sensor kit) to the 4×3 proto board.
  10. Connection Drawings. I show the two distribution boards separately to make things easier to follow. (There are further steps below on soldering order.)

    Temperature and brightness sensor distribution board:

    Presence and motion Sensor distribution board:

     

  11. Solder one end of each wire to the sensors as described in the tables from step 6

    Motion SensorPresence SensorBrightness SensorTemperature Sensor
  12. Solder the other end of the wires to the distribution proto boards. Connect wires of the same color together. If you used a proto board where the lines are already connected via the board you don't need to do any extra step. My proto board has separated solder points so I had to bridge them.

    The 4 pin distribution board is connected to the brightness and temperature sensors.
    The 5 pin distribution board is connected to the motion and presence sensors.
  13. Use a multimeter to verify that solder joints of different colors do not bridge. Any short can damage components and may cause smoke or even fire.
  14. Solder the jumper wires to the ESP pins as described in the wiring tables above. Whether you attach the cables from the front or back of the board does matter — attach them as shown in the photos.

  15. Now it's time to check whether all the soldering has worked out. Connect the jumper wires of the ESP to the distribution boards. Match the colors. 
  16. Flash the software onto the ESP. It can be found in the software section. Verify that all sensors are detected and reporting, then return here to complete assembly.
  17. Place the brightness sensor shield in its place from the inside.
  18. Put in the 5-pin distribution board into its designated position:

  19. Put in the 4-pin distribution board into its designated position:
  20. Screw in the presence sensor shield, with 2 or 3 screws 😅 (3x M2x3mm)
  21. Screw the motion sensor in place (2x M1.7x3mm)

  22. Screw the temperature sensor in place. For the BME680 There is already a cone protruding from the wall that holds the sensor in place on the lower screw hole. (1x M2.5x3mm)

  23. Screw the brightness sensor in place (2x M1.7x3mm)

  24. Slide the divider wall into place. It shields the temperature sensor from ESP board heat. It won’t eliminate the effect entirely, but it’s an improvement.

  25. Attach the ball head or other mounting hardware to the back of the enclosure. This screw is no longer accessible once the ESP is mounted (M3×5–10 mm).

  26. Screw the ESP board onto the back of the enclosure. The USB port must line up with the cutout at the bottom (4× M1.7×5 mm).

  27. Attach the shorter ESP jumper wires (matching colors) to the 5-pin distribution board.

  28. Attach the longer ESP jumper wires (matching colors) to the 4-pin distribution board.

  29. Close the lid — it snaps into place. 

Congratulations — you’re done! 🥳🎉
Post a picture and a comment to this model — I’d love to see your results 🤗

💾 Software

This project uses ESPHome as the underlying software. It’s easy to set up and flash. You need a single YAML file that defines the sensors connected to the device and their properties. I won’t provide general ESPHome flashing instructions — the official documentation is excellent:
Guide: https://esphome.io/guides/installing_esphome/

  1. Download the YAML file that matches your temperature sensor from my GitHub, along with the secrets file.
  2. In bmexxx.yaml, change the friendly name, name, and optionally the area to your liking.
  3. In secrets.yaml, set wifi-password and wifi-ssid to your Wi-Fi credentials.
  4. Set the esp-password and esp-username to any values you like. You will need this password to add the device to Home Assistant.
  5. Run ‘esphome run bmexxx.yaml’ to flash the device.
  6. Test whether all sensors work as expected.
  7. Once deployed in its final location, proceed with calibration.

🎯 Calibration

Calibration is non-trivial and may take time and multiple iterations. I mainly use offset calibration, which is the easiest approach, though there are more accurate methods also available.

BME680:

I only calibrated temperature and humidity. I don’t use air pressure, and air quality is meant to auto-calibrate.

  1. Let the device sit in its final location for 5–10 minutes to saturate with heat from the ESP.
  2. Place a trusted temperature & humidity sensor nearby.
  3. In the bme68x_bsec2_i2c section of your ESPHome file, set temperature_offset to the difference between your device and the trusted sensor. Flash the new values — this also changes humidity readings.
  4. In sensor/platform: bme68x_bsec2, set the humidity filter with offset to the difference compared to your trusted sensor.

BME280:

Again, I only calibrated temperature and humidity; I don’t use air pressure.

  1. Let the device sit for 5–10 minutes to heat-soak.
  2. Place a trusted sensor nearby.
  3. In sensor/platform: bme280_i2c, set the temperature filter offset to match the trusted sensor, and do the same for humidity.

Motion Sensor:

The motion sensor has a jumper that defines the mode of the sensor. 

  • H (Repeat Trigger / Retriggerable mode)
    • As long as motion is detected, the output stays HIGH.
      Example: If the delay time is set to 10 s and motion is detected again after 5 s, the timer resets and the output remains HIGH continuously until no more motion is detected.
  • L (Single Trigger / Non-Retriggerable mode)
    • When motion is detected, the output goes HIGH for the set delay time, then returns to LOW — even if motion is still happening during that period. Only after the delay finishes and the sensor is ready again can it trigger once more.

The default seems to be L, while I use H.

 

The sensor has two potentiometers: one for trigger time and one for sensitivity. Looking from the back, the left is sensitivity and the right is time delay (I always mix them up 😅).

  1. Set the time delay long enough that the presence sensor has already triggered, but short enough to release in a timely manner when a person leaves. This makes automations easier.
  2. Set sensitivity just high enough to trigger where needed, but as low as possible to reduce false positives.

Presence Sensor:

This sensor is the most challenging to calibrate. The g0-g8 values depict the different distances from the sensor.

  1. Enable all the extra sensor readings of the ld2410b in the esphome yaml file.
  2. These are 
    1. the g0-g8 move and still energy sensors
    2. the button to enable engineering mode
    3. the numbers g0-g8 move and still thresholds
  3. While engineering mode is on, memory usage is high. For calibration, it’s best to disable bluetooth_proxy and esp32_ble_tracker (comment them out).
  4. Consider reducing the LD2410 throttle to something small like 250 ms to collect more data quickly.
  5. Flash the new software.
  6. Ensure no one is in the room while calibrating.
  7. Let the sensor sit for 10 minutes while Home Assistant gathers g0–g8 move/still energy values.
  8. Review the history of each g0–g8 value in Home Assistant. Find the highest value each.
  9. Set the g0–g8 thresholds to 5–10 % higher than the highest observed value for this distance.
  10. Disable engineering mode
  11. Revert the YAML changes
  12. Flash again.

🚫 Don'ts:

  1. Don’t mount the device too high. Hot air rises and will skew and destabilize temperature readings; it may also affect the motion sensor.
  2. Don’t place the device near a heater — it reduces temperature accuracy and can trigger the motion sensor.
  3. Don’t place it directly in strong airflow (e.g., when airing the room), as the motion sensor detects rapid heat changes.

📢 Tips:

  • You can use the underware collection to route your cables.
  • You can use my cable clamps to route USB cables. They fit the cables linked here, use minimal filament, and can be attached with double-sided tape.
  • You can use my collection of ball head mounts to mount the device to cabinets, tubes, walls, desks etc.
  • It’s preferable to position the device facing the area where you stay rather than just facing the door. The motion sensor has a wide field of view and covers most of the room, while the presence sensor works best when pointed directly at the target.
  • You can test all sensors with jumper wires before committing to soldering.

⚠️ Disclaimer:

This project is not easy: you have to solder a lot, including very small pins. You have been warned — but I’d love to see people try it 😊

 

The finished product is not perfect — that’s why the title is not “Ultimate Smart Home Sensor Device” 😅. I plan to release a revised version with other sensors when I have time and when the sensors I want become more accessible. Since I don’t know when that will be, I’m sharing this version for now.

 

Things that bug me on the current version:

  1. The motion sensor is very cheap and sometimes triggers when no one is in the room. (This can be minimized by reducing the ESP’s Wi-Fi signal strength, as cheap motion sensors are prone to misfire due to Wi-Fi interference.)
  2. The motion sensor can trigger when you air the room, as it detects heat changes.
  3. The presence sensor uses 24 GHz. While it can detect mostly stationary humans, it cannot detect very small movements or someone under a blanket. (This mostly applies to my girlfriend — somehow I am tracked a bit better 😅).
  4. ESP32 RAM is limited; enabling additional features (e.g., the web server) can cause reboots. I avoided reboots by disabling all non-essential features.
  5. The presence sensor is extremely hard to solder. I actually broke a sensor by accidentally desoldering the resistor right next to the pins.

⏭️ Goals for the next version:

  • Reliable Motion Sensor
  • 60Ghz Presence Sensor (e.g. DFRobot C1001)
  • ESP32 D1 Mini Compatible
  • Less soldering, maybe use WAGO clamps

License:

BY-NC-SA

Related Models

Cable Corners... keep cables in corners! preview image

Cable Corners... keep cables in corners!

muzz64 profile image

muzz64

31,019

v3 - Google Home Mini Speaker Housing - Retro Modern - with Swappable Face Plates preview image

v3 - Google Home Mini Speaker Housing - Retro Modern - with Swappable Face Plates

Jordan Proctor Designs profile image

Jordan Proctor Designs

NFC Sticker Spender mit integriertem Aufroller preview image

NFC Sticker Spender mit integriertem Aufroller

Yannmarch profile image

Yannmarch

529

Drawing Robot - Arduino Uno + CNC Shield + GRBL preview image

Drawing Robot - Arduino Uno + CNC Shield + GRBL

henryarnold profile image

henryarnold

11,685

Home Assistant Voice Preview Edition Enclosure preview image

Home Assistant Voice Preview Edition Enclosure

Home Assistant profile image

Home Assistant

221

NFC-Tags preview image

NFC-Tags

3Ddesings.electronics profile image

3Ddesings.electronics

409

Retro Alarm Clock Stand for the Google Home Mini preview image

Retro Alarm Clock Stand for the Google Home Mini

Yelt profile image

Yelt

11,181

Raspberry Pi 4 Model B - Home Assistant Case preview image

Raspberry Pi 4 Model B - Home Assistant Case

StJohnny22 profile image

StJohnny22

58

2,686