Você está na página 1de 24

Project Title

MULTIPLE ON AND OFF TIME PROGRAMMED INDUSTRIAL


LOAD

Under the Guidance of

Submitted by
ABSTRACT
Power Saving Using Time Operated Electrical Appliance Controlling
System is a reliable circuit that takes over the manual task of switch on/off
the electrical devices with respect to time.
It uses Real Time Clock (RTC) which tracks the Real Time.
When this time equals to the programmed ON time, then the
corresponding Relay for the device is switched ON and then OFF as per the
OFF time that finally switches the load ON or OFF.
Multiple ON/OFF times entry is the biggest advantage with this project.
Matrix keypad helps entering the time while relays used with relay drivers
for the loads.
The complete circuit has its on-board power supply.
PROJECT BLOCK DIAGRAM
HARDWARE COMPONENTS

POWER SUPPLY BLOCK


VOLTAGE REGULATOR (LM 7805)
MICROCONTROLLER (AT89S52/AT89C51)
DS1307 RTC
MATRIX KEYPAD
RELAY
SEVEN SEGMENT
BC547
RESISTORS
CAPACITORS
POWER SUPPLY
230 V AC Bridge rectifier 5v Regulator
50 Hz

5V
DC

Filter(470f)
12V step down
transformer
MICROCONTROLLER

It is a smaller computer
Has on-chip RAM, ROM, I/O ports...

CPU RAM ROM


A single chip
Serial
I/O Timer COM Microcontroller
Port
Port
INTERNAL STRUCTURE OF A MICRO CONTROLLER-
AT89S52/51

External interrupts
On-chip Timer/Counter
ROM for
Interrup program On-chip Timer 1 Counter
t code RAM Inputs
Control Timer 0

CPU

Bus Serial
4 I/O Ports Port
OSC Control

P0 P1 P2 P3 TxD RxD

Address/Data
Features of AT89S51/52
Compatible with MCS-51 Products

8K Bytes of In-System Programmable (ISP) Flash Memory

Endurance: 10,000 Write/Erase Cycles

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Interrupt Recovery from Power-down Mode

Watchdog Timer

Dual Data Pointer


Pin Description
RELAY

IT IS A ELECTRO MAGNETIC SWITCH

USED TO CONTROL THE ELECTRICAL DEVICES

COPPER CORE MAGNETIC FLUX PLAYS MAIN ROLE HERE


The relay's switch connections are usually labeled COM, NC and
NO:
COM = Common, always connect to this; it is the moving part of
the itch.
NC = Normally Closed, COM is connected to this when the relay
coil is off.
NO = Normally Open, COM is connected to this when the relay
coil is on
RELAY DRIVER (ULN 2003)

ULN2003 is a high voltage and high current Darlington


transistor array
It consists of seven NPN Darlington pairs that feature high-
voltage outputs with common-cathode Clamp diode for
switching inductive loads.
The ULN2003 has a 2.7kW series base resistor for each
Darlington pair for operation directly with TTL or 5V
CMOS devices.
Current, Output Max:500mA
Voltage, Input Max:5V
Voltage, Output Max:50V
Fig: ULN 2003
Keypad
A keypad is a set of buttons arranged in a block or
"pad" which usually bear digits, symbols and usually a
complete set of alphabetical letters. If it mostly contains
numbers then it can also be called a numeric keypad.

In order to detect which key is pressed from the matrix,


the row lines are to be made low one by one and read
the columns. Assume that if Row1 is made low, then
read the columns.

If any of the key in row1 is pressed then


correspondingly the column 1will give low that is if
second key is pressed in Row1, then column2 will give low.
DS1307 RTC
RTC?

The RTC chip is a specialized chip that just keeps track of time

It runs on a battery and keeps time for you even when there is a power
outage!

Using an RTC, you can keep track of long timelines, even if you
reprogram your microcontroller or disconnect it from USB or a power
plug.

The RTC we'll be using is the DS1307 . It's low cost, easy to solder,
and can run for years on a very small coin cell.
FEATURES OF DS1307
Real time clock counts seconds, minutes, hours, date of month, month, day of
week and year with leap year compensation valid up to 2100
56 byte nonvolatile RAM for general data storage
2-wrire interface (I2C)
Automatic power fail detect
Consumes less than 500 nA for battery back-up at 25'C
BC547 (NPN Transistor)

The BC547 transistor is an NPN Epitaxial


Silicon Transistor.
It is used in general-purpose switching and
amplification BC847/BC547 series 45 V, 100
mA NPN general-purpose transistors.

The ratio of two currents (Ic/Ib) is called the DC Current Gain of


the device and is given the symbol of hfe or nowadays Beta, ().
The current gain from the emitter to the collector
terminal, Ic/Ie, is called Alpha, (), and is a function of the
transistor itself
LIQUID CRYSTAL DISPLAY (LCD)

Most common LCDs connected to the microcontrollers are


16x2 and 20x2 displays.
This means 16 characters per line by 2 lines and 20
characters per line by 2 lines, respectively.
The standard is referred to as HD44780U, which refers to
the controller chip which receives data from an external
source (and communicates directly with the LCD.
LCD BACKGROUND

If an 8-bit data bus is used the LCD will require 11 data lines
(3 control lines plus the 8 lines for the data bus)
The three control lines are referred to as EN, RS, and RW
EN=Enable (used to tell the LCD that you are sending it data)
RS=Register Select (When RS is low (0), data is treated as a command)
(When RS is High(1), data being sent is text data )
R/W=Read/Write (When RW is low (0), the data written to the LCD)
(When RW is low (0), the data reading to the LCD)
WORKING OF PROJECT

The project uses one real time clock IC DS1307 i.e., Interface to the
MC pin 27 & 28. IT uses a crystal of 32.768 KHz to deliver timing
reference.
A matrix keypad is used for setting the time, relay ON time & OFF
time.
The relay is driven by pin 25 of MC through driving transistor BC547.
Seven segment LEDs are parallel connected to Port 0 through driving
transistors four numbers BL547 to the respective, anode seven segment
LED display as the operation of which is explained before.
Soft ware Requirements

Keil an ARM Company makes C compilers, macro assemblers, real-time


kernels, debuggers, simulators, integrated environments, evaluation
boards, and emulators for ARM7/ARM9/Cortex-M3,
XC16x/C16x/ST10, 251, and 8051 MCU families.

Compilers are programs used to convert a High Level Language to


object code. Desktop compilers produce an output object code for the
underlying microprocessor, but not for other microprocessors.
i.e the programs written in one of the HLL like C will compile the
code to run on the system for a particular processor like x86
(underlying microprocessor in the computer).

For example compilers for Dos platform is different from the


Compilers for Unix platform So if one wants to define a compiler
then compiler is a program that translates source code into object
code.

Você também pode gostar