Page 1
USER MANUAL QBall 2 for QUARC Set Up and Configuration CAPTIVATE. MOTIVATE. GRADUATE.
Page 2
This document and the software described in it are provided subject to a license agreement. Neither the software nor this document may be used or copied except as specified under the terms of that license agreement. Quanser Inc. grants the following rights: a) The right to reproduce...
Page 3
1 Presentation 1.1 Introduction The Quanser QBall 2 (Figure 2.1) is an innovative rotary wing vehicle platform suitable for a wide variety of UAV research applications. The QBall 2 is a quadrotor helicopter design propelled by four brushless motors fitted with 10-inch propellers [3, 4, 5].
2 Operator Warnings This symbol marks specific safety warnings and operating procedures that are important for the safety of the QBall 2 and users. Read these warnings carefully. The QBall 2 is a powerful and potentially dangerous vehicle if used improperly. Always follow safe operating procedures when using the QBall 2.
Page 5
Figure 2.2: System diagram DRAFT - April 6, 2015 QBALL 2 - User Manual...
Page 6
3 Prerequisites To successfully operate the QBall 2, the prerequisites are: i) To be familiar with the wiring and components of the QBall 2. ii) To have QUARC version 2.4 installed and properly licensed. iii) To be familiar with using...
Reference [2] 4.2 Diagram Figure 4.1 below is a basic diagram of the QBall 2, showing the axes and angle. Note that the axes follow a right-hand rule with the x axis aligned with the front of the vehicle.
Page 8
Figure 4.2: QBall 2 components: cage and propellers Figure 4.3: QBall 2 components: DAQ and power board QBALL 2 - User Manual...
Page 9
Figure 4.4: QBall 2 components: sonar and batteries Figure 4.5: QBall 2 joystick ID # Description ID # Description QBall 2 protective cage USB input QBall 2 frame QBall 2 DAQ power cable 10x4.7 propeller QBall 2 power distribution board...
Page 10
4.3.1 QBall 2 frame The QBall 2 frame (#2 in Figure 4.2) is the crossbeam structure to which the QBall 2 components are mounted including the DAQ, power distribution board, motors and speed controllers. The frame rests inside the QBall 2 protective cage (#1 in Figure 4.2).
Page 11
The QBall 2 uses four E-Flite Park 480 (1020 Kv) motors [3] (#4 in Figure 4.2) fitted with paired counter-rotating APC 10 × 4.7 propellers [4] (#3 in Figure 4.2). The motors are mounted to the QBall 2 frame along the X and Y axes and connected to the four speed controllers [5], which are also mounted on the frame.
Page 12
2. This change in motor forces is what causes the resulting torque and roll or pitch dynamics, so we can ignore the net thrust force used to hover the QBall 2. The change in thrust generated by each motor can be calculated from Equation 5.1.
Page 13
ω 5.3 Height Model The motion of the QBall 2 in the vertical direction (along the Z axis) is affected by all the four propellers. The dynamic model of the QBall 2 height can be written as M ¨ Z = 4F cos(r)cos(p) (5.10)
Page 14
5.4 X-Y Position Model The motion of the QBall 2 along the X and Y axes is caused by the total thrust and by changing roll/pitch angles. Assuming that the yaw angle is zero the dynamics of motion in X and Y axes can be written as M ¨...
Page 15
Figure 5.2: A model of the yaw axis with propeller direction of rotation shown. Parameter Value 120 N 15 rad/sec ω 0.03 kg.m roll 0.03 kg.m pitch 1.79 kg 4 N.m 0.04 kg.m 0.2 m Table 5.1: System parameters DRAFT - April 6, 2015 QBALL 2 - User Manual...
6 System Setup Section 6.1 describes setting up the vehicle hardware. Section 6.2 describes the QBall 2 sensors and how they are accessed in QUARC . Section 6.3 and 6.4 describe the procedures for configuring the wireless connection in order to communicate with the QBall 2.
Page 17
• 1 I Figure 6.2 shows the location of the I/O listed above on the QBall 2 DAQ. The DAQ I/O listed above is accessed using the QUARC HIL blockset. The UART, SPI, and I2C communication channels are accessed through the QUARC Stream blockset.
Page 18
The HIL Watchdog block is used to set the timeout limit for the watchdog timer. For the QBall 2 DAQ board, if there is no motor output command received for a consecutive period of time exceeding the watchdog timeout value then the watchdog will trigger, forcing the motor outputs to 0.
Page 19
'qball2' to configure the QBall 2 DAQ and, if desired, enter a name in the Board name field as shown in Figure 6.3. Next, to read and write from the QBall 2 DAQ, add a HIL Read Write block to the model (note that the QBall 2 DAQ is optimized for best performance when a single HIL Read Write block is used in a model, adding more HIL I/O blocks may reduce the performance, particularly the maximum sample rate).
Page 20
The 3-axis gyroscope and accelerometer measurements are used to measure the QBall 2 dynamics and orientation (roll, pitch and yaw). These IMU inputs are crucial for controlling the flight of the QBall 2. The QBall 2 DAQ utilizes a STMicroelectronics 3-axis gyroscope [6] and a Freescale 3-axis accelerometer [7]. The QBall 2 sonar sensor is the Maxbotix XL-Maxsonar EZ3, which measures distances between 20cm and 765cm with 1cm resolution.
Page 21
The battery voltage input measures the supply voltage connected to the QBall 2 DAQ. Since the LiPo batteries used to power the QBall 2 should be charged when they reach a voltage of no less than 10 V, the battery capacity should be monitored.
Table 6.6: QBall 2 DAQ pin list: J9, J10, J11 6.3 Establishing Network Connection The QBall 2 package comes with a pre-configured wireless router and automatically connects to the wifi network Quanser_UVS. It uses TCP/IP connection for communicating with the host computer and/or other...
Page 23
2. After turning on the router that is provided, wait for about 60 seconds for the wireless network to establish and then turn on the QBall 2 power and wait for it to boot up (approximately 60 seconds). 3. Connect your PC network card to any of the ports of the router (e.g. port number 1 to 4) using the network...
Page 24
10. If the QBall 2 is powered on, the QBall 2 can be pinged by typing ping {IP of the QBall 2} in the Run box in Windows (go to the Start menu and click Run). If the connection is successful you will see the ping replies in the command window.
Page 25
Figure 6.9: Pinging the QBall 2 6.4 Configuring models for the QBall 2 target Note: this section applies only to files that are run on the Gumstix target (i.e., on the QBall 2) such as qball_2_control_v1.mdl (see Table 6.7 in Section 6.6).
Page 26
6.5 Joystick The joystick is an integral part of the QBall 2 and must be used in every test flight. Even in closed-loop control modes, the joystick is still used as an enable/stop switch for safety reasons. The joystick has one control stick that operates the pitch, roll, and yaw commands as well as an analog slider to enable takeoff and landing.
Page 27
A script used to compute the LQR controller gains used in stabilizing the QBall 2's orientation and configures other controller gains for controlling the QBall 2 height and vehicle position. This file is run by the setup_qball_2.m script. host_joystick_logitech.mdl A Simulink model used on the host PC to stream joystick data to the QBall 2 for joystick control.
Page 28
Note that even in closed-loop operating modes, the host model must still be connected and streaming joystick data to the QBall 2 since the joystick acts as a safety switch. In closed-loop mode the joystick throttle disables the QBall 2 flight when it is below 10% and enables takeoff and flight when the throttle is above 10%. This is a safety feature so that users can quickly disable the QBall 2 during an experiment if desired.
You may choose to override the height mode and use the joystick throttle input to manually control the QBall 2 throttle, but this is a more challenging mode of operation and should only be attempted if you have experience flying quadro- tor helicopters and wish to do so at your own risk.
Page 30
. See the help in QUARC for the To Host File block for more information. Note that additional data from the QBall 2 model can be added to the signals in order to save additional information as de- sired. 6.7.4 DAQ...
Page 31
Simulink models stream the localization data from an OptiTrack system to the QBall 2. To use this feature, you must have an OptiTrack camera system and have the OptiTrack Motive software installed (see the OptiTrack Quick Start Guide). Make sure to check the QUARC OptiTrack block help pages for the most up to date version of Motive that is recommended.
Page 32
QBall 2 where crossed frame is located. The rigid body also provides measurement of the rotation about the vertical Y axis to control the QBall 2 heading. To setup the rigid body on the QBall 2, the OptiTrack system must already be calibrated using the OptiTrack Motive software;...
Page 33
Rigid Body 1, as seen in Figure 6.18. 7. The pivot point of the rigid body must now be moved to the center of the QBall 2. Select the QBall 2 rigid body in the left side Project Explorer pane. While the rigid body is selected, hold the CTRL key and select the top-most marker on the QBall 2 and set it as the pivot point by right-clicking it and select Set Rigid Body Pivot Point, as shown in Figure 6.18.
Page 34
Figure 6.18: Set the new rigid body pivot point Figure 6.19: Apply a vertical translation to the QBall 2 rigid body pivot point QBALL 2 - User Manual...
Page 35
Figure 6.20: QBall 2 rigid body pivot point moved to the center DRAFT - April 6, 2015 QBALL 2 - User Manual...
Quanser supplies these guidelines for charging batteries but it is the users' responsibility to ensure they are operating their equipment safely and correctly. Quanser is not responsible for any damages Caution resulting from use of batteries, power supplies, chargers, or balancers.
Ensure that the charger is set to LiPo type batteries since these are the batteries supplied with the QBall 2. The charger contains a balancer that ensures even charging across cells within the battery. Figure 7.2 shows the output terminals of the charger connected to the battery cable and the balancer ports.
Page 38
Start/Enter button until a beep is heard and if prompted to confirm press START again to begin charging. 4. Upon completing a full charge the charger should beep and display that the charge is complete. QBALL 2 - User Manual...
For any issue, the first and easiest troubleshooting solution on any electronic device is to reboot the device. Turn off the QBall 2, then turn it back on again. For troubleshooting any problem with the QBall 2, it is always a good idea to...
Page 40
Q6 Trying to start the QBall 2 model results in the error "Unable to locate the dynamic link library or shared object" This error indicates that the QBall 2 driver is not found on the target. Make sure that the model target type is set to quarc_linux_duovero.tlc by navigating to the menu QUARC | Options | Code Generation pane and...
Page 41
QBall 2 Unmanned Vehicle Systems Lab With Quanser robotic systems, you can introduce control concepts related to stationary and mobile robotics, from vibration analysis, resonance and planar position control to sensors, computer, vision- guided control to unmanned systems control. All of the experiments/platforms are compatible with MATLAB®/Simulink®.
Need help?
Do you have a question about the QBall 2 and is the answer not in the manual?
Questions and answers