breath o meter

60
BREATH-O-METER PROJECT REPORT SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE AWARD OF DEGREE IN BACHELOR OF TECHNOLOGY ELECTRONICS AND COMMUNICATION ENGINEERING CHALLA RAJESH REDDY (03071A0459) DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING V.N.R VIGNANA JYOTHI INSTITUTE OF ENGINEERING & TECHNOLOGY (Affiliated to Jawaharlal Nehru Technological University – A.P) Vignana Jyothi Nagar, Bachupally, (Via) Kukatpally, Hyderabad – 500 072 2006-2007 1

Upload: rahuljindal

Post on 08-Apr-2015

832 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Breath o Meter

BREATH-O-METER

PROJECT REPORT SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE AWARD OF

DEGREE IN BACHELOR OF TECHNOLOGY

ELECTRONICS AND COMMUNICATION ENGINEERING

CHALLA RAJESH REDDY (03071A0459)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

ENGINEERING

V.N.R VIGNANA JYOTHI INSTITUTE OF ENGINEERING &

TECHNOLOGY

(Affiliated to Jawaharlal Nehru Technological University – A.P)

Vignana Jyothi Nagar, Bachupally, (Via) Kukatpally, Hyderabad – 500 072

2006-2007

1

Page 2: Breath o Meter

ACKNOWLEDGEMENTS

Words are only representations of our regards and gratitude that we have towards

their actions and inherent associations. As a matter of fact without co-operation no

thought could be coined into a real action. The consistent motivation and invaluable

support throughout the project is absolutely an issue that cannot be quantitatively

measured. These acknowledgements are only a fraction of regards towards their gestures.

We thank Dr. C.D.Naidu (Head of Department, Electronics & Communication)

who motivated us to make out this useful and highly potential project for the present

time. We also thank him for being our internal guide and providing operational support

also extending all co-operations during the course of study.

We would like to place on record our deep appreciation and whole hearted sincere

thanks to Mrs. Y.Padmasai (Associate Professor ECE) whose untimely encouragement

boosted our confidence to this project.

We also wish to express our profound sense of gratitude and indebtedness towards

Mr. Raju (Assistant) Electronic Division for his valuable guidance, constructive

criticism and consistently enthusiastic interest throughout the course of project and

making of the instrument.

Finally, we are grateful to VNR Vignana Jyothi Institute of Engineering & Technology

for providing us complete infrastructure and an opportunity to take up this project.

2

Page 3: Breath o Meter

BREATH-O-METER Challa Rajesh Reddy (03071A0459) M.Sandeep (03071A0433)

G.Kishore (03071A0429) Abhishek Singhal (03071A0401)

V.N.R VIGNANA JYOTHI INSTITUTE OF ENGINEERING & TECHNOLOGY

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

ABSTRACTWith innumerable number of road accidents happening everyday, every year due

to drunken driving has become an important issue of concern. The life threatening

addiction of alcohol has ruined many lives and futures. This project is intended to

develop an instrument known as “BREATH-O-METER” which detects and alerts about

the level of alcohol consumed by a person. Our ultimate mission is to make people aware

about the drastic affects of alcohol in quality of life. This, instrument has been developed

with an overall look of compact nature, availability and within the reach of common man.

The Breath-o-Meter is an electronic instrument, involving a non-invasive method of

measuring the human’s blood alcohol content (BAC). The design embodies a mix of

electronic and mechanical components. Simply blowing into the mouthpiece causes the

Breath-o-Meter to automatically begin to take a sample of your own breath and

determines the state of a person. The instrument mainly features AT89C51

microcontroller along with the usage of alcohol sensor which functions as a variable

resistor, whose resistance has a logarithmic response to ethanol.

Hence, we try to come up with an engineering solution to monitor this important

social problem. Thus, with this kind of muscle behind a common goal, anything is

possible and together we can make a difference.

3

Page 4: Breath o Meter

1.0 INTRODUCTIONA breath-o-meter is a device based on non-invasive method for estimating blood alcohol

content (BAC) from a breath sample. Though technologies for detecting alcohol vary, it's

widely accepted that Dr. Robert Borkenstein (1912-2002), a captain with the Indiana

State Police and later a professor of Indiana University at Bloomington, is regarded as the

first to create a device that measures a subject's blood alcohol level based on a breath

sample. In 1954, Borkenstein invented his breath analyzer, which used chemical

oxidation and photometry to determine alcohol concentration. Subsequent breath

detectors have converted primarily to infrared spectroscopy. The invention of the breath

analyzers provided law enforcement with a non-invasive test providing immediate results

to determine an individual's BAC at the time of testing. It does not, however, determine

an individual's level of intoxication, as this varies by a subject's individual alcohol

tolerance. And the BAC test result itself can vary between individuals consuming

identical amounts of alcohol due to race, gender, weight, genetic pre-disposition,

metabolic rate, etc. Further, the assumption that the test subject's partition ratio will be

average -- that there will be 2100 parts in the blood for every part in the breath -- means

that accurate analysis of a given individual's blood alcohol by measuring breath alcohol is

difficult, as the ratio varies considerably. Breath analyzers don't directly measure blood

alcohol content or concentration, which requires the analysis of a blood sample. Instead,

they estimate BAC indirectly by measuring the amount of alcohol in one's breath. Two

technologies are most prevalent. Evidentiary machines, used by police forces, generally

utilize infrared spectrophotometer technology. Hand-held field testing devices, less

accurate but becoming increasingly popular with law enforcement, are based on

electrochemical fuel cell analysis; used by officers in the field as a form of "field sobriety

test", they are commonly called PBT (preliminary breath test) or PAS (preliminary

alcohol screening).There are a number of models of breath alcohol analyzers that are

intended for the consumer market. These hand-held devices are less expensive and can be

much smaller than the devices used by law enforcement, and are less accurate, but can

still give a useful indication of the user’s BAC. Almost all of these devices use less

expensive tin-oxide semiconductor alcohol sensors, which are not as stable as fuel cell

sensors or infrared devices, and are more prone to false positives.

4

Page 5: Breath o Meter

2.0 PROBLEM DEFINITION 2.1 Affects of alcohol & traffic on quality of lifeThe recognition that drunk driving posed a major danger to the public is as old as

motorized traffic. A law passed in 1872 in England specified prison as a possible

punishment for being drunk while in charge of a vehicle powered by a steam engine The

role of alcohol in traffic safety has produced more activity, literature, passion, and

controversy than any other safety

topic. In many countries there are

advocacy organizations,

professional societies, and

journals devoted exclusively to

the effects of alcohol on traffic

safety.

Reaffirming resolutions on

development of the World Health Organization programmes on alcohol-related problems,

prevention and control of drug and alcohol abuse, mental health: responding to the call

for action, road safety and health promotion and healthy lifestyles and the Global

Strategy on Diet.

Recalling the world health report 2002, which indicated that 4% of the burden of disease

And 3.2% of all deaths globally are attributed to alcohol, and that alcohol is the foremost

risk to health in low-mortality developing countries and the third in developed countries;

5

Page 6: Breath o Meter

Recognizing that the patterns, context and overall level of alcohol consumption influence

the health of the population as a whole, and that harmful drinking is among the foremost

underlying causes of disease, injury, violence – especially domestic violence against

women and children – disability, social problems and premature deaths, is associated

With mental ill-health, has a serious

impact on human welfare affecting

individuals, families, communities and

society as a whole, and contributes to

social and health inequalities.

Emphasizing the risk of harm due to

alcohol consumption, particularly, in the

context of driving a vehicle, at the

workplace and during pregnancy, alarmed by the extent of public health problems

associated with harmful consumption of alcohol and the trends in hazardous drinking,

particularly among young people.

Recognizing that intoxication with alcohol is associated with high-risk behaviors,

including the use of other psychoactive substances and unsafe sex, concerned about the

economic loss to society resulting from harmful alcohol consumption, costs to the health

services, social welfare and

criminal justice systems,

lost productivity and

reduced economic

development. Alcohol is

responsible for more traffic

deaths -- about 22 000 per

year -- than any other

single factor. Large though the traffic losses due to alcohol are, they would be

considerably larger were it not for implementation in the past of many counter measures.

Important among these is the development of laws which proscribe driving with BAC in

excess of some legally specified limit, typically 0.1% , but lower elsewhere. There are a

number of approaches which have the potential to further reduce losses attributable to

6

Page 7: Breath o Meter

alcohol, such as increasing the perceived probability of detection for violating drunken

driving laws.

More potentially important in the future than laws aimed specifically at individuals

violating drunken driving laws are changes in the broader social context. Drunk driving

is intrinsically linked to overall national alcohol consumption; large reductions in drunk

driving necessarily require reductions in alcohol consumption. Increases in price and

difficulty of obtaining, and decreases in advertising, all lead to reduced alcohol

consumption. The main potential for

large decreases in drunk driving is in

the synergistic interaction of the

types of factors which led to such

dramatic changes in smoking. These

factors include the elimination of

television advertising, and the

general glamorizing of the product in

fictional representations.

7

Page 8: Breath o Meter

The chemical bonds between the atoms are shared pairs of electrons. Chemical bonds are

much like springs: They can bend and stretch.

3.1 Effects of alcohol on the body

The effects of alcohol on the human body can take several forms.

Alcohol, specifically ethanol, is a potent central nervous system depressant, with a range

of side effects. The amount and circumstances of consumption play a large part in

determining the extent of intoxication; e.g., consuming alcohol after a heavy meal is less

likely to produce visible signs of intoxication than consumption on an empty stomach.

Hydration also plays a role, especially in determining the extent of hangovers. The

concentration of alcohol in blood is usually given by BAC.

3.0 THE CHEMISTRY OF ALCOHOLThe alcohol found in alcoholic beverages is ethyl alcohol (ethanol). The molecular

structure of ethanol looks like this:

H

H3C - C - O - H

H

Where C is carbon, H is hydrogen, O is oxygen and each hyphen is a chemical bond

between the atoms. For clarity, the bonds of the three hydrogen atoms to the left carbon

atom are not shown.

The OH (O - H) group on the molecule is what makes it an alcohol. There are four types

of bonds in this molecule:

• carbon-carbon (C - C)

• carbon-hydrogen (C - H)

• carbon-oxygen (C - O)

• oxygen-hydrogen (O - H)

8

Page 9: Breath o Meter

Alcohol has a biphasic effect on the body, which is to say that its effects change over

time. Initially, alcohol generally produces feelings of relaxation and cheerfulness, but

further consumption can lead to blurred vision and coordination problems. Cell

membranes are highly permeable to alcohol, so once alcohol is in the bloodstream it can

diffuse into nearly every tissue of the body. After excessive drinking, unconsciousness

can occur and extreme levels of consumption can lead to alcohol poisoning and death (a

concentration in the blood stream of 0.55% will kill half of those affected). Death can

also be caused by asphyxiation when vomit, a frequent result of over consumption,

blocks the trachea and the individual is too inebriated to respond. An appropriate first aid

response to an unconscious, drunken person is to place them in the recovery position.

Intoxication frequently leads to a lowering of one's inhibitions, and intoxicated people

will do things they would not do while sober, often ignoring social, moral, and legal

considerations.

3.2 Intoxication

Ethanol acts as a central nervous system depressant. In small amounts, ethanol causes a

mild euphoria and removes inhibitions, and in large doses it causes drunkenness,

generally at a Blood Alcohol Content of about 0.1%. At higher concentrations, alcohol

causes intoxication, coma, and death. Blood ethanol content above 0.4% can be fatal,

although regular heavy drinkers can tolerate somewhat higher levels than non-drinkers.

Eight to ten drinks per hour is considered a fatal dosage for the average 54 kg (119 lb.)

person. One drink is equivalent to one shot of 40% above (80 proof) liquor, one 12 US fl

oz (355 ml) Beer or one 4–5 US fl oz (120–150 ml) glass of wine.

In the UK, a "unit" of alcohol is 10 ml pure ethanol; so examples of drinks containing one

unit of alcohol include one 25 ml measure of spirits (40% ABV), one 125 ml glass of

weak wine (8% ABV), one half-pint (284 ml) of weak (3.5% ABV) beer, or just over one

third of a pint (about 200 ml) of "premium" (5% ABV) lager. (Note that in fact most

wines are about 12% ABV, so would contain 1.5 units per 125 ml glass, and that many

establishments serve wine by the 175 ml glass. A 175ml glass of 12% wine contains 2.1

units of alcohol).

9

Page 10: Breath o Meter

To determine how many units an alcoholic drink contains a simple formula may be used:

(ABV*ml)/1000. Thus, a "shot" of 40% ABV liquor (approximately 44ml or 1.5 US fl

oz) is actually 1.76 units of alcohol ((40*44)/1000). As a result, one U.S. "shot" of

alcohol is almost double the amount experienced by the international community. As a

result, "shot-takers" in the United States should be aware of the differences between the

two standards and adjust accordingly to prevent alcohol over consumption. Alcoholism,

addiction to alcohol, is a major public health problem. Alcoholics develop a number of

health problems, with cirrhosis of the liver among the most significant. Unlike

withdrawal from some other drugs/intoxicants such as the Opioids, withdrawal from

heavy alcohol consumption can produce delirium tremens that can be fatal. Any alcohol

consumption during pregnancy carries a heavy risk of permanent mental and physical

defects in the child, known as fetal alcohol spectrum disorder.

3.3 Action on the brain

Ethanol is quickly absorbed into the bloodstream and reaches the brain. As a small

molecule, it is able to cross the blood-brain barrier. The molecular targets of alcohols

actions remain essentially unidentified, although many targets have been suggested,

including ion channels and intracellular signaling molecules. Alcohol works on the

GABA system at the synaptic level, and it has a rapid onset of action. Essentially, it

causes the GABA receptor, which is an ion channel, to remain open longer than it does

without the addition of ethanol into the synaptic cleft (the space between two neurons, or

brain cells). This causes more negatively charged particles to enter brain cells than would

10

Page 11: Breath o Meter

under normal conditions. The overall effect is to slow the functional processes of the

brain cell. GABA is commonly known as the brain's "brake" mechanism.

3.4 Blackouts

"Blacking out" or blackouts (a form of anterograde amnesia) are a common problem

usually associated with heavy drinking. They are characterized by a person's inability to

recall events which occurred during the period of blacking out. Blackouts can be avoided

or prevented by drinking less, drinking water and eating. A 2001 survey at Duke

University found that 7.1% of respondents had experienced blackouts within 2 weeks of

the survey.

3.5 Carcinogenic effects

The International Agency for Research on Cancer (Centre International de Recherché sur

le Cancer) of the World Health Organization has classified alcohol as a Group 1

carcinogen. Its evaluation states, "There is sufficient evidence for the carcinogenicity of

alcoholic beverages in humans.… Alcoholic beverages are carcinogenic to humans

(Group 1)."

The U.S. National Institute on Alcohol Abuse and Alcoholism (NIAAA) reports that

"Although there is no evidence that alcohol itself is a carcinogen, alcohol may act as a co-

carcinogen by enhancing the carcinogenic effects of other chemicals. For example,

studies indicate that alcohol enhances tobacco's ability to stimulate tumor formation in

rats. In humans, the risk for mouth, tracheal, and esophageal cancer is 35 times greater

for people who both smoke and drink than for people who neither smoke nor drink,

implying a co-carcinogenic interaction between alcohol and tobacco-related

carcinogens."

"Studies have suggested that high concentrations of acetaldehyde, which is produced as

the body breaks down ethanol, could damage DNA in healthy cells. … Researchers at the

National Institute on Alcohol Abuse and Alcoholism in Bethesda, Maryland, have added

weight to this idea by showing that the damage occurs at concentrations of acetaldehyde

similar to those in saliva and the gastrointestinal tract while people drink alcohol.

11

Page 12: Breath o Meter

Acetaldehyde appears to react with polyamines - naturally occurring compounds essential

for cell growth - to create a particularly dangerous type of mutagenic DNA base called a

Cr-Pdg adduct…"

The strongest link between alcohol and cancer involves cancers of the upper digestive

tract, including the esophagus, the mouth, the pharynx, and the larynx. Less consistent

data link alcohol consumption and cancers of the liver, breast, and colon.

Upper digestive tract - Chronic heavy drinkers have a higher incidence of esophageal

cancer than does the general population. The risk appears to increase as alcohol

consumption increases. An estimated 75% of esophageal cancers in the United States are

attributable to chronic, excessive alcohol consumption.

Nearly 50% of cancers of the mouth, pharynx, and larynx are associated with heavy

drinking. According to mid-1980s U.S. case-control study, people who consumed an

average of more than four drinks per day incurred a nine-fold increase in risk of oral and

pharyngeal cancer, while there was about a four-fold increase in risk associated with

smoking two or more packs of cigarettes per day. Heavy drinkers who also were heavy

smokers experienced a greater than 36-fold excess compared to abstainers from both

products.

Liver - Prolonged, heavy drinking has been associated in many cases with primary liver

cancer. However, it is liver cirrhosis, whether caused by alcohol or another factor that is

thought to induce the cancer. In the United States, liver cancer is relatively uncommon,

afflicting approximately 2 people per 100,000, but excessive alcohol consumption is

linked to as many as 36% of these cases by some investigators.

3.5 Metabolism of alcohol and action on the liver

The liver breaks down alcohols into acetaldehyde by the enzyme alcohol dehydrogenize,

and then into acetic acid by the enzyme acetaldehyde dehydrogenize. Next, the acetate is

converted into fats or carbon dioxide and water. The fats are mostly deposited locally

which, according to some, leads to the characteristic "beer belly". Chronic drinkers,

however, so tax this metabolic pathway that things go awry: fatty acids build up as

12

Page 13: Breath o Meter

plaques in the capillaries around liver cells and those cells begin to die, which leads to the

liver disease cirrhosis. The liver is part of the body's filtration system and if it is damaged

then certain toxins build up, thus leading to symptoms of jaundice.

The alcohol dehydrogenize of women is less effective than that of men. The percentage

of water in women's bodies is less than that of men. Therefore, the alcohol has less

volume to dissolve in, leading to a higher blood alcohol concentration when the same

amount of alcohol is ingested. This contributes to the fact that women become intoxicated

more quickly than men. Also contributing is the fact that men have a more active first-

pass metabolism of alcohol in the stomach and small intestine.

Some people, especially those of East Asian descent, have a genetic mutation in their

acetaldehyde dehydrogenize gene, resulting in less potent acetaldehyde dehydrogenize.

This leads to a buildup of acetaldehyde after alcohol consumption, causing the alcohol

flush reaction with hangover-like symptoms such as flushing, nausea, and dizziness.

These people are unable to drink much alcohol before feeling sick, and are therefore less

susceptible to alcoholism. This adverse reaction can be artificially reproduced by drugs

such as disaffirm, which are used to treat chronic alcoholism by inducing an acute

sensitivity to alcohol.

3.6 Dehydration

Consumption of ethanol has a rapid diuretic effect, meaning that more urine than usual is

produced, since ethanol inhibits the production of ant diuretic hormone.

Over consumption can therefore lead to dehydration (the loss of water).

3.7 Hangover

13

Page 14: Breath o Meter

A common after-effect of ethanol intoxication is the unpleasant sensation known as

hangover, which is partly due to the dehydrating effect of ethanol. Hangover symptoms

include dry mouth, headache, nausea, and sensitivity to light and noise. These symptoms

are partly due to the toxic acetaldehyde produced from alcohol by alcohol dehydrogenize,

and partly due to general dehydration. The dehydration portion of the hangover effect can

be mitigated by drinking plenty of water between and after alcoholic drinks. Other

components of the hangover are thought to come from the various other chemicals in an

alcoholic drink, such as the tannins in red wine, and the results of various metabolic

processes of alcohol in the body, but few scientific studies have attempted to verify this.

Consuming water between drinks is the best way to prevent or lessen the effects of a

hangover.

3.8 Beneficial effects of alcohol

The World Health Organization (WHO) reports that there is convincing evidence that

"low to moderate alcohol intake" results in a decreased risk of coronary heart disease.

However, the WHO cautions that "other cardiovascular and health risks associated with

alcohol do not favor a general recommendation for its use."

Also it has been suggested that moderate consumption of alcohol can reduce the risk of

dementia, facilitate memory and learning, and even improve IQ scores. Moderate

drinkers tend to have better health and live longer than those who abstain from alcohol or

are heavy drinkers.

3.9 Effects by dose

Different concentrations of alcohol in the human body have different effects on the

subject. The following lists the effects of alcohol on the body, depending on the blood

alcohol concentration or BAC.

Please note: the BAC percentages provided below are just estimates and used for

illustrative purposes only. They are not meant to be an exhaustive reference; please

refer to a healthcare professional if more information is needed.

14

Page 15: Breath o Meter

• Euphoria (BAC = 0.03 to 0.12 %)

o Subject may experience an overall improvement in mood and possible

euphoria.

o They may become more self-confident or daring.

o Their attention span shortens. They may look flushed.

o Their judgment is not as good — they may express the first thought that

comes to mind, rather than an appropriate comment for the given situation.

o They have trouble with fine movements, such as writing or signing their

name.

o

• Lethargy (BAC = 0.09 to 0.25 %)

o Subject may become sleepy

o They have trouble understanding or remembering things, even recent

events. They do not react to situations as quickly.

o Their body movements are uncoordinated; they begin to lose their balance

easily, stumbling; walking is not stable.)

o Their vision becomes blurry. They may have trouble sensing things

(hearing, tasting, feeling, etc.).

• Confusion (BAC = 0.18 to 0.30 %)

o Profound confusion — uncertain where they are or what they are doing.

Dizziness and staggering occur.

o Heightened emotional state — aggressive, withdrawn, or overly

affectionate. Vision, speech, and awareness are impaired.

o Poor coordination and pain response. Nausea and vomiting often occur.

• Stupor (BAC = 0.25 to 0.40 %)

o Movement severely impaired; lapses in and out of consciousness.

o Subjects can slip into a coma; will become completely unaware of

surroundings, time passage, and actions.

o Risk of death is very high due to alcohol poisoning and/or pulmonary

aspiration of vomit while unconscious.

15

Page 16: Breath o Meter

• Coma (BAC = 0.35 to 0.50 %)

o Unconsciousness sets in.

o Reflexes are depressed (i.e., pupils do not respond appropriately to

changes in light).

o Breathing is slower and shallower. Heart rate drops. Death usually occurs

at levels in this range.

• Death (BAC more than 0.50 %)

o Alcohol causes central nervous system to fail, resulting in death.

3.10 Moderate doses

Although alcohol is typically thought of purely as a depressant, at low concentrations it

can actually stimulate certain areas of the brain. Alcohol sensitizes the N-methyl-D-

aspartate (NMDA) system of the brain, making it more receptive to the neurotransmitter

glutamate. Stimulated areas include the cortex, hippocampus and nucleus accumbens,

which are responsible for thinking and pleasure seeking. Another one of alcohol's

agreeable effects is body relaxation, possibly caused by heightened alpha brain waves

surging across the brain. Alpha waves are observed (with the aid of EEGs) when the body

is relaxed. Heightened pulses are thought to correspond to higher levels of enjoyment.

A well-known side effect of alcohol is lowering inhibitions. Areas of the brain

responsible for planning and motor learning are dulled. A related effect, caused by even

low levels of alcohol, is the tendency for people to become more animated in speech and

movement. This is due to increased metabolism in areas of the brain associated with

movement, such as the nigrostriatal pathway. This causes reward systems in the brain to

become more active, and combined with reduced understanding of the consequences of

their behavior, can induce people to behave in an uncharacteristically loud and cheerful

manner.

Behavioral changes associated with drunkenness are, to some degree, contextual. A

scientific study found that people drinking in a social setting significantly and

dramatically altered their behavior immediately after the first sip of alcohol, well before

16

Page 17: Breath o Meter

the chemical itself could have filtered through to the nervous system. Likewise, people

consuming non-alcoholic drinks often exhibit drunk-like behavior on a par with their

alcohol-drinking companions even though their own drinks contained no alcohol

whatsoever.

3.11 Excessive doses

The effect alcohol has on the NMDA receptors, earlier responsible for pleasurable

stimulation, turns from a blessing to a curse if too much alcohol is consumed. NMDA

receptors start to become unresponsive, slowing thought in the areas of the brain they are

responsible for. Contributing to this effect is the activity which alcohol induces in the

gamma-aminobutyric acid system (GABA). The GABA system is known to inhibit

activity in the brain. GABA could also be responsible for the memory impairment that

many people experience. It has been asserted that GABA signals interfere with the

registration and consolidation stages of memory formation. As the GABA system is

found in the hippocampus, (among other areas in the CNS), which is thought to play a

large role in memory formation, this is thought to be possible.

Blurred vision is another common symptom of drunkenness. Alcohol seems to suppress

the metabolism of glucose in the brain. The occipital lobe, the part of the brain

responsible for receiving visual inputs, has been found to become especially impaired,

consuming 29 % less glucose than it should. With less glucose metabolism, it is thought

that the cells aren't able to process images properly.

Often, after much alcohol has been consumed, it is possible to experience vertigo, the

sense that the room is spinning (referred to in certain circles as 'The Spins'). This is

associated with abnormal eye movements called nystagmus, specifically positional

17

Page 18: Breath o Meter

alcohol nystagmus. In this case, alcohol has affected the organs responsible for balance

(vestibular system), present in the ears. Balance in the body is monitored principally by

two systems: the semicircular canals, and the utricle and saccule pair. Inside both of

these is a flexible blob called a cupula, which moves when the body moves. This brushes

against hairs in the ear, creating nerve impulses that travel through the vestibulocochlear

nerve (Cranial nerve VIII) in to the brain. However, when alcohol gets in to the

bloodstream it distorts the shape of the cupola, causing it to keep pressing on to the hairs.

The abnormal nerve impulses tell the brain that the body is rotating, causing

disorientation and making the eyes spin round to compensate. When this wears off

(usually taking until the following morning) the brain has adjusted to the spinning, and

interprets not spinning as spinning in the opposite direction causing further disorientation.

This is often a common symptom of the hangover.

Another classic finding of alcohol intoxication is ataxia, in its appendicular, gait, and

truncal forms. Appendicular ataxia results in jerky, uncoordinated movements of the

limbs, as though each muscle were working independently from the others. Truncal

ataxia results in postural instability; gait instability is manifested as a disorderly, wide-

based gait with inconsistent foot positioning. Ataxia is responsible for the observation

that drunken people are clumsy, sway back and forth, and often fall down. It is probably

due to alcohol's effect on the cerebellum.

Extreme overdoses can lead to alcohol poisoning and death due to respiratory depression.

A rare complication of acute alcohol ingestion is Wernicke encephalopathy, a disorder of

thiamine metabolism. If not treated with thiamine, Wernicke encephalopathy can

progress to Korsakoff psychosis, which is irreversible.

18

Page 19: Breath o Meter

Chronic alcohol ingestion over many years can produce atrophy of the vermis, which is

the part of the cerebellum responsible for coordinating gait; vermian atrophy produces the

classic gait findings of alcohol intoxication even when its victim is not inebriated.

Severe drunkenness and diabetic coma can be mistaken for each other on casual

inspection, with potentially serious medical consequences for diabetics. The major

physical finding they share is the sickly-sweet odour of ketosi on the breath; alcoholic

ketosis and diabetic ketosis are both marked by the presence of acetone and other ketones

in the bloodstream, although the ketones are produced by different metabolic pathways in

each disorder. Measurement of the serum glucose and ethanol concentrations in comatose

individuals is routinely performed in the emergency department and easily distinguishes

the two conditions.

3.12 Alcohol consumption and health

Moderate consumption

Moderate consumption of alcohol is defined by the U.S. Department of Agriculture and

the Dietary Guidelines for Americans as no more than two drinks for men and one drink

for women per day. It is defined by the U.S. National Institute on Alcohol Abuse and

Alcoholism (NIAAA) as four drinks per day, not to exceed 14 per week for a man and

three per day, not to exceed 14 per week for a woman. The UK equivalent is 3-4 units per

day for men and 2-3 units for women. See the main article Alcoholic beverages —

recommended maximum intake for a list of governments' guidance’s on alcohol intake

which, for a man, range from two to six drinks per day.

An exhaustive review of all major heart disease studies has found that "alcohol

consumption is related to total mortality in a J-shaped manner, where moderate

consumers have a reduced total mortality compared with total non-consumers and heavy

consumers." An intuitive explanation is that many of the alcohol abstainers in research

studies previously drank excessively and had undermined their health, thus explaining

their high levels of risk. To test this hypothesis, some studies have excluded all but those

19

Page 20: Breath o Meter

who had avoided alcohol for their entire lives. However, the conclusion remained the

same: moderate drinkers are less likely to suffer heart disease.

Other possibilities are that moderate drinkers have more healthful lifestyles (making them

healthier), higher economic status (giving them greater access to better foods or better

healthcare), higher educational levels (causing them to be more aware of disease

symptoms), etc. However, when these and other factors are considered, the conclusion

again remains the same: moderate drinkers are less likely to suffer cardiovascular disease,

which is the leading cause of death in Europe and the Americas. In addition, research has

demonstrated specific mechanisms whereby alcohol significantly reduces cardiovascular

disease, may reduce the risk of dementia, and even indirectly facilitate memory and

learning.

Excess consumption

Excess consumption is detrimental to the user's health. The neurological effects of

alcohol use are often a factor in deadly motor vehicle accidents and fights. People under

the influence of alcohol sometimes find themselves in dangerous or compromising

situations where they would not be had they remained sober. Operating a motor vehicle

or heavy machinery under the influence of alcohol is a serious crime in almost all

developed nations.

Some people are predisposed to developing a chemical dependency to alcohol,

alcoholism. The results of alcoholism are considered a major health problem in many

nations. The development of alcoholism does not take place in the absence of alcohol, but

neither does the presence of alcohol cause it.

3.13 Principle of Testing

Alcohol that a person drinks shows up in the breath because it gets absorbed from the

mouth, throat, stomach and intestines into the bloodstream.

Alcohol is not digested upon absorption, nor chemically changed in the bloodstream. As

the blood goes through the lungs, some of the alcohol moves across the membranes of the

20

Page 21: Breath o Meter

lung's air sacs (alveoli) into the air, because alcohol will evaporate from a solution -- that

is, it is volatile. The concentration of the alcohol in the alveolar air is related to the

concentration of the alcohol in the blood. As the alcohol in the alveolar air is exhaled, it

can be detected by the breath alcohol testing device. Instead of having to draw a driver's

blood to test his alcohol level, an officer can test the driver's breath on the spot and

instantly know if there is a reason to arrest the driver.

Because the alcohol concentration in the breath is related to that in the blood, you can

figure the BAC by measuring alcohol on the breath. The ratio of breath alcohol to blood

alcohol is 2,100:1. This means that 2,100 milliliters (ml) of alveolar air will contain the

same amount of alcohol as 1 ml of blood.

For many years, the legal standard for drunkenness across the United States was 0.10, but

many states have now adopted the 0.08 standard. The federal government has pushed

states to lower the legal limit. The American Medical Association says that a person can

become impaired when the blood alcohol level hits 0.05. If a person's BAC measures

0.08, it means that there are 0.08 grams of alcohol per 100 ml of blood.

3.14 Blood alcohol content

Blood alcohol content (BAC) or blood alcohol concentration is the concentration of

alcohol in blood. It is measured either as a percentage by mass, by mass per volume, or a

combination. For example, a BAC of 0.20% (2.0 ‰) can mean 2 grams of alcohol per

1000 grams of an individual's blood, or it can mean 0.2 grams of alcohol per 100

milliliters (also called a deciliter) of blood.

In many countries, the BAC is measured and reported as grams of alcohol per 100

milliliters (1 litre) of blood (g/100 mL). Because the specific gravity of blood is very

close to the specific gravity of water (its main component), the numerical values for BAC

(%, percent) and (g/100 mL, permille) do not differ to any consequential degree other

than the placement of the decimal point.

The number of drinks consumed is a poor measure of intoxication largely because of

variation in physiology and individual alcohol tolerance. A single drink containing one

21

Page 22: Breath o Meter

ounce (28 grams) of alcohol will increase the average person's BAC roughly 0.03%, but

there is much variation according to body weight, gender, and body fat percentage.

Furthermore, neither BAC nor the numbers of drinks consumed are necessarily accurate

indicators of the level of impairment. Tolerance to alcohol varies from one person to

another, and can be affected by such factors as genetics, adaptation to chronic alcohol

use, and synergistic effects of drugs.

Alcohol content in blood can be directly measured by a hospital laboratory. More

commonly in law enforcement investigations, BAC is estimated from breath alcohol

concentration (BrAC) measured with a machine commonly referred to as a Breathalyzer

(even though that is just the trademark of one manufacturer of the devices).

3.15 Units of measurement

There are several different units in use around the world for defining blood alcohol

concentration. Each is defined as either a mass of alcohol per volume of blood or a mass

of alcohol per mass of blood (never a volume per volume). Below are two tables of

approximately equivalent units.

Approximately Equivalent BAC Measures

Measurement with Units Units also known as: Commonly used in

0.01 g/100 mL g/dL, % g/mL USA

0.10 mg/mLg/L, ‰ g/mL (permille

g/mL)Netherlands, Lithuania, Poland

10 mg/100 mL mg/dL, % g/L, % mg/mL Britain

1mg/100mL mg/dL India

0.10 mg/g ‰, permille by mass, g/kg Finland, Norway, Sweden

22

Page 23: Breath o Meter

Note: The first three mass/volume units are not exactly equivalent to the last two

mass/mass units.

Because the density of blood is 1.06 g/mL, there is a very close approximation between

mass/volume and volume/volume measurements. For this reason, a mg/mL is

approximately the same as a mg/g. An exact conversion is 1 mg/g = 1.06 mg/mL.

In the vernacular and even in popular media, the abbreviation BAC is often used as a

unit. For example, in the United States, BAC has become synonymous with g/100 mL

and percent by mass. When discussing BAC across international boundaries, it is best to

use appropriate units.

3.16 Test assumptions

Blood alcohol tests assume the individual being tested is average in various ways. For

example, on average the ratio of BAC to breathe alcohol content (the partition ratio) is

2100 to 1. In other words, there are 2100 parts of alcohol in the blood for every part in

the breath. However, the actual ratio in any given individual can vary from 1300:1 to

3100:1, or even more widely. This ratio varies not only from person to person, but within

one person from moment to moment. Thus a person with a true blood alcohol level of .08

but a partition ratio of 1700:1 at the time of testing would have a .10 reading on a

Breathalyzer calibrated for the average 2100:1 ratio.

A similar assumption is made in urinalysis. When urine is analyzed for alcohol, the

assumption is that there are 1.3 parts of alcohol in the urine for every 1 part in the blood,

even though the actual ratio can vary greatly.

Breath alcohol testing further assumes that the test is post-absorptive - that is, that the

absorption of alcohol in the subject's body is complete. If the subject is still actively

absorbing alcohol, his body has not reached a state of equilibrium where the

concentration of alcohol is uniform throughout the body. Most forensic alcohol experts

23

Page 24: Breath o Meter

reject test results during this period as the amounts of alcohol in the breath will not

accurately reflect a true concentration in the blood.

3.17 Blood alcohol content calculation

BAC can be roughly estimated using a mathematical approach. While a mathematical

BAC estimation is not as accurate as a breathalyzer, it can be useful for calculating a

BAC level that is not currently testable, or a level that may be present in the future. While

there are several ways to calculate a BAC, one of the most effective ways is to simply

measure the total amount of alcohol consumed divided by the total amount of water in the

body - effectively giving the percent alcohol per volume water in the blood.

The total water weight of an individual can be calculated by multiplying their body

weight by their percent water. For example, a 150 pound woman would have a total

amount of water of 73.5 pounds (150 x .49). For easiest calculations, this weight should

be in kilograms, which can be easily converted by dividing the total pounds by 2.205.

73.5 pounds of water is equivalent to 29.4 kilograms of water. 29.4 kilograms of water is

equivalent to 29,400 mL of water (1 kg = 1 L, and 1 L = 1000 mL).

Gender plays an important role in the total amount of water that a person has. In general,

men have a higher percent of water per pound (58%) than women (49%). This fact alone

strongly contributes to the generalization that men require more alcohol than women to

achieve the same BAC level. Additionally, men are, on average, heavier than women.

The more water a person has, the more alcohol is required to achieve the same alcohol:

blood ratio, or BAC level. Further, studies have shown that women's alcohol metabolism

varies from that of men due to such biochemical factors as different levels of

acetaldehyde dehydrogenize (the enzyme which breaks down alcohol) and the effects of

oral contraceptives.

24

Page 25: Breath o Meter

4.0 BREATH-O-METER

4.1 List of components.….

Component Quantity

• ATmega 32 1

• Pressure sensor 1

• Ethane Sensor 1

• Differential Amplifier 1

• Voltage Regulator 1

• Keyboard Adapter 1

• Crystal Oscillator 1

• Push Buttons 2

• LCD 1

• LED’s

1. Green - 3

2. Red - 3

3. Yellow - 3

• 9v Battery 1

• Resistors 13

• Capacitors 2

• Buzzer 1

• Solder Board 1

• Power Switch 1

25

Page 26: Breath o Meter

4.2 Block Diagram

26

Page 27: Breath o Meter

4.3 ATmega32 Microcontroller

Features

• High-performance, Low-power AVR® 8-bit Microcontroller

• Advanced RISC Architecture

• 131 Powerful Instructions – Most Single-clock Cycle Execution

• 32 x 8 General Purpose Working Registers

• Fully Static Operation

• Up to 16 MIPS Throughput at 16 MHz

• On-chip 2-cycle Multiplier

• Nonvolatile Program and Data Memories

• 32K Bytes of In-System Self-Programmable Flash

• Endurance: 10,000 Write/Erase Cycles

• Optional Boot Code Section with Independent Lock Bits

• In-System Programming by On-chip Boot Program

True Read-While-Write Operation

• 1024 Bytes EEPROM

• Endurance: 100,000 Write/Erase Cycles

• 2K Byte Internal SRAM

• Programming Lock for Software Security

• JTAG (IEEE std. 1149.1 Compliant) Interface

• Boundary-scan Capabilities According to the JTAG Standard

• Extensive On-chip Debug Support

27

Page 28: Breath o Meter

• Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG

Interface

• Peripheral Features

• Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes

• One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture

Mode

• Real Time Counter with Separate Oscillator

• Four PWM Channels

• 8-channel, 10-bit ADC

• Single-ended Channels

• Differential Channels in TQFP Package Only

• Differential Channels with Programmable Gain at 1x, 10x, or 200x

• Byte-oriented Two-wire Serial Interface

• Programmable Serial USART

• Master/Slave SPI Serial Interface

• Programmable Watchdog Timer with Separate On-chip Oscillator

• On-chip Analog Comparator

• Special Microcontroller Features

• Power-on Reset and Programmable Brown-out Detection

• Internal Calibrated RC Oscillator

• External and Internal Interrupt Sources

• Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby

• and Extended Standby

• I/O and Packages

• 32 Programmable I/O Lines

• 40-pin PDIP, 44-lead TQFP, and 44-pad MLF

• Operating Voltages

• 2.7 - 5.5V for ATmega32L

• 4.5 - 5.5V for ATmega32

• Speed Grades

• 0 - 8 MHz for ATmega32L

28

Page 29: Breath o Meter

• 0 - 16 MHz for ATmega32

Overview

The ATmega32 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced

RISC architecture. By executing powerful instructions in a single clock cycle, the

ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system

designer to optimize power consumption versus processing speed. The AVR core

combines a rich instruction set with 32 general purpose working registers. All the 32

registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two

independent registers to be accessed in one single instruction executed in one clock cycle.

The resulting architecture is more code efficient while achieving throughputs up to ten

times faster than conventional CISC microcontrollers.

The ATmega32 provides the following features: 32K bytes of In-System Programmable

Flash Program memory with Read-While-Write capabilities, 1024 bytes EEPROM, 2K

byte SRAM, 32 general purpose I/O lines, 32 general purpose working registers, a JTAG

interface for Boundary-scan, On-chip Debugging support and programming, three

Flexible Timer/Counters with compare modes, Internal and External Interrupts, a serial

29

Page 30: Breath o Meter

Programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit

ADC with optional differential input stage with programmable gain (TQFP package

only), a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and

six software selectable power saving modes. The Idle mode stops the CPU while

30

Page 31: Breath o Meter

Allowing the USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI

port, and interrupt system to continue functioning. The Power-down mode saves the

register contents but freezes the Oscillator, disabling all other chip functions until the

next External Interrupt or Hardware Reset. In Power-save mode, the Asynchronous

Timer continues to run, allowing the user to maintain a timer base while the rest of the

device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules

except Asynchronous timer and ADC, to minimize switching noise during ADC

conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of

the device is sleeping. This allows very fast start-up combined with low-power

consumption. In Extended Standby mode, both the main Oscillator and the Asynchronous

Timer continue to run. The device is manufactured using Atmel’s high density

nonvolatile memory technology. The On-chip ISP Flash allows the program memory to

be reprogrammed in-system through an SPI serial interface, by a conventional nonvolatile

memory programmer, or by an On-chip Boot program running on the AVR core. The

boot program can use any interface to download the application program in the

Application Flash memory. Software in the Boot Flash section will continue to run while

the Application Flash section is updated, providing true Read-While-Write operation. By

combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic

chip, the Atmel ATmega32 is a powerful microcontroller that provides a highly-flexible

and cost-effective solution to many embedded control applications.

The ATmega32 AVR is supported with a full suite of program and system development

tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit

emulators, and evaluation kits.

Pin Descriptions

• VCC Digital supply voltage.

• GND Ground.

• Port A (PA7..PA0)

Port A serves as the analog inputs to the A/D Converter.

Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used.

31

Page 32: Breath o Meter

Port pins can provide internal pull-up resistors (selected for each bit). The Port A output

buffers have symmetrical drive characteristics with both high sink and source capability.

When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source

current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a

reset condition becomes active, even if the clock is not running.

• Port B (PB7..PB0)

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each

bit). The Port B output buffers have symmetrical drive characteristics with both high sink

and source capability. As inputs, Port B pins that are externally pulled low will source

current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset

condition becomes active, even if the clock is not running.

Port B also serves the functions of various special features of the ATmega32

• Port C (PC7..PC0)

Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each

bit). The Port C output buffers have symmetrical drive characteristics with both high sink

and source capability. As inputs, Port C pins that are externally pulled low will source

current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset

condition becomes active, even if the clock is not running. If the JTAG interface is

enabled, the pull-up resistors on pins PC5 (TDI), PC3(TMS) and PC2(TCK) will be

activated even if a reset occurs. The TD0 pin is tri-stated unless TAP states that shift out

data are entered. Port C also serves the functions of the JTAG interface and other special

features.

• Port D (PD7..PD0)

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each

bit). The Port D output buffers have symmetrical drive characteristics with both high sink

and source capability. As inputs, Port D pins that are externally pulled low will source

current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset

condition becomes active, even if the clock is not running.

Port D also serves the functions of various special features of the ATmega32

32

Page 33: Breath o Meter

• RESET

Reset Input. A low level on this pin for longer than the minimum pulse length will

generate a reset, even if the clock is not running. Shorter pulses are not guaranteed to

generate a reset.

• XTAL1

Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

• XTAL2

Output from the inverting Oscillator amplifier.

• AVCC

AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally

connected to VCC, even if the ADC is not used. If the ADC is used, it should be

connected to VCC through a low-pass filter.

• AREF

AREF is the analog reference pin for the A/D Converter.

System Clock and Clock Options

Clock Systems and their Distribution presents the principal clock systems in the AVR

and their distribution. All of the clocks need not be active at a given time. In order to

reduce power consumption, the clocks to modules not being used can be halted by using

different sleep modes, as described in “Power Management and Sleep Modes” on The

clock systems are detailed Figure

CPU Clock – clkCPU The CPU clock is routed to parts of the system concerned with

operation of the AVR core. Examples of such modules are the General Purpose Register

33

Page 34: Breath o Meter

File, the Status Register and the data memory holding the Stack Pointer. Halting the CPU

clock inhibits the core from performing general operations and calculations.

I/O Clock – clkI/O The I/O clock is used by the majority of the I/O modules, like Timer/

Counters, SPI, and USART. The I/O clock is also used by the External Interrupt module,

but note that some external interrupts are detected by asynchronous logic, allowing such

interrupts to be detected even if the I/O clock is halted. Also note that address recognition

in the TWI module is carried out asynchronously when clkI/O is halted, enabling TWI

address reception in all sleep modes.

Flash Clock – clkFLASH The Flash clock controls operation of the Flash interface. The

Flash clock is usually active simultaneously with the CPU clock.

Asynchronous Timer Clock – clkASY

The Asynchronous Timer clock allows the Asynchronous Timer/Counter to be clocked

directly from an external 32 kHz clock crystal. The dedicated clock domain allows using

this Timer/Counter as a real-time counter even when the device is in sleep mode.

ADC Clock – clkADC

The ADC is provided with a dedicated clock domain. This allows halting the CPU and

I/O clocks in order to reduce noise generated by digital circuitry. This gives more

accurate ADC conversion results.

Clock Sources The device has the following clock source options, selectable by Flash

Fuse bits as shown below. The clock from the selected source is input to the AVR clock

generator, and routed to the appropriate modules.

Default Clock Source The device is shipped with CKSEL = “0001” and SUT = “10”.

The default clock source setting is therefore the Internal RC Oscillator with longest

startup time. This default setting ensures that all users can make their desired clock

source setting using an In- System or Parallel Programmer.

Crystal Oscillator XTAL1 and XTAL2 are input and output, respectively, of an

inverting amplifier which can be configured for use as an On-chip Oscillator, Either a

quartz crystal or a ceramic resonator may be used. The CKOPT Fuse selects between two

different Oscillator amplifier modes. When CKOPT is programmed, the Oscillator output

will oscillate will a full rail-to-rail swing on the output. This mode is suitable when

operating in a very noisy environment or when the output from XTAL2 drives a second

34

Page 35: Breath o Meter

clock buffer. This mode has a wide frequency range. When CKOPT is unprogrammed,

the Oscillator has a smaller output swing. This reduces power consumption considerably.

This mode has a limited frequency range and it can not be used to drive other clock

buffers. For resonators, the maximum frequency is 8 MHz with CKOPT unprogrammed

and 16 MHz with CKOPT programmed. C1 and C2 should always be equal for both

crystals and resonators. The optimal value of the capacitors depends on the crystal or

resonator in use, the amount of stray capacitance, and the electromagnetic noise of the

environment.

Power Management and Sleep Modes

Sleep modes enable the application to shut down unused modules in the MCU, thereby

saving power. The AVR provides various sleep modes allowing the user to tailor the

power consumption to the application’s requirements. To enter any of the six sleep

modes, the SE bit in MCUCR must be written to logic one and a SLEEP instruction must

be executed. The SM2, SM1, and SM0 bits in the MCUCR Register select which sleep

mode (Idle, ADC Noise Reduction, Power-down, Power-save, Standby, or Extended

Standby) will be activated by the SLEEP instruction. If an enabled interrupt occurs while

the MCU is in a sleep mode, the MCU wakes up. The MCU is then halted for four cycles

in addition to the start-up time; it executes the interrupt routine, and resumes execution

from the instruction following SLEEP. The contents of the Register File and SRAM are

unaltered when the device wakes up from sleep. If a Reset occurs during sleep mode, the

MCU wakes up and executes from the Reset Vector.

Idle Mode When the SM2.0 bits are written to 000, the SLEEP instruction makes the

MCU enter Idle mode, stopping the CPU but allowing SPI, USART, Analog Comparator,

ADC, Two wire Serial Interface, Timer/Counters, Watchdog, and the interrupt system to

continue operating. This sleep mode basically halts clkCPU and clkFLASH, while

allowing the other clocks to run. Idle mode enables the MCU to wake up from external

triggered interrupts as well as internal ones like the Timer Overflow and USART

Transmit Complete interrupts. If wake-up from the Analog Comparator interrupt is not

required, the Analog Comparator can be powered down by setting the ACD bit in the

Analog Comparator Control and Status

Register – ACSR. This will reduce power consumption in Idle mode. If the ADC is

enabled, a conversion starts automatically when this mode is entered.

35

Page 36: Breath o Meter

ADC Noise Reduction Mode

When the SM2..0 bits are written to 001, the SLEEP instruction makes the MCU enter

ADC Noise Reduction mode, stopping the CPU but allowing the ADC, the External

Interrupts, the Two-wire Serial Interface address watch, Timer/Counter2 and the

Watchdog to continue operating (if enabled). This sleep mode basically halts clkI/O,

clkCPU, and clk- FLASH, while allowing the other clocks to run.

This improves the noise environment for the ADC, enabling higher resolution

measurements. If the ADC is enabled, a conversion starts automatically when this mode

is entered. Apart form the ADC Conversion Complete interrupt, only an External Reset, a

Watchdog Reset, a Brown-out Reset, a Two-wire Serial Interface Address Match

Interrupt, a Timer/Counter2 interrupt, an SPM/EEPROM ready interrupt, an External

level interrupt on INT0 or INT1, or an external interrupt on INT2 can wake up the MCU

from ADC Noise Reduction mode.

Power-down Mode When the SM2..0 bits are written to 010, the SLEEP instruction

makes the MCU enter Power-down mode. In this mode, the External Oscillator is

stopped, while the External interrupts, the Two-wire Serial Interface address watch, and

the Watchdog continue operating (if enabled). Only an External Reset, a Watchdog

Reset, a Brown-out Reset, a Two-wire Serial Interface address match interrupt, an

External level interrupt on INT0 or INT1, or an External interrupt on INT2 can wake up

the MCU. This sleep mode basically halts all generated clocks, allowing operation of

asynchronous modules only.

Note that if a level triggered interrupt is used for wake-up from Power-down mode, the

changed level must be held for some time to wake up the MCU. When waking up from

Power-down mode, there is a delay from the wake-up condition occurs until the wake-up

becomes effective. This allows the clock to restart and become stable after having been

stopped. The wake-up period is defined by the same CKSEL fuses that define the reset

time-out period.

Power-save Mode When the SM2..0 bits are written to 011, the SLEEP instruction

makes the MCU enter Power-save mode. This mode is identical to Power-down, with one

exception:

36

Page 37: Breath o Meter

If Timer/Counter2 is clocked asynchronously, i.e., the AS2 bit in ASSR is set,

Timer/Counter2 will run during sleep. The device can wake up from either Timer

Overflow or Output Compare event from Timer/Counter2 if the corresponding

Timer/Counter2 interrupt enable bits are set in TIMSK, and the Global Interrupt Enable

bit in SREG is set.

If the Asynchronous Timer is NOT clocked asynchronously, Power-down mode is

recommended instead of Power-save mode because the contents of the registers in the

Asynchronous Timer should be considered undefined after wake-up in Power-save mode

if AS2 is 0. This sleep mode basically halts all clocks except clkASY, allowing operation

only of asynchronous modules, including Timer/Counter2 if clocked asynchronously.

Standby Mode When the SM2..0 bits are 110 and an external crystal/resonator clock

option is selected, the SLEEP instruction makes the MCU enter Standby mode. This

mode is identical to Power-down with the exception that the Oscillator is kept running.

From Standby mode, the device wakes up in six clock cycles.

Extended Standby Mode When the SM2..0 bits are 111 and an external

crystal/resonator clock option is selected, the SLEEP instruction makes the MCU enter

Extended Standby mode. This mode is identical to Power-save mode with the exception

that the Oscillator is kept running. From Extended Standby mode, the device wakes up in

six clock cycles.

Minimizing Power Consumption

There are several issues to consider when trying minimizing the power consumption in an

AVR controlled system. In general, sleep modes should be used as much as possible, and

the sleep mode should be selected so that as few as possible of the device’s functions are

operating. All functions not needed should be disabled. In particular, the following

modules may need special consideration when trying to achieve the lowest possible

power consumption.

System Control and Resetting the AVR During Reset, all I/O Registers are set to their

initial values, and the program starts execution from the Reset Vector. The instruction

placed at the Reset Vector must be a JMP absolute jump – instruction to the reset

handling routine. If the program never enables an interrupt source, the Interrupt Vectors

are not used, and regular program code can be placed at these locations. This is also the

case if the Reset Vector is in the Application section while the Interrupt Vectors are in the

37

Page 38: Breath o Meter

Boot section or vice versa The I/O ports of the AVR are immediately reset to their initial

state when a reset source goes active. This does not require any clock source to be

running. After all reset sources have gone inactive, a delay counter is invoked, stretching

the Internal Reset. This allows the power to reach a stable level before normal operation

starts. The time-out period of the delay counter is defined by the user through the CKSEL

Fuses.

Reset Sources The ATmega32 has five sources of reset:

• Power-on Reset. The MCU is reset when the supply voltage is below the Power-on

Reset threshold (VPOT).

• External Reset. The MCU is reset when a low level is present on the RESET pin for

longer than the minimum pulse length.

• Watchdog Reset. The MCU is reset when the Watchdog Timer period expires and

the Watchdog is enabled.

• Brown-out Reset. The MCU is reset when the supply voltage VCC is below the

Brown-out Reset threshold (VBOT) and the Brown-out Detector is enabled.

• JTAG AVR Reset. The MCU is reset as long as there is a logic one in the Reset

Register, one of the scan chains of the JTAG system.

ATmega32 Typical Characteristics – Preliminary Data

All current consumption measurements are performed with all I/O pins configured as

inputs and with internal pull-ups enabled. A sine wave generator with rialto- rail output is

used as clock source.

The power consumption in Power-down mode is independent of clock selection. The

current consumption is a function of several factors such as: operating voltage, operating

frequency, loading of I/O pins, switching rate of I/O pins, code executed and ambient

temperature. The dominating factors are operating voltage and frequency. The current

drawn from capacitive loaded pins may be estimated (for one pin) as CL*VCC*f where

CL = load capacitance, VCC = operating voltage and f = average switching frequency of

I/O pin. The parts are characterized at frequencies higher than test limits. Parts are not

guaranteed to function properly at frequencies higher than the ordering code indicates.

The difference between current consumption in Power-down mode with Watchdog Timer

enabled and Power-down mode with Watchdog Timer disabled represents the differential

current drawn by the Watchdog Timer.

38

Page 39: Breath o Meter

4.4 Alcohol SensorFigaro TGS 2620 - For the detection of Solvent Vapors

Features:-• Low power consumption

• High sensitivity to alcohol and organic solvent vapors

• Long life and low cost

• Uses simple electrical circuit

Applications:-• Alcohol testers

• Organic vapor detectors/alarms

• Solvent detectors for factories, dry cleaners and semiconductor industries

The figure below represents typical sensitivity

characteristics; all data having been gathered at

standard test conditions (see reverse side of this

sheet). The Y-axis is indicated as sensor resistance

ratio (Rs/Ro) which is defined as follows:

• Rs = Sensor resistance in displayed gases at

various concentrations

• Ro = Sensor resistance in 300ppm of ethanol

The figure below represents typical temperature and humidity dependency characteristics.

Again, the Y-axis is indicated as sensor resistance ratio (Rs/Ro), defined as follows:

• Rs = Sensor resistance in 300ppm of ethanol at various temperatures/humidity’s

• Ro = Sensor resistance in 300ppm of ethanol at 20C and 65% R.H.

The sensing element is comprised of a metal oxide semiconductor layer formed on an

alumina substrate of a sensing chip together with an integrated heater. In the presence of

39

Page 40: Breath o Meter

a detectable gas, the sensor's conductivity increases depending on the gas concentration

in the air. A simple electrical circuit can convert the change in conductivity to an output

signal which corresponds to the gas concentration.

The TGS 2620 has high sensitivity to the vapors of organic solvents as well as other

volatile vapors. It also has sensitivity to a variety of combustible gases such as carbon

monoxide, making it a good general purpose sensor. Due to miniaturization of the

sensing chip, TGS 2620 requires a heater current of only 42mA and the device is housed

in a standard TO-5 package.

Basic Measuring Circuit:

The sensor requires two voltage inputs: heater voltage

(VH) and circuit voltage (VC). The heater voltage (VH)

is applied to the integrated heater in order to maintain the

40

Page 41: Breath o Meter

sensing element at a specific temperature which is optimal for sensing. Circuit voltage

(VC) is applied to allow measurement of voltage (VRL) across a load resistor (RL) which

is connected in series with the sensor. A common power supply circuit can be used for

both VC and VH to fulfill the sensor's electrical requirements. The value of the load

resistor (RL) should be chosen to optimize the alarm threshold value, keeping power

consumption (PS) of the semiconductor below a limit of 15mW. Power consumption (PS)

will be highest when the value of Rs is equal to RL on exposure to gas.

4.5 Pressure Sensor

Motorola MPX2050

50kPa on chip Temperature Compensated & Calibrated Silicon Pressure Sensors

The MPX2050 series device is a silicon Piezoresistive pressure sensor providing a highly

accurate and linear voltage output — directly proportional to the applied pressure. The

sensor is a single, monolithic silicon diaphragm with the strain gauge and a thin–film

41

Page 42: Breath o Meter

resistor network integrated on–chip. The chip is laser trimmed for precise span and offset

calibration and temperature compensation.

Features

• • Temperature Compensated Over 0°C to +85°C

• • Unique Silicon Shear Stress Strain Gauge

• • Easy to Use Chip Carrier Package Options

• • Ratio metric to Supply Voltage

• • Differential and Gauge Options

• • ±0.25% Linearity (MPX2050)

Application Examples

• • Pump/Motor Controllers

• • Robotics

• • Level Indicators

• • Medical Diagnostics

• • Pressure Switching

• • Non–Invasive Blood Pressure Measurement

VOLTAGE OUTPUT versus APPLIED DIFFERENTIAL PRESSURE

The differential voltage output of the sensor is directly proportional to the differential

pressure applied. The output voltage of the differential or gauge sensor increases with

increasing pressure applied to the pressure side (P1) relative to the vacuum side (P2).

Similarly, output voltage increases as increasing vacuum is applied to the vacuum side

(P2) relative to the pressure side (P1).

42

Page 43: Breath o Meter

1.0 kPa (kiloPascal) equals 0.145 psi.

2. Device is ratiometric within this specified excitation range. Operating the device above

the specified excitation range may induce additional error due to device self–heating.

3. Full Scale Span (VFSS) is defined as the algebraic difference between the output

voltage at full rated pressure and the output voltage at the minimum rated pressure.

4. Offset (Voff) is defined as the output voltage at the minimum rated pressure.

5. Accuracy (error budget) consists of the following:

• Linearity : Output deviation from a straight line relationship with pressure, using

end point method, over the specified pressure range.

• Temperature Hysteresis : Output deviation at any temperature within the operating

temperature range, after the temperature is cycled to and from the minimum or

maximum operating temperature points, with zero differential pressure applied.

43

Page 44: Breath o Meter

• Pressure Hysteresis : Output deviation at any pressure within the specified range,

when this pressure is cycled to and from the minimum or maximum rated

pressure, at 25°C.

• TcSpan : Output deviation at full rated pressure over the temperature range of 0 to

85°C, relative to 25°C.

• TcOffset : Output deviation with minimum rated pressure applied, over the

temperature range of 0 to 85°C, relative to 25°C.

6. Response Time is defined as the time for the incremental change in the output to go

from 10% to 90% of its final value when subjected to a specified step change in pressure.

7. Offset stability is the product’s output deviation when subjected to 1000 hours of

Pulsed Pressure, Temperature Cycling with Bias Test.

LINEARITY

Linearity refers to how well a transducer’s

output follows the equation:

Vout = Voff + sensitivity x P over the

operating pressure range. There are two

basic methods for calculating nonlinearity:

(1) end point straight line fit (see Figure 2)

or (2) a least squares best line fit. While a

least squares fit gives the “best case”

linearity error (lower numerical value), the

calculations required are burdensome.

Conversely, an end point fit will give the “worst case” error (often more desirable in error

budget calculations) and the calculations are more straightforward for the user.

Motorola’s specified pressure sensor linearities are based on the end point straight line

method measured at the midrange pressure.

ON–CHIP TEMPERATURE COMPENSATION and CALIBRATION

Figure 3 shows the minimum, maximum and typical output characteristics of the

MPX2050 series at 25°C. The output is directly proportional to the differential pressure

44

Page 45: Breath o Meter

and is essentially a straight line. The effects of temperature on Full–Scale Span and

Offset are very small and are shown under Operating Characteristics.

Figure 4 illustrates the differential or gauge configuration in the basic chip carrier (Case

344). A silicone gel isolates the die surface and wire bonds from the environment, while

allowing the pressure signal to be transmitted to the silicon diaphragm. The MPX2050

series pressure sensor operating characteristics and internal reliability and qualification

tests are based on use of dry air as the pressure media. Media other than dry air may have

adverse effects on sensor performance and long term reliability.

5.0 Our Perspective Plan & Approach

Till now the Breath-o-meter was examined and studied with Atmel mega32

microcontroller, Figaro alcohol detecting sensor and Motorola pressure sensor.

But due to unavailability of pressure sensor and Atmega32 programmer we modified the

instrument but solving the same purpose.

45

Page 46: Breath o Meter

The following major components were removed

↓ Atmega32 - Microcontroller

↓ MPX2052D - Pressure sensor

↓ TGS 2620 – Alcohol Sensor

↓ Ina 121 - Differential Amplifier

↓ LCD

↓ Buzzer

And these are the following major components used by us for the development of

instrument. The selection of each component was made carefully depending on the

availability and cost. We were determined to come forward with an engineering solution

which would be cost effective and helpful to society.

AT89C51 – Microcontroller

ADC0804 – Analog to Digital Converter

MQ135 – Gas Sensor (Alcohol Sensor)

Apart from these major changes other components like resistors, capacitors, LED’s,

Voltage regulator, Crystal oscillator, push buttons, battery, solder board were used as per

the requirements.

Thus, this breath-o-meter has been developed with an overall look of compact nature and

availability within the reach of common man. Therefore, with this kind of muscle behind

a common goal, anything is possible and together we can make a difference.

6.0 BLOCK DIAGRAM

46

Page 47: Breath o Meter

6.1 ADC0804 – Analog to Digital Converter

47

Page 48: Breath o Meter

Features• 80C48 and 80C80/85 Bus Compatible - No Interfacing Logic Required

• Conversion Time < 100μs

• Easy Interface to Most Microprocessors

• Will Operate in a “Stand Alone” Mode

• Differential Analog Voltage Inputs

• Works with Band gap Voltage References

• TTL Compatible Inputs and Outputs

• On-Chip Clock Generator

• 0V to 5V Analog Voltage Input Range (Single + 5V Supply)

• No Zero-Adjust Required

Description

The ADC0802 families are CMOS 8-Bit, successive-approximation A/D converters

which use a modified potentiometer ladder and are designed to operate with the 8080A

control bus via three-state outputs. These converters appear to the processor as memory

locations or I/O ports, and hence no interfacing logic is required. The differential analog

voltage input has good common mode- rejection and permits offsetting the analog zero-

input voltage value. In addition, the voltage reference input can be adjusted to allow

encoding any smaller analog voltage span to the full 8 bits of resolution. The device may

be operated in the free-running mode by connecting INTR to the WR input with CS = 0.

48

Page 49: Breath o Meter

6.2 MQ135 – Gas SensorFEATURES

• Wide detecting scope Fast response and High sensitivity

• Stable and long life Simple drive circuit

APPLICATIONThey are used in air quality control equipments for buildings/offices, are suitable for

detecting of NH3,NOx, alcohol, Benzene, smoke,CO2 ,etc.

Parts Materials• Gas sensing layer SnO2

• Electrode Au

• Electrode line Pt

• Heater coil Ni-Cr alloy

• Tubular ceramic Al2O3

• Anti-explosion network Stainless steel gauze (SUS316 100-mesh)

• Clamp ring Copper plating Ni

• Resin base Bakelite

• Tube Pin Copper plating Ni

49

Page 50: Breath o Meter

The equation of the graph (C2H5OH Ethyl Alcohol) is PPM = 73.15*(R0/RS)^3.75 R0 is

a constant that depends on the individual sensor, and Rs is the sensor’s resistance in

ohms. R0 of our sensor from datasheet is found to be 30K ohms.

Parts per million is defined as grams of solute per grams of solvent. BAC, however, is

defined as grams of ethanol per 100mL of blood. Alveoli (deep lung) air has one twenty-

six hundredth of the ethanol (by mass) that blood does. Thus, we can convert to BAC

from the sensor’s output of parts per million as follows:

PPM ETOH = (parts of ethyl alcohol/Million parts of air)

Alcohol Content in Breath sample = (PPM ETOH) (particle density)

50

Page 51: Breath o Meter

Since here particle density is density of air it is 1.29 Kg/m3

Therefore Alcohol content in breath = (PPM ETOH/10^6) (1.29 Kg/m3)

= (PPM ETOH/10^6) (1.29 g/L) since 1 meter cube = 1000 liter

Blood Alcohol Content = Breath Alcohol Content (g/L) x Partion Ratio

= (PPM ETOH/10^6) (1.29) (2100) x (1/10) (g/100mL)

= (PPM ETOH/10^6) (1.29) (210) (g/100mL)

Finally we use following equations to calculate BAC:

• RS=(VCC-Vs)/(Vs/RL)

Vs is the sensor voltage input to the ADC

Vs = (ADC/256)*VCC

• PPM = 73.15*(R0/RS)^3.75

• BAC = PPM*1.29*(210/10^6)

6.3 AT89C51 - Microcontroller

Features• • Compatible with MCS-51™ Products

• • 4K Bytes of In-System Reprogrammable Flash Memory

– Endurance: 1,000 Write/Erase Cycles

• • Fully Static Operation: 0 Hz to 24 MHz

• • Three-level Program Memory Lock

• • 128 x 8-bit Internal RAM

• • 32 Programmable I/O Lines

51

Page 52: Breath o Meter

• • Two 16-bit Timer/Counters

• • Six Interrupt Sources

• • Programmable Serial Channel

• • Low-power Idle and Power-down Modes

Description

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K

bytes of Flash programmable and erasable read only memory (PEROM). The device is

manufactured using Atmel’s high-density nonvolatile memory technology and is

compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip

Flash allows the program memory to be reprogrammed in-system or by a conventional

nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a

monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a

highly-flexible and cost-effective solution to many embedded control applications.

Pin Configurations

Internal block diagram

52

Page 53: Breath o Meter

The AT89C51 provides the following standard features: 4K bytes of Flash, 128

bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt

architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition,

the AT89C51 is designed with static logic for operation down to zero frequency and

supports two software selectable power saving modes. The Idle Mode stops the CPU

while allowing the RAM, timer/counters, serial port and interrupt system to continue

functioning. The Power-down Mode saves the RAM contents but freezes the oscillator

disabling all other chip functions until the next hardware reset.

Pin Description

VCC - Supply voltage.

53

Page 54: Breath o Meter

GND - Ground.

Port 0 - Port 0 is an 8-bit open-drain bi-directional 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 may 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.

Port 1 - Port 1 is an 8-bit bi-directional 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 (IIL) 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 bi-directional 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 (IIL) 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, it uses strong internal pull-ups when emitting 1s. During

accesses to external data memory that uses 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.

Port 3 - Port 3 is an 8-bit bi-directional I/O port with internal pull ups. The Port 3 output

buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are

pulled high by the internal pull ups and can be used as inputs. As inputs, Port 3 pins that

54

Page 55: Breath o Meter

are externally being pulled low will source current (IIL) because of the pull ups. Port 3

also serves the functions of various special features of the AT89C51 as listed below:

Port 3 also receives some control signals for Flash programming and verification.

RST - Reset input. A high on this pin for two machine cycles while the oscillator is

running resets the device.

ALE/PROG - Address Latch Enable 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. Setting the ALE-disable bit has no effect if the microcontroller is in

external execution mode.

PSEN - Program Store Enable is the read strobe to external program memory. When the

AT89C51 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.

55

Page 56: Breath o Meter

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 enable voltage (VPP) during Flash programming, for parts that

require 12-volt VPP.

XTAL1 - Input to the inverting oscillator amplifier and input to the internal clock

operating circuit.

XTAL2 - Output from the inverting oscillator amplifier.

7.0 CODE(Using C)

/************ Header file for AT89C51 Includes definitions for Ports**************/

#include<AT89X51.H>

/************ All Mathematical operations are defined in this header file***********/

#include<MATH.H>

#define VCC 5 /************ Supply Voltage**********/

#define R0 30000 /**********R0=30K this is constant for given sensor*******/

#define RL 20000 /*********RL=20K this is adjustable by the user*********/

56

Page 57: Breath o Meter

void msec(unsigned int); /**********Function to generate a delay in msecs******/

float Blood_Alcohol(unsigned int); /**Function to calculate Blood Alcohol Content**/

float PPMconvert(float);

void main()

{

float BAC,x;

P0=0x00; // configure P0 port as output port

P1=0xFF; // configure P1 port as input port

P2=0x00; // configure P2 port as output port

P3=0x00; // configure P3 port as output port

BAC=0.0;

while(1)

{

x=Blood_Alcohol(P1); /**********BAC percent*********/

if(x>=BAC)

{BAC=x;}

if(BAC>=0.0 && BAC<0.03)

{P3=(1<<0);msec(10);} /*************Sober*************/

else if(BAC>=0.03 && BAC<0.115)

{P3=(1<<1);msec(10);} /************Happy*************/

else if(BAC>=0.115 && BAC<0.215)

{P3=(1<<2);msec(10);} /*************Tipsy************/

else if(BAC>=0.215 && BAC<0.275)

{P3=(1<<3);msec(10);} /************Confused**********/

else if(BAC>=0.275 && BAC<0.375)

{P3=(1<<4);msec(10);} /********Incomprehensible********/

else

{P3=(1<<5);msec(10);} /***********Coma State***********/

57

Page 58: Breath o Meter

}

}

float Blood_Alcohol(unsigned int ADC)

{

float Vs;

float RS;

float PPM,B_A_C;

Vs=((float)ADC/256.0)*VCC;

/****************Vs is the sensed analog voltage by the sensor****************/

/********************Vs = (ADC/256)*VCC*************************/

RS=(VCC-Vs)/(Vs/RL);

/***************RS is the Sensor resistance**********************/

PPM=PPMconvert(R0/RS);

B_A_C=PPM*(1.29)*(210/1000000);

/****************BAC of 0.01 equals 0.01g ETOH in 210 L air *****************/

/**************PPM is g ETOH for every 10^6 g Air At STP, air has a ***********/

/**********************density of 1.29 g/L thus****************************/

/********BAC = (g ETOH) / (10^6 g Air) * (1.29 g Air / L air) * 210 *10^6********/

return(B_A_C);

}

float PPMconvert(float R)

{

return(73.15 * pow(R,3.75)); /********PPM = 73.15 * (R0/RS)^3.75*********/

}

void msec(unsigned int msec) /**Generates delay specified as argument in msecs*/

{

58

Page 59: Breath o Meter

unsigned int i,j;

for(i=0;i<msec;i++)

for(j=0;j<82;j++);

}

8.0 CostS.No Part Name Description Cost( Rs/- )

1 MQ 135 Alcohol Sensor 1502 AT89C51 Microcontroller 603 ADC 0804 A/D Converter 754 IC 7805 +5V Regulator 105 Battery( +9V) General purpose Battery 106 1N4007(4 No’s) Diodes 87 LED’s(6 No’s) Light Emitting Diodes 248 LIN 0297 Potentiometer 49 KDS 8.000 Crystal Oscillator(8M Hz) 1010 Others

Resistors :-

10K Ohm – 2No’s

Capacitors :-

10 uf – 1No’s

150 pf – 1No’s

33 pf – 2No’s

General Purpose PCB

50

59

Page 60: Breath o Meter

Total Cost 401

9.0 CONCLUSION

The Breath-o-Meter is an easy to use, semi-accurate, enjoyable little device, which can be

packed in a small little package for convenience. The device is prepared by keeping in

mind the standard BAC levels. The alcohol sensor which we have used is also sensitive

to Carbon-dioxide but we find TGS2620 suits this application the best, which we

unfortunately couldn’t get. Also since we didn’t use the pressure sensor the user must

blow air constantly for few seconds. So even though the device is prepared according to

standard levels we introduce it as semi-standard device. On the whole it’s an informative

project.

Finally we tried to come forward with an engineering solution which would helpful to

society and fight back this important social problem.

10.0 BIBLIOGRAPHY1. http://en.wikipedia.org/wiki/Alcohol2. http://en.wikipedia.org/wiki/Alcoholic_beverage3. http://en.wikipedia.org/wiki/Blood_alcohol_content4. http://en.wikipedia.org/wiki/Breathalyzer5. http://celtickane.com/projects/bac.php6. http://www.breathalyzer.net/7. http://www.californiaduihelp.com/dui_investigation/alcohol.asp8. http://www.benbest.com/health/alcohol.html9. http://www.forensic-evidence.com/site/Biol_Evid/Breath_Tests.html

60