LED light is gaining its popularity and replacing all old conventional lights like CFL and other. The most important advantage of LED light is, it consumes very less power and gives very good light. Also LED light operates on DC. So it’s battery operated, means its portable/mobile. Another very useful feature of LED light is its intensity can be varied. The LED light intensity can be varied and set as per conditions and requirements. To vary the LED light intensity we have to apply PWM – pulse width modulated voltage.
The given project demonstrates how to control LED light intensity with a simple touch using arduino. It uses touch plate as input and when anyone just touches the plate it will turn ON or OFF LED light and also varies its intensity. The LED light made up of 16 white LEDs arranged in 4×4 matrix form. All LEDs are connected in parallel and one common anode and one common cathode terminals are taken out for external connections. The light intensity increases step by step every time when anyone touches the plate.
CIRCUIT DESCRIPTION
• A touch plate has two contact terminals. One is connected to 5 V output from Arduino board and another is connected to digital pin 8. This pin is also pulled down through 10 K resistor
• The LED light consists of 16 white LEDs. Their anodes and cathodes are shorted and taken out as one common cathode and one common anode terminal
• These 16 LEDs are driven by Darlington transistor MJE3055. Analog output pin 3 of Arduino drives LED through MJE3055
• Pin 2 is connected to the base of MJE3055 through a current limiting resistor of 470. Common anode terminal is given external 5 V supply and common cathode terminal is connected to collector of MJE3055
Here is the snap of circuit arrangement.
Fig. 1: Prototype of Arduino based Touch Controlled LED Light
CIRCUIT OPERATION
• First external 5 V supply is given to LED light and Arduino board is given supply from laptop/computer through USB
• Initially, the LED light is off. The message is displayed on Arduino IDE serial monitor as “Touch controlled LED light” and “LED light is OFF”
• When the user touches the plate 1st time, the LED light glows with 20% intensity because the PWM output from pin 3 has a pulse width of 20%. The message is displayed on serial monitor as “light intensity is 20%”
• Again when the user touches plate 2nd time the PWM output increase to 40% and so the light intensity also increases to 40%. The message is displayed on serial monitor as “light intensity is 40%”
• Similarly, as user keeps on touching plate, every time, the light intensity increases by 20% like 20%, 40%, 60%,……also every time, the light intensity is displayed on serial monitor
• When light intensity is fully 100% and if the user touches plate one more time, the light turns OFF. Again when plate is touched, the light glows with 20% intensity and this cycle repeats
ARDUINO SOFTWARE PROGRAM
The program written compiled in arduino IDE software can be found in the code section of the project. It is uploaded into an internal flash of arduino micro controller ATMega328 through USB built-in programmer.
Project Source Code
###
#define LED_LIGHT 3 #define touch_pin 5 #define touch_LED 13 unsigned int touch_counter=0; void setup() { // put your setup code here, to run once: pinMode(touch_pin, INPUT); pinMode(touch_LED,OUTPUT); Serial.begin(9600); Serial.println("touch controlled LED light"); Serial.println("LED light OFF"); } void loop() { while(digitalRead(touch_pin)==0); digitalWrite(touch_LED,HIGH); touch_counter++; delay(200); digitalWrite(touch_LED,LOW); if(touch_counter==0) { analogWrite(LED_LIGHT,0); Serial.println("LED light OFF"); } else if(touch_counter==1) { analogWrite(LED_LIGHT,51); Serial.println("LED light intensity 20%"); } else if(touch_counter==2) { analogWrite(LED_LIGHT,102); Serial.println("LED light intensity 40%"); } else if(touch_counter==3) { analogWrite(LED_LIGHT,153); Serial.println("LED light intensity 60%"); } else if(touch_counter==4) { analogWrite(LED_LIGHT,204); Serial.println("LED light intensity 80%"); } else if(touch_counter==5) { analogWrite(LED_LIGHT,255); Serial.println("LED light intensity 100%"); } else if(touch_counter==6) touch_counter=0; delay(200); }
###
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.