How to Make a Simple Arduino Night Light for Your Bedroom in Just 10 Minutes

How to Make a Simple Arduino Night Light for Your Bedroom in Just 10 Minutes

Making a night light with an Arduino is a fun and easy electronics project that you can complete in just 10 minutes! With just a few electronic components, you can build your own custom night light to comfort you as you drift off to sleep.

What You'll Need

To make your Arduino night light, you'll need just a few components:

Circuit Diagram

Here is the simple circuit diagram showing how everything needs to be connected:

The LEDs are connected through the resistor to pin 3 on the Arduino. Power and ground are connected to the rails on the breadboard.

Setting up the Circuit

To build the circuit:

  1. Insert the LED strip into the diffuser cup or enclosure.
  2. Connect the 220 ohm resistor to a row on the breadboard.
  3. Connect the resistor to the positive (+) leg of the LED strip.
  4. Insert the Arduino's pin 3 into the same row as the resistor. This will control the LEDs.
  5. Connect the negative (-) leg of the LED strip to ground on the Arduino.
  6. Connect Arduino 5V and GND to power the rails on the breadboard.

Be sure to double check your connections match the circuit diagram before powering on your Arduino!

Uploading the Arduino Sketch

To program the Arduino:

  1. Download the Arduino IDE software on your computer.
  2. Connect your Arduino to your computer with the USB cable.
  3. Copy and paste the following code into a new sketch:

void setup() {
pinMode(3, OUTPUT); // Set pin 3 as an output

void loop() {
analogWrite(3, 255); // Turn LEDs on full brightness

delay(5000); // Wait 5 seconds

analogWrite(3, 0); // Turn LEDs off

delay(5000); // Wait 5 seconds

  1. Upload the code to your Arduino.

This simple sketch turns the LEDs on full brightness for 5 seconds, then off for 5 seconds, repeatedly.

Customizing Your Night Light

Once you have the basic operation working, you can customize your night light in lots of ways:

The possibilities are endless! Make the night light uniquely yours by customizing both the hardware circuits and software code.


Building your own Arduino night light is a fun, straightforward beginner electronics project. In just 10 minutes, you can create a custom night light from easy-to-find components. With just an Arduino, LEDs, resistor, and a few wires, you'll be on your way to lighting up your bedroom in no time!