Professional Documents
Culture Documents
Technology Edition
by Shahzad Saeed
Table of content
Abstract ......................................................................................................................................................... 2
Introduction .................................................................................................................................................. 2
Embedded system ................................................................................................................................. 2
Photographs .................................................................................................................................................. 3
BLOCK DIAGRAM ........................................................................................................................................... 5
Literature Review .......................................................................................................................................... 5
PIC Microcontroller(16F877)................................................................................................................. 5
Features ................................................................................................................................................ 5
Temperature Sensor ..................................................................................................................................... 7
Tilt Sensor ..................................................................................................................................................... 8
BASIC BLOCK DIAGRAM ................................................................................................................................ 9
Relay............................................................................................................................................................ 10
DC MOTOR .................................................................................................................................................. 11
DC MOTOR FORWARD REVERSE BIASED CIRCUIT....................................................................................... 12
OVERALL CIRCUIT ........................................................................................................................................ 14
Battery......................................................................................................................................................... 14
Software ...................................................................................................................................................... 15
Program....................................................................................................................................................... 15
Applications and merits .............................................................................................................................. 20
Result .......................................................................................................................................................... 21
Conclusion ................................................................................................................................................... 21
Behind the Book .......................................................................................................................................... 22
TechnologyEdition.blogspot.com Page 1
Abstract
The objective of the project is to control a certain object with the
help of the movement of the palm.
Introduction
The machine is loaded with several units such as microcontroller,
TILT Sensor, Temperature Sensor, relay and driver circuits.
Embedded system
The system used here is embedded systems.
TechnologyEdition.blogspot.com Page 2
The application of this system makes user friendly cheaper
solutions and enables to add features otherwise impossible to
provide other means.
Photographs
TechnologyEdition.blogspot.com Page 3
Figure 2: Tilt Sensor
TechnologyEdition.blogspot.com Page 4
BLOCK DIAGRAM
Literature Review
PIC Microcontroller(16F877)
The PIC microcontroller is the first RISC based microcontroller
fabricated in CMOS that uses separate bus for the instruction and
data allowing simultaneous access of program and data memory.
Features
All single cycle instructions for program branches which are two
cycle.
TechnologyEdition.blogspot.com Page 5
Eight level deep hardware stack.
TechnologyEdition.blogspot.com Page 6
Temperature Sensor
The thermistor is a type of resistor varies with temperature. The
word when split gives thermal and resistor.
ΔR = kΔT
Where
ΔR = change in resistance
ΔT = change in temperature
TechnologyEdition.blogspot.com Page 7
Tilt Sensor
A tilt sensor can measure the tilting in often two axes of a
reference.
TechnologyEdition.blogspot.com Page 8
reference for an accelerometer accelerates upwards with respect
to a free-falling reference frame.
TechnologyEdition.blogspot.com Page 9
Relay
A relay is an electrical switch and opens closes under the control
of another circuit. The relay actually uses an electromagnet to
open or close.
TechnologyEdition.blogspot.com Page 10
DC MOTOR
The motor is used here to rotate the wheels. Actually a set of 2 DC
motors are used here which can move in both forward and
reverse directions.
Here motors with cores are used because coreless motors are
prone to excess heating.
TechnologyEdition.blogspot.com Page 11
DC MOTOR FORWARD REVERSE BIASED CIRCUIT
TechnologyEdition.blogspot.com Page 12
Figure 3: DC Motor
TechnologyEdition.blogspot.com Page 13
OVERALL CIRCUIT
Battery
The battery used here is a 12V re-chargeable battery.
The main use of the battery is to provide electric current for the
functioning of the whole circuit including the DC motors.
TechnologyEdition.blogspot.com Page 14
Software
The software used here is MICROSIM.
The compiler used here is KEIL COMPILER. This is used to solve the
problems facing embedded software developers.
Program
#include <pic.h>
#include "pic_acce.h"
#include "pic_lcd8.h"
#include "pic_adc.h"
bit val1,val2,val3,x1,y1,z1;
void main()
{
TechnologyEdition.blogspot.com Page 15
rel1=rel2=rel3=rel4=1;
TRISD=0x00;
TRISC=0xc0;
TRISB=0x00;
ADCON1=0x09;
TRISA=0xff;
Lcd8_Init();
Acc_Init();
Delay(65000);Delay(65000);
Delay(65000);Delay(65000);
while(1)
value=Adc8_Cha(0);
Lcd8_Decimal3(0xca,value);
Acc_Write(0x07,0x01);Delay(2000)
TechnologyEdition.blogspot.com Page 16
x=Acc_Read(0x00);Delay(1000);
TRISC=0xc0;
if(x>30)
Lcd8_Write(0x83,'-');
x= 63-x;
x1=1;
else
Lcd8_Write(0x83,'+');
x1=0;
Lcd8_Decimal3(0x84,x);
y=Acc_Read(0x01);Delay(1000);
if(y>30)
Lcd8_Write(0x8b,'-');
y=63-y;
y1=1;
TechnologyEdition.blogspot.com Page 17
}
else
Lcd8_Write(0x8b,'+');
y1=0;
Lcd8_Decimal3(0x8c,y);
z=Acc_Read(0x02);Delay(1000);
if(z>30)
Lcd8_Write(0xc3,'-');
z=63-z;
z1=1;
} else
Lcd8_Write(0xc3,'+');
z1=0;
Lcd8_Decimal3(0xc4,z);
if(x1==1&&x>=8&&z<20)
TechnologyEdition.blogspot.com Page 18
{
rel1=rel2=rel3=rel4=1;
rel1=rel3=0;
Lcd8_Write(0xce,'R');
else if(x1==0&&x>=8&&z<20)
rel1=rel2=rel3=rel4=1;
rel2=rel4=0;
Lcd8_Write(0xce,'L');
} else if(y1==1&&y>=7&&z<15)
rel1=rel2=rel3=rel4=1;
rel1=rel4=0;
Lcd8_Write(0xce,'F');
else if(y1==0&&y>=8&&z<15)
rel1=rel2=rel3=rel4=1;
rel2=rel3=0;
TechnologyEdition.blogspot.com Page 19
Lcd8_Write(0xce,'r');
else
rel1=rel2=rel3=rel4=1;
Lcd8_Write(0xce,'S');
3] Reliability
4] Compatibility
APPLICATIONS
TechnologyEdition.blogspot.com Page 20
Result
A working model of Accelerometer based Tilt sensor for the movement
of the wheel chair was prepared with the help of a PIC microcontroller,
two DC motors and the necessary equipments which resulted in the
proper movement of the wheel chair in all the four directions.
Conclusion
Tilt sensors have a secure place in the movement of equipment based
on actions done. The system can be made free from challenges and will
be cost effective in the near future.
TechnologyEdition.blogspot.com Page 21
Behind the Book
Thank you for reading the book. The book
you’ve now read is the part of series ‘low cost
mini-project edition’ of
technologyedition.blogspot.com.
Download now:
How to make an electronic stethoscope?
How to make a burglar alarm?
Meet me:
http://TechnologyEdition.blogspot.com
Follow me:
http://twitter.com/@shahzadsaeed
TechnologyEdition.blogspot.com Page 22