Maze Solver Robot with Metal Object Detecting Authors: Mohammad Nazmul Hasan Pias 1 , Rashedul Hasan2 , Mehedi Hasan Rayhan3 , H.M. Tariqul Islam Polsah4 , Joyonto Paul5 Department of Electrical and Electronic Engineering Ahsanullah University of Science and Technology Abstract: Maze solver robot is the robot is programmed to solve a maze on its own. It passes the maze through its transverse path and remembers it and do not repeat the path. It is a sensor based robot which follows and measures the distance and avoids the obstacle using ultrasonic sensors. This robot detects the obstacle or wall and passes through the maze and detects metal and with help of a metallic claw picks it up. This report contains the development and techniques regarding building this robot. Introduction: The maze solving theory used here is based on the following. If anyone enters a maze or room, close his eyes, place his right hand on the wall, and start walking while keeping his hand on the wall. He will eventually find his way out of the room or maze. Not the fastest route, but it works! With the help of ultrasonic sensor it senses the obstacle or wall and with right hand rule it follows the maze . This type of robot is otherwise known as micromouse. The individual components of micro mouse system consist of the motor control system, navigation sensor array, and a mapping system for navigating the maze intelligently. Eqiupments: Arduino Mega 2560 DC Gear motor Servo motors Ultrasonic Sensor ( HC-SR04) Lipo Battery Metal detector Chassis LCD Shields Ball Castors Project Description: Design and construction of a micro mouse requires a broad range of engineering skills. This combined with an open design process makes the micro mouse project a very practical and challenging senior design project. Component Descriptions: 1. Ultrasonic sensor Ultrasonic sensors (also known as transceivers when they both send and receive, but more generally called transducers) work on a principle similar to radar or sonar which evaluates attributes of a target by interpreting the echoes from radio or sound waves respectively. Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object. Systems typically use a transducer which generates sound waves in the ultrasonic range, above 18,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves into electrical energy which can be measured and displayed. (model HC-SR04) . 2.Lipo Battery RC LiPo batteries have three main things going for them that make them the perfect battery choice for RC Robots , RC Planes and even more so for RC helicopters over conventional rechargeable battery types such as NiCad, or NiMH. RC LiPo batteries are light weight and can be made in almost any shape and size. RC LiPo batteries have large capacities, meaning they hold lots of power in a small package. RC LiPo batteries have high discharge rates to power the most demanding electric motors. In short, LiPo’s provide high energy storage to weight ratios in an endless variety of shapes and sizes. 3.DC Reduction Gear Motors 12mm gear motor with bracket The DC Gearmotor, consisting of a DC electric motor and a gearbox, is at the heart of several electrical and electronic applications. Precision Microdrives have been designing and developing such high quality mini DC gearmotors in an easy-to-mount package for a range of products and equipment. Our miniature gear motor work smoothly and efficiently, supporting these electrical and electronic applications. These geared motors have reduction gear trains capable of providing high torque at relatively low shaft speed or revolutions per minute (RPM). Precision Microdrives DC geared motors reduce the complexity and cost of designing and constructing applications such as industrial equipment, actuators, medical tools, and robotics. 4.Metal Detector Metal detector works on this principle : whenever metal comes within the detection pattern, electromagnetic field lines penetrate the metal’s surface. Tiny circulating currents called “eddy currents” are caused to flow on the metal surface as illustrated in the figure on the facing page. The power or motivating force that causes eddy currents to flow comes from the electromagnetic field itself. Resulting power loss by this field (the power used up in generating the eddy currents) is sensed by the detector’s circuits. Also, eddy currents generate a secondary electromagnetic field that, in some cases, flows out into the surrounding medium. The portion of the secondary field that intersects the receiver winding, causes a detection signal to occur in that winding. Thus, the detector alerts the operator that metal has been detected. As transmitter current from the antenna generates the electromagnetic field, detection patter (dotted lines) is the area within which Metal detection occurs. Mirror-image pattern atop coil is not used. 5.Motor Drive System: The motor drive system consists of two DC motors with built in shaft encoders that are powered by two monolithic H-bridge IC’s. The IC’s contains all of the free-wheel diodes and power transistors necessary for driving the motors. Also, the input to the IC’s is CMOS and TTL compatible. These properties allow us to minimize the size of the circuitry necessary to power the mouse. In this experiment we have used motor driver IC L293D for creating the H Bridge. H bridge is responsible for the dynamic movement of this robot . An H bridge is an electronic circuit that enables a voltage to be applied across a load in either direction. These circuits are often used in robotics and other applications to allow DC motors to run forwards and backwards. Most DC-to-AC converters (power inverters), most AC/AC converters, the DC-to-DC push– pull converter, most motor controllers, and many other kinds of power electronics use H bridges. In particular, a bipolar stepper motor is almost invariably driven by a motor controller containing Two H Bridges. Here H bridge is controlled by an L293D IC. 6. Microcontroller: In this project we have used arduino based microcontroller. Precisely we have used Arduino Mega 2560. The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. Microcontroller Operating Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins Analog Input Pins DC Current per I/O Pin DC Current for 3.3V Pin Flash Memory SRAM EEPROM Clock Speed ATmega2560 5V 7-12V 6-20V 54 (of which 15 provide PWM output) 16 40 mA 50 mA 256 KB of which 8 KB used by bootloader 8 KB 4 KB 16 MHz 7. Chassis: The final prototype chassis was made out of aluminum. This allowed the chassis to be strong and rigid but also lightweight. 8.Maze: The final maze design involved creating a maze that was transportable as well as one that would last, thus providing a solid testing and competition platform for future micromouse projects. Here the maze is made of corksheets. The walls are also made of corksheets. So it is easily transportable and can be molded to any suitable maze of the required for the robot. Working Procedure: The robot is sensor based. It senses the wall distances through pinging the ultrasonic sensor. The sensors are used as eyes for the robot. .Robot starts by checking its sonars. If it detects a wall on its side sonar, it moves taking the data from the sensors and move according to it. If so, the robot will adjust its wheel movement to move in a straight line maintaining parallel readings from the wall. If either the front or side sonar detects a wall that is too close, then the robot turns off its left wheel so that it veers to the left or right motor to move right according to the maze. Otherwise, the robot will move in a wide circle to the right with the hopes that an object will come into view of at least one of the sonars. The robot moves forward maintaining three sensor reading instantaneously. A metal detector is set to detect metal while running through the whole maze . If the metal detector detects any metal , it’ll stop . Sonar DC Gear motor Arduino Mega2560 Metal Detector Power Supply Block diagram of project Troubleshooting : Designing this robot was a challenge and difficult as the weight must be limited lower . To lower the weight a alluminium made chassis is used . Both metallic and plastic cluster ball is used but these cluster balls got stuck after running few trials . Machine oil is used to get rid from this problem while the ball got stuck . The motor speed wasn’t synchronous hence 12V DC Gear motor of same configuration is used . There were some possibilities of flowing higher current hence DC fuse of various rating is used . Hand drill was used to drill custom hole . To adjust gear motor with chassis custom made clump is used . This project can be done using any microcontroller but Arduino mega2560 is used here due to availability. Custom made vero board is used to connect ultrasonic sensor. Code : // Custom made library is used to optimization of code. #include<driver.h> #include<dist.h> #include<metal.h> void setup() { driver.start(); dist.start(); } void loop() { dist(); metal(); if( f_val>10.00 && r_val>4.00) forward(); else if( f_val>10.00 && r_val<4.00 ) right(); else if( f_val<10.00) turnright(); else if( f-val<10.00 && l_val>30.00) turnleft(); else terminate(); } Discussions : As a beginning level and group task several optimization has been done in this project . We all want to pay our cordial gratitude to Mr. Hasib Farid , Assistant Professor , Department of Electrical and Electronic Engineering . Application : This robot can be used as learning system of basic robotics . Maze solving algorithm experiment and coding practice of programmer can be done by this robot . Future Development : To make fully autonomous and to increase highly efficient metal searching ability . Developing of these regard needs continuous research of every possible problem and its solution .