You are on page 1of 15

Chapter 3

TOOLS AND TECHNIQUES


In this chapter, we will be discussing in detail all the tools used in our work. This
includes hardware, software and simulation tools which aided in this project.

3.1

Hardware used with technical specifications

In this project the list of hardware components used are given below:

18F452 PIC Microcontroller.

GSM Module.

Solar Panel.

Light Dependent Resistor.

IR Sensor

Rain Sensor

Light Emitting Diodes

20x4-Character LCD Module.

Battery.

LM7805 Voltage Regulator.

PC817 Opto-Coupler.

3.1.1 Microcontroller
This section provides an introduction to most common word in the embedded
system microcontroller. It is written to familiarize you with microcontroller
terminology and basic microcontroller architecture.

A microcontroller is a single chip, self-contained computer which incorporates


all the basic components of a personal computer on a much smaller scale.
Microcontrollers are often referred to as single chip devices or single chip computers.

The main consequence of the microcontrollers small size is that its resources are far
more limited than those of a desktop personal computer. In functional terms, a
microcontroller is a programmable single chip which controls a process or system.
Microcontrollers are typically used as embedded controllers where they control part
of a

very

larger system such as an appliance, automobile, scientific instrument or

a computer peripheral.
Microcontrollers are designed to be low cost solutions; therefore using them
can drastically reduce part and design costs for a project. Physically, a microcontroller
is an integrated circuit with pins along each side. The pins presented by a
microcontroller are used for power, ground, oscillator, I/O ports, interrupt request
signals, reset and control. In contrast, the pins exposed by a microprocessor are most
often memory bus signals (rather than I/O ports).

PIC18F452 Microcontroller
Microchip manufacture a series of microcontrollers called PIC (Peripheral
interface controller). There are many different flavours available, some basic low
memory types, going right up through to ones that have Analogue - To - Digital
converters and even PWM built in. A PIC microcontroller is a processor with built in
memory and RAM and you can use it to control your projects (or build projects
around it). So it saves you building a circuit that has separate external RAM, ROM
and peripheral chips. In this project PIC18F452 microcontroller is used and its
specifications are below.

Specification
Data Bus Width:

8 bit

Maximum Clock Frequency: 40 MHz


Package

40-Pin DIP

CPU Speed (MIPS)

10

Program Memory Type

Flash

Program Memory Size:

32 kB

Data RAM Size:

1536 B

Data ROM Size:

256 B

Data ROM Type:

EEPROM

Number of I/Os:

34 I/O

Timers 1 x 8-bit, 3 x 16-bit


Operating Supply Voltage:

2 V to 5.5 V

Temperature Range (C)

-40 to 125

Maximum Operating Temperature:

+ 125 C

The pin diagram of the PIC18F452 is shown below.

3.1.2 GSM
A GSM modem is a specialized type of modem which accepts a SIM card, and
operates over a subscription to a mobile operator, just like a mobile phone. From the
mobile operator perspective, a GSM modem looks just like a mobile phone.

GSM SIM900
SIM900D is a quad-band GSM/GPRS engine that works on frequencies GSM
850MHz, EGSM 900MHz, DCS 1800MHz and PCS 1900MHz. SIM900D features
GPRS multi-slot class 10/ class 8 (optional) and supports the GPRS coding schemes
CS-1, CS-2, CS-3 and CS-4.

Features

High Quality Product (Not hobby grade)

Quad-Band GSM/GPRS 850/ 900/ 1800/ 1900 MHz

Built in RS232 Level Converter (MAX3232)

Configurable baud rate

SMA connector with GSM L Type Antenna.

Built in SIM Card holder.

Built in Network Status LED

Inbuilt Powerful TCP/IP protocol stack for internet data transfer over GPRS.

Audio interface Connector

Most Status & Controlling Pins are available at Connector

Normal operation temperature: -20 C to +55 C

Input Voltage: 5V-12V DC

Specifications

Quad-Band 850/ 900/ 1800/ 1900 MHz

GPRS multi-slot class 10/8

GPRS mobile station class B

Compliant to GSM phase 2/2+ o Class 4 (2 W @850/ 900 MHz) o Class 1 (1


W @ 1800/1900MHz)

Dimensions: 24*24*3mm

Weight: 3.4g

Control via AT commands (GSM 07.07, 07.05 and SIMCOM enhanced AT


Commands)

Low power consumption: 1.0mA (sleep mode)

Operation temperature: -40C to +85 C

3.1.3 Solar Panel


Most simple series connected solar panels are rated into different categories.

15 to 16 volts

30 to 32 solar cells per panel.

16.5 to 17 volts

33 to 34 solar cells per panel.

17 to 20 volts

35 t0 36 solar cells per panel.

We usually use the panels with 36 cells for basic 12 volt lead acid battery
charging. One of the great advantages of building a solar panel is that they can be
built to exactly the voltage and current needed for the project by adjusting the type
and number of cells.
In the solar panel we are simply concerned about what we call watt. The
wattage is simply the open circuited voltage multiplied by the short circuited current.
Panel designers use this figure to rate the components used in the panel and peripheral
components.
For instance, if a panel delivers about 20 volts open circuit and 3.5 amps short
circuit current, the wattage can be 70 watts. Therefore, the system components must
be able to handle the 75 watts at 3.5A and 20V.

3.1.4 LCD Module


In the recent years the LCD is finding widespread use replacing LEDS, seven
segment display. This is due to the declining prices of LCDS the ability to display
numbers, characters, and graphics. This is in contrast to LEDS, which are limited to
numbers and a few characters. Incorporation of a refreshing controller into LCD
thereby relieves the CPU of the task of refreshing the LCD. In contrast the LED must
be refreshed by the CPU to keep displaying the data. There is ease of programming
for characters and graphics.

20x4 Character LCD Module (Green)- JHD 204A


We are using JHD204 LCD module in this project. This is a basic 20 character
by 4 line display. Each character is displayed using 58 dot matrix. It utilizes the
extremely common HD44780 parallel interface chipset.

Display Construction

20 characters*4Lines

Operating voltage VDD

-0.3V to +7 V

Operating Temperature TA

0oC to +60oC

Number of Data lines

8 bit Parallel

Backlight

LED 5.0VDC

3.1.5 Light Dependent Resistor


LDRs or Light Dependent Resistors are very useful especially in light/dark
sensor circuits. Normally the resistance of an LDR is very high, sometimes as high as
1000000 ohms, but when they are illuminated with light resistance drops dramatically.
Electronic opto sensors are the devices that alter their electrical characteristics, in the
presences of visible or invisible light. The best-known devices of this type are the
light dependent resistor (LDR), the photo diode and the phototransistors.

Light dependent resistor as the name suggests depends on light for the
variation of resistance. They are also called as photo conductors, photo conductive
cells or simply photocells. They are made up of semiconductor materials having high
resistance. A light dependent resistor works on the principle of photo conductivity.
Photo conductivity is an optical phenomenon in which the materials conductivity
(hence resistivity) reduces when light is absorbed by the material.
The device consists of a pair of metal film contacts separated by a snakelike
track of cadmium sulphide film, designed to provide the maximum possible contact
area with the two metal films. The structure is housed in a clear plastic or resin case,

to provide free access to external light. Practical LDRs are available in variety of sizes
and packages styles, the most popular size having a face diameter of roughly 10mm.
Practical LDR and its symbol is shown in below figure.

Fig. 1.2: Practical LDR.

Recovery rate:

When an LDR is brought from a certain illuminating level into total darkness,
the resistance does not increase immediately to the dark value. When light is incident
on a photocell it usually takes about 8 to 12ms for the change in resistance to take
place, while it takes seconds for the resistance to rise back again to its initial value
after removal of light. This phenomenon is called as resistance recovery rate.
The recovery rate is specified in k ohm/second and for current LDR types it is
more than 200k ohm/second. A LDR may be connected either way round and no
special precautions are required when soldering.

Darkness: Maximum resistance, about 1Mohm.

Very bright light: Minimum resistance, about 100 ohm.

Application:
LDRs have low cost and simple structure. They are often used as light sensors. They
are used when there is a need to detect absences or presences of light like in a camera

light meter. Used in smoke detection, automatic lighting control, burglar alarm
systems and camera (electronic shutter).

3.1.6 IR Sensor
An infrared sensor is an electronic instrument which is used to sense certain
characteristics of its surroundings by either emitting and/or detecting infrared
radiation. Infrared sensors are also capable of measuring the heat being emitted by an
object and detecting motion.
An IR sensor consists of an emitter, detector and associated circuitry. The
circuit required to make an IR sensor consists of two parts; the emitter circuit and the
receiver circuit.

The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an
IR photodiode which is sensitive to IR light of the same wavelength as that emitted by
the IR LED. When IR light falls on the photodiode, its resistance and correspondingly,
its output voltage, change in proportion to the magnitude of the IR light received. This
is the underlying principle of working of the IR sensor.

3.1.7 Rain Sensor


A rain sensor or rain switch is a switching device activated by rainfall. The
circuit is designed with two lines that are tracked with very short distance. When rain
drops falls on this circuit, the track may become short circuit. It gives the
corresponding signal to related circuit in order to find the rain fall.

3.1.8 Battery
We are using 12v 7AH maintenance free lead acid battery in this project which
is charged by solar energy.

Specifications

Nominal Voltage: 12v

Nominal Capacity @ 20hr rate (AH): 7.0

Discharge Current @ 20hr rate (mA): 350

Dimensions: 15.1 x 6.5 x 9.4cm (5.95 x 2.56 x 3.7")

Weight: 2.2kg

Battery Technology: Lead Acid

Sealed and non-spillable AGM battery

Maintenance-free

Economical
The high watt-hour per pound value is made possible by the materials used in a sealed
lead-acid battery; they are readily available and low in cost.
Long Service Life
Under normal operating conditions five to six years of dependable service life can be
expected in standby applications or between 200 and 1000 charge/discharge cycles
depending upon depth of discharge.
Rugged Construction
The high-impact resistant battery case is made of non- conductive plastic with
superior resistance to shock, vibration, chemicals, and heat.
Capacity
The capacity of a battery, expressed in ampere-hours (AH), is the total amount of
electrical energy available from a fully charged cell. Its value depends on the
discharge current, the temperature during discharge, the final cut-off voltage, and the
general history of the battery

3.1.9 Voltage Regulator


A voltage regulator is designed to automatically maintain a constant voltage
level. The voltage regulator is needed to keep voltages within the prescribed range
that can be tolerated by the electrical equipment using that voltage. A small device or
circuit that regulates the voltage fed to the microprocessor. The power supply of most
PCs generates power at 5 volts but most microprocessors require a voltage below 3.5
volts. The voltage regulator's job is to reduce the 5 volt signal to the lower voltage

required by the microprocessor. Typically, voltage regulators are surrounded by heat


sinks because they generate significant heat.

LM7805
7805 is a voltage regulator integrated circuit. It is a member of 78xx series of
fixed linear voltage regulator ICs. The voltage source in a circuit may have
fluctuations and would not give the fixed voltage output. The voltage regulator IC
maintains the output voltage at a constant value. The xx in 78xx indicates the fixed
output voltage it is designed to provide. 7805 provides +5V regulated power supply.
Capacitors of suitable values can be connected at input and output pins depending
upon the respective voltage levels.

Pin Description:

Pin

Function

Name

Input voltage (5V-18V)

Input

Ground (0V)

Ground

Regulated output; 5V (4.8V-5.2V)

Output

No

3.1.10 Optocoupler

10

In electronics, an opto-isolator, also called an optocoupler, photocoupler, or


optical isolator, is a component that transfers electrical signals between two isolated
circuits by using light. Opto-isolators prevent high voltages from affecting the system
receiving the signal.

PC817 Optocoupler
It is a low voltage, high density optocoupler. It is good to use with low voltage
microcontroller system for isolating inputs and outputs voltages.

Specifications:

CTR Min: 50%

Input Output isolation: 5000 Vrms

No of channel: 1

Input Forward current: 50mA

Output collector emitter voltage: 35V

Output collector current: 50mA

Operating Temperature: -30 to 100 Degree centigrade

Case style: PDIP

Number of Pins: 4

Output type: Phototransistor

Lead Spacing: 2.54mm

Output Power Dissipation: 200mW

Forward Voltage: 1.2V @ 20mA

3.2

Software(s), simulation tool(s) used

Softwares used are:

Easy PC

11

PIC C Compiler

3.2.1 Easy PC
Easy-PC is packed with timesaving features to make the task of PCB design
and layout so much quicker and more pleasurable. It is simple to learn and
understand. Easy-PC is one of the most developed products. It is highly recommended
for its ease of use. Unlike some PCB design products, all the electrical connection
points in Easy-PC are truly connected. This might not sound that impressive but this
ensures that electrical design integrity is maintained throughout the design process,
from Schematic to PCB design editors. Design is always in-sync. Forward and
backward annotation ensures there are no human errors introduced at any stage. It
creates error free designs. An important feature of Easy-PC is the Design Rule
Check which designers are advised to use when theyve completed the layout, as
they have complete control over spacings such as pad to pad and track to pad etc. The
design rule check is intelligent enough to discover any breaks and so will highlight
any rules that have been broken. Easy-PC is provided with a standard library set and
graphical tools to create them.

Key Features

Easy-to-use

Fully integrated Schematic Capture and PCB Layout

True 32-bit Windows application

High-resolution (1m square design area, 1/10th degree angular rotation, 10


micron resolution)

Library editing tools including library creation Wizards

Unlimited elements per design

Multi-level Undo and Redo

Cut, Copy, Paste and Duplicate of all design data

Fast-find of components, nets and errors

12

Customizable toolbars, menus and shortcut keys

Component Values editor

PCB Layout Features

Integrated component Auto-place

Shape-based copper pour

Full, split and partial power planes

3D visualization of board

Automatic track smoothing mode

Star/Delta points

Apply Layout Pattern

Automatic component rename

Supports SMT, PTH and mixed technology, and components on both sides of
board

Unlimited layers and user-defined layer types

Fast switch of layer visibility

Dimensioning

Full Windows printer support

Output to PDF without the need for a separate driver

3.2.2 Compiler
A PIC compiler (or any compiler) is a computer program or set of programs
that transforms source code written in a programming language (the source language)
into another computer language. Source code written in a high level language is
translated into machine code that the microcontroller understands. The most common
reason for converting a source code is to create an executable program.

PIC C Compiler

13

CCS developed the first C Compiler for Microchip microcontrollers over 20


years ago. CCS C Compilers are designed specifically for the PIC MCU architecture,
unlike competitive compilers based on a GNU or common engine with a generic code
generator. Every aspect of the CCS C Compiler is specially optimized for the PIC
MCU. PIC compilers include Standard C Constructs, numerous Pre-Processor
Functions, and the largest library of Built-In Functions. This provides developers with
unique access to device hardware features at the embedded C language level. C syntax
and special functions have a uniform syntax across all chip families, allowing for
migration to a new chip trivial. The CCS C compiler includes a library of example
programs for many common applications. Each example program contains a header
with instructions on how to run the example, and if necessary, the wiring instructions
for interfacing external devices.

Key Features

Easily migrate between all Microchip PICMCUs devices

Minimize development time with peripheral drivers and standard C constructs

C++ style input/output streams with full data formatting to any device or for
strings

Use CCS libraries and object code royalty free

Convenient functions like #bit and #byte allow C variables to be placed at


absolute addresses

The integral one-bit type (Short Int) permits the compiler to generate very
efficient Bit-oriented code

Easily define, set-up and manage interrupts

3.3

Summary

Summary of the chapter.

14

15

You might also like