MuTech RoboticsLearning Hub
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.

Smart Bathroom Light
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

  1. Door closed + motion seen = OCCUPIED, so the light stays on even if you stand still.
  2. The door opening ends the occupied state; the light fades off.
  3. At night the LDR reading switches the light to a soft 20% warm glow.
  4. 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 kit

Wiring

Wiring diagram
PowerGroundSignal
#FromConnect to
1 SignalPIR OUTNano D2
2 SignalDoor reed DONano D3
3 SignalLDR AONano A0
4 PowerAll sensor VCCNano 5V
5 GroundAll sensor GNDNano GND
6 SignalMOSFET SIGNano D9 (PWM)
7 GroundMOSFET GNDNano GND
8 PowerMOSFET IN+12V rail
9 GroundMOSFET IN−GND rail
10 PowerMOSFET OUT+ / OUT−Strip + / −
11 PowerAdapter +12V12V rail
12 PowerNano VIN12V rail
13 GroundNano GNDGND 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.