Sealing seams

DIY robot: a simple step-by-step master class for beginners with photos and videos. Robotics: where to start studying, where to study and what are the prospects Simple homemade robots

Surely, after watching enough movies about robots, you have often wanted to build your own comrade in battle, but you didn’t know where to start. Of course, you won't be able to build a bipedal Terminator, but that's not what we're trying to achieve. Anyone who knows how to hold a soldering iron correctly in their hands can assemble a simple robot and this does not require deep knowledge, although it will not hurt. Amateur robotics is not much different from circuit design, only much more interesting, because it also involves areas such as mechanics and programming. All components are easily available and are not that expensive. So progress does not stand still, and we will use it to our advantage.

Introduction

So. What is a robot? In most cases, this is an automatic device that responds to any environmental actions. Robots can be controlled by humans or perform pre-programmed actions. Typically, the robot is equipped with a variety of sensors (distance, rotation angle, acceleration), video cameras, and manipulators. The electronic part of the robot consists of a microcontroller (MC) - a microcircuit that contains a processor, a clock generator, various peripherals, RAM and permanent memory. There are a huge number of different microcontrollers in the world for different applications, and on their basis you can assemble powerful robots. AVR microcontrollers are widely used for amateur buildings. They are by far the most accessible and on the Internet you can find many examples based on these MKs. To work with microcontrollers, you need to be able to program in assembler or C and have basic knowledge of digital and analog electronics. In our project we will use C. Programming for MK is not much different from programming on a computer, the syntax of the language is the same, most functions are practically no different, and new ones are quite easy to learn and convenient to use.

What do we need

To begin with, our robot will be able to simply avoid obstacles, that is, repeat the normal behavior of most animals in nature. Everything we need to build such a robot can be found in radio stores. Let's decide how our robot will move. I think the most successful are the tracks that are used in tanks; this is the most convenient solution, because the tracks have greater maneuverability than the wheels of a vehicle and are more convenient to control (to turn, it is enough to rotate the tracks in different directions). Therefore, you will need any toy tank whose tracks rotate independently of each other, you can buy one at any toy store at a reasonable price. From this tank you only need a platform with tracks and motors with gearboxes, the rest you can safely unscrew and throw away. We also need a microcontroller, my choice fell on ATmega16 - it has enough ports for connecting sensors and peripherals and in general it is quite convenient. You will also need to purchase some radio components, a soldering iron, and a multimeter.

Making a board with MK



Robot diagram

In our case, the microcontroller will perform the functions of the brain, but we will not start with it, but with powering the robot’s brain. Proper nutrition is the key to health, so we will start with how to properly feed our robot, because this is where novice robot builders usually make mistakes. And in order for our robot to work normally, we need to use a voltage stabilizer. I prefer the L7805 chip - it is designed to produce a stable 5V output voltage, which is what our microcontroller needs. But due to the fact that the voltage drop on this microcircuit is about 2.5V, a minimum of 7.5V must be supplied to it. Together with this stabilizer, electrolytic capacitors are used to smooth out voltage ripples and a diode is necessarily included in the circuit to protect against polarity reversal.
Now we can move on to our microcontroller. The case of the MK is DIP (it’s more convenient to solder) and has forty pins. On board there is an ADC, PWM, USART and much more that we will not use for now. Let's look at a few important nodes. The RESET pin (9th leg of the MK) is pulled up by resistor R1 to the “plus” of the power source - this must be done! Otherwise, your MK may unintentionally reset or, more simply put, glitch. Another desirable measure, but not mandatory, is to connect RESET through the ceramic capacitor C1 to ground. In the diagram you can also see a 1000 uF electrolyte; it saves you from voltage dips when the engines are running, which will also have a beneficial effect on the operation of the microcontroller. Quartz resonator X1 and capacitors C2, C3 should be located as close as possible to pins XTAL1 and XTAL2.
I won’t talk about how to flash MK, since you can read about it on the Internet. We will write the program in C; I chose CodeVisionAVR as the programming environment. This is a fairly user-friendly environment and is useful for beginners because it has a built-in code creation wizard.


My robot board

Motor control

An equally important component in our robot is the motor driver, which makes it easier for us to control it. Never and under no circumstances should motors be connected directly to the MK! In general, powerful loads cannot be controlled directly from the microcontroller, otherwise it will burn out. Use key transistors. For our case, there is a special chip - L293D. In such simple projects, always try to use this particular chip with the “D” index, as it has built-in diodes for overload protection. This microcircuit is very easy to control and is easy to get in radio stores. It is available in two packages: DIP and SOIC. We will use DIP in the package due to the ease of mounting on the board. L293D has separate power supply for motors and logic. Therefore, we will power the microcircuit itself from the stabilizer (VSS input), and the motors directly from the batteries (VS input). L293D can withstand a load of 600 mA per channel, and it has two of these channels, that is, two motors can be connected to one chip. But to be on the safe side, we will combine the channels, and then we will need one micra for each engine. It follows that the L293D will be able to withstand 1.2 A. To achieve this, you need to combine the micra legs, as shown in the diagram. The microcircuit works as follows: when a logical “0” is applied to IN1 and IN2, and a logical one is applied to IN3 and IN4, the motor rotates in one direction, and if the signals are inverted and a logical zero is applied, then the motor will begin to rotate in the other direction. Pins EN1 and EN2 are responsible for turning on each channel. We connect them and connect them to the “plus” of the power supply from the stabilizer. Since the microcircuit heats up during operation, and installing radiators on this type of case is problematic, heat removal is ensured by GND legs - it is better to solder them on a wide contact pad. That's all you need to know about engine drivers for the first time.

Obstacle sensors

So that our robot can navigate and not crash into everything, we will install two infrared sensors on it. The simplest sensor consists of an IR diode that emits in the infrared spectrum and a phototransistor that will receive the signal from the IR diode. The principle is this: when there is no obstacle in front of the sensor, the IR rays do not hit the phototransistor and it does not open. If there is an obstacle in front of the sensor, then the rays are reflected from it and hit the transistor - it opens and current begins to flow. The disadvantage of such sensors is that they can react differently to different surfaces and are not protected from interference - the sensor may accidentally be triggered by extraneous signals from other devices. Modulating the signal can protect you from interference, but we won’t bother with that for now. For starters, that's enough.


The first version of my robot's sensors

Robot firmware

To bring the robot to life, you need to write firmware for it, that is, a program that would take readings from sensors and control the motors. My program is the simplest, it does not contain complex structures and will be understandable to everyone. The next two lines include header files for our microcontroller and commands for generating delays:

#include
#include

The following lines are conditional because the PORTC values ​​depend on how you connected the motor driver to your microcontroller:

PORTC.0 = 1;
PORTC.1 = 0;
PORTC.2 = 1;
PORTC.3 = 0;

The value 0xFF means that the output will be log. “1”, and 0x00 is log. "0".

With the following construction we check whether there is an obstacle in front of the robot and on which side it is:

If (!(PINB & (1< {
...
}

If light from an IR diode hits the phototransistor, then a log is installed on the microcontroller leg. “0” and the robot starts moving backward to move away from the obstacle, then turns around so as not to collide with the obstacle again and then moves forward again. Since we have two sensors, we check for the presence of an obstacle twice – on the right and on the left, and therefore we can find out which side the obstacle is on. The command "delay_ms(1000)" indicates that one second will pass before the next command begins to execute.

Conclusion

I've covered most of the aspects that will help you build your first robot. But robotics doesn't end there. If you assemble this robot, you will have a lot of opportunities to expand it. You can improve the robot's algorithm, such as what to do if the obstacle is not on some side, but right in front of the robot. It also wouldn’t hurt to install an encoder - a simple device that will help you accurately position and know the location of your robot in space. For clarity, it is possible to install a color or monochrome display that can show useful information - battery charge level, distance to obstacles, various debugging information. It wouldn't hurt to improve the sensors - installing TSOPs (these are IR receivers that perceive a signal only of a certain frequency) instead of conventional phototransistors. In addition to infrared sensors, there are ultrasonic sensors, which are more expensive and also have their drawbacks, but have recently been gaining popularity among robot builders. In order for the robot to respond to sound, it would be a good idea to install microphones with an amplifier. But what I think is really interesting is installing the camera and programming machine vision based on it. There is a set of special OpenCV libraries with which you can program facial recognition, movement according to colored beacons and many other interesting things. It all depends only on your imagination and skills.
List of components:
  • ATmega16 in DIP-40 package>
  • L7805 in TO-220 package
  • L293D in DIP-16 housing x2 pcs.
  • resistors with a power of 0.25 W with ratings: 10 kOhm x 1 pc., 220 Ohm x 4 pcs.
  • ceramic capacitors: 0.1 µF, 1 µF, 22 pF
  • electrolytic capacitors: 1000 µF x 16 V, 220 µF x 16 V x 2 pcs.
  • diode 1N4001 or 1N4004
  • 16 MHz quartz resonator
  • IR diodes: any two of them will do.
  • phototransistors, also any, but responding only to the wavelength of infrared rays
Firmware code:
/*****************************************************
Firmware for the robot

MK type: ATmega16
Clock frequency: 16.000000 MHz
If your quartz frequency is different, then you need to specify this in the environment settings:
Project -> Configure -> "C Compiler" Tab
*****************************************************/

#include
#include

Void main(void)
{
//Configure input ports
//Through these ports we receive signals from sensors
DDRB=0x00;
//Turn on pull-up resistors
PORTB=0xFF;

//Configure output ports
//Through these ports we control the motors
DDRC=0xFF;

//Main loop of the program. Here we read the values ​​from the sensors
//and control the engines
while (1)
{
//Let's go forward
PORTC.0 = 1;
PORTC.1 = 0;
PORTC.2 = 1;
PORTC.3 = 0;
if (!(PINB & (1< {
//Go backwards 1 second
PORTC.0 = 0;
PORTC.1 = 1;
PORTC.2 = 0;
PORTC.3 = 1;
delay_ms(1000);
//Wrap it up
PORTC.0 = 1;
PORTC.1 = 0;
PORTC.2 = 0;
PORTC.3 = 1;
delay_ms(1000);
}
if (!(PINB & (1< {
//Go backwards 1 second
PORTC.0 = 0;
PORTC.1 = 1;
PORTC.2 = 0;
PORTC.3 = 1;
delay_ms(1000);
//Wrap it up
PORTC.0 = 0;
PORTC.1 = 1;
PORTC.2 = 1;
PORTC.3 = 0;
delay_ms(1000);
}
};
}

About my robot

At the moment my robot is almost complete.


It is equipped with a wireless camera, a distance sensor (both the camera and this sensor are installed on a rotating tower), an obstacle sensor, an encoder, a signal receiver from the remote control and an RS-232 interface for connecting to a computer. It operates in two modes: autonomous and manual (receives control signals from the remote control), the camera can also be turned on/off remotely or by the robot itself to save battery power. I am writing firmware for apartment security (transferring images to a computer, detecting movements, walking around the premises).

According to your wishes, I am posting a video:

UPD. I re-uploaded the photos and made some minor corrections to the text.

In the age of innovation, robots are no longer outlandish machines. But you will probably be surprised: Is it really possible to make a robot at home?

Undoubtedly, it is quite difficult to create a robot with a complex design, microelements, circuits and programs. And you can’t do without knowledge of physics, mechanics, electronics and programming. However, the simplest robot can be made with your own hands.

Robot– a machine that should automatically perform any actions. But for a homemade robot there is an easier task - to move.

Let's consider 2 simplest options for creating a robot.

1. Let's make a small bug that will vibrate. We will need:

  • motor from a children's car,
  • lithium battery CR2032 (tablet);
  • battery holder,
  • paper clips,
  • insulating tape,
  • soldering iron,
  • Light-emitting diode.


We wrap the LED with electrical tape, leaving its ends free. Using a soldering iron, solder the end of the LED and the back wall of the battery holder. We solder the other LED wire to the motor contacts. We unbend the paper clips, they will be the legs of the bug. Solder the legs to the motor. The legs can be wrapped with electrical tape, so the robot beetle will be more stable. The battery holder wires must be connected to the motor wires. As soon as the lithium battery is installed in the holder, the beetle will begin to vibrate and move. Watch the video on how to create such a simple robot below.

2. Making a robot artist. We will need:

  • plastic or cardboard,
  • motor from a children's car,
  • lithium battery CR2032,
  • 3 markers,
  • electrical tape, foil,
  • glue.

From plastic or cardboard you need to cut out a shape for the future robot - a three-dimensional triangle. A hole is cut in the center into which the motor is inserted. 3 holes are cut from 3 edges into which markers are inserted. A battery is attached to the motor wire using glue with pieces of foil. The motor is inserted into a hole in the robot's body and secured there with glue or tape. The second motor wire is connected to the battery. And the robot artist begins to move!

Building your own robot is the dream of almost every boy. You can remember the craze for robots in the Soviet Union, especially in the 70-80s, and attempts to create cool terminators after the film of the same name, and even entire tournaments where robots fought for championship, destroying each other in the arena. In general, robots have fascinated people since the day the first model was assembled.

And if earlier it took a lot of money, a lot of time and effort to create a robot, now their assembly is a construction kit. You install the parts on the platform, upload the code to the board (ready-made or home-written - depends on your programming skills and what you expect from the robot), and here is a ready-made terminator that will serve you faithfully.

Sounds easy. But this is only in words. In fact, to assemble a robot, and not a radio-controlled toy that can only drive forward and backward, you need many different parts. In this article we will tell you how to assemble a simple robot from inexpensive parts.

Base

The base of any robot is its moving part. The base can be wheeled or tracked, but we recommend the tracked one. Such a base has better maneuverability than a wheeled one, can turn on the spot, and is also more stable on uneven surfaces. Some people, when assembling a robot on a tracked base, buy a toy tank, disassemble it and leave only the base on which the board and other parts are attached. This is a good option, but expensive. It’s easier and cheaper to buy a tracked base. An example of such a base is a plate for Rover. The link to it is below. The advantage of this base is that it has a plastic base attached to it, which allows you to easily attach the Arduino microcontroller board, motor driver, batteries and sensors. This makes it possible to quickly assemble the robot without the need for marking and drilling.

Boards

Arduino is often chosen as the main board. They are easy to install, quite powerful and reliable. But the hardware is not limited to just one board, and for the robot to function, motor drivers, microcircuits, transistors are required - in general, many complex parts.

For your first robot, we recommend the Arduino DV kit, the link to which will be below. This set contains a lot of parts that allow you to create a robot without thinking about what else you need to buy for its normal functioning. The kit includes an Arduino UNO R3 board, a MV-102 development board, relays, tilt, fire, temperature, humidity and water level sensors, a stepper motor, a stepper motor driver, resistors from 220 Ohm to 10 kOhm, LEDs, clock buttons, buzzers, photoresistors, indicators, servo motor, IR receiver, IR remote control, joystick, LED matrix, LCD screen and other parts. The set includes 33 lessons on how to assemble a robot.

By the way, buying such sets is more convenient than ordering individual parts. Firstly, the kit contains everything you need. Secondly, the price is 40% lower than if you bought the parts separately. And thirdly, proven details. You can purchase additional modules and sensors for the Arduino DV kit, making the robot more functional. The best choice for a beginner.

Additional sensors

To prevent your robot from hitting walls and other obstacles, it needs to be equipped with obstacle sensors. There are collision sensors, line sensors, infrared sensors, ultrasonic rangefinders and other sensors. Also, to make the robot smart, you can equip it with motion and lighting sensors, which will allow it to navigate the terrain, driving around not only static but also dynamic objects. We recommend installing at least two obstacle sensors on the front of the robot. It is advisable to install two more sensors in the rear. Remember: the more sensors, the better.

Nutrition

The quality of the power system will determine how long the robot can operate on a single charge. The main part is the power supply. We recommend choosing a power supply with an input and output filter against electromagnetic interference, protection against excess output voltage, current consumption and output short circuit. This will protect the robot even during power surges.

Next, current flows from the power supply to the boards and batteries. In order for the robot to be autonomous, it is necessary to install a battery pack. The blocks can be either compact, for small round batteries, or massive, in which 10 AA batteries are installed . Remember that the larger the battery pack, the greater the weight of the robot. If you are assembling a compact robot, then it is better to choose a unit with 2 batteries.

Also, instead of batteries, you can install a power supply that is protected from moisture and sunlight. The power supply is suitable if you are going to control the robot outdoors.

We found the above parts for assembling the robot in the DV Robot online store. The store also has radio parts, wires, cables, connectors and components. In addition, in the “Mining” section you will find everything you need for mining cryptocurrencies. In the “Bazaar” section you can place an advertisement for free to sell goods and services or find things at a low price. In the “New Items” section you will find many interesting products: for example, 3D printers, carbon and Kevlar, as well as boards and tools.

To create your own robot, you don’t have to graduate or read a ton. Just use the step-by-step instructions that robotics masters offer on their websites. On the Internet you can find a lot of useful information on the development of autonomous robotic systems.

10 Resources for the Aspiring Roboticist

The information on the site allows you to independently create a robot with complex behavior. Here you can find program examples, diagrams, reference materials, ready-made examples, articles and photographs.

There is a separate section on the site dedicated to beginners. The creators of the resource place considerable emphasis on microcontrollers, the development of universal boards for robotics, and soldering of microcircuits. Here you can also find source codes for programs and many articles with practical advice.

The website has a special course “Step by Step”, which describes in detail the process of creating the simplest BEAM robots, as well as automated systems based on AVR microcontrollers.

A site where aspiring robot creators can find all the necessary theoretical and practical information. A large number of useful topical articles are also posted here, news is updated and you can ask questions to experienced roboticists on the forum.

This resource is dedicated to a gradual immersion into the world of robot creation. It all starts with knowledge of Arduino, after which the novice developer is told about AVR microcontrollers and more modern ARM analogues. Detailed descriptions and diagrams explain very clearly how and what to do.

A site about how to make a BEAM robot with your own hands. There is a whole section dedicated to the basics, as well as logic diagrams, examples, etc.

This resource very clearly describes how to create a robot yourself, where to start, what you need to know, where to look for information and the necessary parts. The service also contains a section with a blog, forum and news.

A huge live forum dedicated to the creation of robots. Topics are open here for beginners, interesting projects and ideas are discussed, microcontrollers, ready-made modules, electronics and mechanics are described. And most importantly, you can ask any question about robotics and receive a detailed answer from professionals.

The amateur roboticist’s resource is primarily dedicated to his own project “Homemade Robot”. However, here you can find a lot of useful thematic articles, links to interesting sites, learn about the author’s achievements and discuss various design solutions.

The Arduino hardware platform is the most convenient for developing robotic systems. The information on the site allows you to quickly understand this environment, master the programming language and create several simple projects.

On the shelves of modern stores for children you can find a wide variety of toys. And every child asks his parents to buy him one or another toy “new thing.” What if family budget planning does not include this? To save money, you can try making a new toy yourself. For example, how to make a robot at home, is it possible? Yes, it is quite possible, it is enough to prepare the necessary materials.

Is it possible to assemble a robot yourself?

Nowadays it’s difficult to surprise anyone with a robot toy. The modern technology and computer industry has come a long way. But you may still be surprised by the information on how to make a simple robot at home.

Undoubtedly, it is difficult to understand the operating principle of various microcircuits, electronics, programs and designs. It is difficult to do in this case without basic knowledge in the field of physics, programming and electronics. Even so, every person can assemble a robot on their own.

A robot is an automated machine that is capable of performing various actions. In the case of a homemade robot, it is enough that the car simply moves.

To make assembly easier, you can use available tools: a telephone handset, a plastic bottle or plate, a toothbrush, an old camera or a computer mouse.

Vibrating bug

How to make a small robot? At home, you can make the simplest version of a vibrating bug. You need to stock up on the following materials:

  • a motor from an old children's car;
  • lithium battery CR-2032 series, similar to a tablet;
  • a holder for this very tablet;
  • paper clips;
  • electrical tape;
  • soldering iron;
  • LED.

First you need to wrap the LED with electrical tape, leaving free ends. Using a soldering iron, solder one LED end to the back wall of the battery holder. We solder the remaining tip to the contact of the motor from the machine. The paper clips will serve as legs for the vibrating bug. The wires from the battery holder are connected to the motor wires. The bug will vibrate and move after the holder comes into contact with the battery itself.

Brushbot - children's fun

So, how to make a mini-robot at home? A funny car can be assembled from scrap materials, such as a toothbrush (head), double-sided tape and a vibration motor from an old mobile phone. It is enough to glue the motor to the brush head, and that’s it - the robot is ready.

Power supply will be provided by a coin cell battery. For remote control you will have to come up with something.

Cardboard robot

How to make a robot at home if a child demands it? You can come up with an interesting toy from simple cardboard.

You need to stock up:

  • two cardboard boxes;
  • 20 plastic bottle caps;
  • wire;
  • with tape.

It happens that dad wants to make some kind of wonder for the baby, but nothing sensible comes to mind. Therefore, you can think about how to make a real robot at home.

First you need to use the box as a body for the robot and cut out the bottom of it. Then you need to make 5 holes: under the head, for the arms and legs. In the box intended for the head, you need to make one hole that will help connect it to the body. Wire is used to hold the robot parts together.

After attaching the head, you need to think about how to make a robot arm at home. To do this, a wire is inserted into the side holes, onto which plastic covers are placed. We get movable arms. We do the same with our legs. You can make holes in the lids with an awl.

To ensure the stability of the cardboard robot, careful attention must be paid to the cuts. They give the toy a good appearance. It is difficult to connect all the parts if the cut line is incorrect.

If you decide to glue boxes together, do not overdo it with the amount of glue. It is better to use durable cardboard or paper.

The simplest robot

How to make a light robot at home? It is difficult to create a full-fledged automated machine, but it is still possible to assemble a minimal design. Let's consider a simple mechanism that, for example, can perform certain actions in one zone. You will need the following materials:

    Plastic plate.

    A pair of medium-sized brushes for cleaning shoes.

    Computer fans in the amount of two pieces.

    Connector for 9-V battery and the battery itself.

    Clamp and tie with snap function.

We drill two holes with the same distance in the brush plate. We fasten them. The brushes should be located at the same distance from each other and the middle of the plate. Using nuts, we attach the adjusting mount to the brushes. We install the sliders from the fastenings in the middle location. Computer fans must be used to move the robot. They are connected to a battery and placed in parallel to ensure the rotation of the machine. It will be some kind of vibration motor. Finally, you need to put on the terminals.

In this case, you will not need large financial expenses or any technical or computer experience, because here we describe in detail how to make a robot at home. It is not difficult to get the necessary parts. To improve the motor functions of the design, microcontrollers or additional motors can be used.

Robot, like in advertising

Many people are probably familiar with the browser's commercial, in which the main character is a small robot spinning and drawing shapes on paper with felt-tip pens. How to make a robot at home from this advertisement? Yes, very simple. To create such an automated cute toy, you need to stock up on:

  • three felt-tip pens;
  • thick cardboard or plastic;
  • motor;
  • round battery;
  • foil or electrical tape;
  • glue.

So, we create a form for the robot from plastic or cardboard (more precisely, we cut it out). It is necessary to make a triangular shape with rounded corners. In each corner we make a small hole into which a felt-tip pen can fit. We make one hole near the center of the triangle for the motor. We get 4 holes around the entire perimeter of a triangular shape.

Then insert the markers one by one into the holes made. A battery must be attached to the motor. This can be done using glue and foil or electrical tape. In order for the motor to stay firmly on the robot, it is necessary to fix it with a small amount of glue.

The robot will move only after connecting the second wire to the attached battery.

Lego robot

"Lego" is a series of toys for children, which consists mainly of construction parts that are combined into one element. Parts can be combined, while creating more and more new items for games.

Almost all children from 3 to 10 years old love to assemble such a construction set. In particular, children's interest increases if parts can be assembled into a robot. So, to assemble a moving robot from Lego, you need to prepare the parts, as well as a miniature motor and control unit.

In addition, ready-made kits with parts are now sold that allow you to assemble any robot yourself. The main thing is to master the attached instructions. Eg:

  • prepare the parts as indicated in the instructions;
  • screw the wheels, if any;
  • we assemble fasteners that will serve as support for the motor;
  • insert a battery or even several into a special unit;
  • install the engine;
  • connect it to the motor;
  • We load a special program into the design’s memory that allows you to control the toy.

It would seem that it is quite difficult to assemble a robot, and a person without certain knowledge will not be able to do it at all. But that's not true. Of course, it is difficult to build a full-fledged automated machine, but anyone can do the simplest version. Just read our article on how to make a robot at home.