Final Mini-Project Automobile Turn Lights Control Class: EE/CS 120A Lab Section: 026 TA: Eric Mlinar

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Ryoma John Sasaki

SID: 861062989
Partner: Virgilio Garcia

FINAL MINI-PROJECT

AUTOMOBILE TURN LIGHTS CONTROL

Class: EE/CS 120A


Lab Section: 026
TA: Eric Mlinar
Abstract/Overview:
For the final mini-project, my partner and I decided to construct the “Automobile Lights
Control” system. By using the given HLSM (High-Level State Machine) map we constructed the FSM
(Finite State Machine) and their corresponding circuits to develop a working circuit to which would be
implemented on the Basys-2 Board. We were able to successfully implement the circuit and all its
desired design specifications requirements as well as additional functionalities on the physical Board.

Introduction:
The rear taillight system in modern automobiles serve various purposes ranging from warning
the driver behind them of a possible problem, as a caution to slow down, or a possible change in
direction the lead driver wishes to take. How this is implemented varies greatly depending the
automobile manufacturer. In one particular case, which our group decided to implement, functions in
the following way:
(1) When the “LEFT” turn signal is turned “ON” the left turn signal is indicated by sequentially
turning on the LED’s running to the left (1 LED ON, 2 LEDs ON, …, 4 LEDs ON and so on)
(2) When the “RIGHT” turn signal is turned “ON” the right turn signal is indicated by
sequentially turning on the LED’s running to the right (1 LED ON, 2 LEDs ON, …, 4 LEDs
ON and so on)
(3) When the “HAZARD” signal is turned “ON” all LED’s (left and right) turn on
simultaneously and pulsates “ON” and “OFF” repeatedly.
(4) When the “BRAKE” signal is turned “ON” all LED’s (left and right) turn on simultaneously
and remains on the on position for the entire duration when “BRAKE” signal is “ON”.
This is a functionality seen in some recent models of the Ford Mustang and on some of the older
models of the classic Ford Thunderbird.
For simplicity we were required as per design specifications given in lab the following ways for
implementing the same functionality on the Basys-2 Board:
(1) Eight LED’s on the Basys-2 Board to emulate various functions of the rear taillight system:
(Four LEDs for the Left turn signal, another Four LED’s for the Right turn signal, and Hazard
would share those same eight lights).
(2) On and Off of a signal will be done with buttons:
(1) One button for Left Signal, one button for Right Signal, and one button for Hazard Signal.
However, in order to add an extra layer of complexity we assigned the following changes to the design
specifications and added corresponding function restrictions:
(1) When the “HAZARD” signal is turned “ON” the outer most LED’s (left and right) turn on
simultaneously and pulsates “ON” and “OFF” repeatedly.
(2) When the “BRAKE” signal is turned “ON” along-side with the “HAZARD” signal then all
of the inner LED’s (left and right) turn on simultaneously and remains on the on position for
the entire duration when “BRAKE” signal is “ON” while the outer most outer most LED’s
(left and right) turn on simultaneously and pulsates “ON” and “OFF” repeatedly.
(3) The “LEFT” turn signal and “RIGHT” turn signal cannot be “ON” simultaneously. In this
case all the LEDs will remain off.
(4) Both “LEFT” and “RIGHT” turn signals will be over-written if there is an instance of a
“ON” signal from either or both “HAZARD” and/or “BRAKE” signal and the LED’s will
light up to the corresponding signal from “HAZARD” and/or “BRAKE” signal.
(5) When the “LEFT” or “RIGHT” turn signal is made “OFF” through a physical off from the
button or in a situation described in point (3) or (4), it will restart back from the first LED
(Depending on the PIN assignments for the LEFT and RIGHT LEDs)
Similarly we had to make changes to implementation method on the Basys-2 Board:
(1) Eight LED’s on the Basys-2 Board to emulate various functions of the rear taillight system:
(Four LEDs for the Left turn signal, another Four LED’s for the Right turn signal, Hazard
would share the outer-most LED of both Right and Left turn signal, Brake would share the
same eight lights in total of both Right and Left turn signal).
(2) On and Off of a signal will be done with buttons:
(1) One button for Left Signal, one button for Right Signal, one button for Hazard Signal, and
one button for Brake Signal.
Almost all the circuits required or encountered in this Mini-Project assignment were circuitry visited in
previous lab experiments, except for one particular circuitry our group dubbed the “Time-Lag Circuit”.
This particular circuit delays the clock-cycle of the default clock-cycle count of the Basys-2 Board.
This circuit was required due to the fact the default clock-cycle count is far too fast to see with a naked
eye. Our particular circuit delayed the normally 40 nanosecond clock-cycle (the lowest possible default
setting) to around 1.5 seconds. The “Time-Lag Circuit” can be easily designed using a set of timers to
force the basys-2 board to use multiple clock-cycles to complete, to which the timers’ output can be
used as the “0”s and “1”s of a clock-cycle.

Analysis:
HLSM Of Circuit: Taken from Mini-Project Lab Manual:
FSM of Light Outputs:

Truth Table of Light Outputs:


Equations for Light Outputs:

FSM for Hazard Lights:


FSM for Brake Light Outputs:

Results/Records:
Schematics:
From High Level to Low Level with subsequent sub section(s) for each.

The Highest-Level Circuit: The Automobile Tail-light Signal System


1) LEFT/RIGHT LED CONTROLLER HIGH-LEVEL (IN ABOVE SCHEMATIC
LEFT_SIDE2 AND RIGHT_SIDE2)
NOTE: The same circuit is used for both the Left and Right LED Controller, just with different names.
To avoid redundancy I added just one copy.

LEFT/RIGHT LED CONTROLLER – SPLITTER -


LEFT/RIGHT LED CONTROLLER – INCREMENTER FULL -

LEFT/RIGHT LED CONTROLLER – INCREMENTER FULL – FOUR_BIT_ADDER

LEFT/RIGHT LED CONTROLLER – INCREMENTER FULL – FOUR_BIT_ADDER -_FULL_ADDER


LEFT/RIGHT LED CONTROLLER – INCREMENTER FULL – INCREMENTER

LEFT/RIGHT LED CONTROLLER – INCREMENTER FULL – INCREMENTER – SPLITTER_INV

LEFT/RIGHT LED CONTROLLER – MUX_SELECTOR -


LEFT/RIGHT LED CONTROLLER – HAZARDPULSE –

LEFT/RIGHT LED CONTROLLER – LIGHTOUTPUTWR2 –


2) TIME LAG CIRCUIT HIGHLEVEL:

TIME LAG CIRCUIT – TIMELAG -


TIME LAG CIRCUIT – TIMELAG – INCREMENTER_V2 –

TIME LAG CIRCUIT – TIMELAG – INCREMENTER_V2 – SPLITTER_1_AL


TIME LAG CIRCUIT – TIMELAG - COMPARATOR_V2

TIME LAG CIRCUIT – TIMELAG – SPLITTER_1_ALTV2


Test Bench Code:
The Highest-Level Circuit: The Automobile Tail-light Signal System
Simulation: Test Bench Results
The Highest-Level Circuit: The Automobile Tail-light Signal System
UCF Constraints File:
Discussion:
Our group was able to effectively use our time and successfully completed all necessary tasks within
three lab days out of four. We accomplished our goal of implementing the circuit on the physical
Basys-2 Board. Although the designing, creating and implementation process of the entire project was
not very difficult, each task was very involved and required our group to use all of our knowledge from
previous labs (timer, comparator, etc.), homework (FSM, MAP to Truth Table conversion etc.) and
topics discussed in lecture ( HLSM, etc.).
Thanks to careful planning, coordination and effective communication in both during lab and outside
our group did not stumble into any major problems other than minor errors in wiring, VHDL code, and
ISE Design Bugs (Problems creating new circuit symbol, non-responsive test-bench simulation, all of
which was easily resolved through simply closing and reopening Xilinx).
Our main issue in terms of possible improvement is not in the circuit(s) itself, but rather the very
erroneous nature of Xilinx. Due to the inability to copy, delete, and/or manipulate existing files the
overall size of the project folder (containing all necessary files) became increasingly large (4.0 GB), so
large in fact, that we were forced to use our personal computer to carry on all the tasks. The “Z” drive’s
size capacity limitation prevented us from transferring all necessary files.

Conclusion:
The mini-project, which students were given two weeks to complete, provided students with
invaluable experience and knowledge in the entire designing process of digital circuits. Students were
finally exposed to a “real-world” scenario where they were given a task and asked to complete solely
using their knowledge and prior experience. Starting from design using HLSM (High-Level State
Machine), FSM (Finite State Machine), truth-tables and finally implementing various methods of
efficiently downsizing the said design using techniques such as K-Maps. Using the experience from
prior lab experiments, students used Xilinx ISE Design software to its utmost potential to effectively
create their circuit representation of their design. Finally understanding the various niche characteristics
of the Basys-2 board students manipulated them to fit their desired experimentation conditions. All of
these tasks undertaken through effective communication with their partners and decisive teamwork.
Overall the mini-project was not only very enjoyable and fun experience but also very involved in
teaching us the importance of teamwork, and in an organized, focused and efficient design plan.

You might also like