Case for d1 mini, PIR sensor and LDR sensor.

Case for d1 mini, PIR sensor and LDR sensor. TPU or other flex. material. LED controller, motion and brightness aware.
3
63
0
622
updated August 20, 2023

Description

PDF

So the project is to create a compact controller for a led strip which realises a night light. For this it 

  • needs to detect motion with a PIR sensor. 
  • Next the controller should know if its bright or dark and only add light when dark. So a LDR light dependent resistor allows to measure brightness.
  • A d1 mini (clone) is used to run a custom firmware which reads the sensors, controls the led strip so there should be a mount for that mcu. Since the d1 mini has no holes to fixate it with screws the case must find ways to keep the thing in place.
  • The night light is for an apartment with cats so there should be a way to mask off parts of the field of vision of the motion sensor (or the cats will constantly turn the light on at night.)
  • wallmounted and compact.

Details:

  • The box is 32x33x40 mm, consists of 2 parts (base and front) which get pushed into each other and hold. 
  • The PIR HC-SR501 sensor gets screwed in with 2 x 4mm M2 screws. 
  • The mcu is slipped into the base, there's a pocket in the back and a mould in front where the board snaps in and is fixated then (but you can remove it again with a little pressure through the usb hole). There is also a rectangular mould at the bottom where the metal mcu cover fits in adding stability.
  • The base has an opening for the USB plug, two openings left and right for cables to go through (i.e. wiring for the led strip) and a small hole where you can reach the reset button of the mcu.
  • A little ring at the back of the base allows to hang the box on a nail
  • The LDR has it's own mini-case which is pushed through a hole in the top where it's kept firmly.
  • circling the motion sensor on the front there is a fine mould where a circular mask could be mounted, (diameter 12,8 mm, 270° for 1,2 mm thickness). Depending on the accuracy of your print you may want to go save with 13 mm diameter, 1 mm thickness or similar.
    Fitting masks may be added to this in the future.
  • This is designed to work with TPU or other flex. material and I don't think you can get the mcu in if you print it in PLA. I used TPU with D 58 Shore.
  • This is designed for soldering the contacts of the mcu and unlike my other d1 mini cases there is not enough space here to fit pin headers and duponts in.
  • In case you wondered, this is the night light.

Tags



Model origin

The author marked this model as their own original creation.

License