Maze Exploration with Robot

Multi-Disciplinary Project, Nanyang Technological University, Singapore


Table of Content

In a team of eight, my teammates and I designed and implemented a multi-disciplinary robot system, which succeeded in exploring a maze and finding the fastest path to finish a maze.

The Raspberry PI serves as an communication interface between sub-systems. It hosts the a server program and process request or commands sent by other sub-systems. The android tablet serves as a remote controller for robot. In addition, it can be used as a calibration tool for hardware team. The Arduino board controls with sensors and motors and process sensor readings to be sent to Raspberry PI PC is the brain which process sensor readings and plan path for robot. In addition, the simulator program could be used for testing of algorithms before deploying into the system.

My role was to design, assemble and program a robot with Arduino as its core computational power. This robot was programmed with basic functions such as walking straight, turn left/right, adjust according to the wall, that could be called by external communication like R-Pi. Therefore, I also need to develop the robot to communicate with R-Pi through its serial port.

Phase 1 - Assembly

(It’s harder than you’d imagine)

The robot has two decks to contain power bank, battery, arduino, sensor and R-Pi. The layout of the Arduino robot for both layers is as follows:

Here is the video demonstrating the process of how I solder and shrank the sleeve.

Phase 2 - Robotic Programming

After assembly, the basic functionalities of sensors and motors are developed and designed separately.

Sensors

Given 5 short range GP2Y0A02YK Infrared-Sensors and 2 GP2Y0A21YK long range Infrared-Sensors together with 3 URM-37 Ultrasonic Sensors.

Based on discussions with the algorithm development team and the design of our robot, the team decided that only short range sensors would be required as the updating of the map would only be done within 2 grids of the robot position. As such 3 sensors were mounted on the front of the robot to sense a width of 3 grids as the robot’s movement would be done in a 3 x 3 grid. 2 more sensors were mounted on the left and right side of the robot respectively to aid in the algorithms decision process of path progression.

Motors

The main challenge in motor design is to control the speed of both motors so as to keep them rotating for precisely same distance simultaneously. In our team’s motor design, single wheel encoder (M1A, M2A) were used for such controlling purpose. Since the direction of the motor is managed by driver shield, the second encoder has been removed out of the picture. The only parameter we are concerned about is the speed of the motor. In this session, we will introduce the our PID control to monitor the speed of the motor, calibration and remote calibration(using android tablet to calibrate remotely).

  • PID Contrl: The PID control mechanism was used to control the speed of the motor at real-time. While we are dealing with speed, RPM has been chosen to be the set-point for PID control. The standard PID library from Arduino Official Library were leveraged to develop the PID computation.

  • Remote calibration: Due to the fact that the manual calibration requires the cable connection (serial port) to the Arduino board every time when a change is made, hence such process could be very tedious and will drag down our calibration efficiency. Therefore, the author has devised a mechanism to change the parameter values dynamically so that these parameters could be modified dynamically using the Android tablet.

Phase 3 - Integration

Communication with Raspberry-Pi

The communication with RPi are full-duplex. Arduino will send the sensor readings to RPi and RPi will be also able to send the movement command to Arduino.

Advanced Real-time Calibration

Even though the robot can move forward straight with simple single command after manual calibration, there might exist discrepancies during exploration because there might be minor errors that could not be noticed by human eyes during manual calibration. Therefore, auto-calibration for the motor is required if the robot is desired to move without displacement. There are 3 scenarios where calibration can be carried out: (the initial orientation of the robot is to the right)

 
comments powered by Disqus