Project Report PDF
Project Report PDF
A PROJECT REPORT
Submitted by
PRAKASH.M (610816205019)
JACKRAJ.K.C (610816205009)
RAJESH.N (610816205022)
PRATHAP.S (610816205020)
of
BACHELOR OF TECHNOLOGY
in
INFORMATION TECHNOLOGY
APRIL 2020
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Engineering, Engineering,
We wish to express our sincere thanks to all those who were involved in the
We offer our sincere thank to our Principal Dr.S.CHITHRA, M.E., Ph.D., for
their valuable suggestions which edified us with zest to carry out the work.
We offer our sincere thank to Dr.A.MAHESH, M.E., Ph.D., our beloved Head
We especially thank for Mr.C.SATHISH, M.E., our guide for assisting us with
We also express our sincere thank to our Department Faculty for their valuable
support.
Last but not least we extend our thank to our beloved parents for their moral
The aim of the project is to focus on Important Aspect of the Diseases which is
Effecting a Huge Amount of Population today i.e Alzheimer’s and building an Android
application that could ease the everyday life of a person affected by Alzheimer’s disease. This
app provides various functionalities such as tracking movements of the patient through GPRS,
providing medicine and food timing notifications, daily routine tracker and quiz to increase
cognitive functioning of the patient and Timely Alarm for to provide a Reminder of the App.
The main objective of this project is to make people suffering from Alzheimer’s as
independent as possible. So this project is not only about creating an application but also
address the problem of increased dependency of Alzheimer patients on caregivers and Helping
them in a Techie Way as Each Person on Earth Owns a Mobile Phone Specially if you
Consider India as India is ranking among Top Countries wherein its Population is suffering
from This Diseases.
3 SYSTEM STUDY 4
3.1 Existing method
3.2 Proposed method
4 ARCHITECTURE DESIGN 6
4.1 Architecture design
4.2 Modules
5 SYSTEM SPECIFICATION 8
5.1 Software requirements
5.2 Hardware requirements
5.3 Android studio
5.3.1 Android Features
5.4 Java programming
5.4.1 Use Java
5.5 MAC Address
5.6 Software Tools Used for hardware
5.6.1 Software tools
6 SYSTEM MODULES 22
6.1 ATMEGA 8-bit Microcontroller
6.2 HC-05 device
6.3 Acceleration Sensor - 2 Axis
6.4 Power supply
6.5 LCD Display
7 RESULTS 44
8 CONCLUSION 45
9 FUTURE ENHANCEMENT 46
10 REFERENCES 47
LIST OF FIGURES
i
LIST OF SCREEN SHOTS
4 Display button 17
5 Home mode 44
ii
LIST OF ABBREVATIONS
NO ABBREVIATIONS EXPLANATION
iii
CHAPTER 1
INTRODUCTION
Alzheimer‘s patients are overwhelming for the caregivers and adequate support from
the community. However, the current living conditions in most countries reduce the quality
time of the family members. Thus, maximum care and attention to the Alzheimer‘s patients is
difficult. One of the serious attentions that the caregivers should monitor is the medication.
Medication may help to reduce the effect of the disease and with certain medication and
treatment the patient may survive from Alzheimer (Ministry of Health Malaysia, 2009).
The advancement in information and communication technology (ICT) may reduce the
burden of the caregivers. The existence of mobile devices and high speed communication
technology enable the caregiver and the doctor to monitor Alzheimer‘s patient in the distance
1.2 OBJECTIVE
• To identify alternative suitable approaches in managing Alzheimer’s people.
• To develop system for managing Alzheimer’s people on mobile application.
1
CHAPTER 2
2. LITERATURE SURVEY
2. Mei-Ying wang, J.J Zao, P.H Tsai, and J.W.S Lui, "Wedjat: A Mobile Phone
Based Medicine Intake Reminder and Monitor ".
People affected with Alzheimer disease suffers from various problems such
as inability to think, communicate, and make sound decision, recall memory. They lose
the track of what they are thinking and not know what to speak. Communication
challenges are common in such patients. Behavioral symptoms such as depression,
anxiety, sleep disorder also occurs as disease progresses. Changes in mood and
personality, less social participation, distress from work all these symptoms drastically
affect their livings
2
3. Muhammad Wasim Raad, Tarek Sheltami, and Eldahi Shakshuki, “Ubiquitous
Tele-health Systems for Elderly Patients with Alzheimer’s.
Therefore to overcome above problems to some extent, Alzheimer care system
is introduced which helps to keep track of the progress of the patients remaining
capabilities and improving their overall quality of life. The focus of our work is to
improve patient's condition through Android application which assist in their activities
of daily living and hence to promote independence and participation in social activities.
Our work also aims to give Alzheimer patients a sense of competence & ability to
handle behavioral problems and take best decision thus thereby reducing the burden on
caretakers. In this application, we also will make use of IoT Devices. The Internet of
Things (IoT) is a system of interrelated computing devices, placed into our everyday
used objects to share and receive data enabling communication .
3
CHAPTER 3
3. SYSTEM STUDY
The features of the existing system called “Alzheimer’s daily companion” are as
follows:
• Free and immediate advice and tips for dealing with Alzheimer’s and dementia
behaviors and situation.
• Access to free Alzheimer’s and other dementias caregiver resources and training
materials.
• No internet connectivity required.
The Major Drawbacks of “Alzheimer’s daily companion” are as follows:
• It does not provide GPS tracking or any other mechanism to solve the wandering
problem of the patient.
• It does provides Independence to the Patient and always requires a Care Taker to keep
a Track thus useless
• Its not Patient Oriented application.
• It doesn’t provide Alarm of App Reminder.
It doesn’t gives Information related to its Family Members
3.2 Proposed method
• Task Schedule: This will include schedule for all the daily chores to be performed by
Patient. This schedule will be again stored in the database for easy retrieval.
• GPRS tracking and Navigation: After Providing the Initial Details in the App it will
be stored in the Database and User can Leave Home it will GMS alert to family
members.
4
• Food and Medicine Reminder: User will be reminded about their food and medicine
timing through voice notification.
• SOS Button: An SOS Button is included in the App wherein if he/she clicks it, an
Emergency Message will be forwarded to the Details Provided.
Quiz: It will include certain kind of Quizes mostly related to Family which will help him/her
to remember his Family and Games that help Boost Brain.
5
CHAPTER 4
4.1 Architecture design
Power supply
Buzzer indication
circuit
Regulator
7805
Atmega 8 bit
microcontroller
HC-05
Axis sensor
1.Morning Access
2.Afternoon OPTIONS
3.Evening 1.Tablet Remainder
2.Quiz
Quiz
3.Emergency Question
4.Walking Mode
Patient Current
Location
RTC
Voice Alert Fig: 4.2. Software Architecture Design
6
4.2 Modules
1) Patient personal information:
In the beginning, user will provide basic information of the patient name, which ever
Necessary to generate its Profile.
2) Location tracker:
User just needs to specify his source and destination. Location mapping will begin using
GPRS and navigation feature as soon as the user will leave from home parameters. And if the
user forgets the returning route to reach to the source then the coordinates which will be saved
in the database using GPRS, will help the user to map the route for returning back.
3) Reminder setup:
Our App Provides an Extensive Feature to Create a Event List wherein he/she will be
able to create Event list of his day to day Activity and Keep Track on it to complete the Work
and Avoid Forgetting any Task.
4) Quiz question
It will include certain kind of Quizes mostly related to social and Games that help Boost
Brain .
7
CHAPTER 5
5. SYSTEM SPECIFICATION
8
Fig: 5.3 Android Studio
Let’s understand what each of the numbers in the above image represents:
1.The first bar has features like VCS that allows you to push your code . Refactor lets you
change the name of you application. “VCS” stands for Version Control System. It records
changes to a file or set of files over time so that you can recall specific versions later. Suppose
you make your application in Android version 6.0. When you are done, you push the code into
a cloud like . When a new version of Android releases, the VCS will record the changes you
make to your app for the new version.
9
2.The second toolbar contains all the editor’s tool. It allows you to perform actions like
running the application, debugging the code, opening SDK manager, etc.
3.This is the navigation bar which helps users navigate throughout the project and open any
file for editing at any time.
4.This is your project structure. It contains all files – the java file , manifest file, resource
folder, layout file and the Gradle . We will talk about them later.
5.This is the editor’s window – the place where you write and modify code.
6.This is the tool window bar. It borders the studio and contains various tools, which can be
expanded or collapsed.
5.3.1 Android Features
1.Emulators – to run and test application.
2.A platform to develop android application for all android devices.
3.It also provide LINT tools so that we can check problems like version compatibility,
performance ,etc. (LINT is a special tool provided by Android Studio to check your project for
different kind of bugs).
4.It also supports C++ and NDK. “NDK” stands for Native Development Kit, which consists
of a set of tools that allows you to use C and C++ to make native applications.
5.You can push your code directly into Git hub as the studio is integrated with it.
6.Various code templates are also given to set the environment and make it easier for user to
code.
7.Instant Run option to apply changes in the application that you are running without creating
new APK.
8.And many more…
APK is what you use to feature your app on Google Play Store. You cannot place the whole
code inside Play store – some specific format of file needs to be placed, which contains all the
information of your application. This file is only .apk file.
“APK” stands for Application Package Kit. It is a package file format, which consist all the
10
information related to your app that is used by Android System for distribution and
installation.
These features become more familiar once you work with them
It is used for:
• Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
• It is one of the most popular programming language in the world
• It is easy to learn and simple to use
• It is open-source and free
• It is secure, fast and powerful
• It has a huge community support (tens of millions of developers)
• Java is an object oriented language which gives a clear structure to programs and allows
code to be reused, lowering development costs
• As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or
vice versa
11
Fig: 5.4.1 Use
Event Handling
The Android framework maintains an event queue, into which events are placed as they
occur. In order to be able to handle the event that has been passed, the view must have in place
an event listener, and in order to be able to respond to an event of a particular type, a view
must register the appropriate event listener and implement the corresponding callback method.
For example, if a button is to respond to a click event, it must both register
the View.onClickListener event listener and implement the responding onClick callback
method. The following steps will illustrate how to work with the click event of our button:
protectedvoidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// create the button object
Buttonbutton= (Button) findViewById(R.id.button);
//register the View.onClickListener
12
button.setOnClickListener(newView.OnClickListener() {
// implement onClick callback method
publicvoidonClick(Viewv) {
// some code
}
}
);
}
importandroid.view.View;
importandroid.widget.Button;
importandroid.widget.TextView;
Intentintent=newIntent(this, SecondActivity.class);
startActivity(intent);
The complete code for the Next Page button:
protectedvoidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// create the button object
Buttonbutton= (Button) findViewById(R.id.button);
//register the View.onClickListener
button.setOnClickListener(newView.OnClickListener() {
// implement onClick callback method
publicvoidonClick(Viewv) {
Intentintent=newIntent(this, SecondActivity.class);
startActivity(intent);
}
}
);
}
Run the app.
13
Fig.5.4.2.Event Handling
• Go back the activity_main.xml file in the Design mode. Adding a button to the main
activity, change its id attribute from button2 to display and set up the constraint for it,
as in the following screenshot:
14
5.4.3. Display Massage Box
15
• In MainActivity.java, adding the following lines of code into onCreate method (and
underneath lines of code for the Next Page button):
@Override
protectedvoidonCreate(BundlesavedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// code for the Next Page button
Buttonbutton= (Button) findViewById(R.id.button);
button.setOnClickListener(newView.OnClickListener() {
publicvoidonClick(Viewv) {
Intentintent=newIntent(this, SecondActivity.class);
startActivity(intent);
}
}
);
// code for the Display button
Buttondisplay_btn= (Button) findViewById(R.id.display);
display_btn.setOnClickListener(newView.OnClickListener() {
publicvoidonClick(Viewv) {
display();
}
}
);
}
privatevoiddisplay() {
AlertDialog.BuilderdlgAlert=newAlertDialog.Builder(this);
dlgAlert.setMessage("Hello World! I am Ngoc Minh.");
16
dlgAlert.setTitle("My First App");
dlgAlert.setPositiveButton("OK", null);
dlgAlert.setCancelable(true);
dlgAlert.create().show();
}
importandroid.app.AlertDialog;
17
Fig.5.4.4.Execute Display
18
Fig: 5.5MAC Address
Keil C compiler
EMBEDDED C PROGRAM
Embedded C is a set of language extensions for the C Programming language by
the C Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires nonstandard
extensions to the C language in order to support exotic features such as fixed-point arithmetic,
multiple distinct memory banks, and basic I/O operations.
In 2008, the C Standards Committee extended the C language to address these issues by
providing a common standard for all implementations to adhere to. It includes a number of
features not available in normal C, such as, fixed-point arithmetic, named address spaces, and
basic I/O hardware addressing.
Embedded C use most of the syntax and semantics of standard C, e.g., main () function,
variable definition, data type declaration, conditional statements (if, switch. case), loops
19
(while, for), functions, arrays and strings, structures and union, bit operations, macros, unions,
etc.
µVISION KEIL
µVision Keil provides IDE for 8051 programming& is very easy to use.
When starting a new project, simply select the microcontroller you use from the Device Data
base and the µVision IDE sets all Compiler, Assembler, Linker, and Memory options. It’s
device database is large which supports many ICs of the 8051 family. A HEX file can be
created with the help of Keil which is required for burning onto chip. It has a powerful
debugging tool which detects most of the errors in the program.
KEIL development tools for the 8051 Microcontroller Architecture support every level
of Software developer from the professional applications engineer to the student just learning
about embedded software development. The KEIL C51 C Compiler for the 8051
Microcontroller is the most popular 8051 C compiler in the world. It provides more features
than any other 8051 C compiler available today. The C51 Compiler allows you to write 8051
Micro controller applications in C that, once compiled, have the efficiency and speed of
assembly language. Language extensions in the C51Compiler give you full access to all
resources of the 8051.The C51 Compiler translates C source files into Reloadable object
modules which contain full symbolic information for debugging with the µVision Debugger or
an in-circuit emulator. In addition to the object file, the compiler generates a listing file which
may optionally include symbol table and cross reference information.
Features
• Nine basic data types, including 32-bit IEEE floating-point,
• Flexible variable allocation with the bit, data, b data, idata, x data, and data memory
types, Interrupt functions may be written in C
• Full use of the 8051 register banks complete symbol and type information for source-
level debugging
20
• Use of AJMP and ACALL instructions,
• Bit-addressable data objects
• Built-in interface to the RTX51 Real-Time Kernel
• Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor,
Infineon, Philips, and Transcend Micro controllers
• Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets.
USE OF KEIL C
• Easy to code and debug - C is easy to learn so it easy to code and since no of lines is
less it will reduce complexity in debugging.
• Compatible with any microcontrollers - Just changing the header files we can make the
program to work for different microcontrollers.
21
CHAPTER 6
SYSTEM MODULES
INTRODUCTION
22
• Full Duplex UART
• Multiple Source / Vector / Priority Interrupt Structure
• On - Chip Oscillator and Clock circuitry.
• On - Chip EEPROM
• SPI Serial Bus Interface
• Watch Dog Timer
ARCHITECTURE
23
PIN DESCRIPTION
GND Ground
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each
pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins
can be used as high-impedance inputs.
Port 0 can also be configured to be the multiplexed low-order address/data
bus during accesses to external program and data memory. In this mode, P0
has internal pull-ups.
Port 0 also receives the code bytes during Flash programming and outputs
the code bytes during program verification. External pull-ups are required
during program verification.
24
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port
1 pins, they are pulled high by the internal pull-ups and can be used as
inputs. As inputs, Port 1 pins that are externally being pulled low will
source current because of the internal pull-ups. Port 1 also receives the
low-order address bytes during Flash programming and verification.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2
output buffers can sink/source four TTL inputs. When 1s are written to Port
2 pins, they are pulled high by the internal pull-ups and can be used as
inputs. As inputs, Port 2 pins that are externally being pulled low will
source current because of the internal pull-ups. Port 2 emits the high-order
address byte during fetches from external program memory and during
accesses to external data memory that uses 16-bit addresses (MOVX @
DPTR). In this application, Port 2 uses strong internal pull-ups when
emitting 1s. During accesses to external data memories that use 8-bit
addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special
Function Register. Port 2 also receives the high-order address bits and
some control signals during Flash programming and verification.
25
RST Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device. This pin drives High for 98 oscillator periods after the Watchdog
times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature.
In the default state of bit DISRTO, the RESET HIGH out feature is enabled.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator
frequency and may be used for external timing or clocking purposes. Note, however, that one
ALE pulse is skipped during each access to external data memory. If desired, ALE operation
can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only
during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high.
PSEN
Program Store Enable is the read strobe to external program memory. When the
AT89S51 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external
data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should
be strapped to VCC for internal program executions. This pin also receives the 12-volt
programming enables voltage (VPP) during Flash programming.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL2 Output from the inverting oscillator amplifier.
26
6.2ADDRESSING MODES
DIRECT ADDRESSING
In direct addressing, the operand specified by an 8-bit address field in the instruction.
Only internal data RAM and SFR’s can be directly addressed.
INDIRECT ADDRESSING
In Indirect addressing, the instruction specifies a register that contains the address of the
operand. Both internal and external RAM can indirectly address. The address register for 8-bit
addresses can be either the Stack Pointer or R0 or R1 of the selected register Bank. The
address register for 16-bit addresses can be only the 16-bit data pointer register, DPTR.
INDEXED ADDRESSING
Program memory can only be accessed via indexed addressing this addressing mode is
intended for reading look-up tables in program memory. A 16 bit base register (Either DPTR
or the Program Counter) points to the base of the table, and the accumulator is set up with the
table entry number. Adding the Accumulator data to the base pointer forms the address of the
table entry in program memory. Another type of indexed addressing is used in the“case jump”
instructions. In this case the destination address of a jump instruction is computed as the sum
of the base pointer and the Accumulator data.
REGISTER INSTRUCTION
The register banks, which contains registers R0 through R7, can be accessed by
instructions whose op codes carry a 3-bit register specification. Instructions that access the
registers this way make efficient use of code, since this mode eliminates an address byte.
When the instruction is executed, one of four banks is selected at execution time by the row
bank select bits in the PSW.
27
IMMEDIATE CONSTANTS
The value of a constant can follow the op code in program memory For example. MOV
A, #100 loads the Accumulator with the decimal number 100. The same number could be
specified in hex digit as 64h.
PSW 7 PSW 0
PSW 6 PSW 1
PSW 5 PSW 2
PSW 4 PSW 3
28
PSW4
PSW6
Auxiliary Carry Flag Receives Carry Out Form
PSW7
Carry Flag Receives Carry Out From Bit 1 of ALU Operands. The Program Status
Word contains Status bits that reflect the current state of the CPU. The PSW has shown if Fig
resides in SFR space. The PSW contains the Carry Bit, The auxiliary Carry (For BCD
Operations) the two - register bank select bits, the Overflow flag, a Parity bit and two user
Definable status Flags.
The Carry Bit, in addition to serving as a Carry bit in arithmetic operations also serves
the as the “Accumulator” for a number of Boolean Operations .The bits RS0 and RS1 select
one of the four register banks. A number of the instruction's register to these RAM locations
as R0 through R7.The status of the RS0 and RS1 bits at execution time determines which of
the four banks are selected.
The Parity bit reflects the Number of 1s in the Accumulator .P=1 if the Accumulator
contains an even number of 1s, and P=0 if the Accumulator contains an even number of 1s.
Thus, the number of 1s in the Accumulator plus P is always even. Two bits in the PSW are
uncommitted and can be used as general-purpose status flags.
INTERRUPTS
The ATMEGA provides 5 interrupt sources: Two External interrupts, two-timer
interrupts and a serial port interrupts. The External Interrupts INT0 and INT1 can each either
level activated or transition - activated, depending on bits IT0 and IT1 in Register TCON. The
Flags that actually generate these interrupts are the IE0 and IE1 bits in TCON. When the
service routine is vectored to hardware clears the flag that generated an external interrupt only
29
if the interrupt transition - activated. If the interrupt was level - activated, then the external
requesting source (rather than the on-chip hardware) controls the requested flag. Tf0 and Tf1
generate the Timer 0 and Timer 1 Interrupts, which are set by a rollover in their respective
Timer/Counter Register (except for Timer 0 in Mode 3). When a timer interrupt is generated,
the on-chip hardware clears the flag that generated it when the service routine is vectored to.
The logical OR of RI and TI generate the Serial Port Interrupt. Neither of this flag is
cleared by hardware when the service routine is vectored to. In fact, the service routine
normally must determine whether RI or TI generated the interrupt the bit must be cleared in
software. In the Serial Port Interrupt is generated by the logical OR of RI and TI. Neither of
this flag is cleared by hardware when the service Routine is vectored in. In fact, the service
routine normally must determine whether RI to TI generated the interrupt and the bit must be
cleared in software the device.
OSCILLATOR AND CLOCK CIRCUIT
XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier which
is intended for use as a crystal oscillator in the pierce configuration, in the frequency range of
1.2 MHz to 12 MHz. XTAL2 also the input to the internal clock generator. To drive the chip
with an internal oscillator, one would ground XTAL1 and XTAL2. Since the input to the clock
generator is dividing by two flip flop there are no requirements on the duty cycle of the
external oscillator signal. However, minimum high and low times must be observed. The
clock generator divides the oscillator frequency by 2 and provides a tow phase clock signal to
the chip.
The phase 1 signal is active during the first half of each clock period and the phase 2 signals
are active during the second half of each clock period.
OSCILLATOR CHARACTERISTICS
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier
which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz
crystal or ceramic resonator may be used. To drive the device from an external clock source,
XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no
30
requirements on the duty cycle of the external clock signal, since the input to the internal
clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage
high and low time specifications must be
observed.
Idle Mode
In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain
active. The mode is invoked by software. The content of the on-chip RAM and all the special
functions registers remain unchanged during this mode. The idle mode can be terminated by
any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by
a hard ware reset, the device normally resumes program execution, from where it left off, up
to two machine cycles before the internal reset algorithm takes control. On-chip hardware
inhibits access to internal RAM in this event, but access to
the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin
when Idle is terminated by reset, the instruction following the one that invokes Idle
should not be one that writes to a port pin or to external memory.
Fig.6.1.3.Idle Mode
31
Power-down Mode
In the power-down mode, the oscillator is stopped, and the instruction that invokes
power-down is the last instruction executed. The on-chip RAM and Special Function Registers
retain their values until the power-down mode is terminated. The only exit from power-down
is a hardware reset. Reset redefines the SFRs but does not change the
on-chip RAM. The reset should not be activated before VCC is restored to its normal
operating level and must be held active long enough to allow the oscillator to restart and
stabilize.
Program Memory Lock Bits
On the chip are three lock bits which can be left unprogrammed (U) or can be
programmed (P) to obtain the additional features listed in the table below. When lock bit 1 is
programmed, the logic level at the EA pin is sampled and latched during reset. If the device is
powered up without a reset, the latch initializes to a random value, and holds that value until
reset is activated. It is necessary that the latched value of EA be in agreement with the current
logic level at that pin in order for the device to function properly
32
third party Flash or EPROM programmers. The ATMEGA is shipped with either the high-
voltage or low-voltage programming mode enabled. The respective top-side marking and
device signature codes are listed in the following table.
Table6.1.3.Programming Flash
The ATMEGA code memory array is programmed byte-by byte in either programming mode.
To program any nonblank byte in the on-chip Flash Memory, the entire memory
must be erased using the Chip Erase Mode.
Programming Algorithm:
Before programming the ATMEGA, the address, data and control signals should be set
up according to the Flash programming mode table and Figure 3 and Figure 4. To program the
ATMEGA, take the following steps.
1. Input the desired memory location on the address lines.
2. Input the appropriate data byte on the data lines.
3. Activate the correct combination of control signals.
4. Raise EA/VPP to 12V for the high-voltage programming mode.
5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write
cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5,
changing the address and data for the entire array or until the end of the object file is reached.
Data Polling:
The ATMEGA features Data Polling to indicate the end of a write cycle. During a write
cycle, an attempted read of the last byte written will result in the complement of the written
datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs,
33
and the next cycle may begin. Data Polling may begin any time after a write cycle has been
initiated.
Ready/Busy:
The progress of byte programming can also be monitored by the RDY/BSY output
signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is
pulled high again when programming is done to indicate READY .Program Verify: If lock bits
LB1 and LB2 have not been programmed, the programmed code data can be read back via the
address and data lines for verification. The lock bits cannot be verified directly. Verification of
the lock bits is achieved by observing that their features are enabled.
Chip Erase:
The entire Flash array is erased electrically by using the proper combination of control
signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The
chip erase operation must be executed before the code memory can be re-programmed.
Reading the Signature Bytes: The signature bytes are
read by the same procedure as a normal verification of locations 030H, 031H, and 032H,
except that P3.6 and P3.7 must be pulled to a logic low. The values returned areas follows.
(030H) = 1EH indicates manufactured by Atmega
(031H) = 51H indicates 89C51
(032H) = FFH indicates 12V programming
(032H) = 05H indicates 5V programming.
6.2 HC-05 device
Introduction
• It is used for many applications like wireless headset, game controllers, wireless mouse,
wireless keyboard and many more consumer applications.
• It has range up to <100m which depends upon transmitter and receiver, atmosphere,
geographic & urban conditions.
34
• It is IEEE 802.15.1 standardized protocol, through which one can build wireless
Personal Area Network (PAN). It uses frequency-hopping spread spectrum (FHSS)
radio technology to send data over air.
• It uses serial communication to communicate with devices. It communicates with
microcontroller using serial port (USART).
• HC-05 is a Bluetooth module which is designed for wireless comunication. This module
can be used in a master or slave configuration.
Pin Description
Bluetooth serial modules allow all serial enabled devices to communicate with each other
using Bluetooth.
It has 6 pins,
1. Key/EN: It is used to bring Bluetooth module in AT commands mode. If Key/EN pin is set
to high, then this module will work in command mode. Otherwise by default it is in data
mode. The default baud rate of HC-05 in command mode is 38400bps and 9600 in data mode.
35
HC-05 module has two modes,
2. Command mode: It uses AT commands which are used to change setting of HC-05.
To send these commands to module serial (USART) port is used.
4. TXD: Transmit Serial data (wirelessly received data by Bluetooth module transmitted out
serially on TXD pin)
5. RXD: Receive data serially (received data will be transmitted wirelessly by Bluetooth
module).
• HC-05 has red LED which indicates connection status, whether the Bluetooth is
connected or not. Before connecting to HC-05 module this red LED blinks continuously
in a periodic manner. When it gets connected to any other Bluetooth device, its blinking
slows down to two seconds.
• This module works on 3.3 V. We can connect 5V supply voltage as well since the
module has on board 5 to 3.3 V regulators.
• As HC-05 Bluetooth module has 3.3 V level for RX/TX and microcontroller can detect
3.3 V level, so, no need to shift transmit level of HC-05 module. But we need to shift
the transmit voltage level from microcontroller to RX of HC-05 module.
E.g. Send data from Smartphone terminal to HC-05 Bluetooth module and see this data on PC
serial terminal and vice versa.
36
To communicate smartphone with HC-05 Bluetooth module, smartphone requires Bluetooth
terminal application for transmitting and receiving data. You can find Bluetooth terminal
applications for android and windows in respective app. store.
So, when we want to communicate through smart phone with HC-05 Bluetooth module,
connect this HC-05 module to the PC via serial to USB converter.
Before establishing communication between two Bluetooth devices, 1st we need to pair HC-
05 module to smart phone for communication.
1. Search for new Bluetooth device from your phone. You will find Bluetooth device with
“HC-05” name.
2. Click on connect/pair device option; default pin for HC-05 is 1234 or 0000.
HC-05 Bluetooth module provides switching mode between master and slave mode which
means it able to use neither receiving nor transmitting data.
Comparing it to the HC-05 module, which can only be set as a Slave, the HC-05 can be set as
Master as well which enables making a communication between two separate AVR Boards.
You can use Bluetooth module simply for a serial port replacement to establish connection
between MCU, PC to your embedded project and etc.
HC-05 Specifications
2 Axis Acceleration Sensor Board based on ADXL2XX from Anolog devices. It is a first
generation 3 axis acceleration sensor. User could get acceleration value of X, Y axis. And it is
widely used in shock, slope, and moving detection. Output sensitivity could be select by
simply set voltage level on few pins. The output of MMA7260Q is analog mode, so you need
a A/D converter to read the acceleration value.
38
FEATURES
Specification
Applications
• Tilt-sensing applications
• Mobile devices
• Gaming systems
• Disk drive protection
• Image stabilization
• Sports and health devices
INTRODUCTION
The present chapter introduces the operation of power supply circuits built using filters,
rectifiers, and then voltage regulators. Starting with an AC voltage, a steady DC voltage is
obtained by rectifying the AC voltage, then filtering to a DC level, and finally, regulating to
obtain a desired fixed DC voltage. The regulation is usually obtained from an IC voltage
39
regulator unit, which takes a DC voltage and provides a somewhat lower DC voltage, which
remains the same even if the input DC voltage varies, or the output load connected to the DC
voltage changes.
Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload protection
all in a single IC. Although the internal construction of the IC is somewhat different from that
described for discrete voltage regulator circuits, the external operation is much the same. IC
units provide regulation of either a fixed positive voltage, a fixed negative voltage, or an
adjustable set voltage.
A power supply can be built using a transformer connected to the AC supply line to step
the AC voltage to desired amplitude, then rectifying that AC voltage, filtering with a capacitor
and RC filter, if desired, and finally regulating the DC voltage using an IC regulator. The
regulators can be selected for operation with load currents from hundreds of Milli amperes to
tens of amperes, corresponding to power ratings from milli watts to tens of watts.
40
THREE-TERMINAL VOLTAGE REGULATORS
41
4. Glass substrate with common electrode film (ITO) with horizontal ridges to line up with
the horizontal filter.
5. Polarizing filter film with a horizontal axis to block/pass light.
6. Reflective surface to send light back to viewer. (In a backlit LCD, this layer is replaced
with a light source.)
LCD display:
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals. Liquid crystals do not emit
light directly. LCDs are available to display arbitrary images (as in a general-purpose
computer display) or fixed images which can be displayed or hidden, such as preset words,
digits, and 7-segment displays as in a digital clock. They use the same basic technology,
except that arbitrary images are made up of a large number of small pixels, while other
displays have larger elements. LCDs are used in a wide range of applications
including computer monitors, televisions, instrument panels, aircraft cockpit displays, and
signage. They are common in consumer devices such as video players, gaming
devices, clocks, watches, calculators, and telephones, and have replaced cathode ray
tube (CRT) displays in most applications. They are available in a wider range of screen sizes
than CRT and plasma displays, and since they do not use phosphors, they do not suffer image
burn-in. LCDs are, however, susceptible to image persistence.
The LCD screen is more energy efficient and can be disposed of more safely than a CRT. Its
low electrical power consumption enables it to be used in battery-power electronic equipment.
It is an electronically modulated optical device made up of any number of segments filled
with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce
images in color or monochrome.
16 x 2 character LCD display:
An LCD is a small low cost display. it is easy to interface with a micro-controller
because of an embedded controller (the black blob on the back of the board). This controller is
42
standard across many displays (hd 44780), which means many micro-controllers have libraries
that make displaying messages as easy as a single line of code.
Features:
Table6.5.1Address Code
43
CHAPTER 7
RESULTS
Fig.7.1.Home Mode
Fig.7.3.Morning Reminder
44
CHAPTER 8
CONCLUSION
Looking at the Current Systems in the Market and Their Services We can Say that Our Project
/ System has Overcome all the Drawbacks of System Available So far and we have made a
thorough in depth research of the requirement that a Alzermeria Patient suffers and Targeted
the Problems in more Precise Way also the Current Available Systems have lagged few
Information which was needed The must and thus our Project even provides those Information
Such as voice alert ,emergency message ,medicine reminder . Thus this project will provide a
new way in the Life of Alzheimers patient providing them a life of Independence wherein they
can Believe in our App and leave freely.
45
CHPATER 9
Future And Enhancement
Alzheimer's disease is a type of brain disease, just as coronary artery disease is a type of heart
disease. It is also a degenerative disease, meaning that it becomes worse with time.
Alzheimer's disease is thought to begin 20 years or more before symptoms arise,1-6 with
changes in the brain that are unnoticeable to the person affected. Only after years of brain
changes do individuals experience noticeable symptoms such as memory loss and language
problems. Symptoms occur because nerve cells (neurons) in parts of the brain involved in
thinking, learning and memory (cognitive function) have been damaged or destroyed. As the
disease progresses, neurons in other parts of the brain are damaged or destroyed walking and
swallowing, are affected. Individuals become bed‐bound and require around‐the‐clock care.
Alzheimer's disease is ultimately fatal.
FUTURES
Memory loss is the key symptom of Alzheimer's disease. An early sign of the disease is
usually difficulty remembering recent events or conversations. As the disease
progresses, memory impairments worsen and other symptoms develop
46
CHPATER 10
REFERENCES
1. Alzheimer’s Association, “Alzheimer’s Caregiver Buddy,”
https://play.google.com/store/apps/details?id=com.Alz_IL_Caregiver_
Buddy_Application&hl=en.
2. Ahmad Akl, Jasper Snoek, and Alex Mihailidis. (2015), “Unobtrusive Detection
of Mild Cognitive Impairment in Older Adults Through Home Monitoring”,
IEEE Journal of Biomedical and Health Informatics, Vol.21, No.2, pp. 339-348.
4. Bhadane Ashwini, Kale Sapna, and Bhuse Ishwari, “An Android based
Medication Reminder System based on OCR using ANN”, International
Conference on Recent Trends in engineering & pp.25-30, 2013.
6. Biao Jie, Mingxia Liu, Jun Liu, Daoqiang Zhang and Dinggang Shen. (2016),
“Temporally-Constrained Group Sparse Learning for Longitu- dinal Data
Analysis in Alzheimer’s Disease“, IEEE Transactions on Biomedical
Engineering. Vol.64, No. 1, pp. 238-249.
7. Bo Cheng, Mingxia Liu, Daoqiang Zhang, Brent C. M unsell, Dinggang Shen.
(2015), “Domain Transfer Learning for MCI Conversion Prediction”, IEEE
Transactions on Biomedical Engineering, Vol.62, No. 7, pp. 1805-1817.
47
10.Jean F Coppola, Marc A Kowtko, Christina Yamagata, and Shannon Joyce,
"Applying Mobile Application Development to Help Dementia and Alzheimer
Patients", Proceedings of Student-Faculty Research Day, paper.16, pp.A6.1-A6.7,
2013.
14.Mei-Ying wang, J.J Zao, P.H Tsai, and J.W.S Lui, "Wedjat: A Mobile Phone
Based Medicine Intake Reminder and Monitor ", Proceeding of 9th IEEE
International Conference on Bioinformatics and BioEngineering (BIBE '09), pp.
423 - 430, 2009.
15.. R. Suji Pramila, and Shajim Nargunam, “A Survey on Effective in-Home Health
Monitoring System”, International Journal of Computer Apkkications, Vol.68,
Issue 7, pp.15-19, 2013.
48