What sensors are there for robots? Autonomous robot based on Arduino with remote control The best sensors from stavtrak.

To gain experience with the Arduino board, so to speak, as a learning experience and just for fun, this project was created. The goal of the project was to create a car that can move autonomously, avoiding various obstacles and without colliding with them.

Step 1: List of components and project cost

1. Radio controlled toy car.

This thing costs about 20 bucks, if you have the opportunity to spend more, you can use better.

2. Arduino Uno microcontroller - $ 25

3. Motor shield to control electric motors - $ 20

4. GPS for navigation. Adafruit Ultimate GPS Shield - $ 50

5. Magnetometer as a compass for navigation. Adafruit HMC5883 Magnetometer - $ 10

6. Ultrasonic distance sensor to avoid obstacles. HC-SR04 - $ 6

7. LCD display to display vehicle status and information. LCD Display Blue 1602 IIC, I2C TWI - $ 6 (you can use another one)

8. Infrared sensor and remote control.

9. Arduino sketch (C ++ program).

10. Thin wood board as a mounting platform.

11. Prototyping boards. One is long and narrow, and the other is small, in order to separately install the magnetometer on it away from other elements.

12. Jumpers.

13. Kit for mounting an ultrasonic sensor - $ 12

14. Soldering iron and solder.

So, in general, everything took about $ 150, this is on condition that you buy all these components, since you may already have something of this.

Step 2: Chassis and Platform Mounting

The radio control was removed from an unnecessary toy that cost 15 bucks.

The car is here with two engines. With the help of one engine, the remote control controls the speed of the robot, and with the help of the other, the steering is controlled.

A thin board was used as a mounting surface on which breadboards, Arduino, LCD, etc. were attached. The batteries are placed under the board and the wires are routed through the drilled holes.

Step 3: Program

Arduino is controlled via a C ++ program.

Source

RC_Car_Test_2014_07_20_001.ino

Step 4: LCD

During operation, the screen displays the following information:

Row 1:

1. TH - Target, heading to the current waypoint

2. CH - Current direction of the robot

Row 2:

3. Err - Compass direction, shows in which direction the robot is moving (left or right)

4. Dist - Focal distance (in meters) to the current waypoint

Row 3:

5. SNR - Sonar distance, that is, the distance to any objects in front of the robot

6. Spd - Robot speed

Row 4:

7. Mem - Memory (in bytes). Arduino has 2KB in memory

8. WPT n OF x - Shows where the robot is in the waypoint list

Step 5: avoid colliding with objects

The "Ping" ultrasonic sensor was used to make the robot avoid obstacles. It was decided to combine it with the Arduino NewPing library as it is better than the simple PIng library.

The library was taken from here: https://github.com/fmbfla/Arduino/tree/master/NewPing

The sensor was installed on the bumper of the robot.

The infrared sensor is included in the home version of the Lego mindstorms EV3 set. This is the only sensor that can be used both independently and in conjunction with an infrared beacon, which is also part of a home kit. The next two lessons will be devoted to exploring these two devices, as well as their interaction with each other.

8.1. Exploring the infrared sensor and infrared beacon

(Fig. 1) in his work uses light waves that are invisible to humans - infrared waves * ... The same waves are used, for example, by remote control panels for various modern household appliances (TVs, video and music devices). Infrared sensor in mode "Approximation" independently sends infrared waves and, having caught the reflected signal, determines the presence of an obstacle in front of it. The infrared sensor is paired with an infrared beacon in two more modes of operation. (Fig. 2)... In the mode "Remote" The infrared sensor is able to detect the pressing of the buttons of the infrared beacon, which allows you to organize remote control of the robot. In the mode "Lighthouse" The infrared beacon sends constant signals that the infrared sensor can use to determine the approximate direction and distance of the beacon, which allows the robot to be programmed so that it always follows the direction of the infrared beacon. Before using the infrared beacon, two AAA batteries must be installed in it.

Rice. one

Rice. 2

8.2. Infrared sensor. Zoom Mode

This mode of operation of an infrared sensor is similar to that of an ultrasonic sensor. The difference lies in the nature of light waves: if sound waves are reflected from most materials with little or no attenuation, then the reflection of light waves is influenced not only by the materials, but also by the color of the surface. Dark colors, in contrast to light colors, absorb the light flux more strongly, which affects the operation of the infrared sensor. The range of operation of the infrared sensor also differs from the ultrasonic one - the sensor shows values ​​in the range from 0 (subject is very close) to 100 (the object is far away or not found). We emphasize once again: the infrared sensor cannot be used to determine the exact distance to the object, since its readings in the "Zoom" mode are influenced by the color of the surface of the object under study. In turn, this property can be used to distinguish between light and dark objects that are at an equal distance to the robot. The infrared sensor copes with the task of determining the obstacle in front of it quite successfully.

Let's solve a practical problem similar to Problem number 14 Lesson number 7, but, in order not to repeat ourselves, let us complicate the condition with additional requirements.

Problem number 17: write a program of a straight-line robot, stopping in front of a wall or obstacle, moving back a little, turning 90 degrees and continuing to move until the next obstacle.

A robot assembled according to instructions small-robot-31313, an infrared sensor is installed in front of the vehicle. Connect it with a cable to the port "3" EV3 Brick and start creating the program.

Consider the program block "Expectation" Orange palette by switching it to Mode: - "Comparison" - "Approach" (Fig. 3)... In this mode, the program block "Expectation" has two input parameters: "Comparison type" and "Threshold value"... We already know how to configure these parameters.

Rice. 3

Solution:

  1. Start straight ahead
  2. Wait until the threshold value of the infrared sensor is less than 20
  3. Stop moving forward
  4. Drive back 1 engine revolution
  5. Turn right 90 degrees (using the knowledge of Lesson 3, calculate the required angle of rotation of the motors)
  6. Continue steps 1 - 5 in an endless loop.

Try to solve Problem number 17 independently, without peeping into the solution.

Rice. 4

Now, to consolidate the material, try to adapt the solution Problems number 15 Lesson number 7 to use an infrared sensor! Happened? Share your impressions in the comments to the lesson ...

8.3. Remote control of the robot using an infrared beacon

The infrared beacon included in the home version of Lego mindstorms EV3, paired with an infrared sensor, allows remote control of the robot. Let's take a closer look at the lighthouse:

  1. Using the infrared beacon, aim the signal transmitter (Fig. 5 pos. 1) towards the robot. There must be no obstacles between the beacon and the robot! Thanks to the wide viewing angle, the infrared sensor receives signals with confidence, even if the beacon is located behind the robot!
  2. There are 5 gray buttons on the lighthouse body (Fig. 5 pos. 2) which are recognized by the infrared sensor, and transmits the codes of the clicks to the program that controls the robot.
  3. With a dedicated red switch (Fig. 5 pos. 3) you can choose one of four channels for communication between the beacon and the sensor. This was done so that several robots could be controlled in the immediate vicinity.

Rice. five

Problem number 18: write a program for remote control of a robot using an infrared beacon.

We already know that to implement the ability to select executing blocks, you need to use a program block "Switch" Orange palette. Set the operating mode of the unit "Switch" in - "Measurement" - "Remote" (Fig. 6).

Rice. 6

To activate the communication between the infrared sensor and the beacon, it is necessary to set the correct value of the parameter "Channel" (Fig. 7 pos. 1) according to the selected channel on the lighthouse! To each program container of the block "Switch" it is necessary to match one of the possible options for pressing gray keys (Fig. 7 pos. 2)... Note: some options involve pressing two keys at the same time (the keys pressed are marked in red). Total in the program block "Switch" in this mode, you can process up to 12 different conditions (one of the conditions must be selected as the default condition). Software containers are added to the block "Switch" by clicking on "+" (Fig. 7 pos. 3).

Rice. 7

We propose to implement the following robot control algorithm:

  • Pressing the upper left button turns on the left motor rotation, the robot turns to the right (Fig. 7 pos. 2 meaning: 1)
  • Pressing the upper right button turns on the rotation of the right motor, the robot turns to the left (Fig. 7 pos. 2 value: 3)
  • Simultaneous pressing of the upper left and right buttons turns on the simultaneous forward rotation of the left and right motors, the robot moves forward in a straight line (Fig. 7 pos. 2 value: 5)
  • Simultaneous pressing of the lower left and right buttons turns on the simultaneous rotation of the left and right motors backward, the robot moves backward in a straight line (Fig. 7 pos. 2 value: 8)
  • If no beacon button is pressed, the robot stops. (Fig. 7 pos. 2 value: 0).

When developing a remote control algorithm, you should know the following: when one of the combinations of gray buttons is pressed - the infrared beacon continuously sends the corresponding signal, if the buttons are released, the signal is stopped. The only exception is a separate horizontal gray button (Fig. 7 pos 2 value: 9)... This button has two states: "ON" - "OFF"... In the on state, the beacon continues to send a signal even if you release the button (which is indicated by the green LED illuminating), to turn off the signal sending in this mode, press the horizontal gray button again.

Let's start implementing the program:

Our remote control algorithm provides 5 options for behavior, respectively, our program unit "Switch" will consist of five software containers. Let's get down to setting them up.

  1. We will assign the default option to the option when no buttons are pressed. (Fig. 7 pos. 2 value: 0)... Install a program block in the container that turns off the motors "B" and "C".
  2. To the top left button click option container (Fig. 7 pos. 2 meaning: 1) install the program block "Big motor" including motor "B".
  3. To the top right click option container (Fig. 7 pos. 2 value: 3) install the program block "Big motor" including motor "C".
  4. To the container of the option of simultaneously pressing the upper left and right buttons (Fig. 7 pos. 2 value: 5) install the program block "Independent motor control" "B" and "C" forward.
  5. To the container of the option of simultaneously pressing the lower left and right buttons (Fig. 7 pos. 2 value: 8) install the program block "Independent motor control" including rotation of motors "B" and "C" back.
  6. Let's place our customized program block "Switch" inside the program block "Cycle".

Using the proposed scheme, try to create the program yourself, without peeping into the solution!

Rice. eight

Load the resulting program into the robot and run it. Try to control the robot using an infrared beacon. Did you succeed? Do you understand the principle of remote control implementation? Try to implement additional control options. Write your impressions in the comments for this lesson.

* Want to see invisible waves? Turn on the photo mode in your mobile phone and bring the emitting element of the TV remote control to the lens of the mobile phone. Press the buttons on the remote control and observe the glow of infrared waves on the phone screen.

IR Obstacle Sensor for Robot Cars YL-63 (FC-51)
Smart Car Obstacle Avoidance Sensor Module Infrared Tube Module Reflective Photoelectric Sensor

Proximity sensor YL-63 detects objects in the range of distances from almost zero to the set limit without coming into direct contact with them. Different manufacturers assign different names to the same device. Some call the presented sensor the name YL-63, others FC-51. The sensor is intended for use when information about the distance to the object is not required, but only about its presence or absence. The maximum registration distance depends on the setting. The YL-63 sensor has a discrete output. This is an optical sensor that registers the increase in the intensity of the reflected infrared (IR) radiation in the controlled space. The change in the reflected radiation occurs due to moving parts of mechanisms or the movement of surrounding objects. YL-63 can be placed on a moving object to determine the position in the surrounding space. It is used to detect obstacles during the movement of wheeled and tracked automatic vehicles. The sensor can become part of a visual aid for students in the field of control systems and automation.
The device contains a source of infrared radiation and a photodetector. Radiation is reflected from an obstacle and is registered by a photodetector. It transmits a signal to the LM393 comparator, which is configured to operate at a certain level of illumination of the photodetector. The comparator generates a signal at the output of the YL-63 sensor of a low or high logic level.

The optical sensor YL-63 belongs to the diffusion class. The name of the group of sensors arose from the underlying operation of the multi-directional radiation reflection sensor - the diffusion of radiation by the reflecting surface.
The operation of the device is to determine the illumination of the photodetector. Since the YL-63 captures the reflected radiation, there is an error in measuring the distance caused by the different reflectivity of the surfaces of objects made of various materials.

Distance factors for reflections from various materials.

White matte paper 1
Cotton fabric 0,6
Gray PVC 0,57
Wood
lightly colored 0,73
untreated 0,4
Plastic
White 0,7
black 0.22
Black rubber 0,2-0,15
Brushed aluminum 1,2
Polished stainless steel 2,3

Different reflection and absorption of radiation of different materials are used for the operation of the sensing unit of the tachometer. Suppose we have. You want to know the number of revolutions per minute of the motor shaft. YL-63 will help us out. It is enough to glue a piece of white paper onto the flywheel, direct the sensor beam to the flywheel and get the tachometer receiving unit.
To reduce the consequences of various interference, the processing microcontroller accumulates data received from the sensor in a short period of time and averages it. The YL-63 sensor can work in devices without MK.

Parameters

Supply voltage 3.3-5 V
Detection distance to a reflective white matte plane 0.02-0.3 m
Detection angle 35 °
Dimensions 43 x 16 x 7mm

Contacts

Obstacle sensor YL-63 aka FC-51 has a three-pin connector:
VCC - power supply,
GND - common wire,
OUT - exit.

Indicators

There are two indicators on the module board. Glowing green indicates power on. The red LED is on if there is an object in the detection area.

Setting the sensing distance

The configuration of the device is facilitated by the operation of the detection indicator. This allows you to configure the YL-63 aka FC-51 to operate in real conditions. The sensor sensitivity is set using a variable resistor installed on the board. The obstacle is installed at the required distance from the sensor's photodevices. By turning the movable contact of the variable resistor on the YL-63 module board, the sensing distance is set, the red LED is turned on. Then the triggering distance is checked by moving the reflecting object. The setting is repeated at least three times.

Arduino signal processing softwareYL-63

The sensor signal is applied to pin 12 of the Arduino.

Void setup () (
Serial.begin (9600);
pinMode (12, INPUT);
}
void loop () (
Serial.print ("Signaal:");
Serial.println (digitalRead (12));
delay (500);
}

Part of the robot is a board, so there is no need to worry about the robot's wires getting into its wheels. Even a beginner will be able to create such a robot if the proper level of enthusiasm appears. Let's take a closer look at how you can create such a robot.

Materials and tools for manufacturing:
- directly the Arduino platform;
- two motors with gearboxes;
- layout;
- transistor for motor control;
- medium-sized prototype board;
- small plank for the main platform;
- IR sensor (to determine the distance);
- one durable ball;
- wire;
- glue;
- wheels;
- rubber bands;
- collectors;
- ribbon;
- batteries and housing for them.


From the tools you will need a soldering iron, a hacksaw and a screwdriver.

Robot making process:

Step one. Chassis manufacturing
The chassis is installed where the motors will be mounted. And it is attached, the motors will be with glue. Two angle brackets are used to attach the wheels. Superglue is used to attach them, but it would be safer to fix them with bolts and nuts.
The small marble should be wrapped with wires, but the top should be loose. Two wires are soldered to the breadboard.







Step two. How to make wheels for a robot

Any suitable size children's toys are suitable as wheels. If there are none, then the wheels can be made from bottle caps by yourself, for this, holes are drilled in their center. It is important that the wheels are well centered, otherwise the robot will drive crookedly.




Step three. How does the engine work?
In order to control the motors, the H-Bridge Motor Driver 1A chip - SN754410 is well suited. Thanks to this device, you can control two motors at once, which rotate in different directions. More details on how the motors are connected can be found in the diagram. It happens that the chips start to warm up from a heavy load, this problem is solved by installing a radiator.






Step four. Why do you need an IR sensor
An infrared sensor is needed so that the robot can detect obstacles in front of it. As soon as it occurs, the sensor immediately sends a signal. In order for the IR sensor to work at any time of the day and under any conditions, a red LED is installed on the robot. The sensor connects to pin 9 of the Arduino. With the help of other contacts, the robot will be fed.


Step five. Robot brain device
The freeduino platform is used to control the robot; it is nothing more than a clone of the Ardunio platform. In addition, you can use the picaxe training platform or any other microcontroller. First, you need to make a basic breadboard for the Arduino, for this you need to draw a line across the entire breadboard. It should span pins 8 through 13, as well as the first four pins in the bottom row.
Four AA batteries are used as a power supply for the robot; they are soldered to the main board by polarity.
The H-bridge chip has four motor control outputs. With it, you can adjust the speed of rotation of the motors.




Step six. Creating a mockup for a robot
A mock-up is not mandatory when creating such a robot, it is only needed if some experiments and improvements are constantly being carried out with the robot. To create a breadboard, a plastic tube is taken, which is glued to the robot board. On the other side is the cardboard pad on which the Arduino is installed.


Step seven. Powering the robot
The robot works thanks to four AA batteries, thanks to which the Ardunio is powered by a voltage of just over 5V. To make the batteries easier to change, they can be installed in a special holder. This holder can be removed from children's toys, radios and other equipment. The weight of the batteries is of strategic importance here, as it acts as a counterweight to the engines. If used with a lithium polymer type battery, they may not be heavy enough. In this case, the weight on the battery side will need to be added.

In this article, we will look at several robot schemes that implement the following behaviors:
1. Goes around the obstacle when it comes into contact with the "antennae".
2. Avoids obstacles without contact (IR bumper).
3. It rests on the obstacle with its "antennae", drives back, makes a turn, then continues to move.
4. Avoids turning obstacles (IR bumper).
5. Follows the subject, keeping distance (IR bumper).

Before proceeding with the consideration of the circuits, let's briefly analyze the features of the L293 microcircuit.

Fig. 1. L293D pinout

Inside it there are two drivers for controlling electric motors.
The motors are connected to the OUTPUT outputs. We are able to connect two DC motors.
The 8th and 16th pins of the microcircuit are connected to the plus of the power supply. Separate power supply is supported, i.e. The 16th pin (Vss) is for powering the microcircuit itself (5 volts), and the Vs pin (8th pin) can be connected to the power supply for the motors. The maximum voltage of the power section is 36 volts.
I will not separate them and in all circuits I will connect them to a common power source.
Power supply minus or ground (GND) is connected to pins 4, 5, 12, 13. These pins, in addition, provide heat dissipation of the microcircuit, therefore, when soldering to the board, it is advisable to select an enlarged metallized area for these pins.
The microcircuit also has ENABLE1 and ENABLE2 inputs.
To enable the drivers, it is necessary to have a logical unit on these pins, in other words, we connect the 1st and 9th pins to the power supply plus.
There are also INPUT inputs for motor control.

Fig. 2. Correspondence table of logic levels at inputs and outputs.

Above is a table, according to which you can understand that if a logical unit is applied to the INPUT1 input, i.e. connect to the plus of the power supply, and the INPUT2 input to the minus, then the M1 motor will start to rotate in a certain direction. And if you swap the logic levels at these inputs, then the M1 motor will rotate in the other direction.
The same happens with the second part, to which the M2 motor is connected.

It is this feature that is used in the presented schemes of robots.

Scheme No. 1. The robot goes around the obstacle when it comes into contact with the "antennae".

Fig. 3. Scheme No. 1. With mechanical obstacle sensors.

After power is applied, the motors will rotate in a certain direction, moving the robot forward. This is due to the fact that a high level signal is supplied to INPUT1 through resistor R2, as well as to the INPUT4 input. Transistor VT1 is reliably closed, the base is pulled to minus power, current does not flow to the collector.
I will explain on the left side, because both parts are symmetrical.
Logic 0 is set at the INPUT2 input through the R3 resistor. Judging by the table (Fig. 2), the motor rotates in a certain direction. On the right side of the diagram, the same thing happens and the robot drives forward.
The circuit contains keys (SB1, SB2), which are used as SPDT switches. Staples are attached to them with the help of hot glue and obstacle sensors are obtained.

Fig. 4. The antennae sensors are made of paper clips.

When such a sensor hits an obstacle, the key closes and the INPUT2 input turns out to be connected to the positive power supply, i.e. a logical "1" is supplied. At the same moment in time, the transistor also opens, as a result of which the logical unit at the INPUT1 input is replaced by a logical zero. The motor rotates in the opposite direction when the button is pressed. Microswitching occurs with jerks and the motor turns the robot away from the obstacle until the sensor stops touching the obstacle.

As you may have guessed, the switches or the motors themselves need to be positioned crosswise.

Scheme No. 2. The robot avoids obstacles without contact (IR bumper)

An even more interesting behavior can be realized if TSOP receivers are used as sensors to receive infrared signals. It will be a kind of IR bumper.
So now the circuit looks like this.

Fig. 5. Scheme No. 2. With infrared obstacle sensors.

The "IR receiving module" works like this: when an infrared signal arrives at the TSOP receiver, a negative voltage appears at its output, which unlocks the PNP transistor, and the current from the positive power supply goes to the input circuit of the microcircuit. If last time mechanical switches were used, with the so-called tendrils of paper clips, then the new circuit will allow the robot not to crash into an obstacle, but to react to it from a certain distance. It looks like this:

The receiving part is made in this way: two absolutely identical modules (left and right) fastened together (Fig. 8).

TSOP1136 with an operating frequency of 36 kHz were used as receivers. The pin locations are shown in the figure below.

Fig. 6. TSOP1136.

We figured out the receivers, but to detect obstacles, you need to send infrared radiation with a certain frequency into the space in front of the robot. The operating frequency of the receivers is different, in my case it is 36 kHz. Therefore, a pulse generator for this frequency was assembled on the NE555 microcircuit, and infrared emitting diodes were connected to the output.


Fig. 7. Emitter circuit on NE555.

A fragment of a breadboard is fixed to the robot chassis, on which you can install the desired number of IR diodes.
It is advisable to put heat-shrinkable tubes or something similar on the diodes so that they shine forward, and not in different directions.

Fig. 8. IR bumper.

After power is applied, the robot may move backward, this is due to too high sensitivity of TSOP receivers. They pick up echoes even from floors, walls and other surfaces. Therefore, in the circuit of the emitter of the IR signal (Fig. 7), a trimming resistor is used, with the help of it we reduce the brightness of the infrared diodes and achieve the desired sensitivity.

Scheme No. 3. Such a robot drives back from the obstacle, making a turn.

Let's take a look at another interesting circuit.

Fig. 9. Scheme No. 3.

When such a robot rests against an obstacle with one of its antennae, then it drives back, making a small turn, then after a short pause, the robot continues to move. The behavior is shown in the animation below:

This circuit is also fully compatible with the infrared bumper, from the previous circuit.

In the circuit, electrolytic capacitors appeared between the emitter and base resistors of transistors VT1 and VT2. Diodes VD1, VD2 and LEDs HL1, HL2 appeared.
Let's take a look at why these additional components are needed.
So, when the SB1 switch closes, i.e. the first sensor, the current from the positive power supply through the diode VD1 and the current-limiting resistor R1 goes to the base of the transistor. It opens by changing the logic level at the INPUT1 input, and the level at the INPUT2 input also changes.
At this moment, the current also flows to the capacitor C1 and it is charged. The M1 motor abruptly changes the direction of rotation and the robot drives back from the obstacle. In the video, you can see that the second motor also changes direction, but for a shorter period of time. This is due to the fact that when the SB1 sensor is closed, the current from the plus of the power supply also flows to the right side of the circuit, through the HL2 LED. LEDs not only provide a short-term signal of a collision with an obstacle, but also act as a damper for the voltage supplied to the opposite half of the circuit. Simply put, when the SB1 switch is closed, the capacitor C2 is charged less than C1. And when the key (sensor) SB2 is closed, the same thing happens, but vice versa - C2 is charged more (i.e., the voltage on its plates is more). This allows not only to drive away from the obstacle, but also to turn away from it a little. The angle of this unscrewing depends on the capacitance of capacitors C1 and C2. Capacitors with a capacity of 22 μF, in my opinion, are optimal. With a capacitance of 47 μF, the angle of rotation will be greater.
You can also see in the video that after the robot drives back from the obstacle, there is a short pause before it moves forward. This is due to the discharge of the capacitors, i.e. at some point in time, the logic signals at the INPUT inputs are balanced and the driver for a second ceases to understand in which direction to rotate the motor. But when C1 and C2 are discharged, the INPUT inputs will return to their original logic levels.
Diodes VD1 and VD2 prevent capacitors from discharging through the LEDs HL1, HL2. The circuit does not work without LEDs.

Scheme No. 4. Previous circuit with IR bumper.

This scheme differs from the previous one in that instead of mechanical sensors, infrared (IR bumper) are used here.

Fig. 10. Scheme No. 4.

Collectors PNP transistors VT1 and VT2 when an obstacle is detected, will send a signal to the input circuit of the microcircuit. Then everything happens in the same way as it was described earlier, only such a robot, when it detects an obstacle in front of it, drives back, makes a turn, then continues to move.
The behavior is shown in the animation below:

The robot will have sharper behavior if you reduce the capacitance of capacitors C1 and C2, for example, to 1 μF (minimum capacitance 0.22 μF).

How do I make the robot follow the object?

In all the schemes presented above, the sensors-sensors or the motors themselves must be located crosswise. And with a direct connection (when the left sensor "commands" the left motor, the right one - the right one), the robot will not avoid the obstacle, but rather follow it. Thanks to the direct connection, it is possible to achieve very interesting behavior of the robot - it will actively pursue the object, maintaining a certain distance. The distance to the object depends on the brightness of the IR diodes on the bumper (adjust).

Some more photos:

The chassis uses metal parts from the designer. The breadboard swings out for easy battery replacement.

The robot is powered by 4 AA batteries.

The options for manufacturing the body and chassis for the robot are limited only by your imagination, especially since there are many ready-made solutions on sale. In my case, the circuit will be transferred to the board, since a bunch of wires is not aesthetically pleasing. Batteries with a recharging circuit will also be installed. And what other improvements can be made or new functions added - you can suggest all this in the comments.

There is a video for this article, which describes in detail the operation of the circuits and demonstrates different options for the behavior of the robot.

List of radioelements

Designation A type Denomination Quantity NoteShopMy notebook
Elements of the scheme No. 1 and No. 2 (except for the IR bumper)
VT1, VT2 Bipolar transistor

2N3904

2 Into notepad
R1, R2, R4, R6 Resistor

10 kΩ

4 Into notepad
R3, R5 Resistor

4.7 k Ohm

2 Into notepad
C1 100 uF1 Into notepad
Elements of the "IR receiving module" on the diagram # 2, # 4
VT1, VT2 Bipolar transistor

2N3906

2 KT361, KT816 Into notepad
R1, R2 Resistor

100 ohm

2 Into notepad
C1, C2 Electrolytic capacitor10-47 uF2 Into notepad
Elements of the "IR signal emitting module" Fig. 7
R1 Resistor

1 kΩ

1 Into notepad
R2 Resistor

1.5 k Ohm

1 Into notepad
R3 Variable resistor20 kΩ1 to adjust the brightness FD1, FD2 Into notepad
C1 Ceramic capacitor0.01 μF1 Into notepad
C2 Ceramic capacitor0.1 uF1 Into notepad
FD1, FD2 IR diode 2 Any