ASM Project Specifications
 
 
 
 
 
 
 
 
 

Group:

Professor: Dr. Duncan Elliott
Date: February 3, 1998

 


Contents

Module Description *

Display Module *

User Interface Module *

Mileage Module *

Direction Module *

Speed Module *

Trip Odometer Module *

Clock Module *

Projected Distance Module *

Possible Additional Modules *

High Level VHDL (entity) *

VHDL: *

entity clock is *

VHDL: *

entity speed is *

VHDL: *

entity mileage is *

VHDL: *

entity trip_odometer is *

VHDL: *

entity direction is *

VHDL: *

entity project_distance is *

VHDL: *

entity display_mode is *

VHDL: *

entity alterra_chip is *

Additional Information *

Appendix *

Project Modules *

Design Diagram *

Time Management *

 


General Description

Our proposed project is the design and implementation of an Automobile Status Monitor (ASM). This system monitors various properties and conditions of a vehicle at the drivers fingertips. The preliminary design we intend to implement is a LCD display that utilizes a pushbutton to toggle between the various modules and a second and third button to set certain values. Each module corresponds to a specific feature of the vehicle. The modules we wish to display are the following: mileage, direction, speed, trip odometer, clock, and projected distance. Depending on time constraints, we may add or delete features of this system without having to change our design too much. This modularity makes our system extremely volatile in that respect. Currently we wish to implement modules that display the mileage, direction, speed, trip odometer, clock, and the projected distance that a vehicle can travel on the current tank of fuel.

 

Module Description Display Module The LCD display will be a 2 line by 16 character wide unit. This interface module displays the information for each feature when selected. The LCD display requires 16 I/O pins.

 

User Interface Module There will be three push buttons that the user presses to control the display. One button is used to toggle through each module or state, and the other two are used to set the clock and reset the trip odometer. Each button has it?s own input to the chip therefore requiring 3 I/O pins.

 

Mileage Module The mileage will be calculated and displayed in km/L on the LCD. It will be computed by taking the distance traveled and dividing it by the amount of fuel left in the tank. On the LCD it will display "MILEAGE" on the first line and the value on the second line such as "15.2 KM/L". 14 pins are needed here to indicate the amount of fuel in the tank.

 

Direction Module For the direction the driver is moving, we wish to display one of 8 directions: N, NE, NW, E, S, SE, SW, and W. The display will have "DIRECTION" on the first line and the corresponding direction on the second line (i.e. SW). This module requires a 3-bit input therefore needing 3 pins.

 

Speed Module The speed is calculated using the distance from the number of revolutions and dividing it by the time to get a display in km/h. The display will show "SPEED" and of course the speed such as "53 KM/H" on the next line. Each time a tire makes a revolution a pulse is sent to the ASM, so 1 pin will be required.

 

Trip Odometer Module The trip odometer is the number of kilometers that the vehicle has traveled to the nearest kilometer up to 1000 km. Here the second button is used to reset the trip odometer to zero. It will be displayed as "TRIP ODOMETER" and the value such as "299 KM". This is calculated using the same revolution pulse as the speed module, therefore no input is required.

 

Clock Module The clock displays the time in hours and minutes using HH:MM format. The second button is used to change the hours and the third button is used to change the number of minutes. Display will be "TIME" and then "12:45" for example. No pins are required for the clock module.

 

Projected Distance Module The projected distance is used to inform the driver the projected distance that the vehicle has left to travel on that current tank of gas in kilometers by multiplying the mileage by the amount left in the tank. The display reads "DISTANCE LEFT" and the amount left such as "142 KM". No additional pins are required for this module.

 

Possible Additional Modules Additional modules may include a monitoring of the exterior and interior temperature or a location warning that alerts the driver when an object is close to the vehicle. Other possible additions are:
  High Level VHDL (entity) VHDL: entity clock is

port( sethour, setminute: in std_logic

hour: out std_logic_vector (3 downto 0)

minutes: out std_logic_vector (5 downto 0)

counter: out std_logic_vector (6 downto 0));

Description: sethour: Input from button1. When in display time mode, the time will increase by one hour each time the button is pushed.

setminute: Input from button2. When in display time mode, the minutes increase by one each time button2 is pushed.

hour: When needed, this vector provides the current hour to the display entity.

minutes: When needed, this vector provides the current minute to the display entity.

counter: provides timing for any entity that requires it. Increments every ½ second.

 

VHDL: entity speed is

port( revolution: in std_logic

counter: in std_logic_vector (6 downto 0)

velocity: out std_logic_vector (7 downto 0));

Description: revolution: Each wheel revolution sends a pulse on this line. Knowing the number of revolutions and the radius of the wheel, the distance traveled can be determined.

counter: Provided by the clock entity, counter will be used to determine velocity.

velocity: When needed, this vector provides the current velocity of the vehicle to the display entity.

 

VHDL: entity mileage is

port( litres: in std_logic_vector(13 downto 0)

revolution: in std_logic

km/litre: out std_logic_vector (8 downto 0));

Description: litres: Volume of fuel remaining in the gas tank provided by this vector. This allows 160 litres to be the maximum amount of fuel, and it will be accurate to the hundredth of a litre.

km/litre: When needed, this vector will provide the current mileage to the display entity.

 

VHDL: entity trip_odometer is

port( revolution, reset: in std_logic

trip_odometer: out std_logic_vector (9 downto 0));

Description: Revolution: As described in entity speed.

Reset: When trip_odometer mode is selected, the distance traveled will reset to zero when button1 is pressed.

Trip_odometer: When needed, this vector will provide the current distance traveled to the display entity. Will reset to zero when 1000 km is reached.

 

VHDL: entity direction is

port( direct1: in std_logic_vector (2 downto 0)

direct2: out std_logic_vector (2 downto 0));

 

Description: direct1: Stores the current direction of the vehicle.

direct2: When needed, this vector will provide the current direction the vehicle is travelling to the display entity.

 

VHDL: entity project_distance is

port( litres: in std_logic_vector (2 downto 0)

km/litres: in std_logic_vector (8 downto 0)

projected_km: out std_logic_vector (9 downto 0));

Description: litres: As described in entity mileage.

km/litres: As described in entity mileage.

projected_km: When needed, this vector provides the display entity with the distance the vehicle can go on the remaining fuel.

 

VHDL: entity display_mode is

port( select, button1, button2: in std_logic

minutes: in std_logic_vector (5 downto 0) counter: in std_logic_vector (6 downto 0)

km/litre: in std_logic_vector (8 downto 0)

trip_odometer: in std_logic_vector (9 downto 0)

direct2: in std_logic_vector (2 downto 0)

projected_km: in std_logic_vector (9 downto 0)

display: out std_logic_vector (15 downto 0));

Description: select: The select line is connected to the first button on the interface. This button will be used to cycle through the different display modes.

button1: Used to set the hour, when in the clock display mode. Used as a reset in the trip odometer mode. In all other modes the button pulses will be ignored.

button2: Used to set the minutes, when the ASM is in the clock display mode.

minutes: As described in entity clock.

counter: As described in entity clock.

km/litre: As described in entity mileage.

trip_odometer: As described in entity trip_odometer.

direct2: As described in entity direction.

projected_km: As described in entity projected_distance

display: This vector provides whatever output necessary to display the selected information on the LCD.

 

VHDL: entity alterra_chip is

port( select, button1, button2, revolution: in std_logic

litres: in std_logic_vector(13 downto 0)

direct1: in std_logic_vector (2 downto 0)

display: out std_logic_vector (15 downto 0));

Description: select: As described in the entity display.

button1: As described in the entity display.

button2: As described in the entity display.

display: As described in the entity display.

 

Additional Information
 
TESTING To test our design we will construct our system on a board and by using switches and buttons test each module individually. Inputs will be simulated using the switches and with the buttons we can toggle between states. If the output matches are expected values then the system will work. 
ADDITIONAL PARTS We require a 2 line by 16 character wide LCD display and three pushbuttons. Also for testing purposes, we need an additional button to simulate the number of revolutions, 14 switches to represent liters of gas and 3 more switches for direction parameters. We are still in the process of acquiring these parts. We have spoken to Morris Locker and he advises us to ensure our chip has enough current to drive the LCD. He did tell us that he does have these in stock and he is ordering more, however we will report back to him and see if they will be available.
CHIP The chip we are planning to use is the Altera chip because it is a reprogrammable FPGA. We do not require RAM or a microprocessor. 
 

 

 

 

 

 

 

 

 

 

 
 
 
 
Appendix

 

Project Modules

 

Design Diagram

 

Time Management
Person
Task
Deadline
Duration
Test/Debug
Group
Project Specification
Feb. 3
12 hours
None
Group
Resource Requirements
Feb. 24
8 hours
None
Group
Simulation Documentation
Mar. 10
14 hours
None
Group
Final Report
April 7
18 hours
None
Group
Oral Presentation
April 7, 9
6 hours
None
Group
Student Application Notes
April 9
7 hours
None
Mike
Clock Design
Feb. 13
14 hours
None
Mike
Clock VHDL
Feb. 28
13 hours
12 hours
Milton
Interface Design
Feb. 28
15 hours
None
Milton
Interface Implementation
March 10
7 hours
10 hours
Korrey
Mileage Module Design
Feb. 13
2 hours
None
Korrey
Mileage Module VHDL
Feb. 28
5 hours
5 hours
Korrey
Projected Distance Design
Feb. 16
3 hours
None
Korrey
Projected Distance VHDL
Feb. 28
7 hours
2 hours
Milton
Direction Module Design
Feb. 16
3 hours
None
Milton
Direction Module VHDL
March 3
2 hours
1 hours
Korrey
Speed Module Design
Feb. 18
2 hours
None
Korrey
Speed Module VHDL
March 7
3 hours
3 hours
Korrey
Trip Odometer Design
Feb. 20
3 hours
None
Korrey
Trip Odometer VHDL
March 10
4 hours
4 hours