university of florida€¦ · web viewthe first one is the size, odroid-u3 is as same size as my...

14
EEL 4665/5666 Intelligent Machines Design Laboratory Messenger Final Report Date: 4/22/14 Name: Revant shah E-Mail:[email protected] Instructors: Dr. A. Antonio Arroyo Dr. Eric M. Schwartz TAs: Andy Gray Josh Weaver Daniel Z. Frank Nick Cox

Upload: others

Post on 07-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

EEL 4665/5666

Intelligent Machines Design Laboratory

Messenger

Final Report

Date: 4/22/14

Name: Revant shah

E-Mail:[email protected]

Instructors: Dr. A. Antonio Arroyo

Dr. Eric M. Schwartz

TAs: Andy Gray

Josh Weaver

Daniel Z. Frank

Nick Cox

Page 2: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

Table of Contents

Abstract................................................................................................................................. 3

Executive Summary ............................................................................................................. 3

Introduction ......................................................................................................................... 4

Integrated System and sensors............................................................................................ 4

Mobile Platform...........…..................................................................................................... 6

Actuation……………………………………………………………………………………7

Sensors………………………………………………………………………………………8

Behavior…………………………………………………………………………………….9

Experimental layout and results…………………………………………………………. 9

Conclusion…………………………………………………………………………………. 9

Documentation……………………………………………………………………………..10

Appendices………………………………………………………………………………….10

2

Page 3: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

Abstract:

The Idea behind creating Messenger was to deliver a payload to specified location and to have some kind of image processing to verify the delivery like detecting the face of a person. Although till now what Messenger has been able to achieve is complete autonomous flight to detect a color and use that as a signature to verify the delivery of the payload, deliver the payload at a given GPS location and come back to home wait for the next order. When I started building the Quad-Messenger I absolutely had no clue about Quad-copters and hence a great deal of knowledge was gained after building the Quad, like from knowledge of roll, yaw, pitch and throttle to making the Quad-copter autonomous. And The Topic of Quad-copter itself being difficult the other difficulty which hampered my progress was weather-conditions which made testing really difficult but in the end the quad-messenger was successfully completed. The Making of Quad-messenger was indeed a huge learning curve and I think it was and will be one of the best experience in my undergrad carrier.

Executive Summary:

Quad-messenger had basically two objective first to follow the way point. The second objective was to drop a ball at particular location once the camera detects the red spot which was like a red blanket.

Quad-messenger was build using a frame from 3D-Robotics that had four legs which gives Quad some height which was very useful in protecting the Quad when it crashes. It had four arms that led directly from the on-board autopilot to the motors and the length was precise enough to give Quad-Messenger some stability. The motors used were 850 Kv which means at a voltage of 1V the motors would rotates 850 times in a minute with no load. Generally when props are attached to motors the value of RPM reduces to 75 to 80 percent of its original value. The propellers which were connected to Quad-Messenger were 10x4.7” which means that it is 10 inch long and has a pitch of 4.7. At the very bottom of the quad there is a 5000 mAH 3 cell battery and a fiber frame that gives room to strap a battery and on top the frame was a power distribution board that not only gives power to all four motor via ESC’s but also connects them to on board Auto-pilot board APM 2.6. The ESC Quad-Messenger uses are 20 Amp the basic concept behind ESC’s is it translates the value send from RC transmitter to desired speed of motors to make quad move in particular direction. On top of power distribution board there is fiber frame and top of the fiber frame is APM 2.6. The Power to APM comes from power module which is connected in between power distribution board and the 5000 mAH battery. One of the feature APM 2.6 has is inbuilt battery monitor and the battery monitor gives the update of battery life and if it goes below certain limit it will notify by emitting a sound which helped me saved my batteries couple of times. Apart from that APM also gives me a feature of setting up boundaries for my quad so if it goes above certain height it triggers failsafe and lands my quad there. This two features were very useful in protecting quad-messenger from flying away and crashing because of low battery.

For the safety of autonomous Quad’s it is important to have onboard computer for my quad I chose Odroid-u3. There are couple of reasons why I chose odroid-u3 over some other micro-computers such as Raspberry pi. The first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter. The Second

3

APM 2.6

Power module

GPS

Page 4: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

is Odroid-U3 has three USB ports which which is another great advantage since I needed three USB ports for what I was trying to achieve and it also has IO ports which can help me to drop a payload. The Odroid-U3 was mounted above my APM 2.6 and there was also an IO shield that was connected to my Odroid-U3 and one of the IO port was connected to my servo arm which basically drops the payload. The power to my onboard microcomputer was given by a BEC which basically is the voltage regulator and can be used for many purposes such as powering the receiver. I soldered the BEC to my power distribution board and powered my on onboard micro-computer.

On the top of my microcomputer is my GPS module which gives me my current GPS location and helps drive the Quad. Right next to my GPS module is my wireless transmitter with which I can control my quad manually in case of emergency of flight going wrong. The GPS and wireless receiver was powered by APM 2.6.To achieve the second objective of Quad-Messenger was to drop a payload and to achieve that I used a claw mechanism which is connected to a servo which is connected to the IO shield attached to the Odroid-U3.

For colour detection I used a Camera which was connected to Odroid-U3 and as soon as it detects the red colour it drops the payload which basically is an open-cv program detecting specific colour. The commands to the quad were given by a Ground station using a Wi-Fi module that was connected to my Odroid-U3. The third USB on my Odroid-U3 was connected to my APM 2.6.

Introduction:

The Basic Idea for Building Quad-messenger came from the fact that products online are cheaper and the fact that it’s inconvenient to wait for a small part to ship next business day and you getting a part after three days but what if the shipping was made faster and cheaper. Quads can essentially be at least a faster way, specially small products which would be really expensive over the counter but can be bought online at very nominal rate and the fact that expensive retail stores can be completely eliminated since you will be delivered the product in almost no time and at nominal rate too. And hence this idea motivated me to build Quad-Messenger which can not only deliver’s a package but also take a signature which is the proof of delivery.

Although the Quad-Messenger has lot of potential like surveillance, following a target, Quad messenger can also be used for military purposes such as remote bombing that can be done autonomously. I would definitely like to make Quad-Messenger a multipurpose quad and make it functional to all extent which Quad-Messenger is capable of.

This Report will basically describe the whole process of building the Quad, from smallest part such as building the frame to making it completely autonomous. Ardu-pilot mega has many inbuilt modes such as Stabilize where the entire control of the system is in the hand of the pilot he can move the quad in the direction he wants with help of radio transmitter and receiver. Another mode is Loiter mode where the quad maintains its position when no value is given. Quad-Messenger uses Stabilize mode to take off and then uses Loiter to mode to maintain its position and complete its mission.

Integrated System and sensors:

Quad-Messenger uses an onboard autopilot for decisions on how to rotate motors and at what speed to obtain the desired results and the commands to the APM is given by the onboard micro-

4

Claw Mechanism 1

Page 5: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

computer which makes decision on the basis of values supplied by GPS to the APM and thus completes its mission. The On-board microcomputer also orders the servo to move and drop the payload depending upon the values supplied by camera or GPS. The order to start a mission to the quad is given by base station with the help of onboard WI-FI module connected to the onboard microcomputer.

5

Odroid U3

APM 2.6 GPS Module

4xESC’s

WIFI Module Camera U3-IO Shield

Servo

Claw mechanism

Radio Transmitter &

receiver

LIPO 5000 MAH battery

Power Module

Power distribution

BoardBEC

4xmotors

Page 6: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

Mobile Platform:

The four arms of the quad was made up of steel to give quad-Messenger a rigid body and also protection from winds which is less than 13 miles per hour. The motors were attached to the arms with the help of screws washers and thread locker so that the screws to the motors don’t get loose because of vibrations also the propellers attached to the motors were also connected using thread lock and spacer so they don’t come out because of motion. Apart from that the legs were made up of fiber since their only role was to carry the load of quad when it’s at rest and give some height to the main frame of quad-Messenger.

The APM 3.6 has an inbuilt 3 axis gyroscope and barometer which are really sensitive to the vibration and in order to avoid bad flight the APM 2.6 was assembled on the mobile Platform using moon gel which gave protection against the vibration. The GPS Module was purposely kept on the top to get an accurate GPS position.

6

Power distribution board

APM 2.6

Odroid U3 and IO shield

GPS and radios receiver

Moon Gel

Page 7: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

Actuation:Once the Quad-Messenger frame was constructed there were number of steps to be performed and they needed to be accurate in order for good autonomous flight. The first step was to install mission planner and download the APM 3.0 firmware. The second step was to do the compass roll where basically the compass on APM 2.6 was the calibration by rotating the quad-Messenger around all axis and successful calibration should give the values from -150 to 150.

Once the Magnetometer was calibrated the next step was to calibrate Accelerometer where you change the position of the quad as shown on the site which basically gives stability to your quad. Once the accelerometer was calibrated next was to connect Radio receiver to the APM 2.6. In order to achieve 6 flight modes I didn’t use one channel on my APM. That was channel number 8. The transmitter I used for Quad-Messenger was turnigy 9x 9 channel transmitter and 8c receiver. So the basic connection of my receiver was

Receiver       APM

1                    1

2                    2

3                    3

4                    4

5                   Not connected

6                   5

7                   6

8                   7

PWR            PWR

GND            GND

Once the receiver was connected it had to be calibrated which means you go to mission planner and move you all controls to their minimum and maximum value which basically tells your APM that this are your new minimum and maximum values for a particular channel. Once the Radio was calibrated the next step was to do ESC calibration where basically you connect your motors to you esc and thus depending on the values of respective channel it calibrates all four ESC’s so that they are in sync. Once ESC’s were calibrated the next step was to alter the positions of cable of motors that are connected to do the reason you do this is to achieve the desired result of two diagonal motors rotating clock wise and rest two anti-clockwise and then attach propellers to the Quad. The propellers are also of two type one is pusher and they are generally marked SF and other are pusher and they are generally marked SFP. To the motors going clockwise pusher propellers and used and to the motors going anti clockwise puller propellers are used. Once the propellers were attached the next step was to do vibrational damping this is the most important step to make a successful quad using APM 2.6. The basic problem is the barometer on APM 2.6 is really sensitive to vibration and if vibration is above certain level the readings that it will

7

Page 8: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

get will be completely wrong and in such cases A quad can literally fly away which happened to me and in order to get rid of it I kept moon gel and in significantly reduced my vibrational damping.

Once the vibrational damping was done next step was to do compass mot where basically you flip the propellers on the Quad and rotate it one position down and stick your Quad-copter to the ground so that it doesn’t move and then increase throttle slowly to 75 percent and then quickly bring it down what this basically does is it gets rid of the magnetic interference caused by the on board devices attached to the quad. Once compass mot was done the next step was to do roll and pitch tuning. This is done since the radio transmitter can give a constant value you have to make a correction to the original value that goes to the APM and hence what this does is that when you rise you quad in wont move in any direction and will actually give you a steady flight. Like when I first flew my quad it was constantly moving backwards once I did the roll pitch tuning that behavior was eliminated to great extent.

Sensors:

Quad-Messenger has four sensor accelerometer, barometer, compass and GPS and another special sensor that is made up of onboard camera, a U3-IO shield a servo and claw mechanism. The accelerometer basically measures the acceleration of the quad and hence helps quad to make decisions such as to accelerate more or less depending upon the requirements of the mission. The Barometer helps me to find the altitude of my Quad. For the mission where lot of altitude is not required this is a very useful sensor apart from that it also helps in establishing a fence which means that if the quad goes about certain altitude it has to land. The compass basically gives the direction you are facing and translates it in 360 degree which is again very useful when you travelling from one way point to another in loiter mode. The onboard GPS helps you in reading the current location of the quad-Copter and when you want to move your quad from one point to another GPS coordinates are the most accurate.

The Onboard special sensor basically activates the camera when a desired GPS coordinates are achieved and camera starts looking for Red colour once it detects the Red colour it basically orders IO shield to open the claw which in turn drops the payload. The colour detection was achieved by using open CV and the program to detect the colour was written in python. The program to move the servo attached to the IO shield was written in C++.

Behavior:

The Logic applied in moving the Quad from one way point to another way point which is diagonal to its original position was use the one value either latitude or longitude what my program basically does is it goes for a launch sequence in stabilize mode and then goes to loiter mode and the appropriate pitch values were given in order for quad to go straight and then once it reaches the threshold of longitude it turns to the desired heading for the destination and then again pitch values were given until reaches the threshold of latitude and then the onboard camera finds the red colour once it finds it drops the payload and then come back to its original position and lands.

8

Page 9: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

The values of the pitch and yaw were calculated using the values obtained when the radio controller was calibrated the pitch value works a little bit different than yaw values so if you want to move ahead the value of the pitch is actually decreased to its mid value and hence the quad will move in the forward direction. Although since the quad was tested at day and night the value for red colour was changing even if the clouds came in and so in order to limit the flight duration I kept a 10 second loop and if it does not find colour in ten seconds it would not drop the pay load but will return to the base location. Apart from that my program was also continuously polling for a switch value which basically means that if that switch shows a high value it means that something is wrong and the apm gives the control back to radio transmitter and mission is aborted and the quad comes back home and lands.

All the programming for the Quad was done using mavlink protocol which is basically the language that APM understands and understanding mavlink was one of the most difficult task. Basically APM communicates in terms of messages it continuously keeps sending message to the onboard microcomputer and hence what my program does is it keeps decoding those messages and in return sends the message to APM to do particular task. Although mavlink is designed to make the task easier but understanding it took a significant time. The Language used for programming was python.

Experimental Layout and Results:

The testing of the quad-copter was very challenging since weather was always a major factor affecting the flight. Since I was using stabilize and loiter mode a slight deviation initially due to wind while launch sequence is running would completely change the course of the quad and the second biggest challenge was the fact that when using small areas to test the GPS coordinates do not change rapidly and hence to reach a exact value was really difficult and hence I had to use threshold values but was eventually successfully able to get a complete autonomous flight .

Conclusion:

The Quad-copters have tremendous potential and will be one of the most useful robots due to its versatility and hence for me building Quad-Messenger was a great learning curve. I personally had never knew Linux but now I only work in Linux so in a way Quad-Messenger has taught me a lot of things. Although what I have built Quad-Messenger for was really under use of the onboard system I have and definitely I would like to make more versatile and more reliable autonomous Quad-Messenger.

9

Page 10: University of Florida€¦ · Web viewThe first one is the size, Odroid-U3 is as same size as my onboard auto-pilot which makes it a perfect fit on my Quad and also it’s lighter

Documentation:

1. http://copter.ardupilot.com/wiki/table-of-contents/ : wiki for APM-copter2. http://odroid.com/dokuwiki/doku.php : wiki for odroid3. http://qgroundcontrol.org/mavlink/start : Mavlink

Appendices:

1. http://diydrones.com/profiles/blogs/configuring-turnigy-9x-with-arducopter Tutorial on how to connect turnigy controller to AMP.

2. http://api.ning.com/files/i*tFWQTF2R*7Mmw7hksAU- u9IABKNDO9apguOiSOCfvi2znk1tXhur0Bt00jTOldFvob-Sczg3*lDcgChG26QaHZpzEcISM5/MAVLINK_FOR_DUMMIESPart1_v.1.1.pdf excellent mavlink tutorial

3. Source code can be found at https://sites.google.com/site/revantquadcopter/final-_mission

10