Sie sind auf Seite 1von 29

SCHOOL OF MECHANICAL ENGINEERING

EMC 311/3 MECHATR NIC


MECHATRONIC PROJECT
GROUP

M12
MUHAMMAD SYAHIRAN BIN SALEH

115754

MUHAMMAD ZAEEM BIN MOHAMAD ZAN

115755

NOR SHAFIQAH BINTI SARI

115760

NUR MUSFIRAH BINTI MUSTAFFA

117868

EVALUATOR
ASSOC. PROF. DR. ZAHURIN SAMAD
DR. NORZALILAH MOHAMMAD NOR
22 DECEMBER 2014

NTENTS

1. Introduction

2. Objective

3. Background

4. Methodology

4.1.

Apparatus

4.2.

Material Handling System 11

4.3.

Procedure (circuit diagram and sequence of MHS included) 13

4.4.

Python Coding

17

5. Result

20

5.1.

Output Truth Table 20

5.2.

Output (from command prompt) 21

6. Discussion

23

7. Conclusion

24

8. References

25

9. Attachment

26

INTR0
INTR0DUCTI N
Material Handling is the field concerned with solving the pragmatic problems involving the
movement, storage in a manufacturing plant or warehouse, control and protection of materials,
goods and products throughout the processes of cleaning, preparation, manufacturing,
distribution, consumption and disposal of all related materials, goods and their packaging. The
Material Handling course work is on the methods, mechanical equi
equipment,
pment, systems and related
controls used to achieve these functions. This Mechatro
Mechatronic project, we are required to develop a
material handling system based on equipment as shown in figure 1, 2 and 3 by integrating
various sensors and actuation system using Programmable Logic Controller or Raspberry Pi
micro-controller.
controller. We are required to create a program to collect eight balls in the container until
the end of the program.
In this project, we used Raspberry Pi instead of PLC (programmable logic controller) to integrate
various sensor and actuation system in order to develop a material handling system to complete
the task given. We also determine an operation of a material handling system that can be
performed using the hardware given and decompose the operat
operation
ion into several sequences. By
using the raspberry pi, we create a program using python for carry 8 balls into a container that
moves around on the conveyer belt. The flow of programming created will be further explained
in the procedure section.

Figure 1

Figure 2

Figure 3

BJECTIVE

1. To develop a material handling system by integrating various sensor and actuation system
using Raspberry Pi micro-controller.
controller.
2. To identify and learn the components that are available in the given equipment

3. To determine an operation of a material handling system that can be performed using the
available hardware.
4. To cooperate with the large group members to complete the task that given concord to our
engineering field.
5. To solve the problems that occur while doin
doingg this project and try to complete the task at time
that given.

BACKGR

UND

Material handling is the movement, storage, control and protection of materials, goods and
products throughout the process of manufacturing, distribution, consu
consumption
mption and disposal. The
focus of material handling is on the methods, mechanical equipment, systems and related
controls used to achieve these functions. A material handling system (MHS) can be simply
defined as an integrated system involving activities ssuch
uch as handling, storing and controlling of
materials. Material handling systems (MHS) range from simple pallet rack and shelving projects,
to complex conveyor belt and Automated Storage and Retrieval Systems (AS/RS). The primary
objective of using a MHS iss to ensure that the material in the right amount is safely delivered to
the desired destination at the right time and at the minimum cost. The MHS is properly designed
not only to ensure the minimum cost and compatibility with other manufacturing equipmen
equipment but
also to meet safety concerns.
sized single-board
single board computer developed in the UK by the Raspberry
Raspberry Pi is a credit-card-sized
Pi Foundation with the intention of promoting the teaching of basic computer science in schools.
There are a lot of idea using
ng this intelligent device such as powered arcade machines and drones
to the home automation and low-cost
cost tablets. Since its first appearance a couple of years ago, the
Raspberry Pi has been used in ways that its creators could never have imagined. Intende
Intended as an
educational device, in the tradition of the venerable BBC Micro, the tiny computer found favor
with the burgeoning maker and hacker cultures, which exercised their ingenuity and put the
Raspberry Pi to use in many imaginative scenarios.
Thats mean one of the main interest application of Raspberry Pi is robotic. Robots are generally
quite cool where obviously aside from the ones that wish to except for the ones that try to kill all
of humanity. There are plenty of friendly robots out ther
there.
e. Online magazine RPi MagPi has a
feature about how to make a robotic arm work with the RPi. Robots and Raspberry Pi seem to be
a match made in heaven, if hobbyist projects are anything to go by. Projects include controlling,
an autonomous plane, a voice controlled Star Wars R5
R5-D4
D4 droid and a robot boat. This project
aims to give a general introduction to the General Purpose Input Output pins on the Raspberry
Pi. The GPIO pins are available on the PCB via a header and allow you to interface the Pi to the
real world. So, there is the Pi with its 40 way header in the top left of the board.

Figure 4: GPIO header and pins

From what going to focus in this group project is to develop a material handling system to
collect eight ping pong balls into a container that running on a conveyor by all mean creating
code form Raspberry Pi. It consists of two rows of thirteen pins. Pin 1 is clearly marked on the
board asP1.
. It is vital to looking at the header and compare the hea
header
der to the figure 5 below.

Figure 5: Raspberry Pi B+ GPIO layout

METH
METHODOL

GY

The purpose of this project is to collect ball from station 1 (left) and station 2 (right) as a material
handling system using a raspberry pi microcontroller wi
with python language.

4.1. APPARATUS
This is all the component that been used for this project to run material handiling
system.
Component
1. Raspberry pi (B+ model)

Details

2. 5/2 way single solenoid

Dual step-down
down (buck) power supply
for 3.3V and 1.8V
5V supply has polarity protection, 2A
fuse and hot-swap
swap protection (so you
can plug/unplug USB without resetting
the board)
New USB/Ethernet controller chip
4 USB ports instead of 2 ports
40 GPIO pins instead of 26. The
top/first 26 pins match the original
layout, 9 additional GPIO
PIO and 2
EEPROM Plate identification pins
Composite (NTSC/PAL) video now
integrated into 4-pole
pole 3.5mm
'headphone' jack
MicroSD card socket instead of full
size SD
Four mounting holes in rectangular
layout
Many connectors moved around

Pressure Rating: 150 psi


Number of Ports/Ways: 5
Power: 24 to 120 volts
Valve Type: Cartridge /
Manifold Valves

3. 3/2 way solenoid

Voltage: DC 24V
Current: 200 mA
Pressure: 0.15-0.8 MPa

4. Transistor TIP 41C

VCBO :140 V
VCEO :100 V
VEBO :5 V
IC :6 A
IB :3 A

Peak voltage: 50 V
Output current: 1 A
Peak reverse current: 5uA

5. 1N4001 diode

6. Proximity sensor
(Cylindrical Capacitive Proximity
Sensors )

Distance detect: 15mm


Voltage: 12-24 VDC
Current: 15 mA

7. Magnetic Sensor (swish cs-f)


f)

8. Tact switch

Range of applied voltage: 5-240


5
DC/AC
Max switch: 100 mA
Max contact capacity: 10W
Indicator light: Red LED

Normally open

9. Pneumatic double acting cylinder

Rounded stroke
15mm diameter

10. Single acting cylinder

Rounded stroke
Spring return

Coil voltage :24 Vdc


Coil current:21.8 mA
Coil resistance: 1.1 kohm
Contact current: 5 A

11. Relay

12. Optocoupler LTV946

Current transfer ratio


( CTR : MIN. 50% at IF = 5mA,
VCE = 5V )
High input-output
output isolation voltage
( Viso = 5,000Vrms )
Response time
( tr : TYP. 4ms at VCE = 2V, IC =
2mA, RL = 100W )

13. Breadboard

To set up circuit.

To resist current

Electrolytic decoupling capacitors


100uF/25V. These capacitors are great
transient/surge suppressors. Attach one
between the power and ground of your
project to ensure smooth power
delivery. High quality radial
electrolytic capacitors.

14. Resistors (1.5k and 1k ohm)

15. Electrolytic capacitor

16. Jumper wire

3, 5 and 7 long
Male-to-male jumper
Male-to-female
female jumper (7)

Output current up to 1.5 A


Output voltage of 9V (7809) and 5V
(7805)
Thermal overload protection
Short circuit protection

17. Voltage
oltage regulator 7809 and 7805

10

4.2. MATERIAL HANDLING SYSTEM

The material handling system has included some of devices and hardware. The overview of this
system is the container start at the left of the conveyor and place at the conveyor. Relays act as
switch and change the direction of motor. When Relay A and B is powered, the conveyor will
move the container from starting point to right. When the container arrives at proximity sensor 1,
proximity sensor 1 will trigger and conveyor stopped. During that time two ball will drop into
the container. Then, conveyor move to right until it reaches at proximity sensor 2. At this point,
another two ball is released. The container move to left and stop again at proximity sensor 1
place and release two ball. Finally, the container move to right again and collect last two ball and
move to the end of the conveyor before its stop. Figure 6 shows the complete set of material
handling system. For each of the set of wire need to label and the wire need to connect correctly
to prevent from short circuit. Figure 7 shows wire is labeled correctly before its connect to the
material handling set.

Figure 6: Complete set of material handling system

11

Figure 7: Labeled wire


For each GPIO pin, we need to declare as input or output. This is because the GPIO pin is
programmable. Table below show that each device is declared an unique name and each of them
assign a GPIO pin.

DEVICE
Power Switch
Emergency Stop Switch
Proximity sensor 1
Proximity sensor 2
Magnetic sensor
Relay A
Relay B
Top left solenoid valve
Bottom left solenoid valve
Top right solenoid valve
Bottom right solenoid valve

GPIO

NAME

5
6
19
26
13
23
24
8
7
20
21

Declare in
program
swPwr
swRst
px1
px2
mgs
rlyA
rlyB
sol1t
sol1b
sol2t
sol2b

12

INPUT

OUTPUT

4.3. PROCEDURE

1. The power supply either to PLC or Raspberry Pi is made sure to be switched off and
earthed before touching the PLC and Raspberry Pi, and connecting wire to it.
2. The Raspberry Pi is connected to a monitor, keyboard and mouse.
3. The wiring of the input and output device to the Raspberry Pi was set up as the Figure 8.

Figure 8: Wiring Diagram

13

4. The interface circuit for the switch and magnetic sensor was set up as the Figure 9. Note
that for magnetic sensor need 5V to operate.

Figure 9: Switch interface circuit


5. The interface circuit for the output device was set up as Figure 10.

Figure 10: Output interface circuit


6. The interface circuit for the Proximity Sensor was set up as Figure 11.

Figure 11: Proximity Sensor interface circuit

14

7. To develop a material handling system, the decomposition of machine operation is


constructed as shown in figure 12.

Figure 12: Decomposition of the program


8. Power up the Raspberry Pi after all of the wiring of the input and output device is done
properly.
9. Start the command prompt (LXTerminal) and make new folder named m12pro by
typing mkdir m12pro.
10. Then, type cd m12pro. Make a new python script bu typing mkd
mkdir
ir m12pro.py.
11. Next, a python program is constructed in the file named m12pro.py by typing sudo nano
m12pro.py to develop the material handling system according to the decomposition of
the program.

15

12. Save the python script by press Ctrl+X and y key to pro
proceed.
13. Run the python script by typing sudo python m12pro.py.
14. The sequence of the program is monitored on the command prompt according to the
program decomposition.
15. To stop the running python script, press Ctrl+C.

16

4.4. PYTHON CODING

17

18

19

RESULT
5.1. OUTPUT TRUTH TABLE
SEQUENCES

RELAY
A

RELAY
B

TOP LEFT BOTTOM


TOP
BOTTOM
SOLENOID
LEFT
RIGHT
RIGHT
SOLENOID SOLENOID SOLENOID

Conveyor
move to right
Proximity
sensor 1
detect (left)
Drop ball to
container
(left)
Ball fill
empty space
(left)
Proximity
sensor 2
detect (right)
Drop ball to
container
(right)
Ball fill
empty space
(right)
Conveyor
move to left
Conveyor
stop

20

5.2. OUTPUT (from command prompt)


+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| Project: EMC 311 Mechatronic (Semester 1 2014/15)
|
| Objective: To develope a msterisl handling system
|
|
by integrated various sensor and actuation |
|
systems using raspberry pi
|
| Group Members:
|
| (1) Muhammad Syahiran Bin Sale
Saleh 115754
|
| (2) Muhammad Zaeem Bin Mohamad Zan 115755 |
| (3) Nor Shafiqah Binti Sari
115760
|
| (4) Nur Musfirah binti Mustaffa
117868
|
+-------------------------------------------------------------------------------------------------------------------+
Python GPIO.VERSION = 0.5.8
Ready ...
Wait for Power Button
Power ON
Conveyor move to right.
Wait for proximity sensor 1 detect
Proximity sensor 1 detect
Conveyor Stop.
BALL = 1
Close top gate 1
Wait for magnetic sensor to open bottom gate 1
Magnetic sensor detect, open bottom gate 1
Close bottom gate 1
Open top gate 1
BALL = 2
Close top gate 1
Wait for magnetic sensor to open bottom gate 1
Magnetic sensor detect, open bottom gate 1
Close bottom gate 1
Open top gate 1
Conveyor move to right.
Wait for proximity sensor 2 detect
Proximity sensor 2 detect
Conveyor Stop.
BALL = 3
Close top gate 2
Open bottom gate 2

21

Close bottom gate 2


Open top gate 2
BALL = 4
Close top gate 2
Open bottom gate 2
Close bottom gate 2
Open top gate 2
Conveyor move to left.
Wait for proximity sensor 1 detect
Proximity sensor 1 detect
Conveyor Stop.
BALL = 5
Close top gate 1
Wait for magnetic sensor to open bottom gate 1
Magnetic sensor detect, open bottom gate 1
Close bottom gate 1
Open top gate 1
BALL = 6
Close top gate 1
Wait for magnetic sensor to open bottom gate 1
Magnetic sensor detect, open bottom gate 1
Close bottom gate 1
Open top gate 1
Conveyor move to right.
Wait for proximity sensor 2 detect
Proximity sensor 2 detect
Conveyor Stop.
BALL = 7
Close top gate 2
Open bottom gate 2
Close bottom gate 2
Open top gate 2
BALL = 8
Close top gate 2
Open bottom gate 2
Close bottom gate 2
Open top gate 2
Conveyor move to right.
Conveyor Stop.
Cleanup all pin setting ... Normal Stop

22

DISCUSSI N
Throughout this project, our group is the only one who using Raspberry Pi to design a m
material
handling system (MHS). The provided MHS is design to drop products or parts into the
container. In this project, the MHS need to collect ping pong ball. We required collecting total of
eight ball using the provided hardware and device. The container can move from left to right and
vice versa
rsa by using conveyor belt. This can be completed by programming. All of the automation
in this project is done in python language.
In this project, we need to declare the input and output from Raspberry Pi to MHS. We need to
design interface circuit so that we can connect the MHS to a Raspberry Pi. It is very challenging
to integrate high voltage device (MHS) to a Ra
Raspberry
spberry Pi thats only runs 3.3 V. Most of the
sensor used in the MHS is operated in 24 V. We need to use PLC as a power supply to all the
device that operated in 24 V. For example, proximity ssensor
ensor that operated with 24 V will
transmit 24 V signal at its output,, so we need to step down the voltage to at least 5 V by using
7809 and 7805 voltage regulator. Then the 5 V supply will drive the optocoupler and act as
switch to send the input signal to the Raspberry Pi. For magnetic sensor we can directly connect
to the Raspberry Pi because it is operated in 5 V, in addition of Raspberry Pi also can supply 5 V
to the device.
Furthermore, all the output device is operated
operate in 24 V. Raspberry Pi cant drive the output device
alone because it only can supply 3.3 V up to 5.0 V maximum. The output that is consisting of
solenoid and relay not only operate high voltage but it also need high current supply. We need to
careful when connecting this output device so that high current supply not leak to the Raspberry
Pi. In thiss project, we are using a TIP41C NPN power transistor to each of the solenoid and relay
that act as switch. When the power transistor received a low current signal from the Raspberry Pi
it will allow the high current/voltage to flow to the output device ei
either
ther solenoid of relay.
We manage to integrate all the input and output device to the Raspberry Pi and runs test to every
single of them. All of them are function correctly. But there is problem when we run the input
and output together. This maybe occurs because of noises that exist. In addition, the power
supply is grounded together.
The programming of the Raspberry Pi is easier compare to PLC ladder diagram. Each of the
GPIO pin can be declare but the input and output pin for PLC is fixed with the addres
address. Thats
why our group decided to use the Raspberry Pi as core of the system to drive MHS.

23

CONCLUSI N
By doing this project, now we already know how to develop a material handling system by
integrating various sensor and actuation system by using Raspberry Pi micro
micro-controller.
controller. It is
actually very suitable for industrial uses, especially for industrial control processes. The low cost
computer is extremely customizable and for many businesses trying it out makes sense. Once
Raspberry Pi is integrated, the device has many uses and advantages over elements of existing
IT. The uses of Raspberry Pi are better than programmer logic control (PLC) in term of cost,
time and easy use. Thats why we chose Raspberry Pi while doing this project. We hope next
year there will be more group that use Raspberry Pi so that they can discuss among them then
can make the system better and solve the existing problem.

24

REFERENCES
1. William Bolton. (2008) MECHATRONICS electronic control systems in mechanical and
electrical engineering. 4th edition. Pearson.
2. Getting Started with Raspberry Pi ((2012) by Matt Richardson and Shawn Wallace
3. Associate Professor Dr. Zahurin bin Samad. (2014/2015) Lecture Note Mechatronic.
4. Mr. Ahmad Faizul Hawary. Lecturer
5. Mr. Hashim MD Nordin. Assistant Engineer
6. Mr. Mohd Ali Shahbana Mohd Raus. Assistant Engineer
7. Mr. Ameer

25

ATTACHMENT

26

27

Das könnte Ihnen auch gefallen