You are on page 1of 11

18ECC205J-ANALOG AND DIGITAL COMMUNICATION

MINIPROJECT

TITLE : LED Display with Arduino ADC and PWM


TEAM MEMBERS :

C.Abhishek RA1911004010133
S.Praveen RA1911004010134
S.Nirmal Kumar RA1911004010136
TABLE OF CONTENTS

• INTRODUCTION
• APPLICATION
• CIRUIT
• CODE
• OUTPUT
• ADVANTAGES
• CONCLUSION
INTRODUCTON

PWM is a method of changing the perceived and actual brightness of an LED by pulsing
the power to the LED on and off. This is done very rapidly so there should be no
perceptible flicker, but changing the average power will change the brightness.
Pulse Width Modulation or PWM is a common technique used to vary the width of the
pulses in a pulse-train. PWM has many applications such as controlling servos and speed
controllers, limiting the effective power of motors and LEDs.
WHAT IS PULSE WIDTH MODULATION ?

Pulse width modulation reduces the average power delivered by an electrical signal by
converting the signal into discrete parts. In the PWM technique, the signal’s energy is
distributed through a series of pulses rather than a continuously varying (analog) signal.
APPLICATION

In the display industry LEDs are used as the light source for LCD panels and as the display
pixels in direct view LED displays, eg video walls. The most common method for adjusting
the brightness of these LEDs is a method called Pulse Width Modulation, typically just
known as PWM (you will see this referred to in all Digital View controller board model
specifications). As mentioned, the most common method for adjusting the brightness of an
LED used as a backlight (for LCD panels) or as the main display component (for direct
view LED displays) is by a method known as PWM (Pulse Width Modulation).
CIRCUIT
CODE
int ledPinGreen = 9; // LED connected to digital pin 9

int ledPinYellow = 10; // LED connected to digital pin 10

int ledPinRed = 11; // LED connected to digital pin 11

int analogPin = A3; // potentiometer output connected to analog pin 3int

val = 0; // variable to store the read value

void setup() //define inputs and outputs

{ pinMode(analogPin, INPUT); // sets the pin as input

pinMode(ledPinGreen, OUTPUT); // sets the pin as output

pinMode(ledPinYellow, OUTPUT); // sets the pin as output

pinMode(ledPinRed, OUTPUT); // sets the pin as output

void loop() // this is the code that "runs forever“

val = analogRead(analogPin); //read the input pin // analogRead ranges 0 to 1023 // analogWrite ranges 0 to 255, thus the division by 4 of val

if (val > 900) // high voltage - Red LED turns on

}
{
analogWrite(ledPinRed, val/4); // write to Red LED

analogWrite(ledPinYellow, 0); // disable Yellow LED

analogWrite(ledPinGreen,0); //disable Green


}
else if (val > 700 && val <= 900) // approaching high voltage - Yellow LED turns on
{
analogWrite(ledPinRed, 0); // disable Red LED

analogWrite(ledPinYellow, val/4); // write to Yellow LED

analogWrite(ledPinGreen, 0); // disable Green LED

analogWrite(monitorPin, val/4); // used to scope the PWM output


}
else if (val > 100 && val <= 700) // low voltage - Green LED turns on
{
analogWrite(ledPinRed,0); // disable Red LED

analogWrite(ledPinYellow, 0); // disable Yellow LED

analogWrite(ledPinGreen, val/4); // write to Green LED


}
OUTPUT
ADVANTAGES

Generating audio signals.


PWM technique prevents overheating of LED while maintaining its brightness.
PWM technique is accurate and has a fast response time.
CONCLUSION

Thus different LEDs using pulse width modulation corresponding to different ranges of
analog input voltages is obtained.

You might also like