Pipe Traversing Robot (School)

by nisala in Circuits > Arduino

169 Views, 0 Favorites, 0 Comments

Pipe Traversing Robot (School)

coolrobot.jpg
FBOBMHVKUIDPYCW.jpeg

(Note: This was done as a hypothetical intructables for our project, which we could not a physical model of due to the COVID lockdown, as such the code is also hypothetical. Please do not actually use it !)

This robot is designed to traverse pipes, both on the x axis and the y axis, automatically. This is done through a combination of an adjustable joint and a fan suction system.

Supplies

Arduino

Breadboard

Jumper Wires

2x Lego axel to Motor adapter

Plastic/Cardboard pieces

Lego Gearbox

2 X Motors

Lego Axels

Lego Gearbox

2 X Lego Wheels

2 X Small Wheels

Ultrasonic Sensor

General Lego Pieces\

AADXL345 Gyroscope/Accelerometer


Gyroscope/Accelerometre

Base

The rover is comprised of two parts. Both have a set of wheels, connected by the lego gearbox, while the front houses the arduino itself and the breadboard, the brain of the rover


The first step is to get the base of the parts. Two identically sized plastic pieces is ideal, but even cardboard will work well. However, one of the pieces needs a hole cut in, for the fan to sit in. Cut out a section based on an outline of your fan, and slot the fan in, suing hot glue at the edges to keep it in.

On the other piece, use hot glue to attach the Arduino and breadboard to the piece, leaving room for the motor, gearbox and axels. Connect the fan to the Arduino. As this will be constantly on, an analogue control is not needed, so connect it to one of the digital ports

Middle Joint

Screenshot 2021-10-09 003609.jpg

One of the major components of the build is the adjustable middle joint. This is controlled by a gear system , similar to the one in the image listed. Place the motor for the adjustable joint at a point that will not interfere with the movement motor, using hot glue. An attachment will be used to connect the traditional motor to the lego parts.

Build the middle joint, using the lego motor and Lego pieces as shows in the photo. The will be placed on the same board as the Arduino. Attach a lego piece from the lego gear to the plastic piece with the fan, using hot glue to connect it. Connect this to D0, as the precise movements of the join will require specific angle adjustment , requiring analogue input

Movement

The robot will be controlled with 2 front wheels on front Arduino piece. One motor will be used to drive a gear box, which in turn will be used to drive the two wheels. Again, like with the middle joint, a standard motor with an attachment to drive the Lego axels and thus the Lego wheels. Hot gluing the parts to the board, so the wheels are at the front sides of the board..

As when the robot is climbing up, small inputs are needed to be made with the wheels, so analogue control is necessary, use D1.

Attach wheels to the back piece too, though this does need to be connected to any motor.




Ultrasonic Sensor

15569-Ultrasonic_Distance_Sensor_-_HC-SR04-01a.jpg

An ultrasonic sensor used to determine when the robot needs to ascend/descend, by detecting the wall of the pipe. This needs to be hot glued to as close to the very front of the robot as possible, facing straight on as not to accidentally detect the floor.

This will be connected to pins 12 and 13. While the sensor will inevitably output a distance value, this is based on echolocation, taking into account when the sound wave is fired and when it comes back, then calculating the distance from then. Therefore, it does not need an analogue pin.



Gyroscope Sensor

MPU6050 Module.jpg

To differentiate on whether the rover is going up, or down the pipe, and thus decide on what actions to take, a gyroscope has to be used. The gyroscope is able to to obtain angular velocity data , and while that is not immediately useful, it's possible to make that into "pitch". Pitch describes the rotation of an object from its side, or in simpler terms, whether something is looking 'up' and 'down'.

If the robot is looking down (going down the pipe) the pitch would be positive, and likewise, if it was looking up (going up the pipe) the pitch would be negative. After the rover calculates this, all that needs to be done is to dictate the code that is activated

Code

The code provided below operates the rover.

How it works, is the robot will be placed in the pipe, the front placed on the bottom, and the back piece adjusted to the top. When powered on, the fan will be used to suction the robot to the top. It will keep on going until it's 5 cm away from the wall, the vertical ascend or decline.As in the example pipe there's a slope or decline slightly before a change in verticalitity in the pipe, the gyroscope could be used to calculate the pitch and thus decide what to do.

Whether going up or down the pipe, the robot will wiggle itself through, adjusting the middle joint and utilizing the suction to get up through the pipe and back on flat ground.

Depending on the pipe, various factors in the code will need to be adjusted. Will be done in the sections marked with (1) change the degrees that the motors will move to pry itself up the pipe, adjusting these will allow it to climb up different pipes.

(0) adjusts the distance the ultra sonic sensor will be activated, which at default is 25 cm, to compensate for size of the example pipe (30cm diameter).