top of page
Writer's picturenithya7rns

How to control an LED using Push button and Arduino?

Updated: Sep 24

We all know that #LED can be controlled by various methods, based on Light intensity readings from LDR, based on readings from Motion sensors, controlling through Telegram App, etc. For all this, we need to understand the basics of controlling an LED through a switch or a Push Button.


This article describes how to control an LED using a #Push button and Arduino code. So let's get started, first with the Hardware Components required.






Hardware requirements


The image here shows all the components required to build the circuit.


All Hardware components required
All Hardware components required


  1. Arduino UNO Board


Arduino UNO
Arduino UNO

#Arduino board is a microcontroller that is used to accept inputs from sensors connected and provide an output action on the desired device connected to it. The sensor inputs can be from light-detecting sensors, motion sensors (Ultrasonic or IR), temperature sensors, etc. The output function done on the devices can be turning on an LED, the sound of a buzzer, or a Serial monitor display.

Buy Arduino UNO from here.





2. Jumper Wires


Jumper Wires
Jumper Wires


These are the main components that are used to establish the connections between different devices of the circuit.

Buy Jumper Wires from here.


3. LED



LED
LED

Light Emitting Diode is a commonly used light source. It is a semiconductor. LED emits light when current flows through it.


Buy LED from here.





4. Breadboard


Breadboard
Breadboard

The breadboard is the basic component of any circuit building process. All components, be it input sensors or output display devices are connected to the #Arduino or any other microcontrollers using wired connections through a breadboard. The holes in the breadboard are in series. There are various sizes like full-sized, half-sized, and mini breadboards.


Buy Breadboard from here.



5. Push-button.


PUSH Button
PUSH Button

PUSH Buttons are simple devices used for switching control. It is easy to use and starts or stops the function when connected in a #circuit.


Buy Pushbuttons from here.




Circuit Connections



The circuit connection, on the whole, can be divided into two parts.


First the connection between the Push Button and the Arduino board. One terminal of the Pushbutton is connected to PIN 2 of the Arduino board and the other terminal can be connected to the Ground (GND) pin of the UNO board or to the common Ground in the Breadboard.


Secondly, the Connections between the LED and the Arduino board. The positive terminal of the LED is connected to PIN 12 of the UNO board and the negative terminal is connected directly to the Ground (GND) of the board or to the common ground in the breadboard.


Finally, the Arduino Board is interfaced with the system in which the #IDE is present and the code is written.


Code




Working


The working of this circuit is simple. The LED receives the Supply voltage from the Arduino board. Initially, LED is OFF and is controlled using a Switch/Pushbutton.


When the circuit is OFF.
When the circuit is OFF.



The Pushbutton is the element that establishes the connection between the LED and Power supply through the Arduino board indirectly. That is, on pressing the Pushbutton, the switch is closed, the voltage (5V) is supplied, and the LED is switched ON. On taking the hand off the Pushbutton, the LED is OFF. The switch is open. Hence the switching ON and OFF of the LED can be controlled using Pushbutton and Arduino.


When the circuit is ON.
When the circuit is ON.

Project Video By - Abhishek Goud

Take the first step today to design your circuit, learn to control the LED using #Pushbutton. With the help of this article and circuit, build your own circuit, develop it further with different and creative #code combinations.


 

SEE ALSO:





Order Electronics Projects


Want us to guide you through your project or make the project for you? Click on the button below or reach out to us via Call/WhatsApp at (+91) - 7600948607


You can -


  • Order Basic Electronics Projects

  • Order Embedded Systems Projects

  • Order IoT Projects

  • Order FPGA Projects

  • Order VLSI Projects

  • Order Image Processing Projects

  • Order Matlab Projects

  • Order TinkerCAD Projects

  • Order Proteus Projects


Click on the button below to fill out the project inquiry form -





Create Various Projects


Check out our Free Arduino Projects Playlist - Arduino Projects 

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects 

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects 

Check out our Free IoT Projects Playlist - IoT Projects 

Check out our Free Home Automation Projects Playlist - Home Automation Projects 

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects 


Follow us -


Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, products, offers, competitions, quizzes, and Internship Opportunities.




909 views2 comments

2 Comments


Anushka Gupta
Anushka Gupta
Jul 27, 2023

This blog epitomizes the essence of learning by doing. Following the instructions and seeing the LED respond to the push button was a moment of triumph! Learn Electronics India deserves all the praise for fostering a practical learning environment for electronics enthusiasts.

Like

ashitanarvekar2002
Jul 24, 2023

LearnElectronics India simplifies complex concepts beautifully. Thank you!

Like
bottom of page