Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • 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
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Automatic and Manual Control of Stadium Lights

By Venugopal M May 27, 2017

Stadium lights consume a lot of electricity. They are high beam lights with high wattage rating. A lot of electricity can be saved by controlling the intensity of these lights manually or automatically. For controlling the intensity of light, the voltage supply to the lights need to be controlled. This project is a demonstration of the same application. In this demo project instead of actual stadium lights, LED lights are used.
A series of 8 LEDs are used to demonstrate intensity control functionality. For manual control of light intensity, a variable resistor is used and for automatic control of light intensity, an LDR sensor is used. The LEDs are connected in two series via 2N2222 transistor. The transistor acts as an amplifier whose output is driven by the voltage at its base pin. A set of two switches is used to set the automatic or manual mode of project’s operation.
 
The project is built on Arduino Pro Mini. The Arduino sketch manages to detect mode selection, sense input voltage from variable resistor and the LDR sensor and output a suitable voltage at the base of the light controlling transistor. The Arduino sketch is written using Arduino IDE and burnt to the board using the same. 

Components Required – 

List of components required for Automatic and Manual Control of Stadium Lights
 
Fig. 1: List of components required for Automatic and Manual Control of Stadium Lights
 

Circuit Connections – 

Prototype of Automatic and Manual Control of Stadium Lights

 Fig. 2: Prototype of Automatic and Manual Control of Stadium Lights

 
The circuit is built around Arduino Pro Mini. The LED series, SPDT switches, LDR sensor, and Potentiometer are connected to the Arduino board. The circuit connections are as follow –
 
Power Supply – The circuit needs a 5V regulated DC for its operation. An 18V battery can be used as the primary source of power. The supply from the battery can be regulated to 5V using 7805 voltage regulator IC. The pin 1 of the voltage regulator IC should be connected to the anode of the battery and pin 2 of it should be connected to the ground. The voltage output must be drawn from pin 3 of the 7805 IC.
 
LED Series – A group of 8 LEDs are interfaced to the Arduino board as a demo of stadium lights. The LEDs are connected so that their cathode pins are connected to the ground while the anode pins are connected to the emitter of 2N2222 transistor. The base of the transistor is connected to the pin 6 of the Arduino board and collector is connected to VCC.
 
SPDT switches – The switches are connected to pins 9 and 8 of the Arduino board. By default, the pins are connected to ground via 10K resistors. On toggling the switches, the respective pins are short-circuited to VCC. If the switch connected at pin 9 has HIGH while switch connected at pin 8 has LOW, the automatic mode is selected and the LED lights are operated according to the LDR sensor. If the switch connected at pin 9 has LOW while switch connected at pin 8 has HIGH, the manual mode is selected and LED lights are operated according to the potentiometer. If both the switches have LOW, the LEDs are switched OFF. 
 
LDR sensor – The LDR sensor has a resistance dependent on the ambient light intensity. More is the light falling on the sensor, less is its resistance. The LDR sensor is connected in a potential divider circuit at A0 pin of the controller. It outputs analog voltage at the controller pin which is scaled from 0 to 5 V. 
 
Potentiometer – A 10K pot is interfaced at the A1 pin of the Arduino. The potentiometer allows passing a variable voltage below 5V at the controller pin. 

How the circuit works – 

Image of Automatic and Manual Control of Stadium Lights in action

Fig. 3: Image of Automatic and Manual Control of Stadium Lights in action

Once the Arduino board is powered on, the board initializes the circuit and set the pins digital output or input. It checks the status of pins connected to the SPDT switches. If the switch connected at pin 9 has HIGH while switch connected at pin 8 has LOW, the automatic mode is selected and the LED lights are operated according to the LDR sensor. If the switch connected at pin 9 has LOW while switch connected at pin 8 has HIGH, the manual mode is selected and LED lights are operated according to the potentiometer. If both the switches have LOW, the LEDs are switched OFF by sending a LOW logic at the pin 6 of the board. 

 
If the automatic mode is selected, the Arduino reads analog voltage at pin A0 where the LDR sensor is connected in a voltage divider circuit. More is the surrounding light, less is the resistance of LDR and less is the voltage output at the controller pin. The voltage is read and digitized using inbuilt ADC channel. The value is factored by four and the resultant voltage value is passed to the pin connecting amplifier transistor. So more is the surrounding light, less is the voltage supplied to the transistor and less is the intensity of LED lights. 
 
if manual mode is selected, the Arduino reads analog voltage at pin A1 where the potentiometer is connected. On moving the potentiometer knob, the voltage output at the pin is varied. The same voltage is converted to a digitized reading using inbuilt ADC channel and factored by four. The resultant value of voltage is supplied at the pin 6 of the Arduino where transistor’s base is connected. So more is the voltage output from the potentiometer, more is the supply voltage for triggering at the base of the transistor and more is the intensity of LED lights. 
 
The factor of four has been determined after calibration of the LED’s intensity during project testing. On making the project and using other sets of LEDs, other factors may be found suitable for the respective set of LEDs. Since the inbuilt ADC channel of the Arduino board is 10-bit long, the factor must have a denominator of 1024 and a suitable numerator as determined during project test. 
 
Check out the project code to learn how Arduino reads the status of SPDT switches, read analog voltage from LDR sensor and potentiometer and output a factored voltage at transistors base. 

Programming Guide – 

The Arduino sketch declares variables denoting potentiometer, LDR sensor, LED connection and SPDT switches and assign the respective controller pins according to their interfacing.  
 
The setup() function is called which runs for once after the controller is powered ON. The function set the pins connected to the base of the 2N2222 transistor as digital output and pins connected to the potentiometer, LDR sensor, and SPDT switches as digital input using pinMode() function.  
 
The loop() function is called which iterates infinitely. The status of the SPDT switches is read using digitalRead() function and stored in variables. if the switch connected at pin 9 has HIGH while switch connected at pin 8 has LOW, the automatic mode is selected and the ldr() function is called. If the switch connected at pin 9 has LOW while switch connected at pin 8 has HIGH, the manual mode is selected and pot() function is called. If both the switches have LOW, the LEDs are switched OFF by passing LOW at the pin 6 of Arduino which triggers OFF the transistor circuit.
 
In the pot() function, the voltage from the potentiometer is read using analogRead() function and stored in a variable. The value is scaled by a factor and written to the pin 6 of Arduino where the base of the LED driving transistor is connected. 
 
In the ldr() function, the voltage from the LDR sensor is read using analogRead() function and stored in a variable. The value is scaled by a factor and written to the pin 6 of Arduino where the base of the LED driving transistor is connected. 
 
You can refer to the complete Arduino code for Stadium Lights Intensity Control Project in the code section.

Project Source Code

###

//Program to 

int potPin= A1;

int LDR = A0;

int LED= 6;  

int sw1 = 9;

int sw2 = 8;

void setup()

{

  pinMode(potPin, INPUT); 

  pinMode(LDR, INPUT);

  pinMode(LED, OUTPUT); 

  pinMode(sw1, INPUT);

  pinMode(sw2, INPUT);

}

void loop()

{

  int SWITCH1 = digitalRead(sw1);

  int SWITCH2 = digitalRead(sw2);

  if (SWITCH1 == HIGH && SWITCH2 == LOW)

  {

    ldr();

  }

  else if (SWITCH2 == HIGH && SWITCH1 == LOW)

  {

    pot();

  }

  else if (SWITCH2 == LOW && SWITCH1 == LOW)

  {

    digitalWrite(LED,LOW);

  }

}

void pot()

{

int   readValue = analogRead(potPin);  

int writeValue = (255./1023.) * readValue; 

 analogWrite(LED, writeValue);      

 }

void ldr()

{

  int sv = analogRead(LDR);  

 int wv = (255./1023.) * sv; 

 analogWrite(LED, wv);      

}   

###

 


Project Video


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

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

  • Audio Switching
  • Transistor circuit in audio
  • Parametric Analysis in Cadence Virtuoso IC23.1
  • MCU identification?
  • GanFet power switch starts burning after 20 sec

RSS Electro-Tech-Online.com Discussions

  • stud mount Schottky diodes
  • LED circuit for 1/6 scale diorama
  • Can I use this charger in every country?
  • Electronic board faulty?!?
  • using a RTC in SF basic

Featured – Designing of Audio Amplifiers part 9 series

  • Basics of Audio Amplifier – 1/9
  • Designing 250 Milli Watt Audio Power Amplifier – 2/9
  • Designing 1 Watt Audio Power Amplifier – 3/9
  • Designing a Bass Boost Amplifier – 4/9
  • Designing a 6 Watt Car Audio Amplifier – 5/9
  • Design a low power amplifier for headphones- 6/9

Recent Articles

  • Fischer connector system adds ratchet locking system designed for 300g shock resistance
  • Littelfuse introduces tactile switch with enhanced bracket peg design for mounting strength
  • Infineon releases GaN switch with monolithic bidirectional design
  • Sienna Semiconductor data converters feature sample rates from 20 to 250 Msps
  • Delta’s 5,500 W power supplies achieve 97.5% energy efficiency for AI servers

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • 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

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • 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
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe