Professional Documents
Culture Documents
FACULTY OF ENGINEERING
DEPARTMENT OF MECHATRONICS ENGINEERING
LABVIEW
CCE 448
Balancing Ball on Plate
Prepared by
Rayan Haidar
Jad El Khansa
Presented to
Mr. Elie Abdo
Abstract
From the moment we decided our project theme, it was clear that a
good construction of the hardware needed was one of key elements
required for this project to work. A concept with two independent
axes was used, and the parts were designed, fabricated and
manufactured at a local mechanical workshop.
The idea of the project was to be able to balance a ball in motion on a flat
surface, receiving at the same time some digital feedback about the exact
position of the ball on surface. For such a procedure, we decided to use a
resistive a 13 inches rectangular resistive touch screen acting as the flat
plane surface, and the screen was to function via RS232 USB to serial
connector in order to relay the coordinates into the PC.
Coordinates of the balls position were to be relayed by the controller
via RS232 into LabView.
To control the actuators a control system was to be implemented
using the touch screen for feedback. Such control was to be
achieved by two servo-motors controlling the actuators. The motors
work through PWM signal that would be generated within LabView
and supplied to each motor respectively based on the X and Y
coordinates relayed into LabView code via the Touch Screen
controller. Such coordination would balance the ball on the plate and
keep it from falling off.
The Ball Balancing project was a challenge to us to complete in a
small amount of time, but we worked well together to achieve best
result possible with the resources we had available.
Table of Contents
Abstract............................................................................................................................
Table of Figures..................................................................................................................
I.
Introduction...............................................................................................................
II.
Objective.................................................................................................................
III.
Project Overview...................................................................................................
Labview:................................................................................................................
V. Table of Cost............................................................................................................
Results............................................................................................................................
.........................................................................................................................................
VI.
Conclusion............................................................................................................
VII.
References..............................................................................................................
Table of Figures
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
1. Schematic............................................................................................................
2. My DAQ................................................................................................................
3. Servo Motors.......................................................................................................
4. Touch Screen.......................................................................................................
5. Touch Screen Controller.......................................................................................
6. Central Pillar......................................................................................................
7.Servo-Motor connection to axis flexible pillar.....................................................
8. Final System Design complete...........................................................................
9. Reading from touch screen................................................................................
10. Visa Read.........................................................................................................
11. Validate Data...................................................................................................
12. Byte to (x,y).....................................................................................................
13. Byte to nibble..................................................................................................
14. Controlling the two servo Motors.....................................................................
15. Front Panel Final of main VI..............................................................................
16. Testing phase...................................................................................................
I.
Introduction
For the end of this Fall 2015 semester , we had to undertake a project
related to the Virtual Instrumentation course we have taken. Being
Mechatronics engineering students ourselves , we decided to undergo
a project where we can combine coding abilities with mechanical
knowledge. We were to design a system whereby we could balance a
ball on a flat surface using actuators controlled by electrical servo
motors , that themselves were controlled via a LabView PWM code.
This project was a great opportunity for us personally to gain extra
useful experience and knowledge ion the field of Electro-Mechanical
engineering.
II.
Objective
III.
Project Overview
Figure 1. Schematic
Figure 2. My DAQ
MOTORS:
Servo Motors will be used for movement of each axis. The models
used here are BMS-995 MG from Blue Bird Technology.
Specifications: - Weight: 55 grams.
-
Touch Screen:
The touch screen used in the project is a 4 wire analog touch panel by
EELY Enterprise Group.
Major Features are listed below:
Protocol : COM: 9600 BPS , 8 Data Bits ; USB: USB 1.1 full
speed.
Resolution: 12 Bits (2096 x 2096)
Report Rate: COM Max. 180 packets per second
Bytes : 5 Bytes
X11-X0 (12 Bit data of X pressure Value)
Y11-Y0 (12 Bit Data of Y pressure Value)
Construction:
In the construction process, the system was fitted over a wooden board.
To raise the plate flat above the ground 3 iron pillars were manufactured
in a mechanical workshop, plus two metallic bases for the motors to be
fixed in.
The main pillar was fixed in the wooden boards, meant to hold the Touch
Screen from its center of gravity in the middle, thus lifting some of the
weight of the servo motors. Length of this pillar is 12.7 cm above the
surface of wooden board, to ensure a comfortable space for the screen to
be moved in al directions.
10
11
12
IV. Labview:
13
We created a LabView code in order to control the screen by using two servo motors.
This is the main code which reads the x-y coordinates and converts them
to duty cycle values in order to command the motors to move in the
direction needed. The other Sub-Vis will be explained later in the report.
14
15
Figure 11 shows the VI that takes input array of x-y coordinates as byte array
and search for value 129, if it was found it sends the data to byte to (x,y) VI.
In Figure 12 the VI takes byte array and converts it to integer values between 0
and 4096, which is the resolution of screen 4096x4096.
16
We found this code online and modified it so that it moves the servo
motors with a Duty Cycle controls in our desired matter.. We did the code
twice in order to work with two servo motors using two MyDAQ
apparatuses.
17
This is how the main front panel looks like. It shows the x-y coordinates, xy duty cycle, graph and the controls to choose ports for the screen and
servo motors.
18
V.
Table of Cost
Table 1: Cost
Materials
Price
90.00 $
30.00 $
310.00 $
Total cost
430.00 $
Results
Before complete assembly of the hardware, every part was tested
separately. The touch screen and controller alone were functional and
achieving a link with the Lab View code. Servo Motors where functioning
properly based on commands issued by the control code on Lab View.
After complete assembly, several tests were made to ensure the proper
function of the machine. We have encountered minor errors and low
rate function in the servo motors due to relatively high weight of the
steel ball being used. But the overall result was a complete success,
19
and the axis were moving in the desired directions manipulating the ball
to balance with respect to appropriate X and Y coordinates received
from the touch screen via controller.
VI. Conclusion
We greatly enjoyed working on such a simple yet complicated project.
We believe it helped us gain a quite amount of experience and
knowledge in our field of study that is Mechatronics. The system once
built and tested can be used as an excellent test-bed for testing
various other control system. With higher resources given a better
performance can be yet achieved with more optimal controller and
advanced hardware. Such system could act as a gate way to more
advanced industrial applications with respect to world major
manufacturers in the fields of Mechatronics and Electro-Mechanics.
20
VII. References
Chung Hua EELY Enterprise Group 2010-2015 copyright, Touch Screen Products
[online].
Available: http://www.eelyecw.com/eelyeng/index.htm
21