How to make a small robot using a remote control. Small homemade robot. Stages of making a home robot

Who wouldn’t want to have a universal assistant, ready to carry out any assignment: wash the dishes, buy groceries, change a tire on the car, and take children to kindergarten and parents to work? The idea of ​​creating mechanized assistants has occupied engineering minds since ancient times. And Karel Capek even came up with a word for a mechanical servant - a robot that performs duties instead of a person.

Fortunately, in the current digital age, such assistants are sure to become a reality soon. In fact, intelligent mechanisms are already helping a person with household chores: a robot vacuum cleaner will clean up while the owners are at work, a multicooker will help prepare food, no worse than a self-assembled tablecloth, and the playful puppy Aibo will happily bring slippers or a ball. Sophisticated robots are used in manufacturing, medicine and space. They make it possible to partially, or even completely, replace human labor in difficult or dangerous conditions. At the same time, androids try to look like people in appearance, while industrial robots are usually created for economic and technological reasons and external decor is by no means a priority for them.

But it turns out that you can try to make a robot using improvised means. So, you can construct an original mechanism from a telephone handset, a computer mouse, a toothbrush, an old camera or the ubiquitous plastic bottle. By placing several sensors on the platform, you can program such a robot to perform simple operations: adjusting the lighting, sending signals, moving around the room. Of course, this is far from a multifunctional assistant from science fiction films, but such an activity develops ingenuity and creative engineering thinking, and unconditionally arouses admiration among those who consider robotics to be absolutely not a handicraft business.

Cyborg out of the box

One of the easiest solutions to making a robot is to purchase a ready-made robotics kit with step-by-step instructions. This option is also suitable for those who are going to seriously engage in technical creativity, because one package contains all the necessary parts for mechanics: from electronic boards and specialized sensors, to a supply of bolts and stickers. Along with instructions allowing you to create a rather complex mechanism. Thanks to many accessories, such a robot can serve as an excellent base for creativity.

Basic school knowledge in physics and skills from labor lessons are quite enough to assemble the first robot. A variety of sensors and motors are controlled by control panels, and special programming environments make it possible to create real cyborgs that can execute commands.

For example, a sensor on a mechanical robot can detect the presence or absence of a surface in front of the device, and the program code can indicate in which direction the wheelbase should be turned. Such a robot will never fall off the table! By the way, real robot vacuum cleaners work on a similar principle. In addition to carrying out cleaning according to a given schedule and the ability to return to the base on time to recharge, this intelligent assistant can independently build trajectories for cleaning the room. Because there may be a variety of obstacles on the floor, such as chairs and wires, the robot must constantly scan the path ahead and avoid such obstacles.

In order for a robot created by oneself to be able to carry out various commands, manufacturers provide the possibility of programming it. Having drawn up an algorithm for the robot’s behavior in various conditions, you should create a code for the interaction of sensors with the outside world. This is possible thanks to the presence of a microcomputer, which is the brain center of such a mechanical robot.

Self-made mobile mechanism

Even without specialized, and usually expensive, kits, it is quite possible to make a mechanical manipulator using improvised means. So, having been inspired by the idea of ​​​​creating a robot, you should carefully analyze the stocks of home bins for the presence of unclaimed spare parts that can be used in this creative undertaking. They will use:

  • a motor (for example, from an old toy);
  • wheels from toy cars;
  • construction parts;
  • carton boxes;
  • fountain pen refills;
  • different types of tape;
  • glue;
  • buttons, beads;
  • screws, nuts, paper clips;
  • all kinds of wires;
  • light bulbs;
  • battery (matching the voltage of the motor).

Advice: “A useful skill when creating a robot is the ability to use a soldering iron, because it will help securely fasten the mechanism, especially the electrical components.”

With the help of these publicly available components, you can create a real technical miracle.

So, in order to make your own robot from materials available at home, you should:

  1. prepare the found parts for the mechanism, check their performance;
  2. draw a model of the future robot, taking into account the available equipment;
  3. put together a body for the robot from a construction set or cardboard parts;
  4. glue or solder spare parts responsible for the movement of the mechanism (for example, attach a robot motor to a wheelbase);
  5. provide power to the motor by connecting it with a conductor to the corresponding battery contacts;
  6. complement the themed decor of the device.

Advice: “Beady eyes for a robot, decorative horns-antennae made of wire, legs-springs, diode light bulbs will help to animate even the most boring mechanism. These elements can be attached with glue or tape.”

You can make the mechanism of such a robot in a few hours, after which all that remains is to come up with a name for the robot and present it to admiring spectators. Surely some of them will pick up the innovative idea and be able to make their own mechanical characters.

Famous smart machines

The cute robot Wall-E endears himself to the viewer of the film of the same name, making him empathize with his dramatic adventures, while the Terminator demonstrates the power of a soulless, invincible machine. Star Wars characters - the faithful droids R2D2 and C3PO - accompany you on journeys through a galaxy far, far away, and the romantic Werther even sacrifices himself in a battle with space pirates.

Mechanical robots also exist outside of cinema. Thus, the world admires the skills of the humanoid robot Asimo, who can walk up the stairs, play football, serve drinks and greet politely. The Spirit and Curiosity rovers are equipped with autonomous chemical laboratories, which made it possible to analyze samples of Martian soils. Self-driving robotic cars can move without human intervention, even on complex city streets with high risks of unexpected events.

Perhaps it is from home attempts to create the first intellectual mechanisms that inventions will grow that will change the technical panorama of the future and the life of mankind.

Many of us who have encountered computer technology have dreamed of assembling our own robot. For this device to perform some duties around the house, for example, bring beer. Everyone immediately sets about creating the most complex robot, but often quickly breaks down the results. We never brought our first robot, which was supposed to make a lot of chips, to fruition. Therefore, you need to start simple, gradually complicating your beast. Now we will tell you how you can create a simple robot with your own hands that will independently move around your apartment.

Concept

We set ourselves a simple task, to make a simple robot. Looking ahead, I will say that we, of course, got by not in fifteen minutes, but in a much longer period. But still, this can be done in one evening.

Typically, such crafts take years to complete. People spend several months running around stores in search of the gear they need. But we immediately realized that this was not our path! Therefore, we will use in the design such parts that can be easily found at hand, or uprooted from old equipment. As a last resort, buy for pennies in any radio store or market.

Another idea was to make our craft as cheap as possible. A similar robot costs from 800 to 1500 rubles in radio-electronic stores! Moreover, it is sold in the form of parts, but it still has to be assembled, and it is not a fact that after that it will also work. Manufacturers of such kits often forget to include some parts and that’s it – the robot is lost along with the money! Why do we need such happiness? Our robot should cost no more than 100-150 rubles in parts, including motors and batteries. At the same time, if you pick out the motors from an old children's car, then its price will generally be about 20-30 rubles! You feel the savings, and at the same time you get an excellent friend.

The next part was what our handsome man would do. We decided to make a robot that will search for light sources. If the light source turns, then our car will steer after it. This concept is called “a robot trying to live.” It will be possible to replace his batteries with solar cells and then he will look for light to drive.

Required parts and tools

What do we need to make our child? Since the concept is made from improvised means, we will need a circuit board, or even ordinary thick cardboard. You can use an awl to make holes in the cardboard to attach all the parts. We will use the assembly, because it was at hand, and you won’t find cardboard in my house during the day. This will be the chassis on which we will mount the rest of the robot’s harness, attach motors and sensors. As a driving force, we will use three or five-volt motors that can be pulled out of an old machine. We will make the wheels from caps from plastic bottles, for example from Coca-Cola.

Three-volt phototransistors or photodiodes are used as sensors. They can even be pulled out of an old optomechanical mouse. It contains infrared sensors (in our case they were black). There they are paired, that is, two photocells in one bottle. With a tester, nothing prevents you from finding out which leg is intended for what. Our control element will be domestic 816G transistors. We use three AA batteries soldered together as power sources. Or you can take a battery compartment from an old machine, as we did. Wiring will be required for installation. Twisted pair wires are ideal for these purposes; any self-respecting hacker should have plenty of them in his home. To secure all the parts, it is convenient to use hot-melt adhesive with a hot-melt gun. This wonderful invention melts quickly and sets just as quickly, which allows you to quickly work with it and install simple elements. The thing is ideal for such crafts and I have used it more than once in my articles. We also need a stiff wire; an ordinary paper clip will do just fine.

We mount the circuit

So, we took out all the parts and stacked them on our table. The soldering iron is already smoldering with rosin and you are rubbing your hands, eager to assemble it, well, then let’s get started. We take a piece of assembly and cut it to the size of the future robot. To cut PCB we use metal scissors. We made a square with a side of about 4-5 cm. The main thing is that our tiny circuit, batteries, two motors and fasteners for the front wheel fit on it. So that the board does not become shaggy and is even, you can process it with a file and also remove sharp edges. Our next step will be sealing the sensors. Phototransistors and photodiodes have a plus and a minus, in other words, an anode and a cathode. It is necessary to observe the polarity of their inclusion, which is easy to determine with the simplest tester. If you make a mistake, nothing will burn, but the robot will not move. The sensors are soldered into the corners of the circuit board on one side so that they look to the sides. They should not be soldered completely into the board, but leave about one and a half centimeters of leads so that they can be easily bent in any direction - we will need this later when setting up our robot. These will be our eyes, they should be on one side of our chassis, which in the future will be the front of the robot. It can be immediately noted that we are assembling two control circuits: one for controlling the right and the second left engines.

A little further from the front edge of the chassis, next to our sensors, we need to solder in transistors. For the convenience of soldering and assembling the further circuit, we soldered both transistors with their markings “facing” towards the right wheel. You should immediately note the location of the legs of the transistor. If you take the transistor in your hands and turn the metal substrate towards you, and the marking towards the forest (as in a fairy tale), and the legs are directed downwards, then from left to right the legs will be, respectively: base, collector and emitter. If you look at the diagram showing our transistor, the base will be a stick perpendicular to the thick segment in the circle, the emitter will be a stick with an arrow, the collector will be the same stick, only without the arrow. Everything seems clear here. Let's prepare the batteries and proceed to the actual assembly of the electrical circuit. Initially, we simply took three AA batteries and soldered them in series. You can immediately insert them into a special holder for batteries, which, as we have already said, is pulled out of an old children's car. Now we solder the wires to the batteries and determine two key points on our board where all the wires will converge. This will be a plus and a minus. We did it simply - we threaded a twisted pair into the edges of the board, soldered the ends to the transistors and photo sensors, made a twisted loop and soldered the batteries there. Perhaps not the best option, but it is the most convenient. Well, now we prepare the wires and begin assembling the electrics. We will go from the positive pole of the battery to the negative contact, throughout the entire electrical circuit. We take a piece of twisted pair and start walking - we solder the positive contact of both photo sensors to the plus of the batteries, and solder the emitters of the transistors in the same place. We solder the second leg of the photocell with a small piece of wire to the base of the transistor. We solder the remaining, last legs of the transyuk to the engines respectively. The second contact of the motors can be soldered to the battery through a switch.

But like true Jedi, we decided to turn on our robot by soldering and unsoldering the wire, since there was no switch of a suitable size in my bins.

Electrical debugging

That's it, we've assembled the electrical part, now let's start testing the circuit. We turn on our circuit and bring it to the lit table lamp. Take turns, turning first one or the other photocell. And let's see what happens. If our engines begin to rotate in turn at different speeds, depending on the lighting, then everything is in order. If not, then look for jambs in the assembly. Electronics is the science of contacts, which means that if something does not work, then there is no contact somewhere. An important point: the right photo sensor is responsible for the left wheel, and the left one, respectively, for the right one. Now, let’s figure out which way the right and left engines rotate. They should both spin forward. If this does not happen, then you need to change the polarity of turning on the motor, which is spinning in the wrong direction, simply by re-soldering the wires at the motor terminals the other way around. We once again evaluate the location of the motors on the chassis and check the direction of movement in the direction where our sensors are installed. If everything is in order, then we will move on. In any case, this can be fixed, even after everything is finally assembled.

Assembling the device

We've dealt with the tedious electrical part, now let's move on to the mechanics. We will make the wheels from caps from plastic bottles. To make the front wheel, take two covers and glue them together.

We glued it around the perimeter with the hollow part facing inward for greater stability of the wheel. Next, drill a hole in the first and second lids exactly in the center of the lid. For drilling and all sorts of household crafts, it is very convenient to use a Dremel - a sort of small drill with a lot of attachments, milling, cutting and many others. It is very convenient to use for drilling holes smaller than one millimeter, where a conventional drill cannot cope.

After we drill the covers, we insert a pre-bent paper clip into the hole.

We bend the paperclip into the shape of the letter “P”, where the wheel hangs on the top bar of our letter.

Now we fix this paper clip between the photo sensors, in front of our car. The clip is convenient because you can easily adjust the height of the front wheel, and we will deal with this adjustment later.

Let's move on to the driving wheels. We will also make them from lids. Similarly, we drill each wheel strictly in the center. It is best for the drill to be the size of the motor axle, and ideally a fraction of a millimeter smaller so that the axle can be inserted there, but with difficulty. We put both wheels on the motor shaft, and so that they do not jump off, we secure them with hot glue.

It is important to do this not only so that the wheels do not fly off when moving, but also do not rotate at the fastening point.

The most important part is mounting the electric motors. We placed them at the very end of our chassis, on the opposite side of the circuit board from all the other electronics. We must remember that the controlled motor is placed opposite its control photosystem. This is done so that the robot can turn towards the light. On the right is the photosensor, on the left is the engine and vice versa. To begin with, we will intercept the engines with pieces of twisted pair, threaded through the holes in the installation and twisted from above.

We supply power and see where our engines are rotating. The motors will not rotate in a dark room; it is advisable to point them at the lamp. We check that all engines are working. We turn the robot and watch how the motors change their rotation speed depending on the lighting. Let's turn it with the right photo sensor, and the left engine should spin quickly, and the other one, on the contrary, will slow down. Finally, we check the direction of rotation of the wheels so that the robot moves forward. If everything works as we described, then you can carefully secure the sliders with hot glue.

We try to make sure that their wheels are on the same axis. That’s it – we fix the batteries on the top platform of the chassis and move on to setting up and playing with the robot.

Pitfalls and setup

The first pitfall in our craft was unexpected. When we assembled the entire circuit and technical part, all the engines responded perfectly to the light, and everything seemed to be going great. But when we put our robot on the floor, it didn’t work for us. It turned out that the power of the motors was simply not enough. I had to urgently tear apart the children's car in order to get more powerful engines from there. By the way, if you take motors from toys, you definitely can’t go wrong with their power, since they are designed to carry a lot of cars with batteries. Once we had the engines sorted out, we moved on to cosmetic tuning and drive. First we need to collect the beards of wires that are dragging along the floor and secure them to the chassis with hot glue.

If the robot is dragging its belly somewhere, then you can lift the front chassis by bending the fastening wire. The most important thing is photo sensors. It is best to bend them looking to the side at thirty degrees from the main course. Then it will pick up light sources and move towards them. The required bending angle will have to be selected experimentally. That's it, arm yourself with a table lamp, put the robot on the floor, turn it on and start checking and enjoying how your child clearly follows the light source and how cleverly he finds it.

Improvements

There is no limit to perfection and you can add endless functions to our robot. There were even thoughts of installing a controller, but then the cost and complexity of manufacturing would increase significantly, and this is not our method.

The first improvement is to make a robot that would travel along a given trajectory. Everything is simple here, you take a black stripe and print it on the printer, or similarly draw it with a black permanent marker on a sheet of whatman paper. The main thing is that the strip is slightly narrower than the width of the sealed photo sensors. We lower the photocells themselves so that they look at the floor. Next to each of our eyes we install a super-bright LED in series with a resistance of 470 Ohms. We solder the LED itself with resistance directly to the battery. The idea is simple, the light reflects perfectly from a white sheet of paper, hits our sensor and the robot drives straight. As soon as the beam hits the dark strip, almost no light reaches the photocell (black paper absorbs light perfectly), and therefore one motor begins to rotate more slowly. Another motor quickly turns the robot, leveling its course. As a result, the robot rolls along the black stripe, as if on rails. You can draw such a stripe on a white floor and send the robot to the kitchen to get beer from your computer.

The second idea is to complicate the circuit by adding two more transistors and two photosensors and make the robot look for light not only from the front, but also from all sides, and as soon as it finds it, it rushes towards it. Everything will just depend on which side the light source appears from: if in front, it will go forward, and if from behind, it will roll back. Even in this case, to simplify assembly, you can use the LM293D chip, but it costs about a hundred rubles. But with the help of it you can easily configure the differential activation of the direction of rotation of the wheels or, more simply, the direction of movement of the robot: forward and backward.

The last thing you can do is to completely remove the batteries that constantly run out and install a solar battery, which you can now buy at a mobile phone accessories store (or on dialextreme). To prevent the robot from completely losing its functionality in this mode, if it accidentally enters the shade, you can connect a solar battery in parallel - an electrolytic capacitor with a very large capacity (thousands of microfarads). Since our voltage there does not exceed five volts, we can take a capacitor designed for 6.3 volts. With such a capacity and voltage it will be quite miniature. Converters can either be bought or uprooted from old power supplies.
We think you can come up with the rest of the possible variations yourself. If there is something interesting, be sure to write.

conclusions

So we have joined the greatest science, the engine of progress - cybernetics. In the seventies of the last century, it was very popular to design such robots. It should be noted that our creation uses the rudiments of analog computing technology, which died out with the advent of digital technologies. But as I showed in this article, all is not lost. I hope that we will not stop at constructing such a simple robot, but will come up with new and new designs, and you will surprise us with your interesting crafts. Good luck with the build!

Today we will tell you how to make a robot from available materials. The resulting “high-tech android,” although small in size and unlikely to help you with housework, will certainly amuse both children and adults.

Necessary materials

In order to make a robot with your own hands, you do not need knowledge of nuclear physics. This can be done at home from ordinary materials that you always have on hand. So what we need:
  • 2 pieces of wire
  • 1 motor
  • 1 AA battery
  • 3 push pins
  • 2 pieces of foam board or similar material
  • 2-3 heads of old toothbrushes or a few paper clips

1. Attach the battery to the motor

Using a glue gun, attach a piece of foam cardboard to the motor housing. Then we glue the battery to it.

This step may seem confusing. However, to make a robot, you need to make it move. We put a small oblong piece of foam cardboard on the motor axis and secure it with a glue gun. This design will give the motor an imbalance, which will set the entire robot in motion.

At the very end of the destabilizer, drop a couple of drops of glue, or attach some decorative element - this will add individuality to our creation and increase the amplitude of its movements.

3. Legs

Now you need to equip the robot with lower limbs. If you use toothbrush heads for this, glue them to the bottom of the motor. You can use the same foam board as a layer.

The next step is to attach our two pieces of wire to the motor contacts. You can simply screw them on, but it would be even better to solder them, this will make the robot more durable.

5. Battery connection

Using a heat gun, glue the wire to one end of the battery. You can choose any of the two wires and either side of the battery - polarity does not matter in this case. If you're good at soldering, you can also use soldering instead of glue for this step.

6. Eyes

A pair of beads, which we attach with hot glue to one end of the battery, are quite suitable as the robot’s eyes. At this step, you can show your imagination and come up with the appearance of the eyes at your discretion.

7. Launch

Now let's bring our homemade project to life. Take the free end of the wire and attach it to the unoccupied battery terminal using adhesive tape. You should not use hot glue for this step because it will prevent you from disconnecting the motor if necessary.

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. 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 the 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.

Make a robot very simple Let's figure out what it takes to create a robot at home, in order to understand the basics of robotics.

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

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.

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 - 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 dissipation is provided by GND legs - it is better to solder them on a wide contact pad. That's all you need to know about motor 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.


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 number of two 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 this must be specified in the environment settings: Project -> Configure -> "C Compiler" Tab ****** ***********************************************/ #include #include void main(void) ( //Configure the input ports //Through these ports we receive signals from sensors DDRB=0x00; //Turn on the pull-up resistors PORTB=0xFF; //Configure the output ports //Through these ports we control DDRC motors =0xFF; //Main loop of the program. Here we read the values ​​from the sensors //and control the engines while (1) ( //Move forward PORTC.0 = 1; PORTC.1 = 0; PORTC.2 = 1; PORTC.3 = 0; if (!(PINB & (1<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).

Loading...Loading...