Table of Contents
Contents
Figures
Tables
Abstract
Overview
System Design
I/O Pins
Calibration and Testing of Intelligent Digital Thermometer
Calibration
Testing
Conclusions
Data Sheet



Figures
Figure 1: Actel 1010 External Block Diagram
Figure 2: Temperature Module
Figure 3: Alarm Input Module
Figure 4: Alarm Output Module
Figure 5: Button Module
Figure 6: Display Module
Figure 7: Clock Module
Figure 8: Actel 1010 Internal Block Diagram

Figures 2 through 7 are unavailable because they were drawn up using Protel Schematic Editor and we don't have any exported graphics. At the time of publication of this document we were working on getting them done.



Tables
Table 1: Testing the Main Module
Table 2: I/O Pins on Actel FPGA
Table 3: Hardware Parts List
Table 4: Alarm DIP Switch Settings



Abstract
This report contains a detailed technical description of how to design, build, calibrate and operate the Intelligent Digital Thermometer. The thermometer uses an Actel A1010B FPGA for all the intelligent features and a series of state machines govern the operation of the device. External hardware includes such items as an A/D converter and LED displays to indicate the current temperature, record high and low temperatures and alarm high and low temperatures.



Overview
The Intelligent Digital Thermometer is a digital device that can calculate the temperature, in degrees Celsius, of the medium its temperature sensor is in. The device has an operating range of -50C to +50C with an approximate error of ±2C. By sending the signal from a temperature probe through an 8 bit A/D converter into our Actel A1010B FPGA, we are able to display the current temperature, keep track of the record high and low temperatures and signal an audio/visual alarm if the current temperature exceeds a preset high temperature alarm setting or drops below a preset low temperature alarm setting.



System Design

Support System Operational Description

The support system is made up of seven distinct modules (see
Figure 1: Actel 1010 External Block Diagram):
Figure 1: Actel 1010 External Block Diagram

The Temperature Module (Figure 2: Temperature Module) is responsible for taking a temperature-to-voltage reading of the current temperature (temp) and then converting the reading to a 7 bit digital form. This current temperature measurement is the system default display value and is used for comparison to 4 other predetermined digital level representations (Figure 3: Alarm Input Module) set on the system (these are the high and low record temperatures and the high and low alarm temperatures).

DS1 and DS2 are two seven bit DIP switches. DS1 represents a high temperature threshold while DS2 is a low temperature threshold. If the value of the current temp exceeds either preset DIP switch temp setting, the Alarm Module (Figure 4: Alarm Output Module) will be latched to light an LED. Regardless of the alarm trigger condition (high temperature alarm or low temperature alarm), an audible alarm will sound along with the respective LED and both alarm indicators (visual/audio) will remain on until the user employs the appropriate reset key (BRAT).

Input Module (Figure 5: Input Module) , will allow the user to input information into the system by pressing a button to perform the following actions:


Pressing the Display Record High Temperature (Display Record Low Termperature) key, will display the record high (low) temp's that have occurred since the last time the Reset Record Temperatures key was pressed. The Reset Active Alarms key, will deactivate the visual and audio alarms. Note that in a production model of this project the DIP's would be eliminated and the user would enter the values in another way. Pressing either the Display High Alarm Temperature or Display Low Alarm Temperature key will display the selected threshold temp on the LED display.

The Display Module (Figure 6: Display Module) differs greatly from the original display module we were going to use. The intended display was a 80 character x 2 row LCD display but it was going to take up too much of the logic in the Actel A1010B FPGA so we had to get rid of it in favor of two seven segment LED displays (MAN74A) and a GREEN LED to indicate a negative number. The pins DDI3 through DDI0 represent the least significant number while DDI6 through DDI4 represent the most significant number.

The ECLK (Figure 7: Clock Module) signal (see
Table 2: I/O Pins on Actel FPGA) is generated by an external circuit using a 555 timer. This 555 timer based circuit will generate a clock frequency of 5.0kHz. An external module was chosen because of the relatively low frequency at which the clock is being run and the ease of adjustment during the development of the project. The production run of this project would use a crystal (external) to the FPGA while maintaining low frequency considerations.

The external modules' parts list can be found in the Table 3: Hardware Parts List.



Actel 1010 Internal Design - Operational Description

The Actel 1010 FPGA chip is used to do all of the calculation and comparison done in the digital thermometer. The current temperature is constantly being read in and compared with the record high, record low, high alarm and low alarm temperatures. The user can choose what is displayed by using the keypad interface.

If the temperature ever goes higher than the current record high temperature, the new temperature will be stored in the record high register. If the temperature goes lower than the record low temperature, the new low will replace the old value in the low temperature record register.

The alarms will trigger an alarm which consists of an LED (one for each of the two alarms) and an audio transducer (only one). In similar fashion to the record temperatures, the current temperature is compared to the two preset alarm temperatures to see wether or not a threshold has been exceeded. The user can turn off the alarm by pressing the alarm reset button (BRAT).

Technical Description

Figure 8: Actel 1010 Internal Block Diagram, displays the four modules at the top level of the Actel chip design. This section will describe, in detail, the function of three of these blocks. The 7 Bit Latch is a small module that is described in the Modules section of the report.
Figure 8: Actel 1010 Internal Block Diagram

The Display Module determines which temperature the display will show the user. The Display Module consists of an asynchronous machine that will continually monitor the input signals from the buttons. Depending on the state of these signals, the display will show either the current temperature, the record high temperature, the record low temperature, the alarm high temperature or the alarm low temperature.

The 7 Bit Binary to BCD Converter will convert the seven bit number into a 2 digit BCD number(BCDT7-4 and BCDT3-0) and in conjunction with the preset values, it will be sent to the display device when indicated by the state machine.

The module titled as the 'Negativer' is a 2's complement device. A '0' in the most significant bit of the value entering the negativer will indicate a negative number. The 2's compliment of the signal at this point will produce a binary number that represents the negative value, and the Display Module will light up the LED that is connected to the ISNEG output signal.

The Alarm Module will check to see if the current temperature is outside the preset range specified by the user. The Alarm Control Logic module is a state machine that will continually compare the current temperature with the values of the AHDI and the ALDI signals. These signals are latched from the values of the external DIP switches. When an alarm is triggered, the Alarm Latches will hold the values high until the alarm reset button is pressed.

The final module inside the Actel chip is the Record Module. This circuit is controlled by a state machine that uses the comparator to check to see if the current temperature is higher/lower than the current record high/low temperature. If either of these conditions exist, the value of the current temperature is latched into the register that contains the surpassed record threshold.



Modules

The Intelligent Digital Thermometer consists of many different modules within many levels of design. The operation of each module is described on the following pages along with their schematics, symbols and timing diagrams that verify correct operation.



Main Module

Level Up: None
Level Down:Alarm Module
Record Module
Display Module
7 Bit Latch

Functionality of this Module:

The Main Module is the top level design of the FPGA. It is the fully functional digital thermometer. It has four modules and 40 I/O lines at its level. The four modules consist of the Input Temperature Latch, the Display Module, the Record Temperature Module and the Alarm Module.

Input Temperature Latch

This is a 7 bit wide latch that will latch on the current temperature signal (TDI) on every rising clock edge. The clock runs at about 5kHz but could be run at a much faster or slower rate. For purposes of testing, a series of 7-bit binary words were input into the TDI lines and subsequently into this latch. The word consists of the MSB indicating the side of zero degrees measured (1=positive & 0=negative) and the remaining 6-bits are the binary representation of the magnitude. Note, for the Negativer Module, that if the number is negative, the 2's compliment is taken to convert the binary number into the magnitude of the negative number. The outputted values below (Output Temperature) confirmed proper operation.

Display Module

The Display Module converts the currently selected display temperature into the proper format for outputting the 2 BCD digits. The Input Temperatures served to test the temperature output (DDI). DDI0-7 is 2 digits of Binary-Coded-Decimal and the sign is indicated the 1-bit ISNEG line.

Record Module

The Record Module keeps track of the record high and record low temperatures. Asserting the proper signals (BRHT & BRLT) and observing the corresponding output indicated that these functions are in proper order. The high and low record temperatures can be reset with the BRRT signal.

Alarm Temperatures

The Alarm Module notifies the user of a temperature alarm. Asserting the proper signals (BAHT & BALT) and observing the corresponding output indicated that these functions are in proper order. The function being to display the high and the low user preset temperatures (ALDI & AHDI). When the associated alarm is indicated a signal is asserted (AHO & ALO) that will light a LED and a buzzer in latched by the BUZZ output. Alarms are turned off when the user presses the alarm reset button (BRAT).

Back Annotated Testing of Layed out IC

Every module in the IC was tested before the IC was burnt. The following is an explanation of the testing done step by step. Every test worked properly and you can see from the listing below that each module is tested in this example. Note that buttons are always released the step after they are pressed.

Table 1: Testing the Main Module

Step Operation Performed Result
a Set TDI to +25C Set Current Temperature
b Set ALDI to -20C Set Alarm Low Temperature
c Set AHDI to +32C Set Alarm High Temperature
d Press BAHT Display shows High Alarm Temperature
e Press BALT Display shows Low Alarm Temperature
f Set TDI to +49C Display shows +49C and High Alarm goes off.
g Press BRAT Alarm is off while button is pressed but goes off again once it is released.
h Set TDI to -10C High alarm is still active. Display shows -10C.
i Press BRAT Alarm goes off and stays off.
j Set TDI to -20C Display shows -20C.
k Set TDI to -21C Low temperature alarm goes off. Display shows -21C.
l Set TDI to +5C Low temperature alarm still sounding. Display reads +5C
m Press BRAT Alarm Stops.
n Press BRHT Display shows Record High Temperature of +49C.
o Press BRLT Display shows Record Low Temperature of -21C.
p Press BRRT Display is showing the current temperature of +5C.
q Press BRHT Display shows new Record High Temperature of +5C.
r Press BRLT Display shows new Record Low Temperature of +5C.

Schematic Diagram
Timing Diagram (Generic)
Timing Diagram (ACTEL)



Display Module

Level Up: Main Module
Level Down:Binary to BCD Module
Negativer
Display Logic Module
(1 by 6) bit Adder
7 Bit AB Switch
7 Bit ABCD Switch

Functionality of this Module:

The Display Module is controlled by various signal inputs: BRLT, BAHT, BALT, AND BRHT (user buttons). With no inputs the display output will default to the current temperature. The Display Logic Module determines the select lines on the 7 bit AB Switch and 7 bit ABCD Switch to ensure that the Negativer receives the proper temperature input.

The output is comprised of 2 BCD digits and a sign bit. The module's output is dependent on wether or not a button is pressed. The output worked correctly for each of the selected buttons.

Schematic Diagram
Symbol
Timing Diagram (not available)



Binary to BCD Module

Level Up: Display Module
Level Down:4 Bit Binary to BCD Converter

Functionality of this Module:

This Module accepts an unsigned 6 bit binary number and converts it into 2 BCD digits. The module functions properly.

Note: Some of the timing output on the timing diagram is incorrect because the postscript file is not current. We do not have the correct timing diagram available so you can use this one to get a basic idea of how the module works.

Schematic Diagram
Symbol
Timing Diagram



(1 by 6) Bit Adder Module

Level Up: Display Module
Level Down:None

Functionality of this Module:

A serial adder that adds 1 (binary) to the 6 bit binary value input. The OR gates will prevent the module from adding 1 to 63 (it will now go back to 63 rather than wrap to 0). This will prevent a temperature of less than -63C from displaying a value of minus 0. This module was needed to complete the 2's compliment of the negative number. Note that if the input number is positive, nothing will be added to the 6 bit magnitude.

Schematic Diagram
Symbol
Timing Diagram



4 Bit Binary to BCD Module

Level Up: Binary to BCD Module
Level Down:None

Functionality of this Module:

This is the main building block for the actual module that is needed to convert our 6 bit binary input temperature to the output temperature (BCD form). Testing confirmed proper operation.

Schematic Diagram
Symbol
Timing Diagram



4 Bit Adder Module

Level Up: 4 Bit Binary to BCD Module
Level Down:None

Functionality of this Module:

This module outputs the sum of two 4 bit binary numbers (inputs). It, along with the a 4 bit adder are the two building blocks of the 4 bit binary to BCD converter. The tests performed proved the proper operation.

Schematic Diagram
Symbol
Timing Diagram



7 Bit ABCD Switch Module

Level Up: Display Module
Level Down:None

Functionality of this Module:

This module is a bank of seven 4 input MUX's. It is used in the Display Module to select one of Current Temperature, Record High Temperature, Record Low Temperature or selected Alarm Temperature.

Schematic Diagram
Symbol
Timing Diagram



Negativer Module

Level Up: Display Module
Level Down:None

Functionality of this Module:

This module will output the inverse of the input if the MSB of the input is a zero. This is the first stage in taking the 2's compliment of the negative number being inputted. If the number coming is positive, then nothing is done at this stage. The data goes on to the 1x6 bit adder from here. The MSB will always be inverted, so that the output pin (ISNEG) goes high for a negative number.

Schematic Diagram
Symbol
Timing Diagram



Display Logic Module

Level Up: Display Module
Level Down:None

Functionality of this Module:

This Module will interpret the correct button press and output the corresponding select signals to the switches (7 bit ABCD Switch and 7 bit AB Switch) in order to get the proper temperature to the Neagtiver.

Schematic Diagram
Symbol
Timing Diagram (not available)



Record Module

Level Up: Main Module
Level Down:Record Control Logic
7 Bit AB Switch
Comparator
7 Bit Latch

Functionality of this Module:

Monitors the current input temperature and stores the record high and record low temperatures that occur between resets (BRRT).

Schematic Diagram
Symbol
Timing Diagram



Record Control Logic Module

Level Up: Record Module
Level Down:None

Functionality of this Module:

This Module controls the functionality of the Record Module. It is a simple state machine that allows the Record Module to do comparisons of the current temperature against the record high and record low temperatures using the same comparator.

Schematic Diagram
Symbol
Timing Diagram



Alarm Module

Level Up: Main Module
Level Down:Alarm Control Logic
Alarm Latches
Comparator
7 Bit AB Switch
7 Bit Latch

Functionality of this Module:

The Alarm Module constantly monitors the current input temperature to see if it has exceeded one of the alarm levels. If it has the appropriate alarm will be indicated.

Note: The module was tested successfully under all possible conditions, but the timing diagram is not available because we forgot to print it when we were at the lab.

Schematic Diagram
Symbol
Timing Diagram (not available)



Alarm Control Logic

Level Up: Alarm Module
Level Down:None

Functionality of this Module:

This Module controls the functions pertaining to the Alarm Module. Like the Record Control Logic, it is a simple state machine that allows the Alarm Module to test the current temperature against the high alarm and low alarm temperatures using the same comparator.

Schematic Diagram
Symbol
Timing Diagram



Alarm Latches

Level Up: Alarm Module
Level Down:None

Functionality of this Module:

The Alarm Latches are turned on by the Alarm Logic Module when an alarm condition is met. The alarm signaled will stay on until the alarm reset is pressed (BRAT).

Schematic Diagram
Symbol
Timing Diagram



7 Bit AB Switch

Level Up: Alarm Module
Display Module
Record Module
Level Down:None

Functionality of this Module:

This is a bank of seven two-input MUX's. Since the Intelligent Digital Thermometer is a seven bit device in many areas, it was practical to design this module.

Schematic Diagram
Symbol
Timing Diagram



7 Bit Comparator

Level Up: Alarm Module
Record Module
Level Down:MCMPC8 from ACT1 Library

Functionality of this Module:

This is a 7-bit comparator that will provide a signal when A < B where A and B are unsigned magnitudes. Rather than designing a 7 bit comparator, we used the existing 8 bit comparator and converted it to using only 7 bits.

Schematic Diagram
Symbol
Timing Diagram



7 Bit Latch

Level Up: Main Module
Alarm Module
Record Module
Level Down:None

Functionality of this Module:

This is a bank of 7 D Flip-Flops with preset (active high) and clear (active low). Like the 7 bit AB Switch, the 7 bit latch is used in many places in the Intelligent Digital Thermometer. We needed D Flip-Flops that could be preset to 0 or 1 so we made sure this module could do that.

Schematic Diagram
Symbol
Timing Diagram



I/O Pins
A comprehensive listing of I/O Pins is found in
Table 2: I/O Pins on Actel FPGA. The function of the I/O pins are as follows (See Figure 1: Actel 1010 External Block Diagram or Figure 8: Actel 1010 Internal Block Diagram):
  • TDI1 - TDI7: 7 bit current temperature representation (Temp. Data Input)
  • Bxxx: 6 buttons to select the display value
  • ALDI0 - ALDI6: 7 bit DIP switch (Alarm Low Data Input)
  • AHDI0 - AHDI6: 7 bit DIP switch (Alarm High Data Input)
  • ECLK: External Clock
  • DDI0 - DDI6: Data lines for the 7 segment LED displays
  • ALO: External low temperature alarm signal
  • AHO: External high temperature alarm signal
  • BUZZ: External audible alarm signal
  • RESET: Reserved for power on reset circuitry



Calibration and Testing of Intelligent Digital Thermometer



Calibration

The calibration was done using two different working temperatures. (Please see Figure 2: Temperature Module) R3 and R4 were varied to make the display reflect the temperature indicated on a mercury thermometer. A container of ice water and another container of warm water was used as the sources.



Testing

After the calibration stage, the gauge was submitted to the below rigorous testing and in each case described the results were satisfactory to within the proposed error of ±2C.

The tests performed were:
  • The input temperature was varied over a 50 degree range and the default display observed.
  • The temperature input was made to go high to a certain value and the high record temperature activated.
  • The temperature input was made to go low to a certain value and the low record temperature activated.
  • The record temperature button was activated and the last two tests repeated.
  • An alarm low temperature was set on the record low input and the green LED / audio buzzer observed.
  • An alarm high temperature was set on the record high input and the red LED / audio buzzer observed.
  • Trying all combinations of the last two tests and activating the alarm reset switch were performed and the resulting actions observed.
  • Between each test above the default display was observed and compared to that present input temperature.



Conclusions

Several changes were made to the final design of the project from the inital proposal. The original choice of a LCD dot matrix display module was changed to a LED seven segment display to be able to fit the project on one Actel IC. As DIP switches are used for the input of alarm values, no user other complex input is needed and the 4 by 4 keypad was changed to a number of buttons (to serve as inputs). Breadboarding of the circuit was chosen as the method of prototyping after considering the time left to construct the project test circuit.

Recommendations for future design are as follows:
  • provide a key pad for alarm temperature input.
  • a LCD screen to conserve power (battery powered option).



Data Sheet

The following is a summary of the projects Actel FPGA:
  • 283 logic blocks used out of a possible 295 (96%)
  • 40 I /O pins used out of a possible 57 (70%)
  • 1 clock used
For assignment of pins, please see
Table2: I/O Pins on Actel FPGA.





Table 2: I/O Pins on Actel FPGA

Pin Number Pin Label Description Input/Output
41 AHDI0 Alarm High Setting Input
39 AHDI1 Alarm High Setting Input
40 AHDI2 Alarm High Setting Input
63 AHDI3 Alarm High Setting Input
65 AHDI4 Alarm High Setting Input
64 AHDI5 Alarm High Setting Input
62 AHDI6 Alarm High Setting Input
42 ALDI0 Alarm Low Setting Input
44 ALDI1 Alarm Low Setting Input
43 ALDI2 Alarm Low Setting Input
60 ALDI3 Alarm Low Setting Input
53 ALDI4 Alarm Low Setting Input
51 ALDI5 Alarm Low Setting Input
61 ALDI6 Alarm Low Setting Input
18 BAHT Display Alarm High Input
01 BALT Display Alarm Low Input
47 BRAT Reset Active Alarms Input
07 BRHT Display Record High Input
02 BRLT Display Record Low Input
09 BRRT Reset Record Temps Input
50 RESET Power On Reset Input
46 AHO Alarm High Signal Output
48 ALO Alarm Low Signal Output
45 BUZZ Alarm Audio Signal Output
36 DDI0 Display Output
20 DDI1 Display Output
24 DDI2 Display Output
23 DDI3 Display Output
22 DDI4 Display Output
28 DDI5 Display Output
29 DDI6 Display Output
35 ISNEG Negative Sign Output
68 TDI0 Current Temp Input
37 TDI1 Current Temp Input
67 TDI2 Current Temp Input
08 TDI3 Current Temp Input
05 TDI4 Current Temp Input
06 TDI5 Current Temp Input
03 TDI6 Current Temp Input




Table 3: Hardware Parts List

Part Number Part Description Location
U1 TEXAS INSTRUMENTS 7408
2 I/P POSITIVE AND GATE
Input Module
U2 7448 Seven Segment LED Display Driver Display Module
U5 MAN74A Seven Segment LED Display Display Module
U6 ADC0804 8-BIT A/D CONV. Temperature Module
U7 LM335 TEMPERTURE SENSOR Temperature Module
U8 7448 Seven Segment LED Display Driver Display Module
U9 MAN74A Seven Segment LED Display Display Module
U10 MC1 555 TIMER Clock Module
D1 Red LED Display Module
D2 Red LED Alarm Module
D3 Green LED Alarm Module
Buzzer Piezo +9V Transducer Alarm Module
C1 33000nF TANTALUM CAPACITOR Tempature Module
C2 100nF CERAMIC MONOLITHIC CAPACITOR Tempature Module
C3 100nF CERAMIC MONOLITHIC CAPACITOR Clock Module
C4 1000nF CERAMIC MONOLITHIC CAPACITOR Clock Module
R1 10k 1/4W CARBON RESISTOR Tempature Module
R2 100k 1/4W CARBON RESISTOR Tempature Module
R3 10k TRIMMER POTENTIOMETER Tempature Module
R4 10k TRIMMER POTENTIOMETER Tempature Module
R5 10k 1/4W CARBON RESISTOR Tempature Module
R7 0.680k 1/4W CARBON RESISTOR Clock Module
R8 1k 1/4W CARBON RESISTOR Clock Module
R9 - R22 1k 1/4W CARBON RESISTOR Alarm Inputs
R23 - R30 1k 1/4W CARBON RESISTOR Button Inputs
SW DIP-1 7 Switch DIP Switch Alarm Module
SW DIP-2 7 Switch DIP Switch Alarm Module
SW DIP-3 7 Switch DIP Switch Button Inputs




Table 4: Alarm DIP Switch Settings

Temperature DIP Setting Temperature DIP Setting
+63 111 1111 -63 000 0001
+62 111 1110 -62 000 0010
+61 111 1101 -61 000 0011
+60 111 1100 -60 000 0100
+59 111 1011 -59 000 0101
+58 111 1010 -58 000 0110
+57 111 1001 -57 000 0111
+56 111 1000 -56 000 1000
+55 111 0111 -55 000 1001
+54 111 0110 -54 000 1010
+53 111 0101 -53 000 1011
+52 111 0100 -52 000 1100
+51 111 0011 -51 000 1101
+50 111 0010 -50 000 1110
+49 111 0001 -49 000 1111
+48 111 0000 -48 001 0000
+47 110 1111 -47 001 0001
+46 110 1110 -46 001 0010
+45 110 1101 -45 001 0011
+44 110 1100 -44 001 0100
+43 110 1011 -43 001 0101
+42 110 1010 -42 001 0110
+41 110 1001 -41 001 0111
+40 110 1000 -40 001 1000
+39 110 0111 -39 001 1001
+38 110 0110 -38 001 1010
+37 110 0101 -37 001 1011
+36 110 0100 -36 001 1100
+35 110 0011 -35 001 1101
+34 110 0010 -34 001 1110
+33 110 0001 -33 001 1111
+32 110 0000 -32 010 0000
+31 101 1111 -31 010 0001
+30 101 1110 -30 010 0010
+29 101 1101 -29 010 0011
+28 101 1100 -28 010 0100
+27 101 1011 -27 010 0101
+26 101 1010 -26 010 0110
+25 101 1001 -25 010 0111
+24 101 1000 -24 010 1000
+23 101 0111 -23 010 1001
+22 101 0110 -22 010 1010
+21 101 0101 -21 010 1011
+20 101 0100 -20 010 1100
+19 101 0011 -19 010 1101
+18 101 0010 -18 010 1110
+17 101 0001 -17 010 1111
+16 101 0000 -16 011 0000
+15 100 1111 -15 011 0001
+14 100 1110 -14 011 0010
+13 100 1101 -13 011 0011
+12 100 1100 -12 011 0100
+11 100 1011 -11 011 0101
+10 100 1010 -10 011 0110
+9 100 1001 -9 011 0111
+8 100 1000 -8 011 1000
+7 100 0111 -7 011 1001
+6 100 0110 -6 011 1010
+5 100 0101 -5 011 1011
+4 100 0100 -4 011 1100
+3 100 0011 -3 011 1101
+2 100 0010 -2 011 1110
+1 100 0001 -1 011 1111
0 100 0000 0 100 0000



E.O.F.