Introduction
This portion of the report seeks to describe the investigation and trials of the hardware and software components implemented during the project. The subsections of the segment are structured chronologically.
Single Robot Wavefront Run Framework
The subsequent segments outline the procedures taken in the lead-up to the single robot run based on a wavefront algorithm. It encompasses a range of the mechanism’s navigation capacities in addition to monitoring the effectiveness of sensors that are connected to the robot.
Initiating and Examining Serial Communication
Introduction
The first stage of the project is to determine the capability of the PC to establish communication with the microcontroller placed on each robot. The transmission channel is vital to the success of the project since it is the essential mechanism of uploading code via the robot’s microcontroller during the duration of the experiment.
Objective
The primary objective was to establish a dedicated channel which the researchers can use to deliver command prompts to microcontrollers. The Arduino IDE software is downloaded and installed on the computer to accomplish this. Besides, it is necessary to install eligible drivers on the PC for the COM port to ensure better communication with the microcontrollers.
Downloading the Software
The guide is based on using the latest version of the Arduino IDE software version 1.8.5 which is currently. available for download.
- To install the latest version of the software and accompanying drivers, visit the website.
- Click the option to install on Windows and, when prompted, click the download option for the browser of choice. The installer program should begin to download shortly.
- Once fully downloaded, find the Arduino file that should have a.exe designation and open it, giving the system permission to open the file if prompted.
- A licensing agreement will appear, prompting the user to click “I agree” and after a list of installation components appears, click “Next.”
- The system will then ask to select a destination folder for the installation of the software. One should install it on the main disk drive for easy access, and once selected, the software will begin the installation process.
- Prompts may pop up asking the user to install various components of the software. One should click “install” each time to continue the procedure.
- Eventually, the installation will be finished, with a message window saying “Completed” appearing which can now be closed.
Checking for and Installing Additional Drivers
After installing the updated version of the Arduino IDE software, it is necessary to install critical drivers that will be needed to establish communication between the PC and robots using a serial cable.
- Open the Arduino IDE software after installation.
- The robot should be connected to the PC using a serial to USB cable.
- After connection, navigate the Arduino IDE software: Tools – Board – Selecting Arduino/Genuino UNO. Then, Tools – Port – looking for the option COMX (Arduino/Genuino UNO) with X representing a number which indicates drivers are ready. If not, follow the following steps.
- Manually install drivers by opening the device manager in the Windows menu.
- Expand the ‘other devices’ tab and right-clicking on ‘unknown devices’ and selecting “Update Driver Software.”
- Select the option to browse the computer for driver software.
- In the windows explorer which is prompted, open the folder where the Arduino software is installed which should be somewhere in the C:Program Files (x86)Arduino.
- Opening the Arduino folder, click on the folder with drivers and select ok. Afterward, click Next in the ‘Update Driver Software’ which will trigger the installation of the drivers. Click ‘install’ when prompted during the process.
- After installation, a successfully installed promptly should appear and all windows should be closed.
The software and drivers should be tested by establishing a viable communication channel between the PC and the test robots. Basic scripts are available via the Elegoo Uno robot kit which can be downloaded and selecting the Elegoo Smart Robot Car V2.0. The simple scripts can be uploaded to test the connection.
- After downloading the scripts, open the Lesson 1 folder and select the AUTO_GO file to open inside the Arduino IDE software.
- Once the file code is displayed in the application, connect the robot using the serial cable. Ensure that the Tools settings outlined in the previous phase are selected.
- Click upload to send the scripts while ensuring the Bluetooth module on the RX and TX pins of the robot’s board are disconnected during any script upload process from PC to the board.
- Once the upload is complete, disconnect the robot and activate it, after which it should begin a movement loop, demonstrating an effective communication link.
Conclusions
The exercise demonstrated the establishment and testing of the communication channel between the PC and the microcontroller on the robot through a serial cable. The link serves as the primary method of producing and uploading scripts to the robot during the project.
Exercise II
Introduction
This exercise is meant to study and analyze the robot’s mobility to ensure it is accurate and moves in the intended directions. Furthermore, various degree turns will be tested to maneuver through a maze.
Objective
The basic outcomes of this exercise are to test the ability of the robot to move two lengths in a forward direction, make a 180 degree turn to the right, move forward again for two lengths, and make a 180 degree turn to the left. These fundamental mobility abilities were selected as they mimic the layout of a maze that the robot should be able to complete. The maze will require all three types of movement in different variations. The exercise is separated into phases, with each one dedicated to moving forward, 90-degree clockwise rotation, 90-degree anti-clockwise rotation, and a complex combination of these outlined directions.
Forward Direction
A simple navigation script was programmed to complete the one length forward movement for this exercise. Values for the individual motors were established in the range of 0 to 255, with 255 being the maximized speed of motor rotation. Both, the left and the right motors were programmed to the identical value as a manner of control and the script was uploaded to the robot’s microcontroller.
To test the ability to travel in a straight line, pieces of tape were glued to the floor in measured intervals creating a mimicked corridor to travel through. Both robots experienced a failure during trials, severely veering to one side and hitting the tape “barrier,” thus demonstrating issues in traveling in a straight line. To mitigate this issue, the motor values were varied and experimented with until there was an acceptable level of deviation in error which allowed for practical travel of the mechanism in a straight line.
90 Degree Turns
Two additional navigation scripts were developed, one for the left and right degrees of rotation. The scripts are meant to test the capabilities of the robot to rotate 90 degrees in both directions consistently. Once again, tape measurements were used to track the margin of error for the movements. The tape was positioned in a cross on the floor with the robot placed in the center facing north. Therefore, when the script was running, the robot would endeavor a 90-degree turn which would be tracked by the tape. Any deviation from the 90 degrees necessary was mitigated by modifying the time delay which would warrant the robot to rotate in the correct direction to an appropriate angle.
Movement Combination
After the completion of phases 1 and 2, appropriate values were determined which are used in the final combination movement exercise. A complex script is created, using an individual function for each of the three unique movements that the robot completes. The functions would be activated in the necessary order to execute the movement pattern and achieve the objective pattern. For example, the combination would go: forward, left, forward, right, right, forward, forward.
At first, the script trial runs failed since the robot finished in positions considerably deviated from the programmed script, based on its starting place and orientation. The researchers reduced errors by increasing the time delay between movements which directed the robot to come to a complete stop and rest before beginning the next movement.
Conclusions
This exercise achieved a favorable outcome on the objective to test the robot’s movements and capabilities, demonstrating the control values necessary for competent motor speeds and time delays. The data will be valuable in future trials and the project to improve the robot’s movement.
Basic Barrier Identification and Evasion
Introduction
This exercise is meant to test the ultrasonic sensor on each robot to be able to competently detect nearby objects in its programmed path and change its trajectory to avoid a collision.
Objective
The objective is for the robot to move forward in a continuous motion until an object is noticed by the ultrasonic sensor. The robot must halt, complete a 90-degree turn, and continue its path forward until another detectable object which would cause a repeat of the process until it was completely pinned, preventing it from moving.
Detection and Evasion
For this exercise, a script was programmed using the functions and values from previous exercises. An ultrasonic was tested to identify an object below the threshold value in the code. These values were continuously modified through multiple trials until an acceptable distance for the robot to stop the object was determined.
Self-Correcting Direction
Introduction
A common issue that arises due to no encoders in the Elegoo robot kit is the robot begins to look control of its path. Since the code is based on time delay and does not take into account rugged surfaces, traction, or surface style, this exercise seeks to find a solution to the accuracy of movement with the time-delay factor.
Objective
The objective is to use the ultrasonic sensor in a manner that will detect any change of course from the robot and attempt to correct its path. The experiment was being conducted in a closed corridor setting where the purpose is for the robot to avoid collision with the parallel walls.
Hallway Test with a Control Script
The programmed script directed the robot to move forward in short increments until identifying a barrier in front of it. It would then complete a 180-degree turn and slowly continue moving forward again. Ideally, the robot must move in a straight manner without collision with the side walls until it reaches the end of the corridor where it completes the 180-degree turn and comes back. This is a controlled trial since no correction measures are implemented to ensure course correction. Results showed the robot would make the first leg of the trip, but after the U-turn, would quickly derail off the course and hit one of the walls.
Hallway Test with a Self-Correction Script
To mitigate the issue identified in phase 1, an additional script was programmed with a self-correction feature. It was designed so that after each burst of movement, the ultrasonic sensor on the robot would measure the distance to each wall. If the difference in distance was over the programmed threshold value, which indicates that the robot veered off course, it would slightly change its angle of rotation.
It would essentially be making an incomplete turn and correct its path until the distance was within an appropriate range of values again, measuring after each forward movement increment. Multiple trials were run, determining that a greater angle of rotation caused the robot to fail the test. Meanwhile, shorter rotations took the robot several movements to correct its path but allowed it to navigate in a relatively straightforward manner.
Conclusions
It was determined that using the function from phase 2 provides an effective method for the robot to maintain a straight path, which can be later used in the development of a wavefront algorithm.