Assignment: Microprocessors and PLCs
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
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
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
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
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
You should provide a Micro820 Ladder Logic program to implement the required functionality for the conveyor control system as described above.