Sie sind auf Seite 1von 68

ABSTRACT:

With the development of android app, the concept of smart device has become
more and more popular. Mobile phone is not only the common smart device. There
are platform designed to connect sensor data with users daily life. Although
electronic appliances are becoming more intelligent day by day. Not only
manufacturers are promoting new smart appliances; there are also many
Smartphone oriented remote controller products. Current products are having some
platform compatibility problems in addition to those problems user interaction in
such systems are also becoming more and more complex. Here the work proposed
is an approach to enhance old appliances and the controlling experience through an
android app based visitor counter. Appliances are controlled using sensors. The
sensor data are processed by single-board renesas microcontroller and Delivered
to mobile applications through GSM module. The results of implementation and
experimentation has shown the proposed system can provide more android
application possibilities daily life.

CONTENTS:

1. INTRODUCTION
2. BLOCK DIAGRAM
3. INTRODUCTION TO SOLAR PANNEL
3.1. CRYSTAL SILICON MODULES
4. POWER SUPPLY SYSTEM
4.1. LEAD ACID BATTERY
4.2. BATTERY CONSTRUCTION

5. LM317 ADJUSTABLE REGULATOR


5.1. LM 358 DIP PIN DIAGRAM
5.2. LM 358 FEATURES
5.3. APPLICATIONS

6. ULTRASOUND MOTION SENSOR


6.1. INTRODUCTION
6.2. PRODUCT FEATURES
6.3. TECHNICAL SPECIFICATION
6.4. OPERATION

7. ULTRASONIC RANGING MODULE HC-SR04


7.1. PRODUCT FEATURES
7.2. ELECTRIC PARAMETERS
7.3. TIMING DIAGRAM

8. MAX232

9. GSM INTRODUCTION
9.1. STRUCTURE OF GSM
9.2. SIM 300 AT COMMANDS

10. USB TO SERIAL CONVERTER


11. RELAY FOR BULB
12. PIR SENSOR

13. RENESAS MICROCONTROLLER


13.1. ARCHITECTURAL DIAGRAM
13.2. PIN DIAGRAM FEATURES
13.3. PROGRAM STATUS WORD
13.4. RENESAS 64PIN RF5100LEAXXXFB

14. SEVEN SEGMENT DISPLAY


14.1. FEATURES
14.2. APPLICATIONS

15. SOFTWARE EXPLANATION


15.1. ECLIPSE
15.2. ANDROID BASIC
1. INTRODUCTION:
The main aim of this project is to minimize the power consumption with the help
of Sensor module, PIR sensor module. Nowadays, there are huge amount of
electricity consumption in conference and seminar halls even when the people
count is less. To overcome this quandary, this project gives the best solution by
monitoring the count of number of persons inside the conference/seminar halls.
Using android , according to number of visitors in a room, the bulbs are controlled
and automatically controls the lights based on the intensity of the room.

2. BLOCK DIAGRAM:

LCD

Ultrasonic IN 7 Seg unit

Renesas

Ultrasonic OUT GSM

Solar Panel 12V Circuit Battery

Android app
PIR motion Bulb
COMPONENTS USED:
1. RENESAS Microcontroller
2. ALCD (16x2)
3. Ultrasonic Sensors
4. 7 seg unit
5. GSM
6. Solar Panel
7. Circuit
8. Battery
9. PIR motion
10. Bulb

SOFTWARES USED:

1. Embedded C
2. Renesas flash programmer
3. Android app

DESCRIPTION:
R5F100LE microcontroller from Renesas is used to implement this project.
Microcontroller acts as the heart of this project, which controls the whole system.
It contains of Flash ROM 64KB, RAM 4KB and Data Flash 4KB, and it has High
speed on-chip oscillator, Self-reprogrammable under software control, GPIO’s, 3
UART’s, Simplified I2C, 10 bit resolution ADC, ISP programming support etc.

 In this concept ultrasonic in and ultrasonic out is used to count the


number of peoples entering into the library.
 Counting is stored and updated through android app and in library if
any motion the bulb gets ON.PIR sensor is used to detect motion in
library

 Solar panel is used to supply the power to the this project.

 GSM module is used perform wireless communication for android


app

Methodology

Block
Diagram

Hardware
testing as per
project

Test Code
preparation for
Peripherals

Logic
Development
as per project

Final Testing of
the project as
per Conditions
This section introduces the methodology involved in the design and construction of the Digital
Bidirectional Visitor Counter (DBVC). Using the Takoradi Polytechnic Library crowd
management situation as a case study, it was realized that the library’s capacity often gets
exceeded during its peak usage period (examination period) and therefore makes the
environment uncomfortable for learning. This problem was studied by visually observing
students reaction anytime the library’s capacity was exceeded. Another study was made on the
Malcom tragedy incident, whereby the exact number of people trapped in the collapse building
was unknown. False information about the number of people trapped was given to the rescue
team at their arrival, but they ended up rescuing more survivors than the expected number
revealed to them. This means a lot of people could have died if the rescue team relied on the
information given to them.

3. INTRODUCTION TO SOLAR PANNEL:

A solar panel (also solar module, photovoltaic module or photovoltaic panel) is a packaged,
connected assembly of photovoltaic cells. The solar panel can be used as a component of a larger
photovoltaic system to generate and supply electricity in commercial and residential applications.

Because a single solar panel can produce only a limited amount of power, many installations
contain several panels. A photovoltaic system typically includes an array of solar panels, an
inverter, and sometimes a battery and interconnection wiring.

A solar cell (also called photovoltaic cell or photoelectric cell) is a solid state electrical device
that converts the energy of light directly into electricity by the photovoltaic effect.

Fig: A solar cell made from a mono crystalline silicon wafer


Solar panels use light energy (photons) from the sun to generate electricity through the
photovoltaic effect. The structural (load carrying) member of a module can either be the top layer
or the back layer. The majority of modules use wafer-based crystalline silicon cells or thin-film
cells based on cadmium telluride or silicon. The conducting wires that take the current off the
panels may contain silver, copper or other non-magnetic conductive transition metals.

Currently the best achieved sunlight conversion rate (solar panel efficiency) is around 21% in
commercial products,[3] typically lower than the efficiencies of their cells in isolation. The
energy density of a solar panel is the efficiency described in terms of peak power output per unit
of surface area, commonly expressed in units of watts per square foot (W/ft 2). The most efficient
mass-produced solar panels have energy density values of greater than 13 W/ft2 (140 W/m2).

The solar cells positive terminal is connected through the diode to the positive terminal of the
1.2V battery. If the voltage of the solar cell drops below 1.4 volts then with the 0.2V the
blocking diode takes there won’t be enough potential to charge the 1.2V battery. The purpose of
the diode is to disallow current dissipating out from the battery to the solar cell when this low
voltage situation occurs in the solar cell.

How to charge a battery using solar panel

4. POWER SUPPLY SYSTEM

4.1. LEAD ACID BATTERY


The lead-acid battery was invented in 1859 by French physicist Gaston Planté and is the
oldest type of rechargeable battery. Despite having a very low energy-to-weight ratio and a low
energy-to-volume ratio, its ability to supply high surge currents means that the cells have a
relatively large power-to-weight ratio. These features, along with their low cost, makes it
attractive for use in motor vehicles to provide the high current required by automobile starter
motors.

WORKING OF LEAD ACID BATTERY:

The storage battery or secondary battery is such battery where electrical energy can be
stored as chemical energy and this chemical energy is then converted to electrical energy as
when required. The conversion of electrical energy into chemical energy by applying external
electrical source is known as charging of battery. Whereas conversion of chemical energy into
electrical energy for supplying the external load is known as discharging of secondary battery.
During charging of battery, current is passed through it which causes some chemical changes
inside the battery. This chemical changes absorb energy during their formation.

When the battery is connected to the external load, the chemical changes take place in
reverse direction, during which the absorbed energy is released as electrical energy and supplied
to the load. Now we will try to understand principle working of lead acid battery and for that
we will first discuss about lead acid battery which is very commonly used as storage battery or
secondary battery.
CHARGING:

In the fully charged state, the negative plate consists of lead, and the positive plate lead
dioxide, with the electrolyte of concentrated sulfuric acid.

Overcharging with high charging voltages generates oxygen and hydrogen gas by electrolysis of
water, which is lost to the cell. The design of some types of lead-acid battery allow the
electrolyte level to be inspected and topped up with any water that has been lost.

Due to the freezing-point depression of the electrolyte, as the battery discharges and the
concentration of sulfuric acid decreases, the electrolyte is more likely to freeze during winter
weather when discharged.

DISCHARGING:
In the discharged state both the positive and negative plates become lead(II) sulfate (PbSO4),
and the electrolyte loses much of its dissolved sulfuric acid and becomes primarily water. The
discharge process is driven by the conduction of electrons from the negative plate back into the
cell at the positive plate in the external circuit.
Negative plate reaction
Pb(s) + HSO−4(aq) → PbSO4(s) + H+(aq) + 2e− Release of two conducting electrons gives lead
electrode a net negative charge

• As electrons accumulate they create an electric field which attracts hydrogen ions and repels
sulfate ions, leading to a double-layer near the surface. The hydrogen ions screen the charged
electrode from the solution which limits further reactions unless charge is allowed to flow out of
electrode.

5. LM317 ADJUSTABLE REGULATOR:

The LM117 series of adjustable 3-terminal positive voltage regulators is capable of


supplying in excess of 1.5A over a 1.2V to 37V output range. They are exceptionally easy to use
and require only two external resistors to set the output voltage. Further, both line and load
regulation are better than standard fixed regulators. Also, the LM117 is packaged in standard
transistor packages which are easily mounted and handled.
the LM117 is useful in a wide variety of other applications. Since the regulator is
``floating'' and sees only the input-to-output differential voltage, supplies of several hundred
volts can be regulated as long as the maximum input to output differential is not exceeded, i.e.,
avoid short-circuiting the output.

+5V +3.3V
U1 LM317 - 3.3V

3 2
VIN VOUT

ADJ
1

1
1
+ C1 + C2
470uF/25V 10uF/63V
2

2
1 R2 2
220E
1
R3
330E
2

The LM358 series consists of two independent, high gain, internally frequency compensated
operational amplifiers which were designed specifically to operate from a single power supply
over a wide range of voltages. Operation from split power supplies is also possible and the low
power supply current drain is independent of the magnitude of the power supply voltage.
The LM358 are available in SMD and DIP packages

5.3.Applications:

Light Dependent resistor forms the –ve i/p(2) to the opamp via a voltage divider network.
Pin3 , the +ve i/p(3) is pulled high through a potentiometer.
When there is enough light the LDR resistance is quite less
i/p 3 is adjusted for a voltage to keep the o/p high generally (LED ON).
When surrounding of the LDR is darkened it develops more resistance, Increasing the voltage at
–ve i/p.
So the o/p goes low and LED turns off.
Thus the LDR sensing can be done.
6. ULTRASOUND MOTION SENSOR

6.1. Introduction:
Used to detect the move of human or object. Suitable for indoor and outdoor burglar-proof
application, vehicle burglar-proof application, ATM surveillance camera, warehouse surveillance
camera, and safety warning application in dangerous site where voltage and temperature exist.

6.2. Product Features:


1. High sensitivity, Reliability and stability.

2. Extreme-temp Resistant, vibration-proof, etc.

1. Power In: positive+

2.Out: signal output


3. Power In: negative –

6.3.Main Technical Specifications


1. Power Voltage: DC 6-12V
2. Quiescent current: Less than 2mA
3. Output Level: Low 0V
4. Sensing Angle: no greater than 15 degree
5. Sensing Distance: 2mm-3m

6.4.OPERATION:

The timing diagram of HC-SR04 is shown. To start measurement, Trig of SR04 must receive a
pulse of high (5V) for at least 10us, this will initiate the sensor will transmit out 8 cycle of
ultrasonic burst at 40kHz and wait for the reflected ultrasonic burst. When the sensor detected
ultrasonic from receiver, it will set the Echo pin to high (5V) and delay for a period (width)
which proportion to distance. To obtain the distance, measure the width (Ton) of Echo pin.

Time = Width of Echo pulse, in us (micro second)


 Distance in centimeters = Time / 58
 Distance in inches = Time / 148
 Or you can utilize the speed of sound, which is 340m/s

The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats or
dolphins do. It offers excellent range accuracy and stable readings in an easy-to-use package. It
operation is not affected by sunlight or black material like Sharp rangefinders are (although
acoustically soft materials like cloth can be difficult to detect).

Ultrasonic Ranging Module HC-SR04 provides 2cm-300cm non-contact distance sensing


capabilities,Ranging accuracy up to 3mm; module comprises an ultrasonic transmitter, a receiver
and a control circuit.
Method of use:

Supply module with 5V, the output will be 5V while obstacle in range, or 0V if not. The out
pin of this module is used as a switching output when anti-theft module, and without the feet
when ranging modules.
Note: the module should be inserted in the circuit before power is ON, which avoids
producing high level of miss operation; if not, then power again.

Module Working Principle:

1.Adopt IO trigger through supplying at least 10us sequence of high level signal.
2.The module automatically send eight 40kHz square wave and automatically detect whether
receive the returning pulse signal.
3.If there is signals returning, through outputting high level and the time of high level continuing
is the time of that from the ultrasonic transmitting to receiving. Test distance = (high level time *
sound velocity (340M/S) / 2.

Note: This module is not suitable to connect with electric power, if you need to connect
this module with electronic power, then let the GND terminal of this module to be
connected first, otherwise, it will affect the normal work of the module.

7.2. Electric Parameter

Working Voltage DC 5 V

Working Current 15mA

Working Frequency 40Hz


Max Range 4m

Min Range 2cm

Measuring Angle 15 degree

Trigger Input Signal 10uS TTL pulse

Echo Output Signal Input TTL lever signal and the range in
proportion
Dimension 45*20*15mm

Vcc Trig Echo GND

7. MAX 232:

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to


supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs
to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical
hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels
into EIA-232 levels.
Features

 Meet or Exceed TIA/EIA-232-F and ITU Recommendation V.28


 Operate With Single 5-V Power Supply
 Operate Up to 120 Kbit/s
 Two Drivers and Two Receivers
 ±30-V Input Levels
 Low Supply Current . . . 8 mA Typical
 Designed to be Interchangeable With Maxim MAX232
 ESD Protection Exceeds JESD 22 – 2000-V Human-Body Model (A114-A)
 Applications
o TIA/EIA-232-F
o Battery-Powered Systems
o Terminals
o Modems
o Computers
1. INTRODUCTION TO GSM:

GSM stands for Global System for Mobile Communications formerly called as Groupe Special
Mobile.
This is a standard set developed by the European Telecommunications Standards Institute (ETSI)
to describe technologies for second generation (or "2G") digital cellular networks.
The GSM standard initially was used originally to describe switched circuit network for full
duplex voice telephony to replace first generation analog cellular networks
The standard was expanded over time to include first circuit switched data transport, then packet
data transport via GPRS(General packet radio service). Packet data transmission speeds were
later increased via EDGE. The GSM standard is succeeded by the third generation (or "3G")
UMTS standard developed by the 3GPP. GSM networks will evolve further as they begin to
incorporate fourth generation (or "4G") LTE Advanced standards. "GSM" is a trademark owned
by the GSM Association.
GSM networks operate in a number of different carrier frequency ranges (separated into GSM
frequency ranges for 2G and UMTS frequency bands for 3G), with most 2G GSM networks
operating in the 900 MHz or 1800 MHz bands. Where these bands were already allocated, the
850 MHz and 1900 MHz bands were used instead (for example in Canada and the United
States). In rare cases the 400 and 450 MHz frequency bands are assigned in some countries
because they were previously used for first-generation systems.

India GSM 900 5 carriers

GSM 900/1800 3 carriers

Regardless of the frequency selected by an operator, it is divided into timeslots for individual
phones to use. This allows eight full-rate or sixteen half-rate speech channels per radio
frequency. These eight radio timeslots (or eight burst periods) are grouped into a TDMA frame.
Half rate channels use alternate frames in the same timeslot. The channel data rate for all 8
channels is 270.833 Kbit/s, and the frame duration is 4.615 ms.
The transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and 1
watt in GSM1800/1900

One of the key features of GSM is the Subscriber Identity Module, commonly known as a SIM
card. The SIM is a detachable smart card containing the user's subscription information and
phone book. This allows the user to retain his or her information after switching handsets.
Alternatively, the user can also change operators while retaining the handset simply by changing
the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only
a SIM issued by them; this practice is known as SIM locking.
We are be using SIM300 GSM Module in our Project.
SIM300 is a Tri-band GSM/GPRS engine from SIMCOM Ltd., that works on frequencies
EGSM 900 MHz, DCS 1800 MHz and PCS 1900 MHz SIM300 features GPRS multi-slot class
10/ class 8 (optional) and supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4.
With a tiny configuration of 40mm x 33mm x 2.85 mm, SIM300 can fit almost all the space
requirement in an application, such as Smart phone, PDA phone and other mobile device.
The physical interface between SIM300 and the mobile application is through a 60 pins board-to-
board connector, which provides all hardware interfaces from module to customer’s boards
except the RF antenna interface.

 The keypad and SPI LCD interface will give you the flexibility to develop
customized applications.
 Two serial ports can help you easily develop your applications.
 Two audio channels include two microphones inputs and two speaker outputs. These
audio interfaces can be easily configured by AT command.
 One ADC input
 Two GPIO ports and SIM card detection port

Both 1.8V and 3.0V SIM Cards are supported. The SIM interface is powered from an
internal regulator in the module having nominal voltage 2.8V. All pins reset as outputs driving
low.
Reference circuit of 6PIN SIM card

You can use AT Commands "AT" meaning attention, to communicate with the SIM card. The
SIM interface supports the functionality of the GSM Phase 1 specification and also supports the
functionality of the new GSM Phase 2+ specification for FAST 64 kbps SIM (intended for use
with a SIM application Tool-kit).
The "AT" or "at" prefix must be set at the beginning of each command line.
To terminate a command line enter <CR>.
Commands are usually followed by a response that includes
”<CR><LF><response><CR><LF>”.

Testing and General commands for GSM

1. Steps to test the GSM Module

We can use the PC Hyper Terminal to interact with the GSM Module.
 First insert the SIM card to the GSM Module,

 Connect the Serial cable –RS232 to the PC via DB9 pin connector on the GSM Module.

 Give the power supply. The power supply indicating LED will be ON continuously.

 Another LED on the Module starts blinking to indicate the availability of network.

If the network is available then the delay between the blinking is less.
If the network is not available then the delay between the blinking is more.
 Each GSM modem will have a unique id called IMEI.

 Open Hyper Terminal in the PC , apply the below settings

Connect using  COM1


Bits per second  9600
Data bits  8
Parity  None
Stop bits  1
Flow control  None

 Type AT on Hyper Terminal and press ENTER  OK will be display as a response from
the GSM Module.

AT
OK
Below are few more commands and response from the Module

AT+CGMI - To check Manufacturer Identification


FLYFOT M260 MODEM
OK

AT+CGMM
MULTIBAND 900 1800 1900
OK

1.1. SIM 300 AT Commands in Detail:


AT+CBC? - To check for Battery Status <n> +CBC: n,m
0: battery not in OK
AT+CBC=? charge +CBC: (0-3), (0-100)
1: battery in OK
AT+CBC charge +CBC: n,m
2: battery full OK
AT+CBC=1 3: battery low +CME ERROR 3
<m> Note: not support
0: battery level
0
25: battery level
1
50: battery level
2
75: battery level
3
100: battery
level 4
This command
AT+CGMI gives the
manufacturer
identification.
AT+CGMI FLYFOT MODEM
Note: Get manufacture identification OK
AT+CGMI=? Note: Command valid, FLYFOT mode
AT+CGMI? OK
AT+CGMI=1 +CME ERROR 3
Note: not support
AT+CPAS This command
returns the
activity status
of the mobile
equipment.
AT+CPAS <pas> +CPAS: <pas>
Note :Current activity status 0: ready (allow OK
AT+ CPAS? commands +CME ERROR 3
AT+ CPAS=? from TA/TE) Note: not support
AT+ CPAS=1 1: unavailable
(does not allow
commands)
2: unknown
3: ringing
(ringer is
active)
4: call in
progress
5: asleep (low
functionality)
AT+CMGS= <address><CR> The <address>
field is the
address of the
terminal to
which the
message is sent.
To send the
message,
simply type,
<ctrl-Z>
AT+CMGS=.28.<CR> +CMGS: <mr>
0031000BA13105119226F40000AD0AA8C3F6 OK
30885E9ED301 <ctrl-Z> Note : Successful transmission
AT+CNMI=<mode>,<mt>,<bm>,<ds>,<bfr> This command
selects the
procedure for
message
reception from
the network.

AT+CNMI=2,1,0,0,0 <mode>: OK
Note : <mt>=1 controls the Note: message received and saved in si
processing of the SMS-DELIVERS with unsolicited
unsolicited +CMTI: SM, <index>
result codes OK
AT+CNMI=2,2,0,0,0 Important Note: message received, then route the
Note : <mt>=2 note: only SMS-DELIVERS with unsolicited resu
<mode>=2 is +CMT: [<alpha>,] <length><CR><LF
supported. OK
<mt>: sets the Note: SMS-STATUS-REPORTS are ro
AT+CNMI=2,0,0,1,0 result code unsolicited code:
Note : <ds>=1 indication +CDS : <length><CR><LF><pdu>
routing for OK
SMS- Note: No SMS-STATUS-REPORTs ar
AT+CNMI=2,0,0,0,0 DELIVER +CNMI: 2,2,0,1,0
Note : <ds>=0 indications. Will return the previous status.
<bm>: defines +CNMI: (0-3),(0-3),(0-3),(0-1),(0,1)
at+cnmi? the rules for
Note : Read storing the
at+cnmi=? received CBMs
(Cell Broadcast
Message) types.
<ds>for SMS-
STATUS-
REPORTs.
Default is 0.
<bfr>Default is
0.
AT+CMGR=<index> This command
allows the
application to
read stored
messages
AT+CMGR=1 +CMGR: 1,,24
Note : Read the message 0891683108100005F0040D916831857
F900005001429042802304B0182C06
OK
AT+CMGL=<stat> This command <stat>possible values
allows the received unread messages(0)
application to received read messages(1)
read stored stored unsent messages(2)
messages, by stored sent messages(3)
indicating the all messages(4)
type of the
message to
read.

Does not work.


AT+CMGS= <address><CR> The <address>
field is the
address of the
terminal to
which the
message is sent.
To send the
message,
simply type,
<ctrl-Z>
AT+CMGS=.28.<CR> +CMGS: <mr>
0031000BA13105119226F40000AD0AA8C3F6 OK
30885E9ED301 <ctrl-Z> Note : Successful transmission

Interfacing the GSM Module with Microcontroller.

A SIM card is inserted to the GSM module. After checking as shown in the steps above, RS232
cable is directly connected between DB9 of the module and the DB9 on the controller port. This
establishes the serial communication between them. The GSM commands embedded in the
controller takes care to communicate with the GSM Module via RS232 cable-MAX232-Serial
I/O pins of the Controller.

+5V
DB9 SOCKET MALE uC DB9 SOCKET MALE GSM DB9 SOCKET FEMALE
1 1 U16
6 6 1
2 2 6 1
7 7 2 Tx
3 3 7 2
Rx
8
4
8
4
3
8 3
Vcc
GSM
9 9 4
5 5 9 4
5 GND

CON3 CON4
CON5 GSM

DB9 MALE CONNECTOR GSM MODULE


1.2. GSM Send SMS Flow Chart:

Test GSM Module after inserting SIM as


shown in steps above and connect it to the
Controller

Initialize using AT Enter command – Use ASCII


value of ‘Enter’ = 0x0D

Command Format AT+CMGS=”mob num” Enter


which will transmitted serially to GSM module through
UART0 of the Controller

Send AT+CMGS= String

Send 0x22(ASCII value of “)

Send Mobile number

Send 0x22(ASCII value of “)

Send 0x0D (ASCII value of carriage return)


GSM_Send_SMS

AT+CMGS= command transmitted serially to


GSM module through UART0

0x22(ASCII value of “)

Mobile number

0x22(ASCII value of “)

0x0D (ASCII value of carriage return)

Message

0x1A (ASCII value of cntrl+z to send message)


2. USB TO SERIAL CONVERTER:

A USB adapter is a type of protocol converter which is used for converting USB data signals to
and from other communications standards. Commonly, USB adaptors are used to convert USB
data to standard serial port data and vice versa. Most commonly the USB data signals are
converted to either RS232, RS485, RS422 or TTL serial data. The older serial RS423 protocol is
rarely used anymore, so USB to RS423 adapters are less common.
RS232 is a definition for serial communication on a 1:1 base. RS232 defines the interface layer,
but not the application layer. To use RS232 in a specific situation, application specific software
must be written on devices on both ends of the connecting RS232 cable. The developer is free to
define the protocol used to communicate. RS232 ports can be either accessed directly by an
application, or via a device driver in the operating system.
USB on the other hand is a bus system which allows more than one peripheral to be connected to
a host computer via one USB port. Hubs can be used in the USB chain to extend the cable
length and allow for even more devices to connect to the same USB port. The standard not only
describes the physical properties of the interface, but also the protocols to be used. Because of
the complex USB protocol requirements, communication with USB ports on a computer is
always performed via a device driver.
USB to serial RS232 adapters are often used with consumer, commercial and industrial
applications and USB to serial RS485/RS422 adapters are usually mainly used only with
industrial applications. Adapters for converting USB to other standard or proprietary
protocols also exist; however, these are usually not referred to as a serial adapter.
RELAY FOR BULB

A relay is an electrically operated switch. Current flowing through the coil of the
relay creates a magnetic field which attracts a lever and changes the switch
contacts. The coil current can be on or off so relays have two switch positions and
most have double throw (changeover) switch contacts as shown in the diagram.

Relays allow one circuit to switch a second circuit which can be completely
separate from the first. For example a low voltage battery circuit can use a relay to
switch a 230V AC mains circuit. There is no electrical connection inside the relay
between the two circuits, the link is magnetic and mechanical.

The coil of a relay passes a relatively large current, typically 30mA for a 12V
relay, but it can be as much as 100mA for relays designed to operate from lower
voltages. Most ICs (chips) cannot provide this current and a transistor is usually
used to amplify the small IC current to the larger value required for the relay coil.

Relays thus enables controlling an AC device through DC.

Commonly used Relays are usually SPDT or DPDT but they can have many more
sets of switch contacts, for example relays with 4 sets of changeover contacts are
readily available.
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 switch.
 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.
 Connect to COM and NO if you want the switched circuit to be on when the
relay coil is on.
 Connect to COM and NC if you want the switched circuit to be on when the
relay coil is off.

Protection diodes for relays

Transistors and ICs must be protected from


the brief high voltage produced when a relay
coil is switched off. The diagram shows how
a signal diode (eg 1N4148) is connected
'backwards' across the relay coil to provide
this protection.
PIR SENSOR
PIR stands for Passive Infrared. PIR sensors are often used in the construction of
PIR-based motion detectors. These sensors measure infrared radiation emanating
from objects in the field of view. All objects emits what is known as black body
radiation. It is usually infrared radiation that is invisible to the human eye but can
be detected by electronic devices designed for such a purpose. The term passive in
this instance means that the PIR device does not emit an infrared beam but merely
passively accepts incoming infrared radiation.

It only has one output pin and another two pins is connected to 5V and GND
separately. Apparent motion is detected when an infrared emitting source with one
temperature, such as human body, passes in front of source with another
temperature, such as wall. The unit output is high whenever there is motion
detected. If the motion is continuous, the output remains high. After motion stops,
the output remains high for a few seconds (depend on the variable resistor
adjusted).

1  Vcc

2  Output

3 GND

Working:

Infrared radiation enters through the front of the sensor, known as the sensor face.
At the core of a PIR sensor is a solid state sensor or set of sensors, made from an
approximately 1/4 inch square of natural or artificial pyro electric materials. The
sensor is often manufactured as part of an integrated circuit and may consist of one
(1), two (2) or four (4) 'pixels' of equal areas of the pyro electric material. Pairs of
the sensor pixels may be wired as opposite inputs to a differential amplifier. In
such a configuration, the PIR measurements cancel each other so that the average
temperature of the field of view is removed from the electrical signal; an increase
of IR energy across the entire sensor is self-canceling and will not trigger the
device. This allows the device to resist false indications of change in the event of
being exposed to flashes of light or field-wide illumination. (Continuous bright
light could still saturate the sensor materials and render the sensor unable to
register further information.) At the same time, this differential arrangement
minimizes common-mode interference, allowing the device to resist triggering due
to nearby electric fields. However, a differential pair of sensors cannot measure
temperature in that configuration and therefore this configuration is specialized for
motion detectors.

The human body radiates infrared waves with wavelengths of 8 to 12


micrometers. Any movement by a person leads to a change in the amount of
infrared energy which a sensor can detect within its range. The PIR sensor reacts to
this change in infrared energy and provides a low-frequency, small amplitude
signal. This signal can be amplified and decoded using a microcontroller.

The sensor can sense the change in the amount of infrared energy within
small distances, approximately up to 10 inches. For detecting movements at longer
distance, infrared radiation has to be focused. This focusing is done by a Fresnel
lens. A Fresnel lens divides the whole area into different zones. Any movement
between zones leads to a change in the IR (infrared) energy received by the sensor.
There are different types of Fresnel lenses depending on the range (distance) and
coverage angle. For example, volumetric lenses and curtain lenses etc.

Circuit:

+5V
U5

1
2 VSS
PIR_OUT VOUT
3
VDD

PIR SENSOR

This PIR_OUT signal will be “High” when motion is detected


And “Low” when No Motion is detected.

This o/p can be directly fed into the Microcontroller Port pin for further action.

Flow Chart
Connect 5V and GND to PIR snsr

Any No Output=0
motion

Yes

Output=1

Data

to port pin of micro-controller

Finally the sensor reading is sent to O/P device like

LCD or Buzzer to indicate the human detection


3. RENESAS MICROCONTROLLER:

Why the use of Renesas Microcontroller in your project?


 Renesas microcontroller surpasses its predecessor i.e. 8051 family of microcontrollers, with
various in-built features.
 A few of the many features are mentioned below.
- Renesas is a 16 bit microcontroller
- Minimum instruction time can be changed from ultra-low speed (30.5us) to high
speed (0.03125us).
- 16 to 512KB of ROM and 2 to 32KB of RAM are available depending upon the
series and number of pins.
- On-chip high-speed (32 MHz to 1 MHz) as well a low-speed (15 KHz) oscillator is
present.
- 10 bit resolution A/D converter (6 to 26 channels depending upon the series)
- Totally 3 UART for Serial Interface
- Totally 0-7 channels for timer with built in PWM features.
- Most of the pins of Renesas have multi-task features.
- Cost of Renesas microcontroller is comparatively less.
- Rigid body of microcontroller hence less prone to damages due to electrostatic
charge.
- Operates with 5v power supply.
3.1. Architectural Diagram:
3.2. Pin Diagram:
3.3. Features:
 General-purpose register: 8 bits × 32 registers (8 bits × 8 registers × 4 banks)

 ROM: 512 KB, RAM: 32 KB, Data flash memory: 8 KB

 On-chip high-speed on-chip oscillator

 On-chip single-power-supply flash memory (with prohibition of block erase/writing


function)

 On-chip debug function

 Ports  Total 11 ports with 58 Input/output Pins

o Port 0  0 to 6  Total 7 pins in port 0

o Port 1  0 to 7  Total 8 pins in port 1

o Port 2  0 to 7  Total 8 pins in port 2

o Port 3  0 to 1  Total 2 pins in port 3

o Port 4  0 to 3  Total 4 pins in port 4

o Port 5  0 to 5  Total 6 pins in port 5

o Port 6  0 to 3  Total 4 pins in port 6

o Port 7  0 to 7  Total 8 pins in port 7

o Port 12  0 to 4  Total 5 pins in port 12

o Port 13  0, 7  Total 2 pins in port 13

o Port 14  0, 1, 6, 7  Total 4 pins in port 14

 On-chip power-on-reset (POR) circuit and voltage detector (LVD)

 On-chip watchdog timer (operable with the dedicated low-speed on-chip oscillator)

 I/O ports: 16 to 120 (N-Ch. open drain: 0 to 4)

 Timer  16-bit timer: 8 to 16 channels, Watchdog timer: 1 channel

 Different potential interface: Can connect to a 1.8/2.5/3 V device

 8/10-bit resolution A/D converter (VDD = EVDD =1.6 to 5.5 V): 6 to 26 channels
Memory Space:
Processor Registers:

The RL78/G13 products incorporate the following processor registers.


Control registers
The control registers control the program sequence, statuses and stack memory. The control
registers consist of a program counter (PC), a program status word (PSW) and a stack pointer
(SP).
Program counter (PC)
The program counter is a 20-bit register that holds the address information of the next program to
be executed.
In normal operation, PC is automatically incremented according to the number of bytes of the
instruction to be fetched.
When a branch instruction is executed, immediate data and register contents are set.
Reset signal generation sets the reset vector table values at addresses 0000H and 0001H to the
program counter.

3.4. Program status word (PSW):


The program status word is an 8-bit register consisting of various flags set/reset by instruction
execution.
Program status word contents are stored in the stack area upon vectored interrupt request is
acknowledged or PUSH
PSW instruction execution and are restored upon execution of the RETB, RETI and POP PSW
instructions. Reset signal generation sets the PSW register to 06H.

Interrupt enable flag (IE)


This flag controls the interrupt request acknowledge operations of the CPU.
When 0, the IE flag is set to the interrupt disabled (DI) state, and all mask able interrupt requests
are disabled.
When 1, the IE flag is set to the interrupt enabled (EI) state and interrupt request
acknowledgment is controlled with an in-service priority flag (ISP1, ISP0), an interrupt mask
flag for various interrupt sources, and a priority specification flag.
The IE flag is reset (0) upon DI instruction execution or interrupt acknowledgment and is set (1)
upon EI instruction execution.
Zero flag (Z)
When the operation result is zero, this flag is set (1). It is reset (0) in all other cases.
Register bank select flags (RBS0, RBS1)
These are 2-bit flags to select one of the four register banks.
In these flags, the 2-bit information that indicates the register bank selected by SEL RBn
instruction execution is stored.
Auxiliary carry flag (AC)
If the operation result has a carry from bit 3 or a borrow at bit 3, this flag is set (1). It is reset (0)
in all other cases.
In-service priority flags (ISP1, ISP0)
This flag manages the priority of acknowledgeable mask able vectored interrupts. Vectored
interrupt requests specified lower than the value of ISP0 and ISP1 flags by the priority
specification flag registers (PRn0L, PRn0H, PRn1L, PRn1H, PRn2L, PRn2H) (see 16.3 (3))
cannot be acknowledged. Actual request acknowledgment is controlled by the interrupt enable
flag (IE). Remark n = 0, 1
Carry flag (CY)
This flag stores overflow and underflow upon add/subtract instruction execution. It stores the
shift-out value upon rotate instruction execution and functions as a bit accumulator during bit
operation instruction execution.
3.5. Renesas 64pin RF5100LEAxxxFB:
4. SEVEN SEGMENT DISPLAY:

A seven-segment display (SSD), or seven-segment indicator, is a form of electronic


display device for displaying decimal numerals that is an alternative to the more complex dot
matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters,
basic calculators, and other electronic devices that display numerical information.
The seven segments are arranged as a rectangle of two vertical segments on each side with one
horizontal segment on the top, middle, and bottom. Additionally, the seventh segment bisects the
rectangle horizontally. There are also fourteen-segment displays and sixteen-segment displays
(for full alpha-numeric); however, these have mostly been replaced by dot matrix displays.

The segments of a 7-segment display are referred by the letters A to G, where the
optional DP decimal point (an "eighth segment") is used for the display of non-integer numbers.
Seven-segment displays may use a liquid crystal display (LCD), a light-emitting diode (LED) for
each segment, or other light generating or controlling techniques such as cold cathode gas
discharge, vacuum fluorescent, incandescent filaments, and others. For gasoline price totems and
other large signs, vane displays made up of electromagnetically flipped light-reflecting segments
(or "vanes") is still commonly used. An alternative to the 7-segment display in the 1950s through
the 1970s was the cold-cathode, neon lamp-Like nixie tube. Starting in 1970, RCA sold a display
device known as the Numitron that used incandescent filaments arranged into a seven-segment
display.
In a simple LED package, typically all of the cathodes (negative terminals) or all of the anodes
(positive terminals) of the segment LEDs are connected and brought out to a common pin; this is
referred to as a "common cathode" or "common anode" device. Hence a 7 segments plus decimal
point package will only require nine pins, though commercial products typically contain more
pins, and/or spaces where pins would go, in order to match standard IC sockets.
Integrated displays also exist, with single or multiple digits. Some of these integrated
displays incorporate their own internal decoder, though most do not: each individual LED is
brought out to a connecting pin as described.

A single byte can encode the full state of a 7-segment-display. The most popular bit
encodings are gfedcba and abcdefg, where each letter represents a particular segment in the
display. In the gfedcba representation, a byte value of 0x06 would (in a common-anode circuit)
turn on segments 'c' and 'b', which would display a '1'.

4.1. FEATURES:

 High performance GaAsp.


 Large, easy to read, digits.
 Common anode or common cathode models.
 Also available in orange
 Fast switching-excellent for multiplexing.
 Low power consumption.
 Bold solid segments that are highly legible
 Solid state reliability-long operation life.
 Rugged plastic construction.
 Directly compatible with high contrast.
 Categorized for luminous intensity.
 Wide viewing angle…150 degrees.
 Standard double-dip lead configuration.
 Low forward voltage.
4.2. APPLIACTIONS:

FOR INDUSTRIAL & CONSUMER APPLICATIONS SUCH AS


 Two-digit package simplifies alignment and assembly.
 Digital readout displays.
 Instrument panels.
 Point of sale equipment.
 Digital clocks.
 TV and radios.

SSDs are available in two configurations


 Common Cathode (all LED cathodes are connected).
 Common Anode (all LED anodes are connected).

7-SEGMENT DISPLAY SEGMENTS FOR ALL NUMBERS:


7-SEGMENT TRUTH TABLE
5. SOFTWARE EXPLANATION:

5.1. What is Eclipse?

In the context of computing, Eclipse is an integrated development environment (IDE) for


developing applications using the Java programming language and other programming
languages such as C/C++, Python, PERL, Ruby etc.

The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug-
ins and is designed to be extensible using additional plug-ins. Developed using Java, the Eclipse
platform can be used to develop rich client applications, integrated development environments
and other tools. Eclipse can be used as an IDE for any programming language for which a plug-
in is available.

The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used as
a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++
Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing application
using C/C++, the Eclipse Scale plug-in allows Eclipse to be used an IDE to develop Scale
applications and PHP Eclipse is a plug-in to eclipse that provides complete development tool
for PHP.

Parts of an Eclipse Window


The major visible parts of an eclipse window are:

 Views
 Editors (all appear in one editor area)
 Menu Bar
 Toolbar
An eclipse perspective is the name given to an initial collection and arrangement of views and
an editor area. The default perspective is called java. An eclipse window can have multiple
perspectives open in it but only one perspective can be active at any point of time. A user can
switch between open perspectives or open a new perspective. A perspective controls what
appears in some menus and tool bars.

Typical Eclipse Menus:


The typical menus available on the menu bar of an Eclipse window are:

 File menu
 Edit menu
 Navigate menu
 Search menu
 Project menu
 Run menu
 Window menu
 Help menu

About Eclipse Workspace:


The eclipse workspace contains resources such as:

 Projects
 Files
 Folders
The workspace has a hierarchical structure. Projects are at the top level of the hierarchy and
inside them you can have files and folders. Plug-ins use an API provided by the resources plug-
in to manage the resources in the workspace.
ANDROID:

Android is a complete set of software for mobile devices such as tablet computers,
notebooks, smartphones, electronic book readers, set-top boxes etc.

It contains a Linux-based Operating System, middleware and key mobile applications.

It can be thought of as a mobile operating system. But it is not limited to mobile only. It is
currently used in various devices such as mobiles, tablets, televisions etc.
Android Version History

The first commercial version, Android 1.0, was released in September 2008.

Since 2008, Android has seen numerous updates which have incrementally improved the
operating system, adding new features and fixing bugs in previous releases. Each major release is
named in alphabetical order (the exceptions are versions 1.0 and 1.1) after a dessert or sugary
treat; for example, version 1.5 Cupcake was followed by 1.6 Donut. The latest released version,
4.4.4 Kit Kat, appeared as a security-only update; it was released on June 19, 2014, shortly after
the release of 4.4.3

 Android alpha (1.0)


 Android beta (1.1)
 Cupcake (1.5)
 Donut (1.6)
 Éclair (2.0–2.1)
 Froyo (2.2–2.2.3)
 Gingerbread (2.3–2.3.7)
 Honeycomb (3.0–3.2.6)
 Ice Cream Sandwich (4.0–4.0.4)
 Jelly Bean (4.1–4.3.1)
 Kit Kat (4.4–4.4.4)
 "L" release (developer preview)

There were at least two internal releases (Android Alpha) inside Google and the OHA before the
Android beta was released in November 2007.

The Android beta was released on November 5, 2007, while the software development kit
(SDK) was released on November 12, 2007. The November 5 date is popularly celebrated as
Android's "birthday".

 Android version 1.0 (API level 1) - September 23, 2008


 Android version 1.1 (API level 2) – February 9, 2009
 Android version 1.5 (API level 3) – CUPCAKE – April 27, 2009
 Android version 1.6 (API level 4) – DONUT – September 15, 2009
 Android version 2.0 (API level r5) – ECLAIR – October 26, 2009
 Android version 2.0.1 (API level 6) – ECLAIR – December 3, 2009
 Android version 2.1 (API level 7) – ECLAIR – January 12, 2010
 Android version 2.2-2.2.3 (API level 8) – FROYO – May 20, 2010
 Android version 2.3-2.3.2 (API level 9) – GINGERBREAD – December 6, 2010
 Android version 2.3.3-2.3.7 (API level 10) – GINGERBREAD – February 9, 2011
 Android version 3.0 (API level 11) – HONEYCOMB – February 22, 2011
 Android version 3.1 (API level 12) – HONEYCOMB – May 10, 2011
 Android version 3.2 (API level 13) – HONEYCOMB – July 15, 2011
 Android version 4.0-4.0.2 (API level 14) – ICE CREAM SANDWICH – October 18,
2011
 Android version 4.0.3-4.0.4 (API level 15) – ICE CREAM SANDWICH – December 16,
2011
 Android version 4.1 (API level 16) – JELLY BEAN – July 09, 2012
 Android version 4.2 (API level 17) – JELLY BEAN – November 13, 2012
 Android version 4.3 (API level 18) – JELLY BEAN – July 24, 2013
 Android version 4.4 (API level 19) – KITKAT – October 31, 2013
 Android version 4.4 (API level 20) – KITKAT with wearable extensions – July 22, 2014

API Meaning:

In computer programming, an application programming interface (API) specifies a software


component in terms of its operations, their inputs and outputs and underlying types. Its main
purpose is to define a set of functionalities that are independent of their respective
implementation, allowing both definition and implementation to vary without compromising
each other.In addition to accessing databases or computer hardware, such as hard disk drives or
video cards, an API can be used to ease the work of programming graphical user interface
components, to allow integration of new features into existing applications (a so-called "plug-in
API"), or to share data between otherwise distinct applications. In practice, many times an API
comes in the form of a library that includes specifications for routines, data structures, object
classes, and variables. In some other cases, notably for SOAP and RESTservices, an API comes
as just a specification of remote calls exposed to the API consumers.

Android Software Stack:

Android software stack (also known as android architecture) includes Linux kernel, native
libraries (middleware), Android Runtime, Application Framework and Applications.
Linux kernel is responsible for device drivers, power management, resource access etc. OS
tasks.

On the top of Linux kernel, there are Native libraries such as Web Kit, OpenGL, Free Type,
SQLite, Media, C runtime library (labc) etc.

The Web Kit library is responsible for browser support, SQLite is for database, Free Type for
font support, Media for playing and recording audio and video formats.

The main Android API's are UI (User Interface), telephony, resources, locations, Content
Providers (data) and package managers.

Android Core Building Blocks:

A component is simply a piece of code that has a well-defined life cycle e.g. Activity, Receiver,
user services etc.

The core building blocks or fundamental components of android are activities, views, intents,
services, content providers, Broadcast Receivers, fragments and AndroidManifest.xml.
 An activity is a class that represents a single screen. It is like a Frame in AWT.
 A view is the UI element such as button, label, text field etc. Anything that we see is a
view.
 Intent is used to invoke components. It is mainly used to:
 Start the service
 Launch an activity
 Display a web page
 Display a list of contacts
 Broadcast a message
 Dial a phone call etc.

 Service is a background process that can run for a long time. There are two types of services
local and remote. Local service is accessed from within the application whereas remote
service is accessed remotely from other applications running on the same device.
 Content Providers are used to share data between the applications.
 Fragments are like parts of activity. An activity can display one or more fragments on the
screen at the same time.
Dalvik Virtual Machine:

Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan Bornstein. The Dex
compiler converts the class files into the .dex files that run on the Dalvik VM.Let's see the
compiling and packaging process from the source file:

The javac tool compiles


the java source file into the class file. The dx tool takes all the class files of our application and
generates a single .dex (Dalvik Executable) file. It is a platform-specific tool. The Android
Assets Packaging Tool (aapt) handles the packaging process.

5.2. Android Basics:


 Android is a stack of software for mobile devices which includes an Operating
System, middleware and some key applications.
 The application executes within its own process and its own instance of Dalvik Virtual
Machine.
 Middleware is software that enables two separate programs to interact with each
other. An example is software on a Web server that enables the HTTP server to interact
with scripting engines like PHP or ASP when processing webpage data.

Advantages of Android:
 It is simple and powerful SDK.
 Licensing, Distribution or Development fee is not required.
 Easy to Import third party Java library.
 Supporting platforms are – Linux, Mac OS, and Windows.
 Innovative products like the location-aware services, location of a nearby convenience
store etc., are some of the additive facilities in Android.
 Components can be reused and replaced by the application framework.
 Optimized DVM for mobile devices.
 SQLite enables to store the data in a structured manner.
 Supports GSM telephone and Bluetooth, Wi-Fi, 3G and EDGE technologies.
 The development is a combination of a device emulator, debugging tools, memory
profiling and plug-in for Eclipse IDE.
 The customer will be benefited from wide range of mobile applications to choose, since
the monopoly of wireless carriers like AT&T and Orange will be broken by Google
Android.

Activity:
 The building block of the user interface is the activity.
 Each screen in android is called as an Activity.
 Each Activity is implemented using a JAVA class in Android.

Different phases of Activity Life cycle:

 As an activity transitions from state to state, it is notified of the change by calls to the
following protected methods:
1. On Create (): Called when the activity is first created.
2. On Start (): Called when the activity becomes visible to the user.
3. On Resume (): Called when the activity starts interacting with the user.
4. On Pause (): Called when the current activity is being paused and the previous activity is
being resumed.
5. On Stop (): Called when the activity is no longer visible to the user.
6. On Destroy (): Called before the activity is destroyed by the system.
7. On Restart (): Called when the activity has been stopped and is restarting again.

AndroidManifest.xml file:
 Applications declare their components in a manifest file that's bundled into the Android
package, the .apk file that also holds the application's code, files, and resources.
 The manifest is a structured XML file and is always named AndroidManifest.xml for all
applications. It is also used for naming any libraries the application needs to be linked
against (besides the default Android library) and identifying any permission the
application expects to be granted.

Significance of the .dex files:


Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into
a single .apk file on the device. .dex files can be created by automatically, translating compiled
applications written in the Java programming language.

ADT in Android:
ADT stands for Android Development Tools. Android SDK includes several tools and utilities
to help us create, test, and debug our projects.

http://www.blendinfotech.com/android-interview-questions-and-answers-for-2-years-experience

SOFTWARE REQURIMENT AND SPECIFICATION:


 JDK
 ECLIPSE
 SDK
 ADT PLUGIN
 SQLITE

JDK: A Java Development Kit (JDK) is a program development environment for


writing Javaapplets and applications. It consists of a runtime environment that "sits on top" of the
operating system layer as well as the tools and programming that developers need to compile,
debug, and run applets and applications written in the Java language.

ECLIPSE:

Eclipse is a platform that has been designed from the ground up for building integrated web and
application development tooling. By design, the platform does not provide a great deal of end
user functionality by itself. The value of the platform is what it encourages: rapid development of
integrated features based on a plug-in model.

Eclipse provides a common user interface (UI) model for working with tools. It is designed to
run on multiple operating systems while providing robust integration with each underlying OS.
Plug-ins can program to the Eclipse portable APIs and run unchanged on any of the supported
operating systems.

Android software development kit:

The Android software development kit (SDK) includes everything you need to start
developing, testing, and debugging Android applications. Included in the SDK download are:

The Android APIs: The core of the SDK is the Android API libraries that provide developer
access to the Android stack. These are the same libraries used at Google to create native Android
applications.

Development Tools: To turn Android source code into executable Android applications, the
SDK includes several development tools that let you compile and debug your applications.

The Android Emulator: The Android Emulator is a fully interactive Android device emulator
featuring several alternative skins. Using the emulator, you can see how your applications will
look and behave on a real Android device. All Android applications run within the Dalvik VM so
that the software emulator is an excellent environment — in fact, as it is hardware-neutral, it
provides a better independent test environment than any single hardware implementation.

Full Documentation: The SDK includes extensive code-level reference information detailing
exactly what’s included in each package and class and how to use them. In addition to the code
documentation, Android’s reference documentation explains how to get started and gives
detailed explanations of the fundamentals behind Android development.

Sample Code: The Android SDK includes a selection of sample applications that demonstrate
some of the possibilities available using Android, as well as simple programs that highlight how
to use individual API features.
Online Support: Despite its relative youth, Android has generated a vibrant developer
community. The Google Groups at http://code.google.com/android/groups are active forums of
Android developers with regular input from the Android development team at Google.

ADT PLUGIN:
Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a
powerful, integrated environment in which to build Android applications.

ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an
application UI, add packages based on the Android Framework API, debug your applications
using the Android SDK tools, and even export signed (or unsigned) .apk files in order to
distribute your application.

Developing in Eclipse with ADT is highly recommended and is the fastest way to get started.
With the guided project setup it provides, as well as tools integration, custom XML editors, and
debug output pane, ADT gives you an incredible boost in developing Android applications.

SQLITE:

Like any other applications you may have the need to store data in some kind of a database. For
iPhone applications, we can use SQLite for free. SQLite is a software library that implements a
self-contained, server less, zero-configuration, transactional SQL database engine.

SQLite is an embedded relational database engine. Its developers call it a self-contained, server
less, zero-configuration and transactional SQL database engine. It is very popular and there are
hundreds of millions copies worldwide in use today. SQLite is used in Solaris 10 and Mac OS
operating systems, iPhone or Skype. SQLite library has a built-in support for the SQLite as well
as the Python or the PHP language.
Login Sequence Diagram:

Login Use case Diagram:


Login Test case:

Test Case 1

Name of Test Login

Input Username and Password

Expected output Successfully Login

Actual output Same as expected output

Result Successful

Mobile Applications Based On Android:

Now is an exciting time for mobile developers. Mobile phones have never been more
popular, and powerful Smartphone’s are now a regular choice for consumers. Stylish and
versatile phones packing hard-ware features like GPS, accelerometers, and touch screens are an
enticing platform upon which to create innovative mobile applications.
In the days before Twitter and Facebook, when Google was still a twinkle in its founders’
eyes and dinosaurs roamed the earth, mobile phones were just that — portable phones small
enough to fi t inside a briefcase, featuring batteries that could last up to several hours; they
offered the freedom to make calls without being physically connected to a landline. Increasingly
small, stylish, and powerful mobile phones are now as ubiquitous as they are indispensable.
Hardware advancements have made mobiles smaller and more efficient while including
an increasing number of peripherals. Beginning with cameras and media players, mobiles now
include GPS systems, accelerometers, and touch screens. While these hardware innovations
should prove fertile ground for software development, the applications available for mobile
phones have generally lagged behind the hardware.

JME:
 Micro Edition formerly known as J2ME Java.

 Java Platform, Micro Edition, or Java ME, is a Java platform designed for embedded
systems (mobile devices are one kind of such systems). Target devices range from
industrial controls to mobile (especially feature phones) and set-top boxes. Java ME was
formerly known as Java 2 Platform, Micro Edition (J2ME).
 Java ME was designed by Sun Microsystems, now a subsidiary of Oracle Corporation;
the platform replaced a similar technology, Personal Java.
 These are the set of packages is used to develop application for mobile devices and
embedded systems.

ANDROID:
Android is a software stack for mobile devices that includes an operating system,
middleware and key applications. Android hardware will be designed to tempt consumers, but
the real win is for developers. With existing mobile development built on proprietary operating
systems that restrict third-party applications, Android offers an open and equal alternative.
Without artificial barriers, Android developers are free to write applications that take full

Advantage of increasingly powerful mobile hardware. As a result, developer interest in Android


devices has made their 2008 release a hugely anticipated mobile technology event.
The Android SDK provides the tools and APIs necessary to begin developing
applications on the Android platform using the Java programming language.
Features
 Application framework enabling reuse and replacement of components
 Dalvik virtual machine optimized for mobile devices
 Integrated browser based on the open source Web Kit engine
 Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the
OpenGL ES 1.0 specification (hardware acceleration optional)
 SQLite for structured data storage
 Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC,
AMR, JPG, PNG, GIF)
 GSM Telephony (hardware dependent)
 Bluetooth, EDGE, 3G, and Wi-Fi (hardware dependent)
 Camera, GPS, compass, and accelerometer (hardware dependent)
 Rich development environment including a device emulator, tools for debugging, memory and
performance profiling, and a plug-in for the Eclipse IDE.
What Comes in the Box?
The Android software development kit (SDK) includes everything you need to start
developing, testing, and debugging Android applications. Included in the SDK download are:
The Android APIs: The core of the SDK is the Android API libraries that provide developer
access to the Android stack. These are the same libraries used at Google to create native Android
applications.
Development Tools: To turn Android source code into executable Android applications, the
SDK includes several development tools that let you compile and debug your applications.
The Android Emulator: The Android Emulator is a fully interactive Android device emulator
featuring several alternative skins. Using the emulator, you can see how your applications will
look and behave on a real Android device. All Android applications run within the Dalvik VM so
that the software emulator is an excellent environment — in fact, as it is hardware-neutral, it
provides a better independent test environment than any single hardware implementation.
Full Documentation: The SDK includes extensive code-level reference information detailing
exactly what’s included in each package and class and how to use them. In addition to the code
documentation, Android’s reference documentation explains how to get started and gives
detailed explanations of the fundamentals behind Android development.
Sample Code: The Android SDK includes a selection of sample applications that demonstrate
some of the possibilities available using Android, as well as simple programs that highlight how
to use individual API features.
Online Support: Despite its relative youth, Android has generated a vibrant developer
community. The Google Groups at http://code.google.com/android/groups are active forums of
Android developers with regular input from the Android development team at Google.

Android Architecture:
The following diagram shows the major components of the Android operating system. Each
section is described in more detail below.

Applications
Android will ship with a set of core applications including an email client, SMS program,
calendar, maps, browser, contacts, and others. All applications are written using the Java
programming language.
Eclipse is an open source IDE (integrated development environment) particularly popular for
Java development. It’s available to download for each of the development platforms supported
by Android (Windows, Mac OS, and Linux) from the Eclipse foundation homepage:

www.eclipse.org/downloads/

There are many variations available when selecting your Eclipse download; the following is the
recommended configuration for Android:

 Eclipse 3.3, 3.4 (Ganymede)


 Eclipse JDT plug-in
 WST

WST and the JDT plug-in are included in most Eclipse IDE packages.

Installing Eclipse consists of uncompressing the download into a new folder. When that’s done,
run the Eclipse executable. When it starts for the first time, create a new workspace for your
Android development.

Using the Eclipse Plug-in

The ADT plug-in for Eclipse simplifies your Android development by integrating the developer
tools, including the emulator and .class-to-.dex converter, directly into the IDE. While you don’t
have to use the ADT plug-in, it does make creating, testing, and debugging your applications
faster and easier.

The ADT plug-in integrates the following into Eclipse:

 An Android Project Wizard that simplifies creating new projects and includes a basic
application template
 Forms-based manifest, layout, and resource editors to help create, edit, and validate your
XML resources
 Automated building of Android projects, conversion to Android executable ( .dex),
packaging to package fi les (.apk), and installation of packages onto Dalvik virtual
machines
 The Android Emulator, including control of the emulator’s appearance, network
connection settings, and the ability to simulate incoming calls and SMS messages
 The Dalvik Debug Monitoring Service (DDMS), which includes port forwarding; stack,
heap, and thread viewing; process details; and screen capture facilities
 Access to the device or emulator’s filesystem, allowing you to navigate the folder tree
and transfer files.
 Runtime debugging, so you can set breakpoints and view call stacks
 All Android/Dalvik log and console outputs

6. ADVANTAGES AND LIMITATIONS:

Advantages:

This project is used to count the no. of persons in moll, metro station, car parking
counting easy.
By use of this project we not require any person in counting process

Limitations:
This project is on trial bases and not yet used by the industry.
This project is only count 9999 persons

7. CONCLUSIONS

From the concept of Bidirectional visitor counter, it is easy to minimize
power consumption and also it is low in cost. Electricity usage is minimized
by the automatic switching ON/OFF of bulbs based on visitor’s count..With
this project we will implement such system for the power saving, and
number of peoples entering into the library.. In this concept ultrasonic in
and ultrasonic out is used to count the number of peoples entering into the
library.

FUTURE SCOPE

For project demo concern, we have developed a prototype module. In
future, this project can be taken to the product level. To make this project as
user friendly and durable, we need to make it compact and cost effective.
Going further, most of the units can be embedded along with the controller
on a single board with change in technology, thereby reducing the size of
the system.
REFERENCE

1] Jain, Sarthak, Anant Vaibhav, and Lovely Goyal, "Raspberry Pi based


interactive home automation system through E-mail." Optimization, Reliabilty, and
Information
Technology (ICROIT), 2014 International Conference on. IEEE, 2014.
[2] YAN Wenbo, WANG Quanyu, “Smart Home Implementation Based on
Internet and WiFi Technology” GAO Zhenwei School of Computer Science And
Technology, Beijing
Institute of Technology, Beijing 100081, P. R. China.
[3] Nitin Sinha, Korrapati Eswari Pujitha, John Sahaya Rani Alex, “Xively Based
Sensing and Monitoring System for IOT” 2015 International Conference on
Computer
Communication and Informatics (ICCCI -2015).
[4] Assaf, Mansour H., et al. "Sensor based home automation and security system."
Instrumentation and Measurement Technology Conference (I2MTC), 2012 IEEE
International.
IEEE, 2012.
[5] Kelly, Sean Dieter Tebje, Nagender Kumar Suryadevara, and Subhas Chandra
Mukhopadhyay. "Towards the implementation of IOT for environmental condition
monitoring in
homes." Sensors Journal, IEEE 13.10 (2013): 3846-3853.
[6] Mr. Pranay P. Gaikwadli Mrs. Jyotsna P. Gabhane Mrs. Snehal S. Golait “A
Survey based on Smart Homes System Using Internet-of-Things “, 2015
International Conference On
Computation Of Power, Energy, Information And Communication .
[7] J. JeyaPadmini, K.R.Kashwan, “Effective Power Utilization and Conservation
in Smart Homes Using IOT”, 2015 International Conference On Computation Of
Power,
Energy, Information And Communication.
[8] Ming Wang, Guiqing Zhang, Chenghui Zhang, Jianbin Zhang, Chengdong Li
“An IOT-based Appliance Control System for Smart Homes”, 2013 Fourth
International
Conference on Intelligent Control and Information Processing (ICICIP),2013.
[9] Dongyu Wang, Dixon Lo, Janak Bhimani and Kazunori Sugiura, “AnyControl
- IOT based Home Appliances Monitoring and Controlling”, 2015
IEEE 39th Annual International Computers, Software & Applications Conference.

Das könnte Ihnen auch gefallen