microprocessor
EAT237 Microprocessors and PLCs
Referred/Deferred Coursework Assignment 2016/17 – Weight based potato packing system
Scenario
You have been contracted to develop a control system for a packing system which will load potatoes
into plastic punnets based on weight. Potatoes are to be loaded into punnets until the weight of the
punnet is 1kg +/- 100g. Each potato will weigh between 80g and 110 g.
The potatoes will be delivered one at a time on a conveyor belt with a minimum separation of 10cm
between each potato. When operational the conveyor will move at a speed of 5cm/s. When the
potatoes reach the end of the conveyor they will fall into a hopper which is equipped with a load cell.
The load cell will produce a voltage which is directly proportional to the weight contained in the
hopper. The output voltage will be 10mV per 5g.
The hopper will be controlled by two servos. If servo ‘A’ is activated the potato in the hopper is
emptied into the punnet. If servo ‘B’ is activated the potato is returned to the beginning of the system.
The punnets are carried on a second conveyor belt system at a spacing of 20cm. This belt moves at a
speed of 4cm/s. The punnet currently being loaded is weighed by a further load cell with the same
operational parameters as that for the hopper.
Project Objectives
1. To design a signal conditioning system to interface the two load cells to a PIC18F2455
microcontroller
2. To develop a microprocessor based system to weigh the current potato in the hopper, the
punnet and to decide whether to load or reject the current potato.
3. To design and develop a Micro820 PLC programme to control the two conveyors.
System Elements
Weight Control System
The two weight sensors will be interfaced to a PIC18F2455 microcontroller. The microcontroller will
perform the following functions.
1. Measure the weight of both the punnet and the current potato in the hopper.
2. Add the weight from the hopper and the punnet and determine whether to add or reject the
current potato.
3. Provide digital signals to the conveyor signals as per table 1 below.
Signal Value Meaning
Accept 0 No action
1 Hopper is emptied into the Punnet
Return 0 No action
1 Hopper is emptied into return silo
Full 0 No action
1 Punnet is full – move next punnet into position
Table 1 – Weight control system outputs
Conveyor Control System
The control system for the conveyor will be implemented by a Micro 820 PLC and will move the
potatoes through the system.
The PLC system should perform the following actions on the receipt of the signals from the
Microprocessor:
• When an ‘accept’ signal is received, the PLC should activate the ‘accept’ servo for 5 seconds,
then move the feed conveyor to bring the next potato into the hopper.
• When a ‘reject’ signal is received, the PLC should activate the ‘reject’ servo for 5 seconds
then move the feed conveyor to bring the next potato to the hopper.
• When the ‘full’ signal is received the PLC should move the next punnet into position.
Deliverables
Weight Sensor Signal Conditioning (20%)
You should provide a detailed description including circuit diagrams and relevant design calculations
explaining how the two weight sensors will be interfaced with the PIC18F2455 microcontroller. You
should explain the rationale for the design and how it is makes optimal use of the available feature
of the microcontroller.
Weight Control System Design Notes (10%)
You will carry out design work on the code and produce a set of design notes which may include:
• a flow chart of the operation of the program,
• a list of the I/O pin allocations
• A list of the subroutines you will use.
• Pseudocode outline for your program
Microcontroller Code (20%)
You should provide PIC18F2455 code to implement the required functionality. All code should be
appropriately commented and presented in a professional fashion using appropriate formatting and
indentation. You may write the program in Assembly Language OR C code suitable for the XC8
compiler.
PLC Design Notes (10%)
You will produce a set of design notes for the PLC program based on the required functionality
described above. This may include:
• Flowchart or Sequential Function Chart
• I/O list
• Variable list
• Comments on the purpose of each rung
PLC Program (20%)
You should provide a Micro820 Ladder Logic program to implement the required functionality for
the conveyor control system as described above.
Evaluation (20%)
You will complete the evaluation grid provided (see table 3 – a template will be made available via
SunSpace) where you will provide your critical reflections on how your work across all previous
deliverables addressed the original objectives and how the developed system could be improved.
This can include any changes you see fit to include different components or changes to the structure
of the system but the rationale for your changes must be made clear. There is no page or word limit
for the evaluation grid but it is expected that 2 pages will be adequate.
This is an individual submission so you work should be your own and should not be prepared with
your lab partner.
Guidance and Advice
Hardware Choices
The coursework will involve the use of the ECIO board (PIC18F2455) and the Rockwell Micro 820
PLC. Any submission for alternative devices e.g. Arduino will not be accepted.
Importance of Design
One of the most important themes in this module is the importance of design. It is important,
therefore, that you allow adequate time to design your program. If you fail to do so you will not only
jeopardise the design elements of the coursework but you will also make it extremely difficult to
score well for the coding activities.
Avoiding Accusations of Plagiarism
Any code you write must be entirely your own. You may bring listings into the coding sessions but if
these have been sourced from another source e.g. a text book or the internet, then this must be
fully acknowledged using comments which clearly and unambiguously identify the extent of the
code involved (e.g. by labelling the start and end of the section in question) and the source. You
should also ensure that all work in the written submissions is your own and correctly referenced.
Where you draw on references you should ensure that you clearly explain their relevance to your
own work. If you are unsure on the correct way to reference any material, please ask or refer to the
guidance available via the University Library Website:
http://library.sunderland.ac.uk/find-resources/referencing/
Presentation of Work
Presentation of work is of critical importance. The elements being submitted electronically should be
typed and clearly formatted making appropriate use of headings and subheadings.
SUBMISSION DEADLINE Please submit your work via SunSpace by Friday 25th August.
Marking Scheme
Weight Sensor Signal Conditioning (20%)
Explanation of optimal strategy to interface weight sensors with Microcontroller /20
Weight Measurement System Design Notes (10%)
Design notes which may include:
• a flow chart of the operation of the program,
• a list of the I/O pin allocations
• A list of the subroutines you will use
• Pseudocode outline for your program
/10
Microcontroller Code (20%)
Demonstration of required functionality:
• Read of each Load Cell
• Maintaining a record of current punnet weight
• Decision making algorithm
• Activation of appropriate outputs
/10
Code Structure
• Appropriate use of subroutines/functions
• Clear structure e.g through indentation etc
• Use of sensible/appropriate variable names
• Clear and appropriate use of comments
/10
PLC Design Notes (10%)
Design notes which may include:
• Flowchart or Sequential Function Chart
• I/O list
• Variable list
• Comments on the purpose of each rung
/10
PLC Program (20%)
Demonstration of required functionality:
• Read of output of weight measurement system
• Control of conveyor to move potatoes into hopper
• Control of solenoids
• Control of conveyor to move punnets
/10
Structure of PLC program:
• Appropriate use of instruction blocks
• Clear logical structure
• Use of sensible/appropriate variable and alias names
• Clear and appropriate use of comments
/10
Evaluation (20%)
Critical evaluation of degree of success achieved /10
Recommendations for further development and improvement /10
TOTAL: /100
Table 2 - Marking Scheme
N.B. Written elements will be assessed using the University of Sunderland Generic Assessment
Criteria https://docushare.sunderland.ac.uk/docushare/dsweb/Get/Document-7861/AQH-F6-
15%20Generic%20Assessment%20Criteria.pdf
Evaluation Table.
Objective Critical Evaluation of Degree of Success Achieved
Recommendations For Further Development And Improvement
1. To design a signal conditioning system to interface the two load cells to a PIC18F2455 microcontroller
2. To develop a microprocessor based system to weigh the current potato in the hopper, the punnet and to decide whether to load or reject the current potato.
3. To design and develop a Micro820 PLC programme to control the two conveyors.
Table 3 – Evaluation Grid