Railway Foundation – Laboratory Assessment

advertisement
Railway Foundation – Assignment
ELECTRONIC, ELECTRICAL AND PROCESSOR ENGINEERING
Assessment
You must demonstrate your program to the lecturer and submit a printout of your
program at the time of demonstration. Marks will be awarded for the overall design,
the working state of program, the structure and layout of program, use of the Labview
features, program documentation and the report.
The report should: (Approximately 4-6 pages not including your LabVIEW code)
 Describe the design of your system and the features of your heater control system
 Discuss the hardware peripherals of the of NXPLPC2368 and the MCB2300 evaluation
board that your program uses and how you have used them in the application.
Remember: The program must be demonstrated before any marks will be awarded.
Demonstration: Tuesday 6th October 2009 during your allocated lab session
Report Deadline: Friday 9th October 2009 16:00 Sheaf reception.
The Basic System
Points heating: Railway switch heating controller.
You are required to design a control system for a railway switches (points)
monitoring/heating system. The system is used to prevent points from freezing in
adverse weather conditions by measuring the temperature of the rail and comparing
this with a set point turning on/off a heating system as required.
The rail mount temperature sensor produces a voltage output linearly proportional to
the rail temperature in degrees Celsius. The voltage output from the sensor is 0 to +3V
corresponding to a temperature range of -20°C to +40°C.
To simulate the sensor output the potentiometer on the Keil boards produces a voltage
in the range 0 to approx. +3.3 volts, which is input to the microcontroller through an
analogue to digital converter (ADC). The ADC of the NXP LPC2368 is a 10-bit ADC
producing 1024 possible digital values in the range 0 to 1023. Your program should
read the ADC at 1 second time intervals and convert the digital value into the
corresponding voltage and from the voltage to the equivalent temperature using the
information provided above. If the temperature goes below +2°C the heater is
switched on and otherwise is switched off. The heater output can be simulated using
one of the LED's connected to Port 2 of the microcontroller and additionally as an
Output indicator on the front panel of your program.
Suggested approach
Stage 1
Continuously read ADC channel 0 and display the raw digital value on the front panel
in the form of a digital indicator and/or waveform chart.
Railway Foundation 2009 V1.0
Stage 2
Add a delay to the system so the ADC is sampled every 1s. Convert the raw ADC
value into corresponding voltage and from the voltage to the equivalent temperature
in °C and display the temperature using a digital indicator and/or waveform chart.
Stage 3
Compare the temperature value to the set point (+2°C) and depending on the case
switch the heater (LED) OFF or ON.
For case (a) when the temperature is greater than +2°C the LED is OFF
For case (b) when the temperature is less than or equal to +2°C the LED is ON
Producing a basic working system described above and a report containing a clearly
structured block diagram and associated front panel display will be sufficient for a
pass mark of 40%.
Stage 4 (+10%)
Modify the previous program to make use of the LCD screen on the MCB2300 board.
The LCD should display the current temperature and the status off the heater. Add a
control to the front panel which allows the set point for the heater to be adjusted.
For additional marks some of the following features may be added to the basic system
and documented in your report.
1. [+5%] Use the Push button (INT0) connected to port2 bit 10 to select if the
temperature is displayed in ºF or ºC.
2. [+5%] Add a max/minimum feature to your system. The values should be reset
by a control switch on the Front Panel of the VI.
3. [+5%] Add an alarm feature. If the temperature continues to drop below a
preset level while the heater is still on the LED's should flash, indicating
potential heater malfunction or failure.
4. [+5%] Use the buzzer/speaker connected to the DAC to emit beeps/tones
representing the alarm signal.
5. [+15%] In a previous version of the point heating controller it was found that
when the actual temperature was near the set point temperature the heating
was being turned on and off many times. This caused the relay contacts which
were used to switch the 240V 50Hz mains power to the heater to wear out very
quickly. A solution to this problem would be desirable.
6. [+15%] Add your own innovative features!
Railway Foundation 2009 V1.0
Useful Information.
The following is a brief list of some of the LPC2368 & I/O Application board features:


















NXP LPC2368 Microcontroller ARM7TDMI-S based high-performance 32-bit RISC
Microcontroller
58 Kbytes of high-speed on-chip RAM
512KBytes of external program memory (Flash ROM) with In-System Programming
(ISP) and In-Application Programming (IAP)
Four 32-bit counter/timers T0 – T3 (see LPC23xx user manual for details)
Several digital I/O ports connected to 8 LED’s
A 16 character x 2 line LCD
6 channel 10-bit ADC. One potentiometer generating voltages in the range 0 to +3.3
volts is connected to analogue channel 0.
10-bit DAC (Output may be connected to the speaker on the Keil board via a jumper).
Four UARTs with 2 directly accessible on the Keil demo board COM0 & COM1 (This
could be used to output data.)
CAN 2.0B with two channels (CAN1 & CAN2)
Ethernet 10/100 MAC with DMA
Three I2C serial interfaces
Three SPI/SSP serial interfaces
I2S interface
SD/MMC memory-card interface
Real Time Clock with optional battery backup
PWM unit for three-phase motor control
USB 2.0 Full Speed Device Controller
Note: To enable some of the features on the board it may be necessary to configure the jumpers.
Details of the jumper settings are given in the table below.
MCB2300 Jumper settings
Railway Foundation 2009 V1.0
J1 - USB (D-)
ON
Connects USB Line D- to the USB connector.
J2 - USB (D+)
ON
Connects USB Line D+ to the USB connector.
J3 - AOUT
ON
Connects AOUT via LF amplifier to the loudspeaker.
J4 -
--
Not used
J5 - UMODE
ON
Allows soft-connect of the USB device by issuing a software
restart via P0.14
J6 - AD0.0
ON
Connects POT1 potentiometer to AIN0 for analog input
demonstration.
J8 - INT0
ON
Enable INT0 Push Button.
J9 - RST
ON
Enables Reset via COM0.
J10 - ISP
OFF
J11 - LED
ON
Enables Port2.0 - Port2.7 LEDs.
J13 - ETM
ON
Enables the Embedded Trace Macrocell (so that the USB softconnect and the LED's can be used)
Disables In-System Programming via COM0.
Download