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 electronic axle counter
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: TBA
Report Deadline: TBA
The Basic System
Rail axle detection and load measurement system:
You are required to design an electronic system which detects and counts the number
of axles which have passed over a segment of railway line and continuously measures
the load on the track segment. The system should also warn if excessive loading of the
track occurs by visual indicators and/or audible alarm.
The system will be based on a resistive force sensor which produces a voltage output
linearly proportional to the rail load in kg. The voltage output from the sensor is 0 to
+3V corresponding to a load of 0 to 3000kg.
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 0.1 second time intervals and convert the digital value into the
corresponding voltage and from the voltage to the equivalent load in kg using the
information provided above. The current load reading should be continuously
displayed.
If the load goes above 100kg the system should register an axle has passed over the
track segment and increment a counter. The counter value should also be displayed
front panel of your program. If the load goes above 2000kg an alarm signal should
triggered and warning of excessive loading.
Railway Foundation 2011 V1.0
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.
Stage 2
Add a delay to the system so the ADC is sampled every 0.1s. Convert the raw ADC
value into corresponding voltage and from the voltage to the equivalent load in kg and
display the load using a digital indicator and/or waveform chart.
Stage 3
Compare the load value to the set point (100kg) and depending on the case (>100kg
increment a counter) and (<100kg do nothing). Display the counter value on the front
panel in the form of a digital indicator.
Stage 4
If the load value is greater than 2000kg an alarm should be triggered. Initially this
should be in the form of an LED (s) which illuminates.
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 5 (+15%)
If the train passes over the track segment slowly many increments of the counter may
be observed. Modify your program to only increment the counter after each complete
cycle - the value must first go above the 100kg set and then go below 100kg before
the counter is incremented.
Modify the previous program to make use of the LCD screen on the MCB2300 board.
The LCD should display the current load and the status off the alarm.
Add a control to the front panel which allows the set point for the load alarm 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
load is displayed in kilograms or Pounds.
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%] If the push button is held for longer than 3s the counter value should be
reset.
4. [+5%] Use the buzzer/speaker connected to the DAC to emit beeps/tones
representing the alarm signal.
5. [+10%] In a previous version of the system it was found that when the actual
load value was near the set point load the axle counter was being incremented
Railway Foundation 2011 V1.0
many times during a single axle pass giving an invalid reading. A solution to
this problem would be desirable.
6. [+15%] Add your own innovative features!
Railway Foundation 2011 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 2011 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