You are on page 1of 24

12/11/2016

Building a Temperature
Sensing System
Using DE2-115 FPGA and System Verilog

(Group 3)

CSEG580: Principles of Computer System Design

Study Project

Fall 2016

(Group 3)

Building a Temperature Sensing


System
Using DE2-115 FPGA and System Verilog

Table of Contents
Introduction ........................................................................................................................2
Sensors .............................................................................................................................2
Processing ........................................................................................................................2
Temperature Sensing and Control System ......................................................................3
High-Level Design ...............................................................................................................4
Block Diagram ..................................................................................................................4
Solution Algorithm ...........................................................................................................5
Code Hierarchy ...............................................................................................................6
Code Remarks .................................................................................................................. 6
Lower-Level Design .............................................................................................................8
Hardware..........................................................................................................................8
Results................................................................................................................................. 11
Conclusion .......................................................................................................................... 14
Appendix ............................................................................................................................14
TemperatureSensing.sv ..................................................................................................14
LCD_Display.sv ..............................................................................................................16
References.......................................................................................................................... 20

1!

(Group 3)

Introduction
Many of todays industrial systems rely on stabilized temperature readings to maintain
the safety and quality of the products and appliances. For the most part, many modern
procedures rely on balanced out temperatures and henceforth it is vital to manage an
ideal temperature. Temperature control can be characterized as the method of detecting
temperature change and coordinating the warmth energy into or outward of the
framework to realize the correct temperature [1].
Temperature control frameworks are for the most part useful for closed loop control
frameworks [1]. In such frameworks, an action is taken according to the monitored
temperature in the vicinity. To achieve temperature control, two components must be
considered, which are sensing and processing [3]. Securing the information is the key
part of the entire controlled process. Sensors assume a noteworthy part in gaining the
information and the processor assesses the information and gives a standard coherent
output to accomplish the required outcome [2].

Sensors
The study of sensing can be characterized as the process of obtaining information from
remote geological areas. Various sensors are positioned into the surveillance field to
collect data. Sensor can be characterized as a transducer which changes over one type of
energy into another [2]. Sensors operate by detecting any variations in the surrounding
area, then they send such observations in the form of an output that convey the changes.
The market offers a variety of accessible sensors, such as temperature sensors, gas
sensors, humidity sensors, light sensors and so forth. Whats common between such
sensors is that they produce their output in an electrical form that can be used for
additional processing [3].

Processing
The idea of processing can be described as the act of evaluating data through some type of
program. Electric signals form the input to the processor from the sensor devices. Based on the
given input signal, the processor evaluates the given data and produces an output with respect to
the input data. There are two major types of processors, which fall under PLCs (programmable
Logic controllers) or FPGAs (field programmable entryway exhibits) which can be modified and
programmed to perform in a certain manner. Coding of the FPGA can be performed using
different types of software, which vary depending on the processor compatibility [3].

!
2

(Group 3)

Temperature Sensing and Control System


Many of todays modern industrial systems rely on a variety of parameters that range
from weight, temperature, humidity, light and so forth. Such parameters must be
improved for the best production of different materials and merchandise. Temperature
is one of the critical facets that should be considered amid the assembling of materials.
A temperature control system consists of an integrated set of sensors and processors
that measure and control temperature. Controlling and observing of temperature can't
be accomplished with any physical intervention as the temperatures would be too
enormous or too low. This may make an impediment for the process of gathering
readings and controlling temperature. Given the extreme boundaries of temperature
readings, the atmosphere will be excessively antagonistic which might introduce severe
damages [3]. Controlling temperature can be extremely challenging without accurately
reading the temperature. Hence, a temperature control system can aid in accurately
obtaining temperature readings by solving the problem of human intrusion to
completely and precisely control temperature [1, 2].
The aim of the project is to highlight the process of building a temperature control
system using Altera DE2-115 FPGA1 and System Verilog, but due to lack of time and
required components, the scope is limited to only a temperature sensing system.

Figure 1 Altera DE2-115 FPGA


1

http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=502
!
3

(Group 3)

High-Level Design
Block Diagram
The system starts with a temperature sensor that converts the measured
temperatureinto electrical signals forfurther processing. The measured temperature is
read in terms of analogue voltage and the DE2115 board only accepts digital data.
Hence, from the sensor the output voltage is given to the analogue to digital converter
(ADC) which digitizes the voltage for further the processing of data. The output of ADC
is given to the board through the GPIO pins. The processor processes the information
and displays it on the LCD display [3]. The block diagram is as shown below.

Figure 2 Block Diagram of the Temperature Sensing System [3]

!
4

(Group 3)

Solution Algorithm
The software part of the solution can be defined using the following algorithm.

Figure 3 The algorithm of the Temperature Sensing System


As shown in the above figure, the input temperature is taken from the ADC in binary
code and is then converted into integer.

!
5

(Group 3)

Code Hierarchy
The project code was organized in the following structure (generated through the Tree 2
command on Windows):
C: POCSD_final_project_team_3 / main project folder (contains the
source files in SystemVerilog)
DE2_115.qsf/ Pin assignments file
LCD_Display.sv/ System Verilog file for displaying temp on LCD
README.txt/ README file for instructions about the project
Reset_Delay.sv/ System Verilog file to control resent on DE2-115
TemperatureSensing.sv/ Main System Verilog for temp sensing
+---db/ Compilation temp folder (May be deleted)
+---incremental_db/ Compilation temp folder (May be deleted)
|

\---compiled_partitions

+---output_files
\---simulation / main folder for simulation files
\---modelsim

Code Remarks
Since the implementation of this project is mainly based on the work done in [3],
we tried to re-implement their system by tracing their circuitry and re-writing their
VHDL code. However, this attempt failed because of the inherent differences between
VHDL and System Verilog. Our project requirements state that we must use System
Verilog, and we are more familiar with System Verilog. Moreover, converting code from
VHDL to System Verilog was not a straight forward task. For the most part, the major
components could be converted. Yet, there were some small issues that caused
2

http://www.computerhope.com/treehlp.htm
!
6

(Group 3)

compilation errors and unexpected warnings, which lead us to follow a different


approach to display the read temperature. Instead of using the seven segment display
and switches like [3], we opted to use the LCD of the DE2-115 board as it was provided
to us as a template to benefit from in the project.
First, we made sure that the GPIO pins were assigned according to the documentation
provided by [3] as follows:
wire [3:0] hex1, hex0;
wire [7:0] Temp; //Create wire for read temperature from GPIO
//Pin assignment of each Temp reading with GPIO
assign Temp[0] = GPIO_0[28];
assign Temp[1] = GPIO_0[26];
assign Temp[2] = GPIO_0[24];
assign Temp[3] = GPIO_0[22];
assign Temp[4] = GPIO_0[20];
assign Temp[5] = GPIO_0[18];
assign Temp[6] = GPIO_0[16];
assign Temp[7] = GPIO_0[14];
//Convert Temp to decimal value
assign hex1 = Temp[7:4];
assign hex0 = Temp[3:0];
LCD_Display u1(
// Host Side
.iCLK_50MHZ(CLOCK_50),
.iRST_N(DLY_RST),
.Temp(Temp),
// LCD Side
.DATA_BUS(LCD_DATA),
.LCD_RW(LCD_RW),
.LCD_E(LCD_EN),
.LCD_RS(LCD_RS)
);

The temperature here is defined as an 8 bit wire that gets its values from the
GPIO in binary. Then the values are converted with the hex1 and hex0 assignments that
will be done in the LCD_Display.sv file. The code snippet below shows the changes
made to the LCD display file in which the output of the display was modified to show the
temperature obtained from the sensor. Each ASCII code corresponds to a letter that
shows the statement Temperature(C)=XX which means the temperature in degrees
Celsius equals the value read from the sensor and converted with the ADC.
// ASCII hex values for LCD Display
// Enter Live Hex Data Values from hardware here
// LCD DISPLAYS THE FOLLOWING:
//----------------------------//| Temperature(C)=
|
//| XX
|
//----------------------------!
7

(Group 3)

// Line 1
//always@(Temp)
//tempOutput = Temp;
always
case (index)
5'h00: out <= 8'h54;//T
5'h01: out <= 8'h65;//e
5'h02: out <= 8'h6d;//m
5'h03: out <= 8'h70;//p
5'h04: out <= 8'h65;//e
5'h05: out <= 8'h72;//r
5'h06: out <= 8'h61;//a
5'h07: out <= 8'h74;//t
5'h08: out <= 8'h75;//u
5'h09: out <= 8'h72;//r
5'h0A: out <= 8'h65;//e
5'h0B: out <= 8'h28;//(
5'h0C: out <= 8'h43;//C
5'h0D: out <= 8'h29;//)
5'h0E: out <= 8'h3D;//=
// Line 2
//Converted temperature value
5'h10: out <= {4'h0,hex1};
5'h11: out <= {4'h0,hex0};
default: out <= 8'h20;
endcase

Lower-Level Design
Hardware
The components used for the temperature sensing system are as follows:
LM35 Temperature Sensor
ADC0804 IC
DE2115 Board
10Kresistor
10K pot
150pF capacitor
100F capacitor
Bread Board
!
8

(Group 3)

Connecting wires
Multi-meter

The Schematic diagram is illustrated next.

Figure 4 The Schematic Diagram of the Temperature Sensing System [6]

The two main hardware connections are further explained next.


1. Temperature Sensor
2. Analogue to Digital Convertor

The LM35 Temperature Sensor is used to measure the room temperature in


Centigrade. As shown in Figure 5, LM35 is a three pin transistor like device:
PIN1= Vcc - Power (Connected to +5V)
PIN2= Signal or Output (connected to ADC chip)
PIN3 = Ground (Connected to ground)
!
9

(Group 3)

Figure 5 LM35 Temperature Sensor [7]

This sensor provides variable voltage at the output, based on temperature. For every +1
centigrade rise in temperature there will be +10mV higher voltage at the output pin. For
example, if the temperature is 0 centigrade the output of sensor will be 0V, if the
temperature is 24 centigrade the output of sensor will be +240mV [7].
As shown in Figure 4, so a100uF capacitoris used to smooth out the output of the
LM35 since it has lot of voltage fluctuations [7].

Figure 6 Analogue to Digital Convertor ADC0804 [9]


The ADC chip is used to convert the analogue temperature signal into 8 bit digital data.
It is important to note that theADC0804 operates at 5Vand so DB0 to DB7 pins each
provide output in 5V logic signal to represent logic1. So the problem is the DE2115 logic
!
10

(Group 3)

is of +3v, so we cannot feed the output of the ADC directly to the DE2115 GPIO pins
because if we give +5V to any GPIO pin of PI, the board gets damaged [8].
To overcome this problem, we made use of the adjustable Vref pin (PIN9) on ADC0804.
So weset the Vref of the chip to +2V. This is done by using 10K pot to adjust the voltage
at PIN9 to a voltage of +1V (VREF/2). The voltmeter to get the accurate voltage [7].

Figure 7 Typical Application Schematic of ADC0804 [9]

The ADC is known to have lots of noise which can greatly affect the performance, so we
use150 pF capacitor for Noise Filtration to eliminate fluctuations at output. The
chip works on RC (Resistor-Capacitor) oscillator clock. As shown in circuit diagram, C=
150 pF and R= 10k ohm form a Clock [6].
The important thing to remember here is the capacitor can be changed to a lower value
for higher rate of ADC conversion. However with higher speed there will be decrease in
accuracy. So if the application requires higher accuracy, choose the capacitor with
higher value and for higher speed choose the capacitor with lower value [6].

Results
Results of connecting the circuit to the DE2-115 FPGA board and downloading the
system Verilog code to it can be found in the short video on Drop Box [5].
The video shows that the FPGA board is able to receive the temperature reading through
the GPIO and display it to the user in a readable format in Celsius. According to the
video, the temperature sensor was able to successfully detect the room temperature,
!
11

(Group 3)

which was 22 C at the time of filming the video. Moreover, this temperature can be used
to compare the actual room temperature with the values given by the thermostat in the
room to compare their accuracy.
Execution time was extremely fast so long as all the components are properly connected
and pins assigned to their proper input source on the GPIO. Moreover, any improper
circuitry results in compilation errors, so the deployment of the code was done after
ensuring that all connections were done accurately. Some components could not be
integrated in the initial plan like the buzzer that was supposed to fire an alarm sound
when the temperature changes. This was not accomplished due to complications with
hardware and lack of time.
The complete project circuit configuration is shown below:

!
To check that the temperature measured is equal to the temperature displayed, a
multimeter was used to measure the output voltage from the temperature sensor.

!
12

(Group 3)

As shown above, the multimeter read 213 mV which corresponds to a temperature of


21.3 C.
When measured, the lcd also showed an integer value of the measured temperature of 21
C as shown below.

This indicates that the project worked successfully.

!
13

(Group 3)

Conclusion
The aim of the temperature system was to measure the room temperature and
display it on the LCD of the DE2115 board, which was successfully achieved.
However, the initial plan was to have a control system where a fan would turn on
if the room temperature exceeds a certain threshold or a heater will turn on if it falls
below this threshold. Also, a buzzer was to be installed in order to warn the user when
these two cases happen. But this was not achievable due to time constraints and difficult
access to components. The buzzer was ordered, but it turned out to be damaged and
there was no enough time to order a new one.
Future plans include implementing the above described conditions, in addition to
providing a live feed on a TV screen or monitor to show the measured temperature and
show any warnings. In case of warning an email or text message is sent to the
responsible people in order to take action. This was actually implemented by us before
using the Raspberry Pi.
Finally, it is important to note that the lcd code was provided by the lab instructor
and it was modified by us in order to read the temperature from the adc and convert it
into integer to be displayed on the LCD.

Appendix
This section contains the full code that was used in the implementation of this project.
The major Verilog files include TemperatureSensing.sv and LCD_Display.sv.

TemperatureSensing.sv
module TemperatureSensing(
input
CLOCK_50, // 50 MHz clock
input [3:0] KEY,
// Pushbutton[3:0]
input [17:0] SW,
// Toggle Switch[17:0]
output [6:0] HEX0,HEX1,HEX2,HEX3,HEX4,HEX5,HEX6,HEX7, // Seven Segment
Digits
output [8:0] LEDG, // LED Green
output [17:0] LEDR, // LED Red
inout [35:0] GPIO_0,GPIO_1,
// GPIO Connections
// LCD Module 16X2
output LCD_ON, // LCD Power ON/OFF
output LCD_BLON,
// LCD Back Light ON/OFF
output LCD_RW, // LCD Read/Write Select, 0 = Write, 1 = Read
!
14

(Group 3)

output LCD_EN, // LCD Enable


output LCD_RS, // LCD Command/Data Select, 0 = Command, 1 = Data
inout [7:0] LCD_DATA
// LCD Data bus 8 bits
);
// All inout port turn to tri-state
assign GPIO_0
=
36'hzzzzzzzzz;
assign GPIO_1
=
36'hzzzzzzzzz;
wire [6:0] myclock;
wire RST;
assign RST = KEY[0];
// reset delay gives some time for peripherals to initialize
wire DLY_RST;
Reset_Delay r0( .iCLK(CLOCK_50),.oRESET(DLY_RST) );
// Send switches to red leds
assign LEDR = SW;
// turn LCD ON
assign LCD_ON
assign LCD_BLON

=
=

1'b1;
1'b1;

wire [3:0] hex1, hex0;


wire [7:0] Temp; //Create wire for read temperature from GPIO
//Pin assignment of each Temp reading with GPIO
assign Temp[0] = GPIO_0[28];
assign Temp[1] = GPIO_0[26];
assign Temp[2] = GPIO_0[24];
assign Temp[3] = GPIO_0[22];
assign Temp[4] = GPIO_0[20];
assign Temp[5] = GPIO_0[18];
assign Temp[6] = GPIO_0[16];
assign Temp[7] = GPIO_0[14];
//Convert Temp to decimal value
assign hex1 = Temp[7:4];
assign hex0 = Temp[3:0];
LCD_Display u1(
// Host Side
.iCLK_50MHZ(CLOCK_50),
.iRST_N(DLY_RST),
.Temp(Temp),
// LCD Side
.DATA_BUS(LCD_DATA),
.LCD_RW(LCD_RW),
.LCD_E(LCD_EN),
.LCD_RS(LCD_RS)
);
// blank unused 7-segment digits
assign HEX0 = 7'b111_1111;
assign HEX1 = 7'b111_1111;
assign HEX2 = 7'b111_1111;
assign HEX3 = 7'b111_1111;
!
15

(Group 3)

assign
assign
assign
assign

HEX4
HEX5
HEX6
HEX7

=
=
=
=

7'b111_1111;
7'b111_1111;
7'b111_1111;
7'b111_1111;

endmodule

LCD_Display.sv
module LCD_Display(iCLK_50MHZ, iRST_N, Temp, hex1, hex0,
LCD_RS,LCD_E,LCD_RW,DATA_BUS);
input iCLK_50MHZ, iRST_N;
input [3:0] hex1, hex0;
//Read temperature value from GPIO
input [7:0] Temp;
output LCD_RS, LCD_E, LCD_RW;
inout [7:0] DATA_BUS;
parameter
HOLD = 4'h0,
FUNC_SET = 4'h1,
DISPLAY_ON = 4'h2,
MODE_SET = 4'h3,
Print_String = 4'h4,
LINE2 = 4'h5,
RETURN_HOME = 4'h6,
DROP_LCD_E = 4'h7,
RESET1 = 4'h8,
RESET2 = 4'h9,
RESET3 = 4'ha,
DISPLAY_OFF = 4'hb,
DISPLAY_CLEAR = 4'hc;
reg [3:0] state, next_command;
// Enter new ASCII hex data above for LCD Display
reg [7:0] DATA_BUS_VALUE;
wire [7:0] Next_Char;
reg [19:0] CLK_COUNT_400HZ;
reg [4:0] CHAR_COUNT;
reg CLK_400HZ, LCD_RW_INT, LCD_E, LCD_RS;
// BIDIRECTIONAL TRI STATE LCD DATA BUS
assign DATA_BUS = (LCD_RW_INT? 8'bZZZZZZZZ: DATA_BUS_VALUE);
LCD_display_string u1(
.index(CHAR_COUNT),
.out(Next_Char),
.hex1(hex1),
.hex0(hex0),
);
assign LCD_RW = LCD_RW_INT;
always @(posedge iCLK_50MHZ or negedge iRST_N)
if (!iRST_N)
begin
CLK_COUNT_400HZ <= 20'h00000;
CLK_400HZ <= 1'b0;
!
16

(Group 3)

end
else if (CLK_COUNT_400HZ < 20'h0F424)
begin
CLK_COUNT_400HZ <= CLK_COUNT_400HZ + 1'b1;
end
else
begin
CLK_COUNT_400HZ <= 20'h00000;
CLK_400HZ <= ~CLK_400HZ;
end
// State Machine to send commands and data to LCD DISPLAY
always @(posedge CLK_400HZ or negedge iRST_N)
if (!iRST_N)
begin
state <= RESET1;
end
else
case (state)
RESET1:
// Set Function to 8-bit transfer and 2 line display with 5x8 Font size
// see Hitachi HD44780 family data sheet for LCD command and timing details
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h38;
state <= DROP_LCD_E;
next_command <= RESET2;
CHAR_COUNT <= 5'b00000;
end
RESET2:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h38;
state <= DROP_LCD_E;
next_command <= RESET3;
end
RESET3:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h38;
state <= DROP_LCD_E;
next_command <= FUNC_SET;
end
// EXTRA STATES ABOVE ARE NEEDED FOR RELIABLE PUSHBUTTON RESET OF LCD
FUNC_SET:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h38;
!
17

(Group 3)

state <= DROP_LCD_E;


next_command <= DISPLAY_OFF;
end
// Turn off Display and Turn off cursor
DISPLAY_OFF:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h08;
state <= DROP_LCD_E;
next_command <= DISPLAY_CLEAR;
end
// Clear Display and Turn off cursor
DISPLAY_CLEAR:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h01;
state <= DROP_LCD_E;
next_command <= DISPLAY_ON;
end
// Turn on Display and Turn off cursor
DISPLAY_ON:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h0C;
state <= DROP_LCD_E;
next_command <= MODE_SET;
end
// Set write mode to auto increment address and move cursor to the right
MODE_SET:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h06;
state <= DROP_LCD_E;
next_command <= Print_String;
end
// Write ASCII hex character in first LCD character location
Print_String:
begin
state <= DROP_LCD_E;
LCD_E <= 1'b1;
LCD_RS <= 1'b1;
LCD_RW_INT <= 1'b0;
// ASCII character to output
if (Next_Char[7:4] != 4'h0)
!
18

(Group 3)

DATA_BUS_VALUE <= Next_Char;


// Convert 4-bit value to an ASCII hex digit
else if (Next_Char[3:0] >9)
// ASCII A...F
DATA_BUS_VALUE <= {4'h4,Next_Char[3:0]-4'h9};
else
// ASCII 0...9
DATA_BUS_VALUE <= {4'h3,Next_Char[3:0]};
// Loop to send out 32 characters to LCD Display (16 by 2 lines)
if ((CHAR_COUNT < 31) && (Next_Char != 8'hFE))
CHAR_COUNT <= CHAR_COUNT + 1'b1;
else
CHAR_COUNT <= 5'b00000;
// Jump to second line?
if (CHAR_COUNT == 15)
next_command <= LINE2;
// Return to first line?
else if ((CHAR_COUNT == 31) || (Next_Char == 8'hFE))
next_command <= RETURN_HOME;
else
next_command <= Print_String;
end
// Set write address to line 2 character 1
LINE2:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'hC0;
state <= DROP_LCD_E;
next_command <= Print_String;
end
// Return write address to first character postion on line 1
RETURN_HOME:
begin
LCD_E <= 1'b1;
LCD_RS <= 1'b0;
LCD_RW_INT <= 1'b0;
DATA_BUS_VALUE <= 8'h80;
state <= DROP_LCD_E;
next_command <= Print_String;
end
// The next three states occur at the end of each command or data transfer to
the LCD
// Drop LCD E line - falling edge loads inst/data to LCD controller
DROP_LCD_E:
begin
LCD_E <= 1'b0;
state <= HOLD;
end
// Hold LCD inst/data valid after falling edge of E line
HOLD:
begin
state <= next_command;
!
19

(Group 3)

end
endcase
endmodule
module LCD_display_string(index,out,hex0,hex1);
input [4:0] index;
input [3:0] hex0,hex1;
output [7:0] out;
reg [7:0] out;
integer tempOutput;
// ASCII hex values for LCD Display
// Enter Live Hex Data Values from hardware here
// LCD DISPLAYS THE FOLLOWING:
//----------------------------//| Temperature(C)=
|
//| XX
|
//----------------------------// Line 1
//always@(Temp)
//tempOutput = Temp;
always
case (index)
5'h00: out <= 8'h54;//T
5'h01: out <= 8'h65;//e
5'h02: out <= 8'h6d;//m
5'h03: out <= 8'h70;//p
5'h04: out <= 8'h65;//e
5'h05: out <= 8'h72;//r
5'h06: out <= 8'h61;//a
5'h07: out <= 8'h74;//t
5'h08: out <= 8'h75;//u
5'h09: out <= 8'h72;//r
5'h0A: out <= 8'h65;//e
5'h0B: out <= 8'h28;//(
5'h0C: out <= 8'h43;//C
5'h0D: out <= 8'h29;//)
5'h0E: out <= 8'h3D;//=
// Line 2
//Converted temperature value
5'h10: out <= {4'h0,hex1};
5'h11: out <= {4'h0,hex0};
default: out <= 8'h20;
endcase
endmodule

References

!
20

(Group 3)

[1]

"Temperature control," in Wikipedia, Wikimedia Foundation, 2016. [Online].


Available: https://en.wikipedia.org/wiki/Temperature_control. Accessed: Dec.
11, 2016.

[2]

"Remote sensing," in Wikipedia, Wikimedia Foundation, 2016. [Online].


Available: https://en.wikipedia.org/wiki/Remote_sensing. Accessed: Dec. 11,
2016.

[3]

A. Ani, "TEMPERATURE CONTROL SYSTEM," 2016. [Online]. Available:


https://www.academia.edu/23357304/TEMPERATURE_CONTROL_SYSTEM.
Accessed: Dec. 11, 2016.

[4]

R. M. van der Knijff, "Control systems/SCADA forensics, whats the difference?,"


Digital Investigation, vol. 11, no. 3, pp. 160174, Sep. 2014. [Online]. Available:
http://www.sciencedirect.com/science/article/pii/S1742287614000814.
Accessed: Dec. 11, 2016.

[5]

"TemperatureControlSystem(group3).mp4," Dropbox. [Online]. Available:


https://www.dropbox.com/s/e1fc5rgz8m87y2i/
TemperatureControlSystem%28Group3%29.mp4?dl=0. Accessed: Dec. 11, 2016.

[6]

Circuit Digest, "Raspberry pi temperature monitor using LM35," 2016. [Online].


Available: http://circuitdigest.com/microcontroller-projects/room-temperaturemeasurement-with-raspberry-pi-lm35. Accessed: Nov. 10, 2016.

[7]

Texas Intruments, "LM35 Precision Centigrade Temperature Sensors," in Texas


Intrumnts, 2016. [Online]. Available: http://www.ti.com/lit/ds/symlink/
lm35.pdf. Accessed: Nov. 10, 2016.

[8]

Terasic, 2010. [Online]. Available: https://wiki.ntb.ch/infoportal/_media/fpga/


cyclone_iv/de2_115_schematic.pdf. Accessed: Nov. 10, 2016.

[9]

Intersil, "ADC0803, ADC0804," in Intersil, 2002. [Online]. Available: http://


www.intersil.com/content/dam/Intersil/documents/adc0/adc0803-04.pdf.
Accessed: Dec. 12, 2016.

Additional References
[10]

!
21

N. Emmanuel, "Non-inverting operational amplifier - the Non-inverting opamp," Basic Electronics Tutorials, 2013. [Online]. Available: http://
www.electronics-tutorials.ws/opamp/opamp_3.html. Accessed: Dec. 11, 2016.

(Group 3)

[11]

electrosourav, "Analog temperature detector using uA741 OPAMP,"


Craftronixlab, 2015. [Online]. Available: https://craftronixlab.wordpress.com/
2015/03/05/analog-temperature-detector-using-ua741-opamp/. Accessed: Dec.
11, 2016.

[12]

"Temperature sensor using 741 OPAMP & LM35," 2028. [Online]. Available:
http://8051funkey.blogspot.qa/2014/08/temperature-sensor-using-741-opamplm35.html. Accessed: Dec. 11, 2016.

[13]

C. D. P. policy, Disclaimer, and C. Us, "Temperature controlled LEDs using


LM35," 2016. [Online]. Available: http://circuitdigest.com/electronic-circuits/
temperature-controlled-leds-using-lm35. Accessed: Dec. 11, 2016.

[14]

A. 01, "Using analog temperature sensors with ADCs - application note - maxim,"
2001. [Online]. Available: https://www.maximintegrated.com/en/app-notes/
index.mvp/id/571. Accessed: Dec. 11, 2016.

[15]

H. Chandra and V. my complete profile, " ADC ic interfacing," 2012. [Online].


Available: http://elecoon.blogspot.qa/. Accessed: Dec. 11, 2016.

[16]

xxxxx, " ANALOG to DIGITAL CONVERTER with IC ADC0804" 2015. [Online].


Available: https://electel.blogspot.qa/2015/04/analog-to-digital-converteradc0804.html. Accessed: Dec. 11, 2016.

[17]

EngineersGarage, " ADC0804 Datasheet," 2015. [Online]. Available: http://


www.engineersgarage.com/electronic-components/adc0804-datasheet.
Accessed: Dec. 11, 2016.

[18]

A. Bhargav, "Forums / general help guidance and discussion / problem in testing


ADC0804 in free running mode - Rickeys world of Microcontrollers &
microprocessors," 2014. [Online]. Available: http://www.8051projects.net/
t16815/general-help-guidance-discussion/problem-in-testing-adc0804-freerunning-mode.htm. Accessed: Dec. 11, 2016.

[19]

A. Bhargav, "Forums / electronics / interfacing LM35 with parallel port - Rickeys


world of Microcontrollers & microprocessors," 2014. [Online]. Available: http://
www.8051projects.net/t48719/electronics/interfacing-lm35-parallel-port.htm.
Accessed: Dec. 11, 2016.

[20]

"Interface LM35 temperature sensor with 8051 (AT89C51),". [Online]. Available:


https://bravelearn.com/interface-lm35-temperature-sensor-with-8051-at89c51/.
Accessed: Dec. 11, 2016.
!
22

(Group 3)

[21]

vb. S. 2011, "How to read ADC0804 into 89S52," Forum for Electronics. [Online].
Available: http://www.edaboard.com/thread252180.html. Accessed: Dec. 11,
2016.

[22]

xxxxx, " ANALOG to DIGITAL CONVERTER with IC ADC0804," 2015. [Online].


Available: https://electel.blogspot.qa/2015/04/analog-to-digital-converteradc0804.html. Accessed: Dec. 11, 2016.

[23]

C. D. P. policy, Disclaimer, and C. Us, "Raspberry pi temperature monitor using


LM35," 2016. [Online]. Available: http://circuitdigest.com/microcontrollerprojects/room-temperature-measurement-with-raspberry-pi-lm35. Accessed:
Dec. 11, 2016.

!
23

You might also like