0% found this document useful (0 votes)
40 views5 pages

Unit 3 Exercise 3-1 Potentiometer Cotrolled Led Dimmer

The document outlines a laboratory activity focused on using a potentiometer and Arduino to control LED brightness through Pulse Width Modulation (PWM). Students will learn circuit assembly, coding, and the principles of analog input affecting digital output. The experiment successfully demonstrated the effective modulation of LED brightness based on potentiometer adjustments, with stable performance and minor fluctuations during rapid changes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views5 pages

Unit 3 Exercise 3-1 Potentiometer Cotrolled Led Dimmer

The document outlines a laboratory activity focused on using a potentiometer and Arduino to control LED brightness through Pulse Width Modulation (PWM). Students will learn circuit assembly, coding, and the principles of analog input affecting digital output. The experiment successfully demonstrated the effective modulation of LED brightness based on potentiometer adjustments, with stable performance and minor fluctuations during rapid changes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Auto_228_Laboratory Activity No.

_3__

Name of Activity: Potentiometer Controlled LED Dimmer

Introduction:

ILED brightness control is important for energy efficiency and user convenience. This
experiment uses a potentiometer and an Arduino to adjust LED brightness through Pulse
Width Modulation (PWM). Students will learn basic circuit connections, coding, and how
analog inputs control digital outputs, gaining hands-on experience in electronics and
programming.
Learning Objectives:

1. Understand the principles of using a potentiometer to control the brightness of an LED


using an Arduino microcontroller.

2. Develop skills in circuit assembly and interfacing components such as a potentiometer


and LED with an Arduino board.

3.Learn how to write, compile, and upload an Arduino program to implement a variable LED
dimmer.
Learning Outcomes:

1. Students will be able to correctly wire and assemble the potentiometer-controlled LED
dimmer circuit following a provided schematic.

2. Students will successfully write and upload an Arduino sketch to control LED brightness
based on potentiometer input.

3. Students will analyze and explain the role of PWM (Pulse Width Modulation) in controlling
LED brightness and its practical applications.
Statement of Problem:

In modern electronic applications, controlling brightness in LED lighting is essential for


energy efficiency and user convenience. Traditional methods of LED dimming require
complex circuits or additional components, making them less accessible for beginners. This
experiment aims to explore how a simple Arduino-controlled potentiometer circuit can
effectively vary LED brightness using PWM. By implementing this system, students will gain
hands-on experience in analog input reading, digital output control, and programming
microcontrollers, providing a foundation for more advanced electronic and IoT applications.
List of Materials:

1. Tutor for Arduino MTS -101


2. Arduino Kit (Jumper Wires)
3. Desktop Computer

1
4. USB Cord
5. AC Power Cord
6. Arduino Uno Trainer
Methodology:

1. Circuit Setup – The Arduino Uno board was connected to a computer using a USB cable
for power and programming. A correct AC voltage was supplied to the ITS-100 to power the
circuit.

2. Component Connections – The 1W LED was connected to digital pin 3 of the Arduino
board, while the potentiometer’s wiper was connected to analog pin A2. The circuit was
wired according to the provided schematic diagram
.
3. Programming the Arduino – The Arduino IDE was used to write a program that defined
the potentiometer as an input and the LED as an output. The program utilized the
analogRead() function to read the potentiometer value and mapped it to a PWM signal using
analogWrite() to control LED brightness.

Heres the Code:


//========== ex3-1-1.ino============

//========== Global Declaration ==========

// pin A2 connected to V pot's wiper, pin 3 connected to 1W LED

#define potV 2 // V pot's wiper connected to analog pin A2

#define LED 3. // 1W LED connected to digital pin 3

//========== Initialization============

void setup()

{ pinMode(potV, INPUT); // configure analog pin A2 as an input

pinMode(LED, OUTPUT); // configure digital pin 3 as an output

digitalWrite(LED, 1); // turn off LED

//==========Main Code============

void loop()

{ int analogin=0,pwm; //declare integer variables analogin, pwm

analogin = analogRead(potV); // read the value of vertical pot, range 0 to 1023

pwm=-map(analogin,0,1023,0,255); // scale it to use it with the PWM, range 0 to 255

analogWrite(LED,pwm); // PWM output according to the scaled value

2
}

4. Uploading the Code – The written code was compiled and uploaded to the Arduino board.
Any errors encountered during the compilation were checked and resolved before execution.

5. Testing and Observation – The potentiometer was adjusted from minimum to maximum,
and the LED brightness was observed. The behavior of the LED was analyzed to determine
if it correctly followed the potentiometer's input changes.

Results and Findings:

The system successfully controlled the LED brightness based on the potentiometer’s
position. When the potentiometer wiper moved from bottom to top, the LED brightness
increased gradually. Conversely, when moved from top to bottom, the brightness decreased
accordingly. The PWM signal output effectively modulated the LED intensity, demonstrating
that the potentiometer could serve as an efficient dimmer control.

Conclusion and Observation:

In conclusion, the potentiometer-controlled LED dimmer experiment successfully


demonstrated how a simple analog input (the potentiometer) can regulate LED brightness
through PWM signals on the Arduino. By mapping the potentiometer’s voltage range to a
corresponding PWM output, the LED intensity changed smoothly from dim to bright. During
observations, no significant flicker was detected, indicating stable and responsive
performance. However, rapid adjustments to the potentiometer occasionally introduced
minor, momentary fluctuations in brightness, which were quickly resolved as the PWM
output stabilized.

Documantaion:

3
4
5

You might also like