# MSc Autonomous Robot and GPS Module Experiment

Subject: Tech & Engineering 8 2320 10 min PhD

## Introduction

After the project components described in chapter (4), all components described will then be integrated in a way to achieve the goal of the project (an Autonomous Robot capable to navigate from one waypoint to other waypoints). There are several experiments though, that should be conducted in a sequence. The experiment, are as follows:

In only 3 hours we’ll deliver a custom MSc Autonomous Robot and GPS Module Experiment essay written 100% from scratch
1. Extract robot positions coordination data from the GPS module (EM 406) experiment.
2. Controlling of DC Motors experiment.
3. Robot navigation using magnetic compass (HMC6343) experiment.
4. Robot avoided an obstacles experiment.
5. The robot navigates from one waypoint to another using (GPS & Compass) experiment and
6. Robot navigation with obstacles avoidance using (GPS, Compass and Range sensor) experiment.

In this chapter, all of these experiments will be discussed in detail with results, figures, tables, and comments.

## Extract robot positions coordination data from the GPS module (EM 406) experiment

### Aim

The first experiment involves the extraction of the robot’s position coordination from the GPS module (EM 406). This is done using an Arduino microcontroller while showing this data on a Laptop screen.

### Design

The figure below displays the following:

• 9 V DC Battery wires connected to the Supply Pin of the Arduino microcontroller.
• TX of the GPS module (EM 406) connected to the Pin (4) of the Arduino.
• 5 V of the GPS connected to 5 V of the Arduino.
• GND of the GPS connected to GND of the Arduino.

There is no need to connect the RX of the GPS module since there is no need of sending a command from the Arduino to the GPS. The compiling of the code with baud rate of the GPS module is at 4800. This is where information in the format of a GPRMC sentence appears on the laptop screen. It appears as shows in Figure (2).

## Results Table (2) Data extract from GPS module shows on a PC.

• The experiment should be conducted in open area with no adjustments to buildings or trees which may cause a reduction of the GPS reception.
• All the data, especially the latitude and longitude except the heading angle does not show all the time. It is also not accurate for navigation purposes. Figure (3) shows readings from the GPS module (EM 406), which have missing heading angle values making the navigation more difficult. For this reason the compass added to the project gives a very accurate heading (accuracy 2 degrees) angle. Table (3) Data extract from GPS module shows on a PC.

## Controlling of DC Motors experiment

### Aim

In this experiment, a programming code is written and compiled to the Arduino Microcontroller for controlling four DC Motors (12Vdc, 200RPM Gear head) of the Robot. This is done through the motor controller (Pololu Qik 2s12v10 Dual Serial Motor Controller) to run the four DC motors.

### Design

• 9 V DC Battery wires are connected to the Supply Pin of the Arduino microcontroller.
• 12 V DC Battery wires are connected to the Supply pin of the motor controller.
• TX of the motor controller is connected to RX of the Arduino (pin 5)
• RX of the motor controller is connected to the TX of the Arduino (pin 1)
• The rest of the motor controller is connected to the Arduino (pin 2)
• GND of the motor controller is connected to the GND of the Arduino

In this experiment several indoor tests are conducted to make sure the motors and motor controller are in working condition. The code here was written to send speed values to the four DC motor controllers in hexadecimals (for example 127 is equal in hexadecimals (0x7F). Figure (4), explains the code logic for the experiment.

Academic experts available We will write a custom Tech & Engineering essay specifically for you for only \$16.00 \$11/page Figure (5) Flowchart of Robot Speed control experiment.

A new library file is added to the Arduino library for writing the source code for the motor controller. This library file is called the compacQik2s9v.h library.

• All four motors work well and the speed can be controlled easily from the Arduino through the motor controller (Pololu Qik 2s12v10). When the code uploads all motors start to move at a low speed for three seconds then stop for three seconds. They finally start to turn all motors for three seconds at high speeds.
• All DC motors have the same performance when they are under the same condition which is good for navigation purposes.

## Robot navigation using magnetic compass (HMC6343) experiment

### Aim

To experiment to let the robot navigate using a magnetic compass (HMC6343) in a specific heading angle. What is needed is to identify a specific heading angle and read the actual heading value from the compass fitted. After this, a comparison is made between two values with an accuracy of +- two degrees. This is done so that the Arduino sends this data to the motor controller for keeping the robot within the heading angle trajectory.

### Design

The same wiring as in figure (5) but here the compass PCB is added to the circuit connection as follows:

• 9 V DC Battery wires connected to the Supply Pin of the Arduino microcontroller.
• 12 V DC Battery wires connected to the Supply pin of the motor controller.
• Vcc of the compass connects to 3.3 V of the Arduino
• SDA connects to the analog pin(4) of the Arduino
• SCL connects to analog Pin(5) of the Arduino
• GND of the compass connects to the GND of the Arduino
• Two resistors (10 kΩ) are connected between VCC to SDA and SCL

The flowchart of the programming code for this experiment is shown in Figure (7)

• The robot starts to search for the heading angle saved in the Arduino and moves accordingly. During movement the robot corrects its direction with the help of a reading from the magnetic compass (HMC6343) and the action from the motor controller (Pololu Qik 2s12v10). But this is only in outdoor trails because in the indoor trials, an error occurred in the compass reading due to metal materials surrounding the robot in the lab or in the room. These materials have an effect on the magnetic compass reading.
• The Robot cannot move on a 100% flat ground because we are using a three axis magnetic compass in the beginning. The problem happened when the two axis magnetic compass was used which caused a wrong reading, as a result of this the robot can now move anywhere (on grass, mountain, etc).

## Robot avoided an obstacles experiment

### Aim

Designing/building a robot with a program that is able to avoid any obstacle by using sharp sensors in front of it while it is moving

### Design

The sharp sensor has three wires; the complete wiring is described as follows:

• 9 V DC Battery wires connect to the Supply Pin of Arduino microcontroller.
• 12 V DC Battery wires connect to the Supply pin of motor controller.
• Vcc of the sensor connects to 5 V of the Arduino.
• Analog Pin of the Rang sensor is connected to Analog Pin (1) of the Arduino.
• GND Pin of the sensor is connected to the GND of the Arduino. Figure (8) Motor controller, Robot, Range sensor and Arduino wiring connection.

Figure (9) explains how the robot first avoids an obstacle

Figure(10) shows a flowchart describing the programming code loaded to the robot circuit for doing the avoidance task, for more information about the code (see Appendix ). An obstacles was put in front of the robot, throughout the experiment the robot successfully avoided the obstacles in away illustrated in figure (9). Figure (10) Flowchart of how the Robot avoided an obstacles experiment.

## Robot navigate from waypoint to another waypoint using (GPS & magnetic Compass) experiment

### Aim

To experiment with the robot’s movement from one point to another within a range of a known heading angle going to another known waypoint and stopping there.

### Design

The Arduino, GPS (EM 406), motor controller (Pololu Qik 2s12v10), and magnetic compass are connected as follows:

• 9 V DC Battery wires connect to the Supply Pin of the Arduino microcontroller.
• 12 V DC Battery wires connect to the Supply pin of the motor controller.
• TX of the motor controller is connected to RX of the Arduino (pin 5)
• RX of the motor controller is connected to the TX of the Arduino (pin 1)
• The rest of the motor controller is connected to the Arduino (pin 2)
• GND of the motor controller is connected to the GND of the Arduino
• Vcc of the compass is connected to 3.3 V of the Arduino
• SDA is connected to the analog pin(4) of the Arduino
• SCL is connected to the analog Pin(5) of the Arduino
• GND of the compass is connected to the GND of the Arduino
• Two resistors (10 kΩ) are supposed to be connected between VCC to SDA and SCL

Figure (11) explains the wiring of the integrated circuit. Figure (11) Motor controller, Robot, GPS module, Compass and Arduino wiring connection.

The robot successfully navigated from one waypoint to another one and stopped there with a positions accuracy of 5 meters.

• The experiment should be conducted in an open area (no building or trees) for ensuring good reception and good results.
• Because the robot has four good quality motors, a proper motor controller, and a battery, the robot moved on flat ground as well as grass with good performance.
• Some speed calibration tests should be done several times to improve the robot’s movement towards the next waypoint.

## Robot navigation with obstacles avoidance experiment

### Aim

This experiment depends on all results from experiments 1, 2, 3, 4, and 5, an integration of all of them in one experiment. In this experiment, the robot moves from a point within a range of known heading angles going to another known waypoint, and stops there. It avoids any obstacles in between by using a range sensor (Sharp sensor), GPS module (EM 406), motor controller (Pololu Qik 2s12v10), and magnetic compass (HMC6343).

### Design

The Arduino, range sensor (Sharp sensor), GPS (EM 406), motor controller (Pololu Qik 2s12v10), and magnetic compass are connected as follows:

Get your customised and 100% plagiarism-free paper on any subject done for only \$16.00 \$11/page
• 9 V DC battery wires connect to the Supply Pin of the Arduino microcontroller.
• 12 V DC battery wires connect to the Supply pin of the motor controller.
• TX of the motor controller is connected to RX of the Arduino (pin 5)
• RX of the motor controller is connected to the TX of the Arduino (pin 1)
• The rest of the motor controller is connected to the Arduino (pin 2)
• GND of the motor controller is connected to the GND of the Arduino
• Vcc of the compass connects to 3.3 V of the Arduino
• SDA connects to the analog pin(4) of the Arduino
• SCL connects to the analog Pin(5) of the Arduino
• GND of the compass connects to the GND of the Arduino
• Two resistors (10 kΩ) are connected between VCC to SDA and SCL
• Vcc of the sensor connects to 5 V of the Arduino.
• The analog Pin of the range sensor is connected to the Analog Pin (1) of the Arduino.
• The GND pin of the sensor is connected to the GND of the Arduino.

Figure (13) shows all the connections of the experiment. Figure (13) Motor controller, Robot, GPS module, Compass, range sensor and Arduino wiring connection.

For this experiment the PCB is designed for the final prototype by using a two layer CAD Software (Diptrace) (the Schematic diagram in Appendix).

Figure (14) shows the complete Autonomous robot with a first prototype circuit

Figure (15) shows a complete Autonomous robot with the final prototype circuit PCB layout

There are four small holes in the four corners for connecting the PCB to the robot platform, one big hole in the middle connects the battery and motor wires to the motor controller and finally one hole for the ON/OFF switch. Figure (16) shows the PCB fitted on the robot and all the components are connected.

Figure (17) is a flowchart illustrating the programming code loaded to the Arduino microcontroller
{"ft_lang_label":"__label__en","ft_lang_prob":0.89491343,"math_prob":0.6432188,"size":12353,"snap":"2022-40-2023-06","text_gpt3_token_len":2733,"char_repetition_ratio":0.2159689,"word_repetition_ratio":0.27272728,"special_character_ratio":0.22221322,"punctuation_ratio":0.06302336,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9510547,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-07T05:33:37Z\",\"WARC-Record-ID\":\"<urn:uuid:b9cca64c-1278-4eeb-80c0-248cff719b8b>\",\"Content-Length\":\"153198\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b36bcfff-e358-48a8-a4fa-e19de6be8055>\",\"WARC-Concurrent-To\":\"<urn:uuid:aab51c4b-f79c-4712-a1f0-6f12c0948666>\",\"WARC-IP-Address\":\"172.67.189.204\",\"WARC-Target-URI\":\"https://edufixers.com/msc-autonomous-robot-and-gps-module-experiment/\",\"WARC-Payload-Digest\":\"sha1:BZH2EVB3PJJM2LNEYOU57MNSP7LNZUG4\",\"WARC-Block-Digest\":\"sha1:OZE6JUTHPYMEOSCE75MNLHMPA5I2V43V\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500384.17_warc_CC-MAIN-20230207035749-20230207065749-00549.warc.gz\"}"}