Download Introduction

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Switched-mode power supply wikipedia , lookup

Power over Ethernet wikipedia , lookup

Resilient control systems wikipedia , lookup

Control system wikipedia , lookup

Serial digital interface wikipedia , lookup

Opto-isolator wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Transcript
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
TABLE OF CONTENTS
Introduction.................................................................................................................... 2
Theory of Operation....................................................................................................... 3
Microcontroller.................................................................................................. 3
LCD Display...................................................................................................... 4
Keypad............................................................................................................... 5
Temperature Sensor........................................................................................... 6
RFID Kit............................................................................................................ 7
Power Supply..................................................................................................... 7
Compressor Interface......................................................................................... 8
Documentation for Circuit Design................................................................................. 8
List of References.......................................................................................................... 9
-1-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
Introduction
The "Cold as Ice" fridge is an intelligent refrigerator that consists of an inventory
system to keep track of its contents, a digital thermostat system to control the temperature
within the refrigerator, and an Ethernet and LCD interface to allow for user interaction.
All of the refrigerator's functionality will be controlled by a microcontroller. The microcontroller will be reading, interpreting, and storing information given by a Radio
Frequency Identification Device (RFID), operating a web server to allow for remote user
control, driving the LCD panel to allow for local user control, and monitoring the
temperature within the refrigerator and in turn controlling the compressor to keep the
temperature within a user-specified range. Local user interaction will consist of the user
being able to control the thermostat as well as the refrigerator displaying warning
messages such as an expired product. Remote user interaction will consist of the user's
ability to control the thermostat, see the contents inside, as well as input/access a recipe
database that will be continually updated based on the current contents of the refrigerator.
-2-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
Theory of Operation
Microcontroller
Due to the required features of the design, the Rabbit Core Module 2200 [1] will be
used. The microcontroller will be responsible for processing all input signals from the
external components as well as maintaining a recipe database and running a web server.
The RCM 2200 runs at an operating frequency of 22.1 MHz which will be used to
support the following operations:

Monitoring temperature data from temperature sensor, thereby controlling the
compressor.

Monitoring changes in keypad input and processing user commands.

Updating LCD display.

Sending and receiving data packets to the RFID receiver using RS-232 standard.

Handling the TCP/IP stack and the required Ethernet web server utilities.

Maintaining current database of food items.
Since the majority of functions performed will be dependent on user interaction,
speed is not an issue. The only concern is to make sure that the operating frequency is
such that communications with the RFID receiver will be successful. The four serial ports
of the RCM 2200 can operate in an asynchronous mode up to the baud rate of the system
clock divided by 64, or 345,313 bps. The RFID receiver serial port can be configured to
9600, 19200, 38400, or 57600 baud, therefore the operating frequency of the RCM 2200
will be sufficient for all operations. The external components will be interfaced with the
RCM 2200 using 28 I/O pins as broken down in the following:

Ethernet Interface:
4 pins from Ethernet Port

4 Button Keypad Interface:
5 pins from Port B

LCD Interface:
3 pins from Port D
8 pins from Port A

RFID Interface:
2 pins from Port C

Compressor Interface:
1 pin from Port B

Temperature Sensor Interface: 4 pins from Port E

Reset Switch:
1 pin from RESET
-3-
Digital Systems Senior Design Project – Grp 11
ECE 477
Fall 2004
The 256K of onboard flash memory will be used to host the web server. It is
estimated that the web server alone will occupy around 120K of flash. With just ASCII
displays and simple user input from the web, this memory should be sufficient to support
the web server, database, and other Ethernet applications.
The RCM 2200 contains five 8-bit timers (cascadable in pairs) and two 10-bit timers.
The seven onboard timers will be used for (at least) the main functions below:

LCD refresh rate

Timing for compressor control. The compressor should not be turned on/off more
than once per minute.

RFID serial communication.
The RCM 2200 will be powered using a 5V regulated supply from a switching regulator.
LCD Display
The LCD display is used to display information regarding the current status of the
refrigerator (as far as warnings and fault signals) and displays the temperature inside the
cavity. The user will interface with the LCD by way of the 4-button keypad. The LCD
display Module [2] has a built in LSI controller with a data register (DR) and an
instruction register (IR). The IR stores instruction codes and address information for
display data RAM (DDRAM) and character generator (CGRAM). This register is written
to from the RCM 2200. The DR stores data to be written or read from DDRAM or
CGRAM. When address information is written into the IR, then data is stored into the DR
from DDRAM or CGRAM. By the register selector (RS) signal, these two registers can
be selected.
Table 1. Control signals for LCD Module
RS
R/W Operation
0
0
IR write as an internal operation (display clear, etc.)
0
1
Read busy flag (DB7) and address counter (DB0 to DB7)
1
0
Write data to DDRAM or CGRAM (DR to DDRAM or CGRAM)
1
1
Read data from DDRAM or CGRAM (DDRAM or CGRAM to DR)
-4-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
When the busy flag is ‘1’, the controller LSI is in the internal operation mode and
the next instruction from the RCM 2200 will not be accepted. When RS=’0’ and
R/W=’1’, the busy flag is output to DB7. The next instruction must be written after
ensuring that the busy flag is ‘0’.
Keypad
The keypad will be used by the user to scroll through errors messages displayed
on the LCD screen and to set the temperature of the refrigerator. The keypad [3] will be
interfaced with a Maxim switch debouncer [4]. The debouncer will then be interfaced to
the RCM 2200 using 5 pins on Port B. The debouncer is designed to eliminate the
extraneous level changes that result from interfacing with mechanical switches. Virtually
all mechanical switches bounce upon opening or closing. The MAX6818 removes bounce
when a switch opens or closes by requiring that sequentially clocked inputs remain in the
same state for a number of sampling periods. The output to the RCM 2200 does not
change until the input from the 4-arrow keypad is stable for a duration of 40ms. The
circuit block diagram (Figure 1) shows the functional blocks consisting of an on-chip
oscillator, counter, exclusive-NOR gate, and D flip-flop. When the input does not equal
the output, the XNOR gate issues a counter reset. When the switch input state is stable for
the full qualification period, the counter clocks the flip-flop, updating the output to the
RCM 2200. The change output (CH) is updated simultaneously with the switch outputs.
Figure 1. MAX6818 Block Diagram
-5-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
Temperature Sensor
The temperature sensor is used by the microcontroller to monitor the temperature
within the refrigerator and based on this data control the compressor of the refrigerator.
The TC72 [5] consists of a band-gap type temperature sensor, a 10-bit Sigma Delta
Analog-to-Digital Converter (ADC), an internal conversion oscillator and a double buffer
digital output port as shown in Figure 2. The 10-bit ADC is scaled from -128ºC to
+127ºC; therefore, the resolution is 0.25ºC per bit.
This device features a four-wire serial interface that is fully compatible with the
SPI specification thereby allowing the TC72 to operate as a slave with the RCM 2200.
The serial interface consists of the Chip Enable (CE), Serial Clock (SCK), Serial Data
Input (SDI) and Serial Data Output (SDO) signals. The CE is active-high, and data is
written to or read from the device, when CE is equal to a logic high voltage. The SCK
input is disabled when CE is low. The rising edge of the CE line initiates a read or write
operation, while the falling edge of CE completes a read or write operation. The SCK
input is provided by the RCM 2200 and is used to synchronize the data on the SDI and
SDO lines. The address byte is transferred first on the SDI line, followed by the data. A7,
the MSb of the address, determines whether a read or write operation will occur. If A7 =
‘0’, one or more read cycles will occur; otherwise, if A7 = ‘1’, one or more write cycles
will occur.
The TC72 can be used either in a Continuous Temperature Conversion mode or a
One-Shot Conversion mode. The Continuous Conversion mode measures the temperature
approximately every 150 ms and stores the data in the temperature registers. In contrast,
the One-Shot mode performs a single temperature measurement and returns to the powersaving shut down mode. Since power consumption is not a major concern for this design,
the Continuous Conversion mode will be used.
-6-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
Figure 2. TC72 Internal Block Diagram
RFID Kit
As mentioned earlier the RFID HF-I Midrange kit [6] communicates with the
RCM 2200 through use of a serial DB-9 connector at a baud rate of 9600 bps. This
communication occurs at RS-232 levels using 1 start bit, 8 data bits, 1 stop bit and no
parity. The data packet from the RCM 2200 to the reader is known as the request and the
reply from the reader to the RCM 2200 as the response. The RCM 2200 is always the
primary station and initiates all communication sequences. These sequences consist of
request/response pairs where the RCM 2200 waits for a response prior to continuing. The
S6350 Reader operates at a frequency of 13.56MHz and handles all RF and digital
functions in order to communicate with Tag-it HF, Tag-it HF-I (ISO15693 compliant)
and all other ISO15693 compliant transponders. Unlike the other devices which we be
powered from the regulator circuit, the RFID module will be powered with its own
manufacturer supplied 9VDC 1.5A “wall wart”.
Power Supply
A step-down (buck) switching regulator will be used to convert an unregulated 840VDC to a regulated 5VDC that will be supplied to all of the components on our board
except the RFID module as mentioned earlier. Using the nomograph provided in the
regulator datasheet [7], the inductor and capacitor values were chosen to be 33µH and
-7-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
2x15µF respectively. With these chosen values for the power circuitry the regulator
guarantees a maximum supply current of 3A, which will be more than sufficient to
supply the design which will require a maximum current draw of less than 0.7A (0.576A
estimated max) as broken down below:

Microcontroller: 134mA at 4.75 – 5.25V

RFID: 250mA at 4.5 – 5.5V

LCD: 1.6mA at 4.5 – 5.5V

Keypad: 50mA at 0 – 24V

Switch Debouncer: 20µA at 2.7 – 5.5V

Thermistor: 400µA at 2.65 – 5.5V

Photovoltaic Isolator: 50mA at < 1.4V

Power Relay: 90mA at 3.75 – 5.25V
The unregulated DC fed into the regulator circuitry will be supplied using a standard
12VDC “wall wart”.
Compressor Interface
An active low control line (pin PB7) will be used from the RCM 2200 in order to
turn the refrigerator’s compressor on/off. The data received from the temperature sensor
will indicate whether the control line should be set low/high depending on whether the
compressor should turn on to cool the refrigerator, or turn off in order for the temperature
to increase. An opto-isolator [8] is used to ensure that the microcontroller is protected
from the unregulated AC voltage that powers the compressor. When PB7 goes low the
diode inside the isolator turns on thereby activating the phototransistor as well. This
places a voltage at the base of the TIP122 [9] transistor thereby allowing current to flow
through the power relay [10]. The relay is thus activated and its internal switch is closed,
bridging the AC voltage and thereby powering the compressor. When PB7 is high the
diode within the isolator is reverse biased, consequently no power is supplied to the
compressor for reasons derivable from previous statements.
Documentation for Circuit Design
See attached sheets for the schematic, Bill of Materials, and Design Rules Check.
-8-
ECE 477
Digital Systems Senior Design Project – Grp 11
Fall 2004
List of References
[1] RabbitCore RCM2200 C-Programmable Module with Ethernet.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/RC2200UM.pdf
[2] Crystalfontz 20x4 LCD Display. CFAH2004A-NYA-JP.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/20x4LCD.pdf
[3] Storm 3000 Series 4 Arrow Keypad. 3K0421.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/4Keypad.pdf
[4] Maxim ±15kV ESD-Protected Octal CMOS Switch Debouncer. MAX6818.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/MAX6818.pdf
[5] Microchip Digital Temperature Sensor with SPI™ Interface. TC72.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/TC72.pdf
[6] Texas Instruments RFID HF-I Midrange Evaluation Kit. RI-K10-001A.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/S6000.pdf
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/S6350RM.pdf
[7] National Semiconductor SIMPLE SWITCHER® High Efficiency 3A Step-Down
Voltage Regulator. LM2676S-5.0.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/LM2676.pdf
[8] Fairchild Semiconductor General Purpose 6-pin Phototransistor Optocoupler. 4N28.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/4N28.pdf
[9] Fairchild Semiconductor NPN Epitaxial Darlington Transistor. TIP122.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/TIP122.pdf
[10] Potter & Brumfield/Tyco Electronics 5VDC PC Mount Relay. T77S1D10-05.
http://shay.ecn.purdue.edu/~477grp11/index_files/Documents/T77Relay.pdf
-9-