0% found this document useful (0 votes)
8 views26 pages

Driver Attention Warning System Design

This document describes a distance warning system designed to alert drivers of following vehicles when they get too close to the vehicle ahead. The system uses an ATmega328P microcontroller, ultrasonic sensor, and LCD display. When the ultrasonic sensor detects an object within a certain distance, it generates a high signal that triggers the microcontroller. The microcontroller then activates the LCD display and alarm to warn the following driver. The system aims to reduce accidents caused by drivers not recognizing slower vehicles ahead in time. It provides advantages over conventional multi-chip systems by eliminating extra chips, printed circuit boards, and connectors required to support multi-chip designs.

Uploaded by

Praveen Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views26 pages

Driver Attention Warning System Design

This document describes a distance warning system designed to alert drivers of following vehicles when they get too close to the vehicle ahead. The system uses an ATmega328P microcontroller, ultrasonic sensor, and LCD display. When the ultrasonic sensor detects an object within a certain distance, it generates a high signal that triggers the microcontroller. The microcontroller then activates the LCD display and alarm to warn the following driver. The system aims to reduce accidents caused by drivers not recognizing slower vehicles ahead in time. It provides advantages over conventional multi-chip systems by eliminating extra chips, printed circuit boards, and connectors required to support multi-chip designs.

Uploaded by

Praveen Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

KEEP DISTANCE WARNING SYSTEM

CHAPTER 1 INTRODUCTION
1.1 INTRODUCTION:
Most of the accidents in high-ways a e ha!!ening d"e to the d owsiness of d i#e s$ %ost often this sy%!to% is fo"nd in &ong distance t "c' d i#e s$ these d i#e s %ay ta'e so%e ti%e to ecogni(e the o!!osite #ehic&e$ which is "nning at &ow s!eed$ es"&ting accident) This 'ind of accidents %ay ha!!en d"e to the d "n'en d i#e s a&so) So to inc ease safety an e&ect onic wa ning syste% is essentia& to a&e t the d i#e s) This 'ind of syste% can *e insta&&ed in a&& ty!es of #ehic&es$ es!ecia&&y in co%%e cia& #ehic&es$ so that accident ate can *e %ini%i(ed) The wa ning syste% designed he e can *e ca&&ed as d i#e attention syste%$ which aises an a&a % and ene gi(es the dis!&ay *oa d a"to%atica&&y when the fo&&owing #ehic&e ca%e nea to the in-f ont "nning #ehic&e) The syste% is designed with +,S-. %ic ocont o&&e $ the tas' is /"ite si%!&e$ the fo&&owing #ehic&e detection ci c"it is designed with inf a ed senso s$ when the IR signa& is inte "!ted d"e to the fo&&owing #ehic&e$ the ci c"it gene ates high signa& and it is fed to %ic ocont o&&e ) It offe s se#e a& ad#antages o#e con#entiona& %"&ti-chi! syste%s) The e is a cost and s!ace ad#antage as e0t a chi! costs and

! inted ci c"it *oa d and connecto s e/"i ed to s"!!o t %"&ti-chi! syste%s a e e&i%inated)
SOFTWARE REQUIREMENT: 1) KEI2 MICR3 4ISI3N-5 .) MICR3 62AS7 HARDWARE REQUIREMENT: 1) MICR3C3NTR322ER 8+,S-.9 .) 2M5.:) 5) ;2TRAS3NIC SENS3R :) 2CD DISP2AY

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

1.2 AIM:
The ai% of this syste% is to a&e t the fo&&owing #ehic&e whene#e it ca%e #e y c&ose to the ahead #ehic&e< the e*y to so%e e0tent accidents can *e a#oided )Many accidents at 7igh-ways a e ta'ing !&ace d"e to the c&ose "nning of #ehic&es$ a&& of s"dden$ if the in f ont #ehic&e d i#e ed"ces the s!eed o a!!&ied * ea's$ then it is /"ite diffic"&t to the fo&&owing #ehic&e d i#e to cont o& his #ehic&e$ es"&ting accidents a#oid this 'ind of accident$ the wa ning syste%$ which contains a&a % and dis!&ay syste% can a ange at ea side of each and e#e y #ehic&e)

1.3 BLOCK DIAGRAM:

P3WER S;PP2Y

2CD DISP2AY

AT +,S-. MICR3 -C3NTR322E R ;2TRAS3NIC SENS3R =;>>ER

FIG (1.3) BLOCK DIAGRAM

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

1.4 FLOW CHART:


START Initia&i(ation of Mic ocont o&&e

Initia&i(ation of 2CD

Initia&i(ation of "&t asonic

If o*?ect is detected yes ="((e on

N3

3*?ect detection is dis!&ayed on 2CD ST3P ST3P FIG (1.4) FLOWCHART

1.5 CONCLUSION:
7ence$ the ci c"it is designed s"ch that whene#e the inf a ed signa& is inte "!ted$ &ogic high signa& is gene ated and it is fed to %ic ocont o&&e $ on ecei!t of this signa&$ the cont o&&e acti#ates the dis!&ay *oa d and a&a % a"to%atica&&y)

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

CHAPTER 2 DESCRIPTION OF MICROCONTROLLER


2.1 INTRODUCTION :
The +@-1 is an o igina& %e%*e of the +@-1 fa%i&y) The e a e two othe %e%*e s in the +@-1 fa%i&y of %ic ocont o&&e s) They a e +@-. and +@51) A&& the th ee %ic ocont o&&e s wi&& ha#e the sa%e inte na& a chitect" e$ *"t they diffe in the fo&&owing as!ects) +@51 has 1.+ *ytes of RAM$ two ti%e s and A inte "!ts) +,S-1 has :K= R3M$ 1.+ *ytes of RAM$ two ti%e s and A inte "!ts) +,S-. has +K= R3M$ 1.+ *ytes of RAM$ th ee ti%e s and + inte "!ts) 3f the th ee %ic ocont o&&e s$ +,S-1 is the %ost ! efe a*&e) Mic ocont o&&e s"!!o ts *oth se ia& and !a a&&e& co%%"nication) In the conce ned ! o?ect +,S-. %ic ocont o&&e is "sed) 7e e %ic ocont o&&e "sed is AT+,S-.$ which is %an"fact" ed *y ATME2 &a*o ato ies) The AT+,S-. ! o#ides the fo&&owing standa d feat" esB +K*ytes of 6&ash$ .-A *ytes of RAM$ 5. IC3 &ines$ th ee 1A-*it ti%e Cco"nte s$ si0-#ecto two-&e#e& inte "!t a chitect" e$ a f"&& d"!&e0 se ia& !o t$ on-chi! osci&&ato $ and c&oc' ci c"it y) In addition$ the AT+,S-. is designed with static &ogic fo o!e ation down to (e o f e/"ency and s"!!o ts two softwa e se&ecta*&e !owe sa#ing %odes) The Id&e Mode sto!s the CP; whi&e a&&owing the RAM$ ti%e Cco"nte s$ se ia& !o t$ and inte "!t syste% to contin"e f"nctioning) The Powe down Mode sa#es the RAM contents *"t f ee(es the osci&&ato $ disa*&ing a&& othe chi! f"nctions "nti& the ne0t ha dwa e eset) The Id&e Mode sto!s the CP; whi&e a&&owing the RAM$ ti%e Cco"nte s$ se ia& !o t and inte "!t syste% to contin"e f"nctioning) The Powe down Mode sa#es the RAM contents *"t f ee(es the osci&&ato disa*&ing a&& othe chi! f"nctions "nti& the ne0t ha dwa e eset) =y co%*ining a #e sati&e +-*it CP; with 6&ash on a %ono&ithic chi!$ the AT+,C-. is a !owe f"& %ic oco%!"te which ! o#ides a high&y f&e0i*&e and cost effecti#e so&"tion to %any e%*edded cont o& a!!&ications)

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

2.2 PIN CONFIGURATION:

FIG (2.2) PIN DIAGRAM OF !S52 IC

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

2.3 PIN DESCRIPTION:


"CC Pin :@ ! o#ides S"!!&y #o&tage to the chi!) The #o&tage so" ce is D-# GND) Pin .@ is the g o"nded

P#$% &
Po t @ is an +-*it o!en d ain *idi ectiona& IC3 !o t f o% !in 5. to 5,) As an o"t!"t !o t each !in can sin' eight TT2 in!"ts) When 1s a e w itten to !o t @ !ins$ the !ins can *e "sed as high-i%!edance in!"ts In this %ode P@ has inte na& !"&&-"!s) Po t @ a&so ecei#es the code *ytes d" ing 6&ash ! og a%%ing$ and o"t!"ts the code *ytes d" ing ! og a% #e ification) E0te na& !"&&-"!s a e e/"i ed d" ing ! og a% #e ification)

P#$% 1
Po t 1 is an +-*it *idi ectiona& IC3 !o t with inte na& !"&&-"!s f o% !in 1 to +) The Po t 1 o"t!"t *"ffe s can sin'Cso" ce fo" TT2 in!"ts) When 1s a e w itten to Po t 1 !ins they a e !"&&ed high *y the inte na& !"&&-"!s and can *e "sed as in!"ts) As in!"ts$ Po t 1 !ins that a e e0te na&&y *eing !"&&ed &ow wi&& so" ce c" ent 8II29 *eca"se of the inte na& !"&&-"!s) In addition$ P1)@ and P1)1 can *e config" ed to *e the ti%e Cco"nte . e0te na& co"nt in!"t 8P1)@CT.9 and the ti%e Cco"nte . t igge in!"t 8P1)1CT.EE9$ es!ecti#e&y$ as shown in fo&&owing ta*&e) Po t 1 a&so ecei#es the &ow-o de add ess *ytes d" ing 6&ash ! og a%%ing and ! og a% #e ification)

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM TABLE (2.3.1) PORT 1 FUNCTIONS

P#$% 2
Po t . is an +-*it *idi ectiona& IC3 !o t with inte na& !"&&-"!s f o% !in .1 to .+) The Po t . o"t!"t *"ffe s can sin' C so" ce fo" TT2 in!"ts) When 1s a e w itten to Po t . !ins they a e !"&&ed high *y the inte na& !"&&-"!s and can *e "sed as in!"ts) As in!"ts$ Po t . !ins that a e e0te na&&y *eing !"&&ed &ow wi&& so" ce c" ent 8II29 *eca"se of the inte na& !"&&-"!s) Po t . e%its the high-o de add ess *yte d" ing fetches f o% e0te na& ! og a% %e%o y and d" ing accesses to e0te na& data %e%o y that "ses 1A-*it add esses 8M34E F DPTR9) In this a!!&ication it "ses st ong inte na& !"&&-"!s when e%itting 1s) D" ing accesses to e0te na& data %e%o y that "ses +-*it add esses 8M34E F RI9$ Po t . e%its the contents of the P. S!ecia& 6"nction Registe ) Po t . a&so ecei#es the high-o de add ess *its and so%e cont o& signa&s d" ing 6&ash ! og a%%ing and #e ification)

P#$% 3
Po t 5 is an +-*it *idi ectiona& IC3 !o t with inte na& !"&&-"!s f o% !in 1@ to 1G) The Po t 5 o"t!"t *"ffe s can sin' C so" ce fo" TT2 in!"ts) When 1s a e w itten to Po t 5 !ins they a e !"&&ed high *y the inte na& !"&&-"!s and can *e "sed as in!"ts) As in!"ts$ Po t 5 !ins that a e e0te na&&y *eing !"&&ed &ow wi&& so" ce c" ent 8II29 *eca"se of the !"&&-"!s)

TABLE (2.3.2) PORT 3 FUNCTIONS

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

RST
Pin , is the Reset in!"t) It is acti#e high) ;!on a!!&ying a high !"&se to this !in$ the %ic ocont o&&e wi&& eset and te %inate a&& acti#ities) A high on this !in fo two %achine cyc&es whi&e the osci&&ato is "nning esets the de#ice)

ALE'PROG
Add ess 2atch is an o"t!"t !in and is acti#e high) Add ess 2atch Ena*&e o"t!"t !"&se fo &atching the &ow *yte of the add ess d" ing accesses to e0te na& %e%o y) This !in is a&so the ! og a% !"&se in!"t 8PR3G9 d" ing 6&ash ! og a%%ing) In no %a& o!e ation A2E is e%itted at a constant ate of 1CA the osci&&ato f e/"ency$ and %ay *e "sed fo e0te na& ti%ing o c&oc'ing !" !oses) Note$ howe#e $ that one A2E !"&se is s'i!!ed d" ing each access to e0te na& Data Me%o y) If desi ed$ A2E o!e ation can *e disa*&ed *y setting *it @ of S6R &ocation +E7) With the *it set$ A2E is acti#e on&y d" ing a M34E o M34C inst "ction) 3the wise$ the !in is wea'&y !"&&ed high) Setting the A2E-disa*&e *it has no effect if the %ic ocont o&&e is in e0te na& e0ec"tion %ode)

PSEN
P og a% Sto e Ena*&e is the ead st o*e to e0te na& ! og a% %e%o y) When the AT+,C-. is e0ec"ting code f o% e0te na& ! og a% %e%o y$ PSEN is acti#ated twice each %achine cyc&e$ e0ce!t that two PSEN acti#ations a e s'i!!ed d" ing each access to e0te na& data %e%o y)

EA'"PP
E0te na& Access Ena*&e EA %"st *e st a!!ed to GND in o de to ena*&e the de#ice to fetch code f o% e0te na& ! og a% %e%o y &ocations sta ting at @@@@7 "! to 66667) Note$ howe#e $ that if &oc' *it 1 is ! og a%%ed$ EA wi&& *e inte na&&y &atched on eset) EA sho"&d *e st a!!ed to 4CC fo inte na& ! og a% e0ec"tions) This !in a&so ecei#es the 1.-#o&t ! og a%%ing ena*&e #o&tage 84PP9 d" ing 6&ash ! og a%%ing when 1.-#o&t ! og a%%ing is se&ected)

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM

(TAL1
In!"t to the in#e ting osci&&ato a%!&ifie and in!"t to the inte na& c&oc' o!e ating ci c"it)

(TAL2
3"t!"t f o% the in#e ting osci&&ato a%!&ifie )

OSCILLATOR CHARACTERISTICS
ETA21 and ETA2. a e the in!"t and o"t!"t$ es!ecti#e&y$ of an in#e ting a%!&ifie which can *e config" ed fo "se as an on chi! osci&&ato $ as shown in 6ig" e -)5) Eithe a /"a t( c ysta& o ce a%ic esonato %ay *e "sed) To d i#e the de#ice f o% an e0te na& c&oc' so" ce$ ETA2. sho"&d *e &eft "nconnected whi&e ETA21 is d i#en )

FIGURE (2.3.1) CR)STAL CONNECTIONS

SRTIST$ NA2G3NDA

KEEP DISTANCE WARNING SYSTEM FIGURE( 2.3.2) E(TERNAL CLOCK DRI"E CONFIGURATION The e a e no e/"i e%ents on the d"ty cyc&e of the e0te na& c&oc' signa&$ since the in!"t to the inte na& c&oc'ing ci c"it y is th o"gh a di#ide-*y two f&i!-f&o!$ *"t %ini%"% and %a0i%"% #o&tage high and &ow ti%e s!ecifications %"st *e o*se #ed)

IDLE MODE
In id&e %ode$ the CP; !"ts itse&f to s&ee! whi&e a&& the on-chi! !e i!he a&s e%ain acti#e) The %ode is in#o'ed *y softwa e) The content of the on-chi! RAM and a&& the s!ecia& f"nctions egiste s e%ain "nchanged d" ing this %ode) The id&e %ode can *e te %inated *y any ena*&ed inte "!t o *y a ha dwa e eset) It sho"&d *e noted that when id&e is te %inated *y a ha dwa e eset$ the de#ice no %a&&y es"%es ! og a% e0ec"tion$ f o% whe e it &eft off$ "! to two %achine cyc&es *efo e the inte na& eset a&go ith% ta'es cont o&) 3n-chi! ha dwa e inhi*its access to inte na& RAM in this e#ent$ *"t access to the !o t !ins is not inhi*ited) To e&i%inate the !ossi*i&ity of an "ne0!ected w ite to a !o t !in when Id&e is te %inated *y eset$ the inst "ction fo&&owing the one that in#o'es Id&e sho"&d not *e one that w ites to a !o t !in o to e0te na& %e%o y)

POWER DOWN MODE


In the !owe down %ode the osci&&ato is sto!!ed$ and the inst "ction that in#o'es !owe down is the &ast inst "ction e0ec"ted) The on-chi! RAM and S!ecia& 6"nction Registe s etain thei #a&"es "nti& the !owe down %ode is te %inated) The on&y e0it f o% !owe down is a ha dwa e eset) Reset edefines the S6Rs *"t does not change the on-chi! RAM) The eset sho"&d not *e acti#ated *efo e 4CC is esto ed to its no %a& o!e ating &e#e& and %"st *e he&d acti#e &ong eno"gh to a&&ow the osci&&ato to esta t and sta*i&i(e)

T*+,- (2.3.3) S%*%./ #0 E1%-$2*, P32/ D.$324 I5,- *25 P#6-$ D#62 M#5-

SRTIST$ NA2G3NDA

1@

KEEP DISTANCE WARNING SYSTEM

2.4 TIMERS:
T37-$ & *25 1 Ti%e @ and Ti%e 1 in the AT+,S-. o!e ate the sa%e way as Ti%e @ and Ti%e 1 in the AT+,S-.) Registe !ai s 8T7@$ T219$ 8T71$ T219 a e the 1A-*it co"nte egiste s fo ti%e Cco"nte s @ and 1) T37-$ 2 Ti%e . is a 1A-*it Ti%e CCo"nte that can o!e ate as eithe a ti%e o an e#ent co"nte ) The ty!e of o!e ation is se&ected *y *it CCT. in the S6R T.C3N) Ti%e . has th ee o!e ating %odesB ca!t" e$ a"to- e&oad 8"! o down co"nting9$ and *a"d ate gene ato ) The %odes a e se&ected *y *its in T.C3N$ as shown in Ta*&e -).) Ti%e . consists of two +-*it egiste s$ T7. and T2.) In the Ti%e f"nction$ the T2. egiste is inc e%ented e#e y %achine cyc&e) Since a %achine cyc&e consists of 1. osci&&ato !e iods$ the co"nt ate is 1C1. of the osci&&ato f e/"ency)

T*+,- (2.4) T37-$ 2 O8-$*%324 M#5-/ In the Co"nte f"nction$ the egiste is inc e%ented in es!onse to a 1-to-@ t ansition at its co es!onding e0te na& in!"t !in$ T.) In this f"nction$ the e0te na& in!"t is sa%!&ed d" ing S-P. of e#e y %achine cyc&e) When the sa%!&es show a high in one cyc&e and a &ow in the ne0t cyc&e$ the co"nt is inc e%ented) The new co"nt #a&"e a!!ea s in the egiste d" ing S5P1 of the cyc&e fo&&owing the one in which the t ansition was detected) Since two %achine cyc&es 8.: osci&&ato !e iods9 a e e/"i ed to ecogni(e a 1-to-@ t ansition$ the %a0i%"% co"nt ate is 1C.: of the osci&&ato f e/"ency) To ens" e that a gi#en &e#e& is sa%!&ed at &east once *efo e it changes$ the &e#e& sho"&d *e he&d fo at &east one f"&& %achine cyc&e)

SRTIST$ NA2G3NDA

11

KEEP DISTANCE WARNING SYSTEM The e a e no est ictions on the d"ty cyc&e of e0te na& in!"t signa&$ *"t it sho"&d fo at &east one f"&& %achine to ens" e that a gi#en &e#e& is sa%!&ed at &east once *efo e it changes)

2.5 INTERRUPTS:
The AT+,S-. has a tota& of si0 inte "!t #ecto sB two e0te na& inte "!ts 8INT@ and INT19$ th ee ti%e inte "!ts 8Ti%e s @$ 1$ and .9$ and the se ia& !o t inte "!t) These inte "!ts a e a&& shown in 6ig" e .)-

FIGURE (2.5) INTERRUPTS SOURCE Each of these inte "!t so" ces can *e indi#id"a&&y ena*&ed o disa*&ed *y setting o c&ea ing a *it in S!ecia& 6"nction Registe IE) IE a&so contains a g&o*a& disa*&e *it$ EA$ which disa*&es a&& inte "!ts at once) Ti%e . inte "!t is gene ated *y the &ogica& 3R of *its T6. and EE6. in egiste T.C3N) Neithe of these f&ags is c&ea ed *y ha dwa e when the se #ice o"tine is #ecto ed to) In fact$ the se #ice o"tine %ay ha#e to dete %ine whethe it was T6. o EE6. that gene ated the inte "!t$ and that *it wi&& ha#e to *e c&ea ed in softwa e) The Ti%e @ and Ti%e 1 f&ags$ T6@ and T61$ a e set at S-P. of the cyc&e in which the ti%e s o#e f&ow)

SRTIST$ NA2G3NDA

1.

KEEP DISTANCE WARNING SYSTEM

T*+,- (2.5) I2%-$$.8%/ E2*+,- R-43/%-$

2.9 MEMOR) ORGANI:ATION :


The tota& %e%o y of +,S-. syste% is &ogica&&y di#ided in P og a% %e%o y and Data %e%o y) P og a% %e%o y sto es the ! og a%s to *e e0ec"ted$ whi&e data %e%o y sto es the data &i'e inte %ediate es"&ts$ #a ia*&es and constants e/"i ed fo the e0ec"tion of the ! og a%) P og a% %e%o y is in#a ia*&y i%!&e%ented "sing EPR3M$ *eca"se it sto es on&y ! og a% code which is to *e e0ec"ted and th"s it need not *e w itten into) 7owe#e $ the data %e%o y %ay *e ead f o% o w itten to and th"s it is i%!&e%ented "sing RAM) 6" the $ the ! og a% %e%o y and data %e%o y *oth %ay *e catego i(ed as on-chi! 8inte na&9 and e0te na& %e%o y$ de!ending "!on whethe the %e%o y !hysica&&y e0ists on the chi! o it is e0te na&&y inte faced) The +,S-. can add ess +K*ytes on-chi! %e%o y whose %a! sta ts f o% @@@@7 and ends at 16667) It can add ess A:K*ytes of e0te na& ! og a% %e%o y "nde the cont o& of PSEN 8&ow9 signa&)

SRTIST$ NA2G3NDA

15

KEEP DISTANCE WARNING SYSTEM

CHAPTER;3 POWER SUPPL)


3.1 INTRODUCTION:
Powe s"!!&ies a e designed to con#e t high #o&tage AC %ains e&ect icity to a s"ita*&e &ow #o&tage s"!!&y fo e&ect onics ci c"its and othe de#ices)

F34 (3.1) B,#<= D3*4$*7 #0 * R-4.,*%-5 P#6-$ S.88,> S>/%-7 3.2 TRANSFORMER:
A t ansfo %e ste!s down high #o&tage AC %ains to &ow #o&tage AC) 7e e we a e "sing a cente -ta! t ansfo %e whose o"t!"t wi&& *e sin"soida& with .:4 !ea' to !ea') )

F34( 3.2) O.%8.% W*?-0#$7 #0 %$*2/0#$7-$


The &ow #o&tage AC o"t!"t is s"ita*&e fo &a%!s$ heate s and s!ecia& AC %oto s) It is not s"ita*&e fo e&ect onic ci c"its "n&ess they inc&"de a ectifie and a s%oothing ca!acito ) The t ansfo %e o"t!"t is gi#en to the ectifie ci c"it)

3.3 RECTIFIER:
A ectifie con#e ts AC to DC$ *"t the DC o"t!"t is #a ying) The e a e se#e a& ty!es of ectifie s< he e we "se a * idge ectifie )

SRTIST$ NA2G3NDA

1:

KEEP DISTANCE WARNING SYSTEM The = idge ectifie is a ci c"it$ which con#e ts an ac #o&tage to dc #o&tage "sing *oth ha&f cyc&es of the in!"t ac #o&tage) The ci c"it has fo" diodes connected to fo % a * idge) The ac in!"t #o&tage is a!!&ied to the diagona&&y o!!osite ends of the * idge) The &oad esistance is connected *etween the othe two ends of the * idge)6o the !ositi#e ha&f cyc&e of the in!"t ac #o&tage$ diodes D1 and D5 cond"ct) The cond"cting diodes wi&& *e in se ies with the &oad esistance R2 and hence the &oad c" ent f&ows th o"gh R2) 6o the negati#e ha&f cyc&e of the in!"t ac #o&tage$ diodes D. and D: cond"ct)The cond"cting diodes D. and D: wi&& *e in se ies with the &oad esistance R2 and hence the c" ent f&ows th o"gh R2 in the sa%e di ection as in the ! e#io"s ha&f cyc&e) Th"s a *i-di ectiona& wa#e is con#e ted into "nidi ectiona&)

FIG (3.3.1) R-<%303-$ <3$<.3%

FIG (3.3.2) R-<%303-$ #.%8.%

S7##%@324:
The s%oothing *&oc' s%oothes the DC f o% #a ying g eat&y to a s%a&& i!!&e and the i!!&e #o&tage is defined as the de#iation of the &oad #o&tage f o% its DC #a&"e) S%oothing is a&so na%ed as fi&te ing) 6i&te ing is f e/"ent&y effected *y sh"nting the &oad with a ca!acito ) The action of this syste% de!ends on the fact that

SRTIST$ NA2G3NDA

1-

KEEP DISTANCE WARNING SYSTEM the ca!acito sto es ene gy d" ing the cond"ction !e iod and de&i#e s this ene gy to the &oads d" ing the no cond"cting !e iod) In this way$ the ti%e d" ing which the c" ent !asses th o"gh the &oad is ! o&onging Ted$ and the i!!&e is conside a*&y dec eased) The action of the ca!acito is shown with the he&! of wa#efo %)

Figure (3.3.3) Smoothing action of capacitor

F34.$- (3.3.4) W*?-0#$7 #0 %@- $-<%303-5 #.%8.% /7##%@324 3.4 "#,%*4- R-4.,*%#$:
4o&tage Reg"&ato e&i%inates i!!&e *y setting DC o"t!"t to a fi0ed #o&tage) 4o&tage eg"&ato ICs a e a#ai&a*&e with fi0ed 8ty!ica&&y -4$ 1.4 and 1-49 o #a ia*&e o"t!"t #o&tages)Many of the fi0ed #o&tage eg"&ato ICs has 5 &eads 8in!"t$ o"t!"t and high i%!edance9) >ene diode is an e0a%!&e of fi0ed eg"&ato which is shown he e)

SRTIST$ NA2G3NDA

1A

KEEP DISTANCE WARNING SYSTEM

F34.$- (3.4) "#,%*4- R-4.,*%#$ 3.5 POWER SUPPL) CIRCUIT:

F34 (3.5) POWER SUPPL) CIRCUIT

3.5 CONCLUSION:
We he e *y conc&"de that %ost of the digita& &ogic ci c"its and ! ocesso s need a - #o&t !owe s"!!&y) To "se these !a ts we inc&"de a eg"&ated - #o&t so" ce) ;n eg"&ated !owe s"!!&y wi&& *e anging f o% , #o&ts to .: #o&ts DC ) So$to %a'e a - #o&t !owe s"!!&y$ we "se a 2MG+@- #o&tage eg"&ato IC )

CHAPTER 4
SRTIST$ NA2G3NDA 1G

KEEP DISTANCE WARNING SYSTEM

ULTRASONIC SENSOR
4.1 INTRODUCTION :
Pa a&&a0Hs PING999I "&t asonic senso ! o#ides a #e y &ow-cost and easy %ethod of distance %eas" e%ent) This senso is !e fect fo any n"%*e of a!!&ications that e/"i e yo" to !e fo % %eas" e%ents *etween %o#ing o stationa y o*?ects) Nat" a&&y$ o*otics a!!&ications a e #e y !o!"&a *"t yo"H&& a&so find this ! od"ct to *e "sef"& in sec" ity syste%s o as an inf a ed e!&ace%ent if so desi ed)

FIG (4.1) ULTRASONIC SENSOR This %eas" es distance "sing sona < an "&t asonic 8we&& a*o#e h"%an hea ing9 !"&se is t ans%itted f o% the "nit and distance-to-ta get is dete %ined *y %eas" ing the ti%e e/"i ed fo the echo et" n) 3"t!"t f o% the PING999 senso is a #a ia*&e-width !"&se that co es!onds to the distance to the ta get) PING)))A S-2/#$ F-*%.$-/:

The PING999 has on&y has 5 connections$ which inc&"de 4dd$ 4ss$ and 1 IC3 !in) The 5-!in heade %a'es it easy to connect "sing a se #o e0tension ca*&e$ no so&de ing e/"i ed) Se#e a& sa%!&e codes a e a#ai&a*&e "sing the Ping999 senso )

L3/% #0 %-<@23<*, /8-<303<*%3#2/:


Range - .c% to 5% 8J)G-K to 1@H9 S"!!&y 4o&tageB -4 DC-1@L 8A*so&"teB Mini%"% :)-4$ Ma0i%"% A49 S"!!&y C" entB 5@ %A ty!< 5- %A %a0 5-!in inte face 8!owe $ g o"nd$ signa&9 .@ %A !owe cons"%!tion Na ow acce!tance ang&e

SRTIST$ NA2G3NDA

1+

KEEP DISTANCE WARNING SYSTEM


Si%!&e !"&se in C !"&se o"t co%%"nication Indicato 2ED shows %eas" e%ent in ! og ess In!"t T igge - !ositi#e TT2 !"&se$ . Ms %in$ - Ms ty!) Echo P"&se - !ositi#e TT2 !"&se$ 11- Ms to 1+)- %s Echo 7o&d-off - G-@ Ms f o% fa&& of T igge !"&se =" st 6 e/"ency - :@ '7( fo .@@ Ms Si(e - .. %% 7 0 :A %% W 0 1A %% D 8@)+- in 0 1)+ in 0 @)A in9

U,%$*/#23< /-2/#$/ 8a&so 'nown as %$*2/5.<-$/ when they *oth send and ecei#e9 wo ' on a ! inci!&e si%i&a to ada o sona which e#a&"ate att i*"tes of a ta get *y inte ! eting the echoes f o% adio o so"nd wa#es es!ecti#e&y) ;&t asonic senso s gene ate high f e/"ency so"nd wa#es and e#a&"ate the echo which is ecei#ed *ac' *y the senso ) Senso s ca&c"&ate the ti%e inte #a& *etween sending the signa& and ecei#ing the echo to dete %ine the distance to an o*?ect) This techno&ogy can *e "sed fo %eas" ingB wind s!eed and di ection 8ane%o%ete 9$ f"&&ness of a tan'$ and s!eed th o"gh ai o wate ) 6o %eas" ing s!eed o di ection a de#ice "ses %"&ti!&e detecto s and ca&c"&ates the s!eed f o% the e&ati#e distances to !a tic"&ates in the ai o wate ) To %eas" e the a%o"nt of &i/"id in a tan'$ the senso %eas" es the distance to the s" face of the f&"id) 6" the a!!&ications inc&"deB h"%idifie s$ sona $ %edica& "&t asonog a!hy$ *" g&a a&a %s$ and nondest "cti#e testing) Syste%s ty!ica&&y "se a t ansd"ce which gene ates so"nd wa#es in the "&t asonic ange$ a*o#e .@$@@@ he t($ *y t" ning e&ect ica& ene gy into so"nd$ then "!on ecei#ing the echo t" n the so"nd wa#es into e&ect ica& ene gy which can *e %eas" ed and dis!&ayed) The techno&ogy is &i%ited *y the sha!es of s" faces and the density o consistency of the %ate ia&) 6o e0a%!&e foa% on the s" face of a f&"id in a tan' co"&d disto t a eading)

SRTIST$ NA2G3NDA

1,

KEEP DISTANCE WARNING SYSTEM

Transducers:
An "&t asonic t ansd"ce is a de#ice that con#e ts ene gy into ultrasound$ o so"nd wa#es a*o#e the no %a& ange of h"%an hea ing) Whi&e technica&&y a dog whistle is an "&t asonic t ansd"ce that con#e ts %echanica& ene gy in the fo % of ai ! ess" e into "&t asonic so"nd wa#es$ the te % is %o e a!t to *e "sed to efe to piezoelectric transducers that con#e t e&ect ica& ene gy into so"nd) Pie(oe&ect ic c ysta&s ha#e the ! o!e ty of changing si(e when a voltage is a!!&ied$ th"s a!!&ying an a&te nating c" ent 8AC9 ac oss the% ca"ses the% to osci&&ate at #e y high f e/"encies$ th"s ! od"cing #e y high f e/"ency so"nd wa#es)

Detectors
Since !ie(oe&ect ic c ysta& gene ate a #o&tage when fo ce is a!!&ied to the%$ the sa%e c ysta& can *e "sed as an "&t asonic detecto ) So%e syste%s "se se!a ate t ans%itte and ecei#e co%!onents whi&e othe s co%*ine *oth in a sing&e !ie(oe&ect ic t anscei#e ) A&te nati#e %ethods fo c eating and detecting "&t aso"nd inc&"de %agnetost iction and ca!aciti#e act"ation)

4.2 A88,3<*%3#2/ #0 U,%$*/#23< /-2/#$/: U/- 32 7-53<32-:


Medica& "&t asonic t ansd"ce s 8! o*es9 co%e in a #a iety of diffe ent sha!es and si(es fo "se in %a'ing !ict" es of diffe ent !a ts of the *ody) The t ansd"ce %ay *e !assed o#e the s" face of the *ody o inse ted into an *ody o!ening s"ch as the ect"% o #agina) C&inicians who !e fo % "&t aso"nd-g"ided ! oced" es often "se a ! o*e !ositioning syste% to ho&d the "&t asonic t ansd"ce )

Use in industry;
;&t asonic senso s a e "sed to detect the ! esence of ta gets and to %eas" e the distance to ta gets in %any a"to%ated facto ies and ! ocess !&ants) Senso s with an on

SRTIST$ NA2G3NDA

.@

KEEP DISTANCE WARNING SYSTEM o off digita& o"t!"t a e a#ai&a*&e fo detecting the ! esence of o*?ects$ and senso s with an ana&og o"t!"t which #a ies ! o!o tiona&&y to the senso to ta get se!a ation distance a e co%%e cia&&y a#ai&a*&e)

U&t asonic senso s a e co%%on&y "sed fo

a wide #a iety of noncontact ! esence$

! o0i%ity$ o distance %eas" ing a!!&ications) These de#ices ty!ica&&y t ans%it a sho t *" st of "&t asonic so"nd towa d a ta get$ which ef&ects the so"nd *ac' to the senso ) The syste% then %eas" es the ti%e fo the echo to et" n to the senso and co%!"tes the distance to the ta get "sing the s!eed of so"nd in the %edi"%)

W*?-,-24%@ #0 S#.25 */ * F.2<%3#2 #0 S#.25 S8--5 *25 F$-B.-2<>:


The wa#e&ength of so"nd changes as a f"nction of *oth the s!eed of so"nd and the f e/"ency$ as shown *y the e0! essionB N O cCf whe eB N O wa#e&ength CO s!eed of &ight 6 O f e/"ency 6ig" e . is a !&ot of the wa#e&ength of so"nd as a f"nction of f e/"ency at oo% te%!e at" e in ai )

FIG (4.2) PLOT OF WA"E LENGTH "S FREQUENC) B*<=4$#.25N#3/-

SRTIST$ NA2G3NDA

.1

KEEP DISTANCE WARNING SYSTEM The &e#e& of *ac'g o"nd "&t asonic noise di%inishes as the f e/"ency inc eases) The eason is that &ess noise at the highe f e/"encies is ! od"ced in the en#i on%ent$ and the noise that is ! od"ced is g eat&y atten"ated as it t a#e&s th o"gh the ai )

SRTIST$ NA2G3NDA

..

4.3 U,%$*/#23< /-2/#$ 5$3?- <3$<.3%:


The in#e te is "sed fo the d i#e of the "&t asonic senso ) The two in#e te s a e KEEP DISTANCE WARNING SYSTEM connected in !a a&&e& *eca"se of the t ans%ission e&ect ic !owe inc ease) The !hase with the #o&tage to a!!&y to the !ositi#e te %ina& and the negati#e te %ina& of the senso has *een 1+@ deg ees shifted) =eca"se it is c"tting the di ect c" ent with the ca!acito $ a*o"t twice of 4o&tage of the in#e te o"t!"t a e a!!&ied to the senso )

S342*,*78,303<*%3#2<3$<.3%:
Gene a&&y$ the !ositi#e and the negati#e !owe s"!!&y a e "sed fo the o!e ationa& a%!&ifie ) The ci c"it this ti%e wo 's with the sing&e !owe s"!!&y of D, 4) The efo e$ fo the !ositi#e in!"t of the o!e ationa& a%!&ifie s$ the ha&f of the !owe s"!!&y #o&tage is a!!ied as the *ias #o&tage and it is %ade :)- 4 in the cent a& #o&tage of the a%!&ified a&te nating c" ent signa&) When "sing the o!e ationa& a%!&ifie with the negati#e feed*ac'$ the #o&tage of the !ositi#e in!"t te %ina& and the #o&tage of the negati#e in!"t te %ina& *eco%e e/"a& a!! o0i%ate&y) So$ *y this *ias #o&tage$ the side of the !ositi#e and the side of the negati#e of the a&te nating c" ent signa& can *e e/"a&&y a%!&ified) When not "sing this *ias #o&tage$ the disto tion ca"ses the a&te nating c" ent signa&)

S342*, 5-%-<%#$:
This ci c"it is the ci c"it which detects the "&t asonic which et" ned f o% the %eas" e%ent o*?ect) The o"t!"t of the detection ci c"it is detected "sing the co%!a ato ) At the ci c"it this ti%e$ the o!e ationa& a%!&ifie of the sing&e !owe s"!!&y is "sed instead of the co%!a ato ) The o!e ationa& a%!&ifie a%!&ifies and o"t!"ts the diffe ence *etween the !ositi#e) In case of the o!e ationa& a%!&ifie which doesnHt ha#e the negati#e feed*ac'$ at a &itt&e in!"t #o&tage$ the o"t!"t *eco%es the sat" ation state) So$ when the !ositi#e in!"t *eco%es highe a &itt&e than the negati#e in!"t$ the diffe ence is tens of tho"sands of ti%es a%!&ified and the o"t!"t *eco%es the sa%e as the !owe s"!!&y a&%ost) 8It is the sat" ation state9 3!!osite&y$ when the !ositi#e in!"t *eco%es &owe a &itt&e than the negati#e in!"t$ the diffe ence is tens of tho"sands of ti%es a%!&ified and the o"t!"t *eco%es @ 4 a&%ost)8It is in the 366 condition9 This o!e ation is the sa%e as the o!e ation of the co%!a ato ) 7owe#e $ *eca"se the inne ci c"it is diffe ent a*o"t the co%!a ato and the o!e ationa& a%!&ifie $ the co%!a ato can not *e "sed )

CHAPTER 5 LCD DISPLA) CIRCUIT


5.1 INTRODUCTION:
SRTIST$ NA2G3NDA .5 The a&!han"%e ic 1A cha acte E .&ine 2CD e/"i es +data &ines and a&so 5 cont o&

signa&s and they a e inte faced to 5AA:)=y "sing . !o ts$ !o t @P5 data !ins a e connected to

KEEP DISTANCE WARNING SYSTEM

APPENDI(;THEOR) OF MICROCONTROLLER
A %ic o-cont o&&e contains a CP;$ c&oc' ci c"it y$ R3M$ Ra% and IC3 ci c"it y on a sing&e integ ated ci c"it !ac'age) The Mic o-cont o&&e is the efo e$ a se&f-contained de#ice$ which does not e/"i e a host of associated s"!!o t chi!s fo its o!e ation as con#entiona& %ic o! ocesso s do) It offe s se#e a& ad#antages o#e con#entiona& %"&ti-chi! syste%s) The e is a cost and s!ace ad#antage as e0t a chi! costs and ! inted ci c"it *oa d and connecto s e/"i ed to s"!!o t %"&ti-chi! syste%s a e e&i%inated) The othe ad#antages inc&"de chea!e %aintenance$ dec eased ha dwa e design effo t and dec eased *oa d density$ which is e&e#ant in !o ta*&e cont o& e/"i!%ent) The %ic ocont o&&e that we "se is AT+,S-.)

M-7#$> O$4*23C*%3#2 #0 M3<$#<#2%$#,,-$:


The tota& %e%o y of +,S-. syste% is &ogica&&y di#ided in P og a% %e%o y and Data %e%o y) P og a% %e%o y sto es the ! og a%s to *e e0ec"ted$ whi&e data %e%o y sto es the data &i'e inte %ediate es"&ts$ #a ia*&es and constants e/"i ed fo the e0ec"tion of the ! og a%) P og a% %e%o y is in#a ia*&y i%!&e%ented "sing EPR3M$ *eca"se it sto es on&y ! og a% code which is to *e e0ec"ted and th"s it need not *e w itten into) 7owe#e $ the data %e%o y %ay *e ead f o% o w itten to and th"s it is i%!&e%ented "sing RAM) Gnd #cc ! eset s the ! w ogen d@ y d1 d. d: y ddA %ay dG #cc gnd i(ed as 6" the $ a% %e%o and datad5 %e%o *oth *e catego on-chi! 8inte na&9 and e0te na& %e%o y$ de!ending "!on whethe the %e%o y SRTIST$ NA2G3NDA .:

LCD DISPLA)

KEEP DISTANCE WARNING SYSTEM !hysica&&y e0ists on the chi! o it is e0te na&&y inte faced) The +,S-. can add ess +K*ytes on-chi! %e%o y whose %a! sta ts f o% @@@@7 and ends at 16667) It can add ess A:K*ytes of e0te na& ! og a% %e%o y "nde the cont o& of PSEN 8&ow9 signa&) The AT+,S-. i%!&e%ents .-A *ytes of on-chi! RAM) The "!!e 1.+ *ytes occ"!y a !a a&&e& add ess s!ace to the S!ecia& 6"nction Registe s) That %eans the "!!e 1.+*ytes ha#e the sa%e add esses as the S6R s!ace *"t a e !hysica&&y se!a ate f o% S6R s!ace) When an inst "ction accesses an inte na& &ocation a*o#e add ess G67$ the add ess %ode "sed in the inst "ction s!ecifies whethe the CP; accesses the "!!e 1.+ *ytes of RAM o the S6R s!ace) Inst "ctions that "se di ect add essing access S6R s!ace)

SRTIST$ NA2G3NDA

.-

KEEP DISTANCE WARNING SYSTEM

SRTIST$ NA2G3NDA

.A

Common questions

Powered by AI

Ultrasonic sensors can adapt to different applications by leveraging specific attributes of sound wave reflection in various environments. For instance, liquid level measurement uses the sensor's ability to detect distance by measuring the time between emitting a sound wave and receiving its reflection from the liquid surface. In air speed detection, sensors utilize multiple detectors to determine speed through changes in relative distances to air particulates. Each application tailors sensor output types—digital for presence or analog for distance—and employs specific configurations to optimize accuracy and reliability given the environmental factors present .

The signal amplification circuit in an ultrasonic sensor uses operational amplifiers configured with a single power supply of +9 V, providing a bias voltage to amplify alternating current signals symmetrically. The operational amplifiers amplify the input differential signal by tens of thousands of times and convert it into a detectable output. This setup allows the system to achieve precise signal amplification necessary for accurate distance measurements, ensuring that incoming echoes are recorded with minimal distortion. The proper function of operational amplifiers is critical across both the amplification and signal amplification sections .

An ultrasonic sensor calculates the distance to an object by emitting ultrasonic sound waves and measuring the time it takes for the echoes to return. Employing the principle of sonar, the sensor converts the time delay into a distance measurement based on the speed of sound in the medium. Such a sensor is advantageous in robotics for navigation and obstacle avoidance as well as in medical ultrasonography due to its non-invasive nature, high resolution, and ability to differentiate between various tissue types. These different applications require adaptations in the sensor's configuration to cater to specific operational environments .

The AT89S52 microcontroller, being a single-chip solution, provides several advantages over conventional multi-chip processor systems, including reduced costs and space savings due to fewer external components. It has integrated clock circuitry, ROM, RAM, and I/O capabilities, which streamline hardware design and reduce board density. This is critical in portable device manufacturing. Maintenance costs decline due to the simpler architecture, and adaptability in design improves as developers can focus on application-specific features instead of system interconnects. These characteristics make it a highly suitable choice for embedded applications requiring robust, compact, and efficient control units .

XTAL1 and XTAL2 pins on the AT89S52 serve as the input and output to the inverting amplifier respectively, allowing the construction of an on-chip oscillator circuit. The oscillator can be utilized by connecting either a quartz crystal or a ceramic resonator across these pins. To use an external clock source, XTAL1 is driven by the clock signal while XTAL2 is left unconnected. The circuit facilitates a stable clock input for the microcontroller's operations. The configuration is crucial for ensuring reliable clock signal generation and processing .

The ALE (Address Latch Enable) pin in the AT89S52 microcontroller serves as a control line that allows the multiplexing of data and address signals over one bus line. This enables the use of fewer pins for the bus, reducing the microcontroller's pin count. When bit 0 of SFR location 8EH is set, ALE is active only during MOVX or MOVC instructions, otherwise weakly pulled high. Its role changes if the microcontroller operates in external execution mode, wherein ALE-disable bit activity has no impact. Understanding this dynamic is critical for leveraging the micromanagement of resource allocation in diverse execution scenarios .

The AT89S52 microcontroller differentiates between program memory and data memory, which serve distinct functions. Program memory, implemented via EPROM, stores code that does not typically change, thus being read-only. Data memory, on the other hand, consists of on-chip RAM suitable for storing variable data and intermediate processing results. On-chip RAM is split into lower 128 bytes accessible directly and upper 128 bytes, which overlap with Special Function Registers. The structure enables efficient data handling during processing and enhances system design by minimizing external memory dependency .

In Idle Mode, the CPU of the AT89S52 stops while peripherals such as RAM, timer/counters, serial port, and interrupt system remain active. This allows the system to save power while maintaining certain functionalities. The mode is only exited through an interrupt or hardware reset. In contrast, the Power Down Mode stops the oscillator, resulting in the suspension of all chip operations except for preserving RAM contents; a hardware reset is needed to exit this mode. Both modes serve different power-saving needs depending on the level of functionality retention required .

Ultrasonic sensor readings can be significantly affected by environmental conditions and object characteristics. For instance, irregular surface shapes can distort the echoes, leading to inaccurate measurements. Similarly, the density and consistency of the sensor's surrounding material, such as foam on a liquid's surface, can alter sound wave propagation, distorting distance estimates. These limitations necessitate careful consideration of application conditions and may require additional calibration or use of alternative sensing technologies for precise measurements .

The 8031 microcontroller has 128 bytes of RAM, two timers, and six interrupts but lacks built-in ROM. The 89S51 has 4KB ROM, 128 bytes of RAM, two timers, and six interrupts, making it slightly more advanced due to its built-in ROM. The 89S52, used in the concerned project, has the highest specifications among the three, with 8KB ROM, 128 bytes of RAM, three timers, and eight interrupts. This makes the 89S52 more versatile, especially for applications requiring additional storage and enhanced interrupt handling .

You might also like