top of page
Writer's pictureSanskruti Ashtikar

Designing an Automatic Street Light Control System Using TinkerCAD

As urbanization increases, there is a growing need for energy-efficient solutions in public infrastructure. One such solution is the automatic street light control system, which ensures that street lights are only turned on when needed, thereby saving energy. In this article, we will walk you through the process of designing and simulating an automatic street light control system using TinkerCAD. This project uses an LDR (Light Dependent Resistor) to sense ambient light levels and an Arduino to control the street light accordingly.


Materials Needed:


  • Arduino Uno

  • Light Dependent Resistor (LDR)

  • 10kΩ Resistor

  • LED (to simulate the street light)

  • Breadboard

  • Jumper Wires


Step 1: Understanding the Concept


The automatic street light control system operates based on the ambient light level. When the surrounding light falls below a certain threshold, the system automatically turns on the street light (represented by an LED in this project). Conversely, when there is sufficient light, the system turns the light off. The LDR, a type of photoresistor, is used to detect the light level. The resistance of the LDR decreases as the light intensity increases, and this property is utilized to control the LED.


Step 2: Setting Up the Circuit in TinkerCAD


  1. Arduino Uno: Place the Arduino Uno on the TinkerCAD workspace. This will be the brain of your automatic street light system.

  2. LDR and Resistor:

    • Place the LDR on the breadboard. One end of the LDR should be connected to the 5V pin on the Arduino.

    • Connect the other end of the LDR to the A0 analog input pin on the Arduino.

    • Also, connect this end of the LDR to one end of a 10kΩ resistor.

    • Connect the other end of the resistor to the GND pin on the Arduino. This creates a voltage divider that will vary the voltage at A0 based on the light level.

  3. LED (Street Light Simulation):

    • Place the LED on the breadboard.

    • Connect the longer leg (anode) of the LED to digital pin 9 on the Arduino through a current-limiting resistor (220Ω).

    • Connect the shorter leg (cathode) of the LED to the GND rail of the breadboard.

  4. Power: Ensure the Arduino is powered, either through a USB connection or an external power source.


Step 3: Writing the Arduino Code


The Arduino code will read the value from the LDR, compare it to a predefined threshold, and control the LED based on this comparison.


int LDRPin = A0; // Pin connected to LDR
int LEDPin = 9;  // Pin connected to LED
int threshold = 500; // Light level threshold for turning on the LED
void setup() {
  pinMode(LEDPin, OUTPUT); // Set the LED pin as output
  Serial.begin(9600);      // Begin serial communication for debugging
}
void loop() {
  int LDRValue = analogRead(LDRPin); // Read the value from the LDR
  Serial.println(LDRValue);          // Print the LDR value for monitoring
  
  if (LDRValue < threshold) {
    // If the ambient light is below the threshold, turn on the LED
    digitalWrite(LEDPin, HIGH);
  } else {
    // Otherwise, turn off the LED
    digitalWrite(LEDPin, LOW);
  }
  
  delay(100); // Small delay to stabilize readings
}

Step 4: Simulating the Circuit in TinkerCAD


  1. Start the Simulation: Click the "Start Simulation" button in TinkerCAD. The LED should respond to changes in light levels as detected by the LDR.

  2. Testing the System: Simulate changes in light by adjusting the ambient light in the TinkerCAD environment (if available), or by manually adjusting the resistance of the LDR in the circuit. Observe how the LED turns on when the light level drops below the threshold and turns off when the light level is above the threshold.

  3. Monitoring Output: Use the serial monitor to observe the real-time values of the LDR, which can help you adjust the threshold for your specific conditions.

  4. Troubleshooting: If the LED does not behave as expected, check the connections, ensure that the code is correctly uploaded, and adjust the threshold value to suit the simulated environment.


Step 5: Fine-Tuning the System


Once the basic functionality is working, you can fine-tune the system for more accurate control:

  • Adjusting Sensitivity: Experiment with different threshold values in the code to find the most suitable light level for turning on and off the street light.

  • Adding a Delay: To prevent the light from flickering on and off due to momentary changes in light levels (like a passing car), you can add a delay or hysteresis in the code.

  • Multiple Lights: If you have multiple LEDs representing street lights, you can control them simultaneously or independently using different pins.


Step 6: Building the Physical Circuit


After successfully simulating the circuit in TinkerCAD, you can build the physical automatic street light control system using real components.

  1. Assemble the Components: Transfer your TinkerCAD design to a physical breadboard, following the same connections.

  2. Upload the Code: Connect your Arduino to a computer, upload the code, and test the circuit.

  3. Test the System: Observe how the system behaves under different light conditions. Make any necessary adjustments to the threshold or circuit components.


Step 7: Expanding the Project


There are several ways to expand this project and make it more robust:

  • Power Management: Integrate solar panels and batteries to create a self-sustaining street light system.

  • Motion Sensors: Add a PIR sensor to detect movement and only activate the lights when someone is nearby, saving even more energy.

  • Remote Monitoring: Use IoT (Internet of Things) technology to monitor and control the street lights remotely.


Conclusion


Congratulations! You’ve successfully designed and simulated an automatic street light control system using TinkerCAD. This project not only introduces you to the basics of light sensing and Arduino programming but also highlights the potential for energy savings in public lighting systems.

Automatic street light control systems are a practical application of electronics and embedded systems, and they offer a tangible way to contribute to energy efficiency in urban environments. With the skills gained from this project, you can continue exploring more advanced automation and control systems, making the world a smarter and more sustainable place.


Happy tinkering!


Want us to guide you through your project or make the project for you ?







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 


0 views0 comments

Related Posts

See All

Comments


bottom of page