Beruflich Dokumente
Kultur Dokumente
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
8. MAX232
9. GSM INTRODUCTION
9.1. STRUCTURE OF GSM
9.2. SIM 300 AT COMMANDS
2. BLOCK DIAGRAM:
LCD
Renesas
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.
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.
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.
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.
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.
+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.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.
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).
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.
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.
Working Voltage DC 5 V
Echo Output Signal Input TTL lever signal and the range in
proportion
Dimension 45*20*15mm
7. MAX 232:
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.
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>”.
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.
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+CGMM
MULTIBAND 900 1800 1900
OK
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.
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
0x22(ASCII value of “)
Mobile number
0x22(ASCII value of “)
Message
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.
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.
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 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 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
On-chip watchdog timer (operable with the dedicated low-speed on-chip oscillator)
8/10-bit resolution A/D converter (VDD = EVDD =1.6 to 5.5 V): 6 to 26 channels
Memory Space:
Processor Registers:
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:
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.
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.
File menu
Edit menu
Navigate menu
Search menu
Project menu
Run menu
Window menu
Help menu
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 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
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".
API Meaning:
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.
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:
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.
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.
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
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.
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:
Test Case 1
Result Successful
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
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:
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.
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.
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
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