Auto-avoiding Robot With Different Ways of Control

by Valerii Ermoshkin in Circuits > Electronics

8 Views, 0 Favorites, 0 Comments

Auto-avoiding Robot With Different Ways of Control

self-driving-delivery-robot-riding-motorbike-delivering-food-expressly-vector.jpg

This is pretty hard and time-consuming project. But it worth the time spent on it! General idea is to make a robot that can detect objects right in front of it. Besides, a user themself can control this robot by 2 different methods. First one is with the help of remote control and second one is using sources of light (it can be ordinary flashlight). This thing also can be chagred by both charger and solar panels, which you can remove if you don't need them. Besides, you don't need any microcontroler here. Sounds interesting, right? Let's start creating.

Supplies

We have a big list of components:

Resistors (different values)

Variable resistors (470 kOhm and 1 kOhm)

Capacitors (different values)

Diodes

Battery from an old phone

Solar panels

IR receiver (TSOP1736)

Two-slot terminal blocks

Bipolar NPN transistors (KT972A)

Bipolar PNP transistors (KT973A)

Voltage drop detector (KР1171СП28)

2I-NOT logic chips (74HC00N)

Logic inverters (74HC14DN)

Switches

Phototransistors (BPW85B)

Red and green LEDs

IR LED

Motors

Single-core mounting wires

Circuit

Schematic_Robot-1_2025-07-10.png

The circuit is pretty hard, but I'll try to explain everything.

The circuit can be divided into 7 main blocks: power supply, sensor signal, direction change, PWM modulation for motors, motor drivers, infrared LED signal and a tactile sensor. Let's start with power supply. It is provided by a solar panel and a battery. Using a switch, you can connect the battery to the charger. A microcircuit that checks the voltage is also installed here. As soon as the voltage drops to 3V or lower, the microcircuit output will have zero potential, which is why current will start flowing through the LED. Thus, when the battery is almost discharged, the user will see this thanks to the LED. Here, the pluses of the microcircuits are directly connected to the power supply circuit.

Then the current goes to the input of the infrared sensor. It is protected by diode D6 and capacitor C6 from interference caused by the inductive load of the motors. Positive voltage charges capacitor C7. In the absence of an infrared signal, the sensor at its output gives a positive voltage, which does not pass through diode D29. When the infrared signal gets to the sensor, zero potential is formed at its output. Because of this, the capacitor C7 is discharged and a low logical level is sent to the 2AND-NOT logic chip (V1). Then a high logical level is formed at its output, which powers the LED connected to it, which shows that the sensor has been triggered. Then the current from the V1 chip goes to the inputs of the V4 and V5 chips. Thanks to the circuit on the V2 and V3 chips, the logical level at the outputs of the V4 and V5 chips will always be the opposite when the sensor is triggered. This is achieved by the fact that while the capacitor connected to V2 or V3 is charging, it will pass a high logical level to another chip, due to which the signals at their terminals are opposite. After charging the capacitor, the high logical level is already on another chip, and it charges the capacitor, passing the current to the first chip, and so on. Thus, the outputs of the V2 and V3 chips always have the opposite signal. Then the V4 and V5 chips will have opposite signals. PWM modulation on the V6 and V7 chips is achieved by connecting them via a capacitor. Initially, the V6 chip inputs have a high and low logical level, which means the output will be high. Then the V7 chip inputs will have a high level, and the output will be low. This means there is zero potential there. The current from the V6 chip output will flow to the V7 output until the capacitor is charged. When it is charged, the input of the capacitor connected to the V6 input will have a positive potential. This means that both V6 inputs will have a high logical level, and the output will be low. Then the V7 input will also have a low level, and the output will be high. It will charge the capacitor from the other side. When it is charged, a negative potential will form on its opposite side, which will cause the V6 input to have a low logical level again, and the circuit will start to operate again. Thus, the output of the V7 chip will alternately change high and low logical levels. PWM modulation on the V8 and V9 chips works in a similar way.

When the output of the V4 chip is low logical level, the input of V6, connected to the output of V4, will constantly have a low logical level, due to which its output will always be high. Consequently, the output of V7 will always have a low logical level. Then this will interrupt the operation of the PWM modulation, and a low signal will be sent to J5, which will cause the motor to rotate in the opposite direction, due to the operation of the driver (the driver operation is described below). The connection of the V5 chip with the PWM circuit on V8 and V9 works in a similar way.

Below are two equivalent driver circuits for the U5 and U6 motors. Let's consider the operation of one of the drivers. The driver circuit consists of 2 NPN transistors, 2 PNP transistors, 4 diodes that protect against the influence of the inductive current of the motor, and the motor itself. The current flowing to the base of transistor Q2 is opposite to the current flowing to the base of transistor Q5, thanks to the inverter microcircuit. Then, when the base current of transistor Q2 is negative, the current flows through transistor Q2, then through the motor to transistor Q5 and finally to ground. When the base current of Q2 is positive, the current does not flow through this transistor, which means it will not flow through the motor either. When the V4 microcircuit has a low logic level, the current will not flow through transistors Q2 and Q5. It will flow through two inverters J5 and J6 to the bases of transistors Q3 and Q4 (the base current of the transistors is always opposite due to the inverters). Then the current will flow through transistor Q3, then through the motor to transistor Q4 and finally to ground. Thus, the motor will turn in the other direction. Let's consider the operation of an infrared LED. To connect an IR LED, a pulse current is needed. It is obtained using a PWM modulation circuit on microcircuits V10 and V11. Initially, at the inputs of V11, one input has a high logic level (provided that the entire PWM modulation circuit is connected by the switch U8), and the other is low. Then its output has a high logic level. This output charges the capacitor C12 and gives a high logic level to both inputs of the V10 chip. At its output, zero potential is formed. When the capacitor is charged, on its side connected to one of the V11 inputs, there will be a positive potential, due to which both inputs of this chip will have a high logic level. Then its output will have a low logic level and the output of V10 will have a high logic level. It will start charging the capacitor from the other side, due to which the side connected to the V11 input will have a negative potential. Then there will be a low logic level again at this input, and the circuit will start its work again. At the output, we have pulses for powering the LED. The V12 chip checks the signals from the PWM modulation for the LED and from the IR sensor. When both of these signals have a high logic level, the output of the chip will be low. Because of this, low signals will be sent to the J5 and J8 chips, which will cause the motors to turn in the opposite direction, i.e. the robot will go backwards. But since the current flowing in the opposite direction from the J5 and J8 chips, which creates a negative voltage, is different due to the current passing through resistors of different ratings, and the capacitors are discharged at different speeds, the speed of the motors will be different. This will allow the robot to make a U-turn when it “sees” an obstacle.

The tactile sensor, upon collision, closes resistors R23, R24 and capacitors C13, C14 to the ground. This will again lead to the fact that there will be a different speed of current flowing in the opposite direction from J5 and J8, which will cause the same U-turn described above.

Let's consider the robot's operation in the light search mode. To switch to this mode, you need to turn off the switches U3 and U8 of their parts of the circuit and open the switches U4 and U7 so that the PWM modulation speed is controlled by the phototransistors. The less light hits the phototransistor, the more resistance it has. The lower the PWM modulation frequency will be, which is why the motor will rotate more slowly.

That was a lot, right? But it's not the hardest thing, though.

Making Circuit Board

термоклише.jpg

The LIT method is used to transfer a drawing onto a foil-coated surface of fiberglass. To transfer using the LIT (laser-iron) method, you will need: an iron, a sheet of glossy paper of A4 format, a piece of single-sided foil-coated fiberglass, metal scissors, a household cleaner for degreasing, fine-grained sandpaper "zero".

To avoid burning the table with an iron, lay a piece of heat-resistant plastic or polymer, for example, non-foil-coated textolite or getinax. It is better to choose a sheet from which the transfer will be made with a good glossy coating. Such sheets are usually found in high-quality magazines or advertising brochures of various companies. It is advisable to choose a sheet of A4 or A5 format.

ATTENTION! Only a laser printer can be used to print thermal clichés. The “blacker” the printer prints, the higher the quality of the printed thermal cliche. It is recommended to set the print resolution to 600 dpi in the printer settings.

Load a glossy sheet into the laser printer tray and print page 14 of the robot assembly instructions. After printing, you will have a thermal cliche in exact dimensions. Never touch the printed surface of the drawing with your hands! This can lead to the toner coming off and the coating becoming depleted, as a result of which the transfer will be of poor quality.

Take fiberglass, it should be foil-clad on one side only. Use a pencil to mark the dimensions of the printed circuit board on a piece of fiberglass, cut off the excess with metal scissors. Now the foil-clad surface must be degreased and cleaned of oxides. To do this, moisten a cloth with a cleaner and firmly wipe the entire surface evenly. If you do not have a cleaner, you can prepare the surface of the foil area of ​​the fiberglass differently. Then take fine-grained sandpaper and evenly clean the entire surface of the foil fiberglass with light circular movements.

Carefully place the hot stamp on the foil surface of the printed circuit board. The hot stamp should be placed with the pattern facing the foil surface. Bend the protruding edges of the sheet so that the outline of the pattern falls exactly along the edges (perimeter) of the fiberglass board.

Turn on the iron and let it heat up. Set the iron regulator to medium heat. Lower the iron onto the resulting "sandwich". Press on the iron, transferring your body weight to your hands. Hold the iron in this position for 3-4 minutes. After a one-minute break, repeat the above operation again!

ATTENTION!!! It is not recommended to make “ironing” movements with the iron during the transfer, as this will lead to the displacement of the heated pattern and its smearing on the foil surface. Only vertical movements (raise-lower) are allowed with the iron.

Prepare a small plastic bucket in advance by pouring any water into it up to half. After the second transfer, throw the hot cloth into the bucket of water. Wait for the glossy paper to get wet. On average, this takes about 2 minutes. Start removing the paper from the printed circuit board with your hands. Do this carefully, trying not to damage the print. Build up to completely clean the surface of the board from paper.

After cleaning from paper, the transfer of the pattern of the conductive tracks is clearly visible on the surface of the fiberglass.

Inspect it for a break in the poor-quality transfer. To make your task easier, use the BOTTOM drawing in the appendix. Compare the geometry of the current-carrying tracks of this drawing and the one obtained as a result of thermal transfer to fiberglass.

If the current-carrying track pattern has been completely transferred, then proceed immediately to the etching process in ferric chloride.

Restore or correct the untransferred areas using a marker for drawing printed circuit boards. This marker is sold in specialized stores selling measuring instruments, radio components. The marker for drawing printed circuit boards says permanent marker. When buying, find out the thickness of the writing unit, it is better to take 0.75 mm.

After restoring the untransferred areas of the current-carrying tracks, be sure to dry the board. On an iron this process takes about a minute on a hot heating battery for at least 5 minutes. Drying is necessary so that the marker is fixed and does not wash off with the solution during etching.

For etching in a solution, buy a can of dry ferric chloride. Dilute with cold water in the proportions indicated on the label. It is better to carry out the etching process itself in trays for washing photographs or in plastic rectangular dishes. Be careful when etching in a solution, since clothes smeared with ferric chloride are difficult to wash off.

Dip the prepared printed circuit board into the ferric chloride solution. When the areas unprotected by current-carrying paths are completely etched, the printed circuit board can be removed. You can speed up the etching process two to three times by rhythmically shaking the etching bath.

Rinse the printed circuit board in water and dry it. Put on safety glasses and on the drilling machine, drill all the holes in the printed circuit board. If you do not have a drilling machine, buy a hand drill, which can also drill holes. This simple device consists of a motor and a clamp, is sold in radio stores. In any case, it is recommended to wear glasses to avoid putting your eyesight at risk.

Clean the toner from the surface of the printed circuit board with fine-grained (zero) sandpaper until the shiny current-carrying tracks are visible. The surface of the printed circuit board must be cleaned, trying to ensure that there are no "dark" uncleaned areas left. The areas around the holes should be cleaned especially well.

Tin the foil-clad current-carrying tracks with flux. The tinning process is coating the surface of the current-carrying tracks or any other with a thin layer of solder. Using a brush, evenly coat the entire conductive surface of the printed circuit board with liquid flux. When the flux dries, tin the conductive tracks. Do not apply rosin to the soldering iron tip while tinning with flux. Neutral liquid flux for soldering copper and its alloys tins the surface perfectly.

The final part. First visually, and then using a device (tester), inspect the printed circuit board for short circuits between adjacent conductive tracks or mounting pads for radio components. Eliminate them, if present, using an awl. If the holes for radio components are sealed with solder, free them with an awl. To do this, bring the soldering iron tip to the sealed hole and heat it up, then touch this place with an awl. The hole will be freed from solder. The printed circuit board is ready for mounting radio components!

Soldering

монтажный чертёж.jpg
photo_2025-07-10_17-56-12.jpg
photo_2025-07-10_17-56-07.jpg

Now this is hard. I've made the circuit very compact. That was my mistake. It's nearly impossible to solder everything right. I've spent multiple days and nights to complete this and make sure that everything is alright. I can't give you any tips on this. This would be a big routine for you anyway.

Results

Robot

That was very time-consuming, hard, but interesting project! By making this, you'll learn a lot of stuff about electronics.