Download 132: Front Panel Display

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

Voltage optimisation wikipedia , lookup

Control theory wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Mains electricity wikipedia , lookup

Solar micro-inverter wikipedia , lookup

Electronic paper wikipedia , lookup

Stereo display wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Surface-conduction electron-emitter display wikipedia , lookup

Liquid-crystal display wikipedia , lookup

Transcript
132: Front Panel Display
by
Rebecca Charles, Brian Jund, and Joe Volovage
Faculty Supervisor: Joel Jorgenson
For ECE 401
Dept. of Electrical and Computer Engineering
North Dakota State University
May 2001
Abstract:
The RT-2200 is a receiver/transmitter radio is designed for ground communications. Its
primary mode of functioning is to be connected with several other RT-2200's all
controlled remotely by a single computer. There are some uses that require the RT-2200
to be controlled locally. This presents a problem, because the RT-2200 has no display to
indicate what functions are being used and it has few external knobs or buttons in which
to controlled it by. A solution to this dilemma is a front panel display that will allow the
user to control the RT-2200 locally and see these changes on the display screen.
The front panel display is intended to be a device that will be plugged into the RT-2200
by removing the front cover of the radio and attaching this display module to it. It will be
plugged into the J13 connector on the front of the RT-2200. The J13 connector will be
the only point of interface between the RT-2200 and the front panel display. The display
will be an LCD with a touch screen over-lay allowing the user to "select" the functions to
be used. This "selection" will bring up a new display with a list of options related to the
desired function.
Chapter 1 - Introduction
1.1 Introduction
This report will cover the concept, design, and future implementation of Group #132
Senior Design Project: Front Panel Display for the RT-2200 radio. This project was
funded by Rockwell Collins which provided information for the specifications required
by the RT-2200 and Front Panel Display.
1.2 Background
The RT-2200 is a receiver/transmitter radio is designed for ground communications. Its
primary mode of functioning is to be connected with several other RT-2200's all
controlled remotely by a single computer. There are some uses that require the RT-2200
to be controlled locally. This presents a problem, because the RT-2200 has no display to
indicate what functions are being used and it has few external knobs or buttons in which
to controlled it by. A solution to this dilemma is a front panel display that will allow the
user to control the RT-2200 locally and see these changes on the display screen.
1.3 Objective
The front panel display is intended to be a device that will be plugged into the RT-2200
by removing the front cover of the radio and attaching this display module to it. It will be
plugged into the J13 connector on the front of the RT-2200. The J13 connector will be
the only point of interface between the RT-2200 and the front panel display. The display
will be an LCD with a touch screen over-lay allowing the user to "select" the functions to
be used. This "selection" will bring up a new display with a list of options related to the
desired function.
1.4 Scope
The layout of this report is as follows:
Chapter 1: Introduces the problem and why a front panel display is a necessity for local
control of the RT-2200.
Chapter 2: Gives a little background on previous designs for a front panel display and
what the specifications will be on the current front panel display design.
Chapter 3: Further divides the project into its components and gives explanations as to
why they were selected and how each one will function.
Chapter 4: Provides the overall design of the front panel display, including schematics
and drawing descriptions.
Chapter 5: Concludes the report with "lessons learned" and gives suggestions for future
applications.
References, program listings, and data sheets are located in the Appendices
Chapter 2 - Previous Work & Design Approach
2.1 Introduction
Before beginning design work on the front panel display, previous front panel displays
were researched to give a better understanding of the specifications required. Also, this
examination of previous work offered considerable information about what obstacles to
expect and how to solve them.
2.2 Previous Work
A front panel display was created earlier in 1995 and was called the FP-2200. A
feasibility study report was printed May 16, 1995 by Robert Walstrom for Rockwell
International; indicating the functions and uses of the FP-2200. This front panel display
required either an RS-232 or RS-485 serial bus to interface between itself and the RT2200. Panel control buttons on the front panel and functions displayed on its LCD screen
replaced the need for a computer to control the RT-2200.
A tuner knob adjusted the receiver and transmitter frequencies and preset channels. The
functions of the RT-2200 were selected and changed by buttons placed along both
vertical sides of the display screen. In the feasibility report, Walstrom mentioned using a
touch screen display in the future, which would eliminate the buttons on the front panel.
2.3 Specifications (Components)
PIC microcontroller - The PIC Microcontroller will be the center of control for the front
panel display. It will interface with the touch screen controller, the display, and J13. It
will take inputs from the touch screen controller and, based upon those inputs, it will
write to pins on J13 to vary settings on the radio. It will also read pins on J13 to get the
state of the settings of the radio (i.e. volume level, frequency setting, etc.), and it will
update this information on the display.
PIC Hardware - There are three ports (ports A,B, and C) which contain a total of 22 I/O
pins on the PIC. If it turns out that there aren’t enough pins, a MUX will be used. Port A
will be tied to J13, Port B will be tied to the touch screen controller, and Port C will be
tied to the LCD display.
PIC Software - All of our software will be written in C++. The protocol that will be
used to communicate with the radio through J13 will be Low Speed Binary Interface
(LSBI). There will be a main program routine and several subroutines. The main routine
will display certain buttons and states of various functions (i.e. volume level, current
frequency, etc.). It will be continuously monitoring the touch screen for user input.
When you touch the screen, a routine will be triggered to either bring you to a different
menu (a menu of the frequency presets or an alphanumeric input menu) , or it will change
a setting on the radio (i.e. raise/lower volume, change squelch, etc.).
Interface (RS232/RS485) - The communication between the controller and the touch
screen controller is based on RS232 protocol. This is also the case for communication
between the controller and the emulator when Pro Comm is being used to emulate the
RT2200. The interface that is used for communication between the controller and the
RT2200 is RS485. All of the conversions from the output of the controller as TTL to
RS485 or RS232 are handled with chips designed for the task. For TTL - RS485, two
LTC1485 chips are used and for TTL - RS232, a MAX232A is used. Both of these chips
are designed to achieve the needed voltage levels with only a 5 Volt source.
Touch Screen - The resistive overlay model of touch screens appears to be the best
choice for the front panel display. We chose the resistive model because it is the most
durable and can handle different types of "stylus" (i.e. human finger, metal pointer, etc.)
The resistive touch screens are also priced very competitively. For the touch screen
controller we have selected, it works well with a four-wire or eight-wire touch screen.
Touch Screen Controller - This component was selected because it is made by the same
manufacturer as the touch screen.
LCD - The LCD display will be approximately 3.5x6" capable of displaying both text
and graphics. We are currently looking at the G242CX5R1AC Model from Seiko
Instruments. It requires +5 volts at 23 mA of power for the VDD, -24 volts at 6 mA for the
VLC, and +5 volts at 300 mA or the CFL backlight to be on. This has it's own controller
board built into it called the SED 1330. The viewing area for this model is about 3"x5"
with overall dimensions of a little over 4.3"x6.7". The substrate material is glass - epoxy
and has a viewing angle of approximately 55°. The operating temperature for the
G242CX5R1AC is from 0°C to +50°C. This LCD seems to have everything in it to work
well with a touch screen and a PIC microcontroller.
LCD Controller - The recommended LCD controller board to be used in conjunction
with the G242CX5R1AC is the LCDC-1330-32A. The main attraction for this controller
is that it can have up to 3 layers of screens displayed superimposed on one another. The
LCDC-1330-32A is specified to be compatible to use with either the 6800 family or the
8080 family processors. This should not be a problem configuring with the PIC
microprocessor. The built-in controller for the G242CX5R1AC uses approximately 13
pins of the 6800 family processors which should be no more than the PIC microcontroller
will use.
Power Supply - One of the main components of the display will be the power supply.
This power supply will be the source for all electronics that are used in the front panel.
The power for the front panel display will come from the +28 VDC unregulated power
output on J13 (Pins 27 and 31). Both pins 27 and 31 will be tied together. The power
return that will be used is pin 10 on J13. The power supply will step the voltage down to
5 VDC. We are proposing to use an LM7805 regulator to reduce and regulate the
voltage. All the components of the front panel will use 5VDC. There will be a reset
button that will be used to reset the front panel in the event of a problem. This reset
button will initiate any necessary shut down procedure of the PIC Microcontroller.
Buffering Circuitry - There will be buffering circuitry between the PIC Microcontroller
and J13. The purpose of this circuitry is to protect the PIC. If there is no power applied
to the PIC and you have live input/output pins connected to a port on the PIC, it can be
damaged. The proposed chip to be used is an MM74HC245A octal 3-state transceiver.
The buffering circuitry will ensure that there will be no voltage applied to any pins on the
PIC before power is applied to it. The buffering circuitry will be a chip that will create a
connection between the desired pins when power is applied to the chip, and it will create
an open circuit between the pins when power is not applied to the chip.
2.4 Block Diagram
Front Panel Display Circuit Block Diagram
Touch Screen and
Controller
Touch Screen:
Dynapro
RES6.4PL495659
RS-232 Transceiver
PIC Microcontroller
Power Supply
J13
Connector
National
LM7805CT
Motorola
MC145406P
Controller:
SC3-OEM
Buffer Circuit
RS-485 Transceiver
LCD Screen and Controller
LCD Screen:
Seiko
G242CX5R1AC
PIC
PIC16F877-20I/P
LTC
1485
RT2200
National
MM74HC245AN
Controller:
Seiko
1330 LCD Controller
2.5 Time Line
2.6 Conclusions
After researching previous designs and their essential components, a rough block diagram
was created to help organize how the front panel display would be designed and which
parts would be used. At this point the design of the front panel display was purely
conceptual.
Chapter 3 - Detailed Design
3.1 Introduction
The first 15 weeks spent on the project focused on the completion of the requirements
capture and included choosing the components needed to implement a functional front
panel display. A great deal of research went into selecting the most cost-efficient part,
which would be durable and perform effectively. After selecting each component, a list
was sent to Rockwell Collins giving the name, manufacturer, and approximate price.
Rockwell Collins then procured the desired parts and delivered them to North Dakota
State University.
3.2 Interface - RS232/RS485
The interface between the controller and the touch screen uses RS232. Data only needs
to flow from the touch screen to the controller. For this reason there is only one line
connecting the two devices. The line goes from the touch screen controller to a
MAX232A chip that takes the RS232 voltage levels and converts them to TTL levels.
This signal is then run through the MM74HC245A buffer chip to the SCI receive pin on
the PIC (RC7). This is needed to disconnect SCI port from the touch screen. The
enabling of this chip is controlled by pin RC3. This pin is also used to receive data from
the RT2200.
The data transfer between the controller and the RT2200 is RS485. Two LTC1485 chips
are used. One is used for transmitting and the other is used for receiving. The chip that
is used for transmitting has the receiver permanently disabled by tying the receive-enable
pin to Vcc. The transmitter on this chip is enabled and disabled by the voltage level at
pin RC4 (it is an active high signal). The chip that is used for receiving has the
transmitter permanently disabled by tying the transmit-enable pin to ground. The
receiver on this chip is enabled and disabled by the voltage level at pin RC5 (it is and
active low signal). In order to allow proper control of the serial data transfers, the SCI
port needs to be turned off when the different chips are being enabled and disabled.
3.3 Power Supply
The power supply consists of some DC-DC voltage regulators and several capacitors.
The unregulated 28 VDC is obtained from pin 27 on J13. The voltage level is stepped
down to 18 VDC with an LM7818, and then down to 5 VDC with an LM7805. It was
determined by testing that the LM7805 could not dissipate the heat produced by the
power loss in the device. The use of an LM7818 with an LM7805 has not been fully
tested but is believed to work. Heat sinks need to be added to both devices to allow for
proper heat dissipation. After the voltage has been stepped down to 5 VDC, a series of
de-coupling capacitors are used to further smooth out the voltage levels throughout the
entire circuit. A large bulk capacitor (approximately 10 µF) is placed near the regulator.
Several mid-range capacitors (approximately .1 µF to 1 µF) are used closer to the
individual devices that are drawing current. A high frequency capacitor (approximately
.01 µF) is used directly between the power and ground pins on each device that is
drawing current. This method of power distribution is very effective in reducing sag and
noise in the power supply.
3.4 LCD
The LCD that we were going to use was a Seiko. Approximately 2 weeks was spent
trying to get the display to work. The pin connections were looked over a number of
times to verify that they were correct. Different pin assignments were tried. Different
variations on the C code used to initialize the display were programmed to the PIC. One
of these variations was taken from example code off of the Seiko web site and it was
specifically written for initializing the model that we were using. An oscilloscope was
used to look at the control bus and data bus signals to verify that timing was correct.
Comparing our waveforms to the timing specifications given in the user manual, we were
well within the limits, so timing shouldn't have been a problem. Despite everything
mentioned above, the display wouldn't work.
The 20x4 alpha numeric LCD that is used on the PIC evaluation boards is the display we
ended up using. This display was very simple to use because the C code that is used to
initialize and drive the display had already been written. We were also familiar with
using it from previous courses.
It took a couple of hours to write code that would display 4 different screens. The
screens that were made include: a main menu, frequency preset screen, and a squelch
screen.
3.5 Touch Screen
The touch screen that was used was an 8-wire resistive touch screen that was made by
Gunthro. The controller we used was also made by the same company.
The controller sends the coordinates of where the screen was touched in a serial format to
the PIC microcontroller via RS-232 protocol. A chip was used to take the RS-232 signal
and convert it to a TTL signal before going to the PIC. The data packet sent out by the
controller contains 11 bytes of data which are in ASCII. The format of the packet is:
"T x1 x2 x3 x4 , y1 y2 y3 y4 K". The first byte in the packet is either a T (as shown) or
an R. The T stands for touch and the R stands for release. If you touch the screen and
don't take your finger off it (i.e. press and hold your finger in one place) the controller
will send out packets of data which start with a T. It will keep sending these packets until
you release your finger and then it will send out one last packet that starts with an R.
There are two coordinates that the controller sends out. One is the X coordinate, which
gives your horizontal position. The other is the Y coordinate, which gives your vertical
position. Both of these coordinates have a range of 0 to 1023. In the data packet, the X
coordinate is in bytes 2 through 5. Byte 2 (x1) is the most significant digit and byte 5
(x4) is the least significant digit. The Y coordinate is bytes 7 through 10. Byte 7 (y1) is
the most significant digit and byte 10 (y4) is the least significant digit. The two
coordinates are separated by a comma which is in byte 6 of the packet. The last byte of
data (K as shown above) in the packet is just an end byte, which is the hexadecimal value
'0D'.
Each byte of data is stored in a register on the PIC one value at a time. There is function
called 'getbyte' that takes the RS-232 serial data from pin 7 on port C and stores it in this
register. Once the register is full, the 'getbyte' function returns the contents of this
register. Our code contains 11 variables (one for each byte of data in the packet). Each
variable is equated to the 'getbyte' function. So the first variable will contain byte 1 of
the packet, the second variable will contain byte 2 of the packet, etc. Once all of the data
is received, the 4 variables which contain the X coordinate information are placed into a
single variable by shifting the appropriate number of zeros into the variables that
represent the higher order bits and then adding the 4 variables together. The same thing
is done for the Y coordinate.
The X and Y coordinates are then sent to a function called 'button'. The 'button' function
takes these values and uses a bunch of If statements to determine which button was
pressed. It then stores the button number in a variable and returns it to the main program.
When setting up buttons for the touch screen, there is a certain range of values that X and
Y could be for each button. That is why If statements are used. They figure out which
button was pressed by determining what range each variable falls in. For example,
3.6 Conclusion
Selecting parts for the front panel display was much more time consuming then first
anticipated. Delays were met frequently when trying to find information about touch
screens and LCD's. The first obstacle was lack of information regarding these
components, but after many hours of searching on the Internet, a better understanding of
how touch screens operate was gained.
Chapter 4 - Overall Functionality
4.1 Introduction
After the components were wired together on a breadboard, a CADET board was used to
supply power. The C code was then written to perform operations between the PIC
microcontroller and various other components. A software package called ProComm
PLUS was used to simulate a RT-2200 radio. The C code was compiled and used to send
packets of information from this software to RS-485 and the PIC microcontroller. Also,
C code was written to allow the PIC microcontroller to communicate with the touch
screen through the RS-232 chip.
4.2 Overall Design
In order to use the ProComm software to emulate the RT2200, it is necessary to use
RS232 between the controller and the computer's comm1 port. This was done by
deleting the RS485 chips. Next, another MM74HC245A chip as well as another
MAX232A chip was added. The enabling of the chip connected to the computer is
controlled by RC4 and the enabling of the chip connected to the touch screen is
controlled by RC5. The display described in chapter 3 did not work when we received it,
so a 20 x 4 alpha numeric LCD was used. The rest of the circuit is laid out as described
in chapter 3. This is the setup the software is made to use. The power supply and
distribution was not fully tested so for functionality and timing tests, the supply voltage is
obtained from the C.A.D.E.T. board.
4.3 Experimental Results
4.4 Conclusion
Although a front panel display was not actually constructed, all of the components
necessary to its functionality were tested and performed as expected with the exception of
the LCD. The reasons for the LCD's failure to operate were determined as being
manufacturer defects and errors. The smaller LCD used showed that if this front panel
was built, it would perform as expected.
Chapter 5 - Future Work & Conclusions
5.1 Lessons Learned
Throughout this project, many obstacles were encountered, some minor and others much
more difficult. The only commonality these obstacles had with each other was that a
lesson was learned from each one. With the work done to finish the requirements
capture, the three greatest actions that helped in this completion are as follows: Time
Management, Resource Allocation, and Communication. The first initial timeline
proposed
5.2 Conclusions
5.3 Future Work
The operation of the Squelch function clearly showed that any future additions of
functions would simply require a few minor changes/additions in C code and more
memory.
Appendices
Appendix A - References
Appendix B - Program Listings
Appendix C - Circuit Board Layouts
Appendix D - Data Sheets