LED Strip Brightness Controller

Introduction: LED Strip Brightness Controller

LED Strips are famous across the globe for its consumption of low voltage and its brightness .Sometimes we need to adjust the voltage supply and brightness of these LED strips, for example, during your sleep you would get disturbed due to the brightness of LED. This is a arduino project to control the brightness of LED strip . it is user - friendly as it receives brightness value from the user. The brightness value depends on the voltage given to LED strip. If the user gives 5v , it gives the maximum brightness, if the user gives 0.1 volts it supplies low brightness. Arduino could write voltage from 0 - 255 (0-5v splits eg: 1v = 51 units) . But using commands and calculation we can minimise this to 0-5v. Lets go into the project.

Supplies

Requirements :

  1. Arduino UNO / nano / MEGA
  2. LED strip (Should work on minimum
  3. Arduino IDE
  4. connecting wires (nos 2)

Step 1: CONNECTIONS

These are the connections to connect LED Strip with Arduino:

ARDUINO LED Strip

GND >> - (negative)

DIGITAL PWM 3 (pin3 ) >> + (positive)

----------------------------------------------------------------------------------------

connect the negative pin of LED strip to groung(GND) pin of arduino

connect the positive pin of LED strip to pin 3 pin of arduino

Step 2: CODE

The most important thing next to hardware in Arduino is the code .The code is given below. Type this code and upload it using arduino IDE or bluino loader.

float brightness ;
int LED =3; float realbrightness; float delay1; float delay2; float option; void setup () { pinMode(LED,OUTPUT); Serial.begin(9600); Serial.println("Arduino LED strip controller"); Serial.println(" "); Serial.println("Please enter the brightness of LED strip (1-5)"); Serial.println(" "); while (Serial.available() ==0) {} brightness = Serial.parseFloat(); realbrightness = (brightness) * 51.0; if (realbrightness >=6 ) { Serial.println(" Please enter a valid brightness"); } } void loop () { Serial.println(" "); Serial.println("The LED strip is blinking at rate of "); Serial.print(brightness); analogWrite(LED,realbrightness); delay(1000); }


Step 3: TIME TO TEST !

Connect the Arduino upload the code, open the Serial monitor. The message "Please enter the brightness of LED strip (1-5)" should be displayed .Enter the brightness value and click send . you can view that your LED strip is running in your brightness command!.

Step 4: ADDITIONAL INFO:

  • The brightness can be entered in decimal value.
  • brightness entered above 5, will be same as 5.
  • As the value gets less, the brightness reduces.
  • By default sometimes Arduino drivers may be missing in yout computer . To solve errors ,open device manager and update all unknown drivers.
  • Select the correct COM port and version of Arduino.
  • Code alternate download :
LED Strip Speed Challenge

Participated in the
LED Strip Speed Challenge

Be the First to Share

    Recommendations

    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • Metal Contest

      Metal Contest
    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest

    Comments