Specifications

110
There will be four states that will manage the control box unit. The first state will
be the wait state. The wait state will wait for a valid reading from the hand held
unit. If the user who has taking the breath sample gives a bad reading, it will stay
in the wait state. This means that the motor relay, headlight LEDs, green status
LED, and red status LED. Once a valid reading has been registered, then the
current state will be transitioned to enabled state. In the enabled state, the motor
relay bits is set to high, as well as the green status led and highlight LEDs. Once
the system is in the enabled state, the system will request another reading at a
random interval. As soon as the system asked for another reading, the current
state will transition to rolling state. The rolling state will enable red status led,
disable the green led and wait for the user to give a valid reading. The user will
have four minutes to give a valid reading. If the user gives an invalid reading, the
current state will be transitioned to the alert state. In the alert state, the green
status LED, red status LED, and the headlight LEDs will be toggled until the user
cuts power to the vehicle. Figure 4.4-2 shows the flow diagram for the control
box unit states.
Figure 4.4-2: Diagram illustrating the flow chart control box unit states.
The functions that were used for the control box unit can be listed in the tables
below. These functions are essential in order to communicate with the hand held
unit and also enable the correct bits to disable or enable the LEDs and motor
relay. Table 4.4.2-1 summarizes these functions.