Uploaded by درويد دانسيل رشيد Danesil

Kevin Njuguna Githua CAT 2

advertisement
DIGITAL LOGIC
CAT 2
Semester 2 Year 1
May – August 2021
Daniel Esilaba SCT221-C004-0111/2020
[Email address]
System Proposal
IoT-Enabled Breathalyzer System
Abstract
The proposed system makes use of Arduino microcontroller which is interfaced with an alcohol
sensor to analyze alcohol in the drivers’ breathes. Whenever a predetermined alcohol content
threshold surpassed, the system triggers an action where the vehicle’s engine automatically
switches off and an alarm sent to the local traffic authorities. The alarm will contain the driver’s
details, motor vehicle details, location and amount of alcohol detected.
Introduction
According to global status report on road safety in 2018 by World Health Organization (WHO),
fatalities emanating from road traffic accidents (RTAs) have increased to 1.3 million per year
(2018). More than 93% of these accidents, occur in low-income and middle-income countries.
The report also identified road traffic deaths (RTDs) as the leading cause of death for people
groups between 5 and 29 years of age. Furthermore, research on RTA estimates that more than
50% of injuries/deaths emanating from road accident occur to age groups 15–49 years which is
considered the economically productive period (Sapkota et al., 2016), (Macharia et al., 2009,
June). From previous and current reports and various research undertakings, it has been shown
that RTDs are severe on vulnerable road users, pedestrians, cyclists and riders of motorbikes and
their passengers accounting for staggering 46% of global traffic deaths (World Health
Organization, 2018), (World Health Organization, 2015), (World Health Organization, 2009).
Problem statement
Driving under the influence of alcohol has been a major cause of traffic accidents the world over.
Alcohol impairs judgment often leading to fatal accidents most of which could easily be
avoided.
Relevance of the study/justification
In several papers, it is reported that 85% of the accidents are caused by driver error in Kenya
ranging from over speeding, intoxication and/or plain recklessness among others (Manyara,
2016), (Mogambi & Nyakeri, 2015). The Kenya police in conjunction with NTSA has been
enforcing adherence of traffic rules in the country. Touching on drunk-driving, NTSA introduced
a breathalyzer to detect the alcohol content in drivers, infamously called alcoblow in 2012. This
was in a bid to reduce drug and substance abuse as defined by traffic act (R. of K. (GoK), 2018).
Alcoblow was however removed from the traffic monitoring personnel in November 2019 citing
that the devices were not effective in deterring drunk-driving (Tendu, 2019). There is no
published information of its reintroduction since then, but the problem of drunk driving still
persists.
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
Solve the Problem
The IoT-enabled Breathalyzer System aims at preventing such accidents by determine the
alcohol content of the driver’s breathe even before they switch on their motor vehicles.
Therefore, unlike the traditional mechanism where the drunk driver can only be detected by
traffic police, the drunk drivers won’t have the ability to drive the vehicle thus preventing the
possibility of alcohol-based accidents.
Objectives
The main objective of the system this paper is to design, develop and implement an IoT-enabled
Breathalyzer system which can determining the alcohol content of the driver’s bloodstream and
compare against a given threshold. The system should have the capacity to shut down the
engine once the threshold is surpassed and send the data and location of the vehicle to the
local traffic authorities.
Literature Review
Ralph Oyini Mbouna et al. (2013) presents visual analysis of eye state and head pose (HP) for
continuous monitoring of alertness of a vehicle driver. The proposed scheme uses visual features
such as eye index (EI), pupil activity (PA), and HP to extract critical information on non-alertness
of a vehicle driver. Moreover, Anirban Dasgupta & Anjith (2013) Proposed a robust real-time
embedded platform monitor the loss of attention of the driver during day and night driving
conditions. The percentage of eye closure has been used to indicate the alertness level. The
system is found to be robust under actual driving conditions. Many of the authors explained the
vehicle tracking in embedded system. For instance, Coifman (2012), explained a real-time
computer vision system for vehicle tracking and traffic surveillance. His paper proposed a
feature-based tracking system. Peng et al. (2018) explained the system which provides vehicle
cabin safety. This system monitors the level of the toxic gases such as CO, LPG and alcohol
within the vehicle and provides alert information as alarm during the dangerous.
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
Proposed Method
Start
Alcohol Sensor
Alcohol
Detected?
Yes
Shut Engine
Buzzer Beeps
No
Send data to Cloud
Do not Shut the Engine
Implementation and Testing
a) The Arduino UNO have been programmed using the Arduino IDE.
b) The alcohol sensor in the sensory nodes detect the values of the variables in the
environment and send them to the Analog to Digital Converter.
c) The ADC relays the converted data to the microcontroller which processes the obtained
value set.
d) The microcontroller controls the relays which are connected to the engine starter
depending on the sensor value received.
e) Then, the microcontroller flashes the information on the GSM modem which in turn is
sent to the database in cloud.
f)
The process is then repeated and analyzed after every cycle until the vehicle is shut off.
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
Timeframe
Activity
Date
Buying the required components
Aug 1, 2021 – Aug 3, 2021
Installing the sensors
Aug 4, 2021- Aug 6, 2021
Programming the Arduino UNO
Aug 7, 2021- Aug 10, 2021
Connecting user devices to GSM modem.
Aug 11, 2021- Aug 13, 2021
Connecting the sensors and GSM to the controller
August 14, 2021
Testing
August 15, 2021
Rectifying any Faults
August 17, 2021
Budget
Component
Arduino Uno R3
Alcohol sensor
Huawei GSM Modem
Power supply
Alarm System
Totals
Cost (Ksh)
30,000
45,000
1,900
2,000
5,000
82,900
Conclusion
Drink and Drive Detection is a model purposed for detecting alcohol content in the driver’s
bloodstream. This system is successfully developed to minimize the alcohol related traffic
fatalities and save many lives by providing emergency services. This system will have broad
application prospects since it integrates the real-time GPS tracking and will reduce the number
of accidents. The results of our research shows that higher sensitivity and accuracy will be
achieved using this project. This made the project more user-friendly and reliable. The proposed
method is verified to be highly beneficial for the automotive insurance industry.
References
Anirban Dasgupta & Anjith George. 2013. A Vision Based System for Monitoring the Loss of
Attention in Automotive Drivers. IEEE Trans. on Intelligent Transportation Systems, 4 (14)
Flescher , Paul Benjamin , Nelson, Astoyao , Robert Adjetey. 2012. Design and development of
GSM/GPS based vehicle tracking and alert system for commercial intercity bus. IEEE Int.
Conf. on Adaptive Science & Technology (ICAST)
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
Peng, Z., Gao, S., Li, Z., Xiao, B., & Qian, Y. (2018). Vehicle safety improvement through deep
learning and mobile sensing. IEEE network, 32(4), 28-33.
Ralph Oyini Mbouna, Seong G. Kong, Myung-Geun Chun, 2013.Visual Analysis of Eye State and
Head Pose for Driver Alertness Monitoring. IEEE Trans. on Intelligent Transportation, 3
(14).
Types of Sensors that can be used in the system
 Motion sensors- electronic device that uses a sensor to detect nearby people or objects.
The sensor can be used to determine when the driver enters or leaves the vehicle.
 Alcohol Sensor- The alcohol sensor is technically referred to as a MQ3 sensor which
detects ethanol in the air. When a drunk person breathes near the alcohol sensor it
detects the ethanol in his breathe and provides an output based on alcohol
concentration.
 Infrared sensors- An IR sensor can measure the heat of an object as well as detects the
motion. Usually, in the infrared spectrum, all the objects radiate some form of thermal
radiation. The sensor can be used to determine if it is a person that has entered the
vehicle or an object.
 Accelerometer sensors- An electronic sensor measures the acceleration forces acting on
an object, to determine the object's position in space and monitor the object's
movement. They can be used to pinpoint the location of the car when sending data to
cloud.
Truth Table for the system implementation
A
0
0
0
0
0
0
0
0
1
1
1
1
1
B
0
0
0
0
1
1
1
1
0
0
0
0
1
C
0
0
1
1
0
0
1
1
0
0
1
1
0
D
0
1
0
1
0
1
0
1
0
1
0
1
0
F
0
0
0
0
1
1
1
1
1
1
1
1
1
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
1
1
1
1
1
1
F=A+B
0
1
1
1
0
1
1
1
1
Obtain Minimized Expressions using K-map
F=A’BC’D’+A’BC’D+A’BCD’+A’BCD+AB’C’D’+AB’C’D+AB’CD’+AB’CD+ABC’D’+ABC’D+AB
CD’+ABCD
Implement the expression in software form
If (A==0 && B==0)
digitalWrite(13, LOW);
else
digitalWrite (13, HIGH);
QUESTION TWO
a)
Design a calculator to add three bit binary numbers using minimum number of gates
and explain why it is the main device in the processor unit. Based on Arduino IDE program and
wiring diagram, explain how it can be implemented. (4 Marks)
Solution
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
b)
In the computer a mouse, keyboard and two other sensors are input devices, develop an
Arduino implementation of the device that is used to select one of them as well as the other
that is used to identify them.
(4marks)
Solution
c)
State and prove the distributive laws as used in Boolean algebra and implement them in
Arduino.
(2 marks)
Solution
d)
A robot is designed such that it has eight microcontrollers controlling it for different
operations. For a certain operation if the 1st microcontroller is active then there are other
microcontrollers that will be active at the same time following the sequence of adding one
twice, two once, one once and two subsequently. (4 marks)
i.
Write down the truth table for the circuit
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
ii.
Develop the Boolean equation that describe the circuit and draw the smallest possible
circuit.
iii.
Implement the above in Arduino.
Solution
e)
Design a 3-bit synchronous counter and implement it in software form.
(2 marks)
Solution
f)
Assume the following circuit represents a greenhouse control system. Obtain its truth
table, Boolean expression and Arduino implementation explaining what it possibly performs.
(2 marks)
Solution
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
Daniel Esilaba SCT221-C004-0111/2020
Digital Locgic CAT 2
Page
Download