Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Touch Controlled LED Light using Arduino

By Ashutosh Bhatt March 4, 2017

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.

Prototype of Arduino based Touch Controlled LED Light

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

Circuit-Diagram-Arduino-Based-Touch-Controlled-LED-Light

Project Video


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

  • Can anyone please help me with this single board computer?
  • Anyone successfully communicated to the BlueNRG-M0 module on the B-L4S5I-IOT01A board
  • How to Build an Audio Tone Control?
  • Current version of LTspice not working on Windows 11?
  • Addressable Latch in My Logic Project

RSS Electro-Tech-Online.com Discussions

  • KiCad custom symbol definition correct approach
  • Measuring controller current output with a meter
  • restarting this Christmas project
  • Anyone In The US Ordered From AliExpress Recently?
  • My Advanced Realistic Humanoid Robots Project

Featured Tutorials

Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
    Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
    Practical application of hardware filters with real-life examples
  • A filter design example
    A filter design example
  • Types of filter responses
    Types of filter responses
  • What are the two types of hardware filters?
    What are the two types of hardware filters?
  • What are hardware filters and their types?
    What are hardware filters and their types?
More Tutorials >

Recent Articles

  • Posifa sensors improve low-flow accuracy in compact systems
  • Acopian releases low-profile power supplies rated to 900 W
  • Octavo Systems OSDZU-3 REF Development Platform
  • Same Sky adds enclosure design to its audio engineering capabilities
  • Waterproof SMA-to-MHF I LK assemblies introduced by Amphenol RF

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe