Introduction: DIY RGB LED Light-Mixing Lamp With Arduino

The original source of my project is based on this website: Here

In this project, I created a Lamp with an RGB LED and an LDR sensor. By using the LDR sensor as a switch, the lamp would start shining when the lightness is low. The lamp can be used as a night lamp because it would automatically start functioning as soon as the lights are off. I added a It can also be a toy when you're bored. Basically, you just have to cover the LDR sensor, then the circle will start spinning, and you can stare at it as long as you can.

Major Changes I've made with the project:

1. Originally, the creator uses three LDR sensors to control one color out of Red, Blue, and Green. Instead of doing that, I change it into one LDR and let it control the three colors

2. I added a motor on the lamp, and then put a picture of the hypnosis circle on for fun.


The following materials are bought in a physical electronic store:

  1. RGB LED x1
  2. Arduino Leonardo x1
  3. Breadboard x1
  4. Resistors x2
  5. Arduino Gearbox Motor x1
  6. Picture of Hypnosis Circle
  7. LDR sensor
  8. Jumper Wires
  9. L298N Motor drive module x1

Step 1: Connect the Wires to the Breadboard

  1. The Motor should first connect to the L298N Motor drive module, then connect the module to Digital Pins
  2. The LDR sensor should connect to the Analog Pins
  3. Three of the ports of the RGB LED should connect to the Digital Pins

Step 2: Program

The programs can be accessed through this link: Arduino Code

Step 3: Decoration

  1. I've Used a box to decorate the exterior of the lamp and cover the wires inside
  2. I've added a Hypnosis circle and a motor on the lamp just to make it more interesting