The aim of the project “street light management using pc” is to design a system using which the ac loads (street lights) can be controlled through pc using the Arduino through which the power management can be optimized. The project is designed in such a way that the controller is interfaced to pc using serial communication technique. Serial communication is often used either to control or to receive data from an embedded microprocessor. In serial communication, the data is sent one bit at a time. Serial communication is a form of I/O in which the bits of a byte being transferred appear one after the other in a timed sequence on a single wire. Serial communication is commonly used in applications such as industrial automation systems, scientific analysis and certain consumer products. Here the serial communication is established between the pc and the controller by a line driver which acts as a voltage converter and the loads will also be interfaced to the controller through relays. Depending on the input received from the pc, the controller will perform the predefined task of turning on/off the loads. Here we will design the buttons to operate the loads. By clicking on these buttons the corresponding data will be passed to the controller serially. And an LCD will also be interfaced with the controller to display the status of loads.

This project uses a regulated 5v, 500mA power supply. 7805 and 7812 three-terminal voltage regulators are used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 230/12v step down transformer.

TECHNICAL SPECIFICATIONS

HARDWARE

  • Arduino (ATMEGA328)
  • LCD
  • RELAY
  • BULB

POWER SUPPLY

  • Transformer                    :             12V step down 
  • Filter                               :             1000uf/25V
  • Voltage Regulator           :             7805 / 7812

SOFTWARE

  • Software tools used
  • Keil IDE,PROTEUS

BLOCK DIAGRAM

POWER SUPPLY BLOCK DIAGRAM

\

Bill of Materials

S.NoCOMPONENTSDESCRIPTIONQUANTITYlink
1Arduino UnoArduino UNO atmega3281https://www.amazon.com/Arduino-A000066-ARDUINO-UNO-R3/dp/B008GRTSV6
2relayrelay4https://www.amazon.in/Generic-unbranded-relay-module-optocoupler/dp/B00C59RNPE/ref=pd_lpo_2?pd_rd_i=B00C59RNPE&psc=1
3LCD 16*2 LCD 16*2 1https://www.thingbits.in/products/standard-lcd-16×2-display
4LED BulbsLED Bulbs4https://www.flipkart.com/philips-10-5-w-standard-b22-led-bulb/p/itm6749804877c27?pid=BLBE6GKGHDEYXBG2&lid=LSTBLBE6GKGHDEYXBG2NRCG1V&marketplace=FLIPKART&store=jhg%2Fyqn%2Ffeb&srno=b_1_10&otracker=browse&fm=organic&iid=c61eae6c-179d-494a-b36f-8e4ed9556166.BLBE6GKGHDEYXBG2.SEARCH&ppt=None&ppn=None&ssid=bvrkfdjjnk0000001632933560379
5laptoplaptop1https://www.amazon.in/Lenovo-IdeaPad-Business-Graphics-Platinum/dp/B0999BTTKZ/ref=sr_1_2?dchild=1&qid=1632933668&refinements=p_89%3ALenovo&s=computers&sr=1-2
6BreadboardBreadboard1https://www.electronicscomp.com/gl12-840-points-solderless-breadboard?gclid=CjwKCAjwndCKBhAkEiwAgSDKQT8pZpDgWOcNPcG4vm5xkorj2j1NmHG7bI6YPNIZGlibrYrijf4AcBoCzdsQAvD_BwE
7Jumper WiresJumper Wires40https://www.flipkart.com/arduino-female-male-dupont-20cm-jumper-wire-40pcs-interconnect-electronic-hobby-kit/p/itmf8e5ezvkequ3h?pid=EHKF8DVBG9BXZHHH&lid=LSTEHKF8DVBG9BXZHHHUGSG9J&marketplace=FLIPKART&cmpid=content_electronic-hobby-kit_14498130132_u_8965229628_gmc_pla&tgi=sem,1,G,11214002,u,,,543116155366,,,,c,,,,,,,&ef_id=CjwKCAjwndCKBhAkEiwAgSDKQYwKr3euuMpKCLDJnf-2qgZAQRW2n8hnMZC3nTW73FEqy4E5LPx20RoCuUAQAvD_BwE:G:s&s_kwcid=AL!739!3!543116155366!!!u!297659526158!&gclid=CjwKCAjwndCKBhAkEiwAgSDKQYwKr3euuMpKCLDJnf-2qgZAQRW2n8hnMZC3nTW73FEqy4E5LPx20RoCuUAQAvD_BwE&gclsrc=aw.ds

Arduino uno

This is the new Arduino Uno R3. In addition to all the features of the previous board, the Uno now uses an ATmega16U2 instead of the 8U2 found on the Uno (or the FTDI found on previous generations). This allows for faster transfer rates and more memory. No drivers are needed for Linux or Mac (inf file for Windows is needed and included in the Arduino IDE), and the ability to have the Uno show up as a keyboard, mouse, joystick, etc. Never fear for accidental electrical discharge, either since the Uno R3 also includes a plastic base plate to protect it!

The Uno R3 also adds SDA and SCL pins next to the AREF. In addition, there are two new pins placed near the RESET pin. One is the IOREF that allows the shields to adapt to the voltage provided from the board. The other is not connected and is reserved for future purposes. The Uno R3 works with all existing shields but can adapt to new shields which use these additional pins.

Arduino is an open-source physical computing platform based on a simple i/o board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing, MaxMSP). The open-source IDE can be downloaded for free (currently for Mac OS X, Windows, and Linux).

Single-Channel Relay Module Pin Description

A relay is an electrically operated switch. It consists of a set of input terminals for a single or multiple control signals, and a set of operating contact terminals. The switch may have any number of contacts in multiple contact forms, such as making contacts, break contacts or combinations thereof.

Pin NumberPin NameDescription
1Relay TriggerInput to activate the relay
2Ground0V reference
3VCCSupply input for powering the relay coil
4Normally OpenNormally open terminal of the relay
5CommonThe common terminal of the relay
6Normally ClosedNormally closed contact of the relay

Single-Channel Relay Module Specifications

  • Supply voltage – 3.75V to 6V
  • Quiescent current: 2mA
  • Current when the relay is active: ~70mA
  • Relay maximum contact voltage – 250VAC or 30VDC
  • Relay maximum current – 10A

Standard LCD 16×2 Display

Wanna add an interface to your project? Use the 16×2 standard alphanumeric LCD display, they are extremely common and is a fast way to have your project show status messages.

An LCD (Liquid Crystal Display) screen is an electronic display module and has a wide range of applications. A 16×2 LCD display is a very basic module and is very commonly used in various devices and circuits.

A 16×2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in a 5×7 pixel matrix. The 16 x 2 intelligent alphanumeric dot matrix display is capable of displaying 224 different characters and symbols. This LCD has two registers, namely, Command and Data. Command register stores various commands given to the display.

The data register stores data to be displayed. The process of controlling the display involves putting the data that form the image of what you want to display into the data registers, then putting instructions in the instruction register. In your Arduino project, Liquid Crystal Library simplifies this for you so you don’t need to know the low-level instructions. The contrast of the display can be adjusted by adjusting the potentiometer to be connected across the VEE pin.

General specifications

Minimum logic voltage:4.5 V
Maximum logic voltage:5.5 V
Typical LED backlight voltage drop:4.2 V
Typical LED backlight current:120 mA
Supply current:2 mA

Pinout

PinSymbolFunction
1Vssground (0 V)
2Vdd5 V logic supply voltage
3Vocontrast adjustment
4RSH/L register select signal
5R/WH/L read/write signal
6EH/L enable signal
7-14DB0 – DB7H/L data bus for 4- or 8-bit mode
15A (LED+)backlight anode
16K (LED-)backlight cathode

Final Code

 



#include<LiquidCrystal.h>
LiquidCrystal lcd(14, 15, 16, 17, 18, 19);
#define REALY1 3
#define REALY2 4

void setup()
{
  lcd.begin(16,2);
  pinMode(REALY1, OUTPUT);
  pinMode(REALY2, OUTPUT);
  Serial.begin(9600);
  lcd.setCursor(0,0);
  lcd.print("STREET LIGHT");
Serial.println("STREET LIGHT CONTROL SYSTRM ");
}

void loop()
{
  lcd.setCursor(0,1);
  while(Serial.available())
  {
    char In=Serial.read();
    
    if(In=='1')            // RALAY 1 ON
    {
      digitalWrite(REALY1, HIGH);
      lcd.println("Light 1 ON      ");
      Serial.println("Light 1 ON");
          }
    
     else if(In=='2')            //RALAY 1 OFF
    {
      digitalWrite(REALY1, LOW);
      lcd.print("Light 1 OFF     ");
      Serial.println("Light 1 OFF"); 
    }
    
     else if(In=='3')     // Left
    {
       lcd.print("Light 2 ON        ");
      digitalWrite(REALY2, HIGH);
      Serial.println("Light 2 ON ");
     }
    
     else if(In=='4')     // Right
    {
       lcd.print("Light 2 OFF       ");
      digitalWrite(REALY2, LOW);
      Serial.println("Light 2 OFF");
    }
    
     else if(In=='5')    // stop
    {
      digitalWrite(REALY1, LOW);
      digitalWrite(REALY2, LOW);
      lcd.print("light 1 2 OFF    ");
      Serial.println("Light 1 2 OFF");
    }
    
    else
    {
      
    }
  }
}

By Devilal

Leave a Reply

Your email address will not be published. Required fields are marked *