Introduction: Unmanned Ground Vehicle Drone and Its Control System
About this project-
It is capable of moving around with the help of my laptop keyboard and the swivel configuration can be controlled with the help of a joystick. In the future, I have plans on putting more work into it to get a decent video streaming configuration, make a more solid structure for the body, add a proper PCB for the electronics, and get a decent power supply unit.
This UGV is still a work in progress. I used breadboards and jumper wires, the advantage is any modifications to the circuitry can be made swiftly. It makes adding and removing the components easy, during prototype testing.
Right now it has some major structural design issues, power supply issues, and the stability of the software is questionable. But it works pretty well and it is fun to use. As mentioned before, I have only use breadboards and jumper wires for the electronics, so no soldering is required. But I will try and keep updating this instructable as I work on this project in the future.
I wanted to make a machine which can help people, protect people from hazards or threats. So I thought of making a drone which can act as a sentinel or like a "protector" to protect people or things from harm.
So the original idea was to make a general purpose UGV, to which various objects or devices can be attached as per according to requirement. I wanted it to be like a platform, which can be used to do different things or serve different purposes like,
1) a machine that could be used as a sentinel in the Army. With some modifications, it can be fitted with tactical equipment or antennas or weapons to go to places which would be too dangerous for humans.
2) or at home, a machine that could be used as a companion when someone has to go from one place to another. The drone could be modified to move autonomously and escort someone who is going alone. It could be fitted with offensive equipment which can be operated by someone sitting at home or far away, to protect someone from harm. A machine that escorts people who live alone or who have to go alone somewhere.
I thought of all the above ideas and I wanted to make such a machine. A sentinel which has the sole purpose of protecting people from threats.
As of now, in its current state, it has many drawbacks and is far from my original idea. But I like to think of it as my first steps towards this idea or goal.
A video of the UGV:
Step 1: Operating the UGV
I use an "Attack-3" Logitech joystick and arrow keys on the keyboard to fully operate the ROV.
I made a simulation of the swivels current position in time using SDL to improve its ease of control using a joystick. On the CUI I print out the events taking place in the program. I have used a basic event-driven architecture.
The application is written in C++.
Link to the joystick: http://support.logitech.com/en_us/product/attack-3...
Image Source: https://secure.logitech.com/assets/17392/17392.png
Step 2: Materials, Tools, Parts, Modules Used-
I have attached a picture of a list of all the metal parts I have used in this project. Whenever I mention a part from this list, I will be using its Identification number (also in the list).
1) Arduino Uno (1 quantity), Arduino Nano (1 quantity)
2) 12-volt batteries (2 quantity)
3) 9-volt batteries (2 quantity)
4) 8.8-volt Lithium-Polymer battery (1 quantity)
5) TowerPro MG995 metal gear servo (4 quantity)
6) TowerPro SG90 Mini servo (1 quantity)
7) 5-volt regulator (1 quantity)
8) Nrf24L01 Long range with PA + LNA (2 quantity)
9) Base Module for Nrf24L01 (2 quantity) (http://yourduino.com/sunshop//index.php?l=product_...)
10) Male to female jumper wires (~40 quantity)
11) Male to female jumper wires (~40 quantity)
12) female to female jumper wires (~40 quantity)
13) 3) Johnson geared 500 RPM DC motor (2 quantity) (http://www.amazon.in/Johnson-Geared-Motor-gear-rob...)
0) wooden pieces 54 cm in length, 6 cm in depth and 2.5 cm in width (2 quantity)
1) Fiberglass sheets
2) Mechanix Metal - 5 (2 quantity) (http://www.amazon.in/Mechanix-3601009-Metal-5/dp/B...)
3) 100x20 Wheels for 6mm shaft (4 quantity) (http://www.robosoftsystems.co.in/roboshop/index.ph...)
4) Dead Axle Dummy Motor 6mm (2 quantity) (https://www.robomart.com/6-mm-dead-axle-dummy-moto...)
5) Geared DC motor Clamp (6 quantity) (http://www.amazon.in/Geared-DC-motor-Clamp-Pcs/dp/...)
6) High torque DC motor clamps (2 quantity) (http://robokits.co.in/motors/dc-geared-motors/clam...)
There is a good chance that I may have missed some Important parts, If you see any unidentified part in the pictures, please feel free to comment and ask me what it is. I have labeled each picture with an "ID", so you can use that to pinpoint a particular pic.
Step 3: Building the Body
I have built the structure like big pieces of LEGO. I have divided the structure into separate smaller parts which can be put together to give the complete structure. The advantage is that I can modify one part without interfering with the other. So if a module has a problem, only that module need be replaced/mended.
The UGVhas 4 major modules. Image A lists out the major parts of the structure.
1) (3) and (4) are responsible for hosting the rear wheels, the steering assembly, and the front wheels.
2) (1) and (2) are responsible for holding (3) and (4) together and maintain structural integrity as a whole, (2) has two 12Volt batteries attached to it with the help of wood glue which forms the main power supply unit for the main motors and a servo (explained in detail in later steps).
3) (1) is responsible for providing additional support to the steering assembly. After building the steering assembly, it was noted that it deformed due to the amount of stress the UGV as a whole was putting on the assembly. Therefore, (1) has a protruding piece of wood in the front as opposed to (2), which is responsible for holding up the steering assembly with two springs and the swivel configuration (described in later steps).
Also, to provide additional structure, the steering assembly was built with a combination of fiberglass and steel parts.
Image A1 gives a closer top view of (4),
1) (A1:1) is responsible for holding the electronics in the UGV. A piece of fiberglass hosting the breadboard, Arduino, and other electronics will be attached to (A1:1). It is made up of a simple L clamp and two pieces of AB-7 attached to it with nuts and bolts.
2) (A1:2) is responsible for holding the rear gear motor.
3) (A1:3) are two pieces of wood attached to the frame with the help of wood glue to enable (1) and (2) to maintain structure and hold all the parts together.
4) (A1:4) is responsible for holding additional electronics which control the main motors of the UGV.
Image A2 gives a closer bottom view of (4).
1) (A2:1) is the main servo for driving the steering assembly. The UGV uses two of these servos to control the steering. these servos are mounted on a piece of hardened cardboard and affixed to the bottom front of (3) and (4) via nails hammered into the frame.
2) (A2:2) is one part of the steering assembly, it is connected to the steering servos as well as to (4). It is also responsible for hosting the front wheels of the UGV.
Images A3 to A6 give a detailed view
1) (A3) is a closeup of (A1:3)
2) (A4) is another view of (4)
3) (A5) is a closeup of (A1:1)
4) (A6) is a closeup of (A2:2) or the steering assembly.
Step 4: Steering
The whole steering assembly is made up of three main parts.
1) the steering configuration itself hosting the front wheels.
2) the servo motors controlling the steering configuration.
3) the springsholding the steering configuration upright.
Image B0 shows the spring support system for the steering assembly. Initially, I built the steering assembly without any fiberglass support. This resulted in an unstable structure. The result was disastrous as during high-speed operation, the steering assembly broke and the metal was deformed. The metal provides the strength, but I had to use fiberglass to provide some structure to the steering assembly. The result was a super-stable structure with some minor anomalies, to remove/prevent further deformation, I attached springs to the moving parts and connected to the immovable parts. This resulted in a much smoother steering as the servos do not have complete control over the hinge and during a collision, the spring prevents the steering to rotate to wide angles and damage the servo.
After adding spring support with the help of (B0:1) I decided that it can hold the swivel configuration too.
Image B1 shows a different view of the configuration. I added all the extra support of fiberglass after initial tests which resulted in the destruction of the assembly, so in order to minimize the risk of metal deforming, with every strip of metal (components A-11, A-7, A-5), I attached the additional vertical metal support to prevent the strip from deformation or bends. So every component is made up of two metal strips, attached at an angle of 90 degrees to each other.
Image (B1:3) is a dummy motor attached to the L clamp for steering wheels.
Image (B1:2) I could not find much better wheels than those, but they are pretty solid and provide decent clearance from the ground.
Image (B2:1) Component A-5 is attached to the servo with the help of two pairs of nuts and bolts. One thing to remember is to add washers to the nuts and bolts to prevent the nuts from getting loose during operation, this also helps in a solid bond.
Image (B2:2) and (B2:3) show the metal strips strengthened with additional support.
Image (B2:4) the hinge of the connection is the most probable point of failure during operation, so I added additional washers and components TW-1 for an additional bond without disrupting the operation of the hinge mechanism.
Image (B5:1), Make sure in advance there is enough room for rotation of the steering, I saw this problem in the end and had to dismantle the whole thing to cut the wood.
Image (B5:3) Make sure to attach solid L-clamps, don't use the flimsy thin L clamps which are much cheaper. I had to drill two holes in the L-clamp and attached it to the wood. Make sure the L-clamps on both the ends are perfectly levelled, unlevelled L-clamps can damage the steering. So, do your measurements before hammering anything to the wood!
Image (B5:2) I put three strips of fiberglass cubes on each side of the L-clamp. This was done to add strength to the steering hinge, without this, the hinge would bend way out of shape and steering would be impossible. You can add more strips to improve the structure, but 6 strips of fiberglass did the job in this case.
The component stack in the configuration in Image (B5) is as follows:
|compionent PY-2 with component T-1 attached to it|
|3x fiberglass layers|
|3x fiberglass layers|
|plastic mount thingy|
|compionent PY-2 with component T-1 attached to it|
Image (B7:1) The component AUB-5 is used to improve the hinge mechanism. It reduces the risk of the nut and bolt assembly coming off.
Image (B7:2), (B7:3), (B7:4), (B7:5), (B7:6) Using stacks of fiberglass sandwiched in between metal or metal sandwiched between layers of fiberglass gave the structure as well as strength to the assembly.
Image (B7:7) make sure to use bolts which are smaller in length to ensure obstruction free rotation.
Image (B7:8), (B7:9) holes in the fiberglass to accommodate the steel rod (SH-2 80mm) and the end component R-8.
Image (B7:10) to prevent deformation of the metal strip during operation, because the meet point of component SQ-25and component A-11 acts as a hinge when weight is applied.
Step 5: The Swivel Configuration
The idea was to make a drone which is capable of monitoring its environment. To make this possible, I added a swivel configuration to which a live video streaming camera may be attached. The swivel acts like a head which can monitor its environment without changing the position of the UGV. so standing in one place, the UGVcan look at its left, right, up or down.
The construction of the swivel is as follows:
1) rotation in the Y axis: the camera mounted can look left or right. The swivel is mounted on the drone with the help of a steel rod (component SH-4 127mm). the steel rod goes through the piece of wood the swivel is mounted on to provide maximum structure and stability in operation. the swivel is held in place as shown in the attached images.
2) rotation in the X axis: the camera mounted can look up or down. Now the swivel was intended to use with a camera only, so I attached the component SQ-25 or the camera mount directly to the servo.
Step 6: Motor Speed Control, Going Forward and Reverse
To control the speed of the motor I am using a TIP122 Darlington transistor and using the PWM from the Arduino to vary the speed of the motor.
To control the direction of spin of the motor, I have made a simple configuration with the help of a servo. If I want the motor to spin in a particular direction, I simply send a signal to rotate the servo and reverse the polarity to change the direction. I tried to use an H-Bridge but it was not outputting enough power to drive the motors, I was too lazy to analyze the circuit so I built this configuration instead.
The batteries are connected in parallel and provide 12 volts DC to each motor.
This is a great instructable on using TIP120: https://www.instructables.com/id/Use-Arduino-with-T...
Step 7: Electronics: Receiver Side
I used only one Arduino, I kept the other one in case I needed to test individual components. I used a breadboard because I had to change the circuitry several times. Since this UGV is a prototype, the breadboard provides a flexible platform for quickly adding removing components or devices.
I mounted the antenna to the side, at a high location to keep it somewhat visible at all times.
1) The rear driving motors each get 12 volts from the two massive 12 Volt batteries. I could have used a LiPo, but they were a cheaper option.
2) The servo that changes the direction of the drive motors is powered by the 12 Volt batteries too, but via a 5-volt regulator.
3) The 4 Servos for the steering and the swivel configurations are powered by an 8 Volt Lithium Polymer for smooth operation. Always provide sufficient power to servos, or they will start behaving abnormally. I have dedicated the LiPo to the 4 servos only because adding any more components to the LiPo supply takes a toll on the battery and the servos start behaving abnormally.
4) The Arduino board is powered by a 9 Volt battery.
The power supply for the UGV is good only as a prototype or for testing purposes. In future builds, I plan to install a unified solution for power supply.
Power supply for Nrf24L01 (Long range PA+LNA) Transceivers:
(Using Rf24 Library)
(I used the Base Module for Nrf24L01, it is much simpler way to get good transmission http://yourduino.com/sunshop//index.php?l=product_...)
It is always better to use a separate reliable and regulated power supply for the transceivers for reliable operation. Do not power the antenna off the Arduino supply as it greatly reduces transmission reliability.
To know more about the transceivers, go to this link:https://arduino-info.wikispaces.com/Nrf24L01-2.4GH...
This website provides all the information required for working with the transceivers.
Take a look at the following video too, it has some vital information about using the Nrf24L01:
Sorry, the simulation does not work but it does give a nice view of the circuitry.
1) The blue micro servo is used to represent the polarity switcher configuration.
2) I could not find the Nrf24L01 so I just wired color coded jumpers to a PIHD-1x8 , complete info on hooking up the transceiver can be found here: https://arduino-info.wikispaces.com/Nrf24L01-2.4GH...
3) The four big servos are for the swivel and the steering. Pins (7) and (6) are for steering and pins (2) and (3) for swivel control.
4) Pin (5) controls the servo for reversing polarity
5) Pin (8) controls the PWM for speed control of rear motors.
6) Pins (13) to (9) and Pin (2) are connected to the Nrf24L01 module.
Step 8: Electronics: Transmitter Side
The transmitter circuit is relatively simpler. I used an
1) Arduino nano
2) One Nrf24L01 transceiver
3) One 5-volt power regulator (breakout board)
4) A 9-volt battery
I have used breakout boards and jumpers to connect the components together. Since I had to move the circuit from place to place a lot, I built a protective case out of fiberglass and metal components.
The circuit is not very complex, I only connected the Nrf224L01 to an Arduino nano and that was it.
Some Important points on powering the circuit:
1) I used a 9-volt battery and used a 5-volt power regulator to power the Nrf24L01. Keep in mind, Nrf24L01 uses 3.3volts of power for operation, but in my case, i was using a "Base Module" to power the transceiver. (http://yourduino.com/sunshop//index.php?l=product_...)
2) Do not power the Nrf24L01 directly from the Arduino, It will result in poor or no transmission.
Step 9: Some Important Points
1) Using C++ and utilizing SDL (Simple Directmedia Layer), I made an application which can provide a
a) real-time simulation of the swivel position in 3D space,
b) Get input from keyboard arrow keys to move the UGV,
c) Get joystick data and move the swivel accordingly,
d) get a speed value from a scroller integrated into the joystick.
2) To make the swivel move smoothly and safely, I had to implement a filter to reduce the effect of spiking in readings from the joystick which may potentially damage the servo. The filter ensures there is no instantaneous change in positioning the swivel servos.
3) The joystick spits out a value in the range of 0 - 32,767, so I had to clamp it down to 0 - 180. This is fed to the servos for operation.
4) in each transmission, I send out an integer Array of 5 elements from the laptop transmitter to the UGV receiver for updating the actuators position in real time.
5) The UGV is still in development and the software is not very reliable. I am not going to post the code yet because it is not ready, but you may ask me any questions in the comments if you face any problems during the build.
If you have built this UGV, and you need help with the software, drop me a mail at the provided email ID!
1) A breadboard is good, but it is not the right solution. I will use a PCB in the next build to improve reliability.
2) I tried to use an H-bridge, but it was not supplying enough powers to the motors to make them move. I am not very familiar with electronics so I made a mechanical device to reverse the polarity.
3) The TIP122 gets very hot under load, so a breadboard is not recommended as it melts right through it! The best option is to use a PCB with a proper heatsink.
1) I would NOT recommend handling fiberglass with bare hands. I did it with bare hands and I got splinters in my hands for days :P
Wear latex gloves which provide both dexterity and protection at the same time.
2) whenever cutting fiberglass, wear a face mask and safety goggles! I learned this the hard way and trust me it is not a nice feeling to inhale fiberglass.
The same goes for cutting wood.
Working with tools-
3) hammering components into wood needs to be done slowly and carefully. Whenever attaching a component, do small taps on the nail with some force and let the nail slowly sink into the wood. Don't get hasty. It can damage the component or the finger or both.
4) I used a battery operated drill to punch holes through wood or fiberglass, for drilling holes through metal, I used a heavy duty drill.
To drill a hole accurately without missing the mark, what I do is before turning the drill ON, I put the drill bit on the mark, apply some pressure to hold the drill steady, brace for vibrations, and then turn ON the drill. This works most of the time.
5) While operating machines of mass destruction like drills or hammers or blades or handsaws, it is a good recommendation to wear gloves to protect those flimsy hands from mass destruction.
6) While operating a screwdriver, make sure when tightening a screw, keep your hands clear from its path. If the screwdriver slips it will cut through your fingers. It happened to me three times and it does not feel good, it's not as bad as stubbing your toe, but it hurts pretty bad...
The same goes for working with knives, Never cut towards yourself when using a hand blade.
If you have any doubts, please feel free to comment. I will keep updating this instructable as frequently as possible.
and this is my email- email@example.com, If you have any doubts (regarding the software or hardware), you can drop me a mail here too.