Kids OK with adultArduino NanoLevel 2/3
Smart Bathroom Light
Motion lights switch off while you shower. This one uses motion AND a door sensor, so it stays on until the door opens again.

Kids OK, with an adult
DIY project. Children must build this only with an adult (16+ years) beside them at all times. Not suitable for children under 8 years.
12V LED strip only. Keep the Nano, MOSFET and adapter outside the wet area. Never wire 230V mains in a bathroom yourself.
Strictly follow the description given with this video.
Video
The video link will be added here soon.
How it works
- Door closed + motion seen = OCCUPIED, so the light stays on even if you stand still.
- The door opening ends the occupied state; the light fades off.
- At night the LDR reading switches the light to a soft 20% warm glow.
- A logic-level MOSFET dims the 12V strip with PWM from D9.
Parts you need
- Arduino Nano× 1Buy
- PIR motion sensor× 1Buy
- Reed switch module + magnet (door)× 1Buy
- LDR module× 1Buy
- Logic-level MOSFET module× 1Buy
- 12V warm-white LED strip (1 m)× 1Buy
- 12V 2A adapter× 1Buy
Kit for this projectPrice on request
Get the kitWiring

PowerGroundSignal
| # | From | Connect to |
|---|---|---|
| 1 Signal | PIR OUT | Nano D2 |
| 2 Signal | Door reed DO | Nano D3 |
| 3 Signal | LDR AO | Nano A0 |
| 4 Power | All sensor VCC | Nano 5V |
| 5 Ground | All sensor GND | Nano GND |
| 6 Signal | MOSFET SIG | Nano D9 (PWM) |
| 7 Ground | MOSFET GND | Nano GND |
| 8 Power | MOSFET IN+ | 12V rail |
| 9 Ground | MOSFET IN− | GND rail |
| 10 Power | MOSFET OUT+ / OUT− | Strip + / − |
| 11 Power | Adapter +12V | 12V rail |
| 12 Power | Nano VIN | 12V rail |
| 13 Ground | Nano GND | GND rail |
3D print files
- pir_ceiling_dome.stlPETG · 0.2 mm · 20% · no supports · ~1 h 40 minLink at launch
- door_reed_clips.stlPETG · 0.2 mm · 30% · no supports · ~35 minLink at launch
Code
The tested Arduino / ESP32 code for this project will be posted here, ready to copy.