Arduino the Nighttime Energy Saver

by bichagalpradyun in Circuits > LEDs

192 Views, 0 Favorites, 0 Comments

Arduino the Nighttime Energy Saver

Screenshot 2023-04-23 at 12.42.31 PM.png
Screenshot 2023-04-23 at 1.25.28 PM.png

Title: "Saving Energy with Smart Roads"

Have you ever wondered how much energy is wasted on roads due to unnecessary lighting? Well, I have a solution for you! Introducing my project called "Smart Roads."

The idea is simple - we use an LDR sensor to detect if it's night-time and an IR proximity sensor to detect if a vehicle is approaching. If it's night-time and a vehicle is detected, the lights will turn on. If there's no vehicle detected, the lights will stay off.

No more wasting electricity on unnecessary lighting overnight or during the day! With "Smart Roads," we can save energy and reduce our carbon footprint. So, let's make our roads smarter and greener!

Supplies

Screenshot 2023-04-23 at 12.47.46 PM.png
Screenshot 2023-04-23 at 12.51.01 PM.png
Screenshot 2023-04-23 at 12.51.45 PM.png
Screenshot 2023-04-23 at 12.53.37 PM.png
Screenshot 2023-04-23 at 12.52.28 PM.png

ARDUINO,LDR,IR SENSOR, RELAYOR LIGHT

UNDERSTANDING THE PROJECT

Screenshot 2023-04-23 at 12.52.28 PM.png
Screenshot 2023-04-23 at 1.25.28 PM.png

Have you ever noticed that the street lights are on all night long, even when there's no one around? It's like they're partying without us! But all that wasted electricity can really add up. That's why I decided to create "The Nighttime Energy Saver" project.

Using a combination of an LDR sensor and an IR proximity sensor, this project is designed to turn on the street lights only when they're needed. If it's dark outside and the IR sensor detects a vehicle, then the lights will turn on automatically. But if there's no movement, then the lights will stay off, saving you tons of energy (and money!).

I mean, who needs street lights on all night long anyway? Do the ghosts and vampires really need that much help finding their way around? I don't think so. So let's be smart and turn them off when we don't need them.

With "The Nighttime Energy Saver," you can be the hero your city needs. Not only will you be saving energy and money, but you'll also be helping the environment. And who doesn't love a good environmentalist?

So come on, join the party! Let's save some electricity and show those street lights who's boss. "The Nighttime Energy Saver" project is fun, easy, and will make a difference. Plus, think of all the money you'll save to buy more Arduino projects!

CONNECTIONS OF PROJECT

Screenshot 2023-04-23 at 1.09.29 PM.png

UNDERSTANDING THE CODE

This code sets up an Arduino board to read two sensors: an IR sensor connected to digital pin 10 and an LDR (light-dependent resistor) sensor connected to digital pin 11. The code also sets up pin 12 as an output pin to control a light.

In the loop() function, the code reads the values of the sensors using digitalRead() and stores them in the readete and ldr variables. The value of readete will be either 0 or 1 depending on whether the IR sensor detects an object or not. The value of ldr will be either 0 or 1 depending on whether the LDR sensor detects light or not.

The code then checks whether the LDR sensor detects light. If it does, the code checks whether the IR sensor detects an object. If the IR sensor does not detect an object, it means that it is night time and the code turns on the light connected to pin 12 by setting it to HIGH. If the IR sensor detects an object, it means that it is daytime and there is no need to turn on the light, so the code turns it off by setting it to LOW.

Finally, the code includes a delay() function to introduce a small delay of 10 milliseconds between each loop iteration, which helps improve the performance of the simulation.

Overall, this code is an example of how sensors and output pins can be used together in an Arduino project to automate the control of a light based on the time of day and the presence of objects.

UPLOADING THE CODE

// CODE BY PRADYUN

int ldr = 0;

int readete = 0;

void setup()

{

 pinMode(10, INPUT);

 pinMode(11, INPUT);

 pinMode(12, OUTPUT);

}


void loop()

{

 readete = digitalRead(10);

 ldr = digitalRead(11);

 Serial.println(readete);

 if (ldr == 1) {

  if (readete == 0) {

   digitalWrite(12, HIGH);

  } else {

   digitalWrite(12, LOW);

  }

 } else {

  digitalWrite(12, LOW);

 }

 delay(10); // Delay a little bit to improve simulation performance

}


BUILDING THE MODEL

Screenshot 2023-04-23 at 12.52.28 PM.png
Screenshot 2023-04-23 at 1.25.28 PM.png

FOR THIS MODEL IHAVE USED BLIX BUILDING BLOCKS BUT YOU CAN USE ANY MATERIAL

THANK YOU

IF YOU LIKED THE PROJECT PLS GIVE IT A LIKE FOR MORE DETAILS YOU CAN DM ME ON LINKDEIN https://www.linkedin.com/in/pradyun-bichagal-0a6a10221