Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

The microcontroller controls the all-terrain vehicle. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

Wide functionality, relative ease of programming and low cost have made single-chip microcontrollers attractive for amateur radio creativity. The proposed device was developed as a visual aid for a radio engineering circle in order to make it easier for young radio amateurs to study microcontrollers and make this study visual, lively and entertaining.

The product is based on a large electromechanical toy - a caterpillar space all-terrain vehicle driven by two electric motors. It is controlled by the available domestic microcontroller KR1878BE1. The program provides for a series of sequential actions that provide automatic guidance of the machine to the light source and approach to it. All actions are accompanied by corresponding voice messages recorded in the memory of the specialized chips Chipcorder by Winbond Electronics, already familiar to readers.

The device described below works as follows. After the power is turned on, the control LED blinks twice, signaling the normal operation of the microcontroller. Then, within 20 seconds, the machine tells why and by whom it was created, as well as that it is controlled by a single-chip microcontroller KR1878BE1. Further, she reports on her task - to find a light source and get close to it, after which she determines the level of illumination in the direction in front of her, performs a turn to the right by about 10 °, measures the illumination again. If after turning to the right it has become smaller, it should turn left by the same 10 °, if it has increased, then another turn to the right is made, the illumination is measured again, etc. In other words, the car turns in the direction of increasing illumination until it does not stop (while slightly jumping the direction to the maximum illumination), then makes one turn in the opposite direction.

As a result, the direction to the first found maximum illumination is determined. After that, the car starts approaching the target - it moves towards it for a certain time. Further, this sequence of actions is performed a specified number of times. All actions are commented by voice messages. After the last step of the program has been completed, the machine reports that the program has been completed. (The 10° turn of the machine is determined by the operating time of the corresponding electric motor and the speed of the caterpillar of the electromechanical toy that the author used).

Schematic diagram of the control part of the device is shown in fig. 1. Its basis is the DD1 KR1878BE1 microcontroller [1-3]. The switching scheme is typical. The clock frequency is set by the ZG1 quartz resonator. The HL1 LED serves to indicate that the microcontroller has started up normally and the program is running.

The microcontroller controls the rover
(click to enlarge)

The signal source is the photodiode VD2. With the help of the op amp DA2.1, its photocurrent is converted into voltage. Resistor R13 and capacitor C9 form a low pass filter. The follower on the op-amp DA2.2 ensures its coordination with the input of the ADC DA4. The exemplary voltage is created using an integral zener diode DA6 and a current-limiting resistor R34. Resistor R12 is selected for a specific copy of the VD2 photodiode so that when the illumination is close to maximum, the voltage at the ADC input does not exceed the exemplary one, equal to 2,5 V.

The device uses a 10-bit ADC TLC1549CP with a serial interface. This allows the microcontroller to control and receive data from the ADC using only three signal lines. The timing diagram of the ADC operation is shown in fig. 2. After the CS signal is applied, the most significant bit of the result of the previous conversion appears at the DATA output. To get the next bit, you need to apply a pulse to the I/O CLOCK input of the ADC. By its decline, the next bit appears at the DATA output, and so on. Simultaneously, by the decline of the third pulse at the I / O CLOCK input, the sampling of the input analog signal from the IN input of the ADC begins. On the decline of the tenth pulse at the input I / O CLOCK, the output of the result of the previous conversion ends and a new conversion begins. A high level must be applied to the CS input. After 21 µs or more, the CS signal can be applied and the conversion result can be read out. The general algorithm is as follows: first, "push" unnecessary 10 bits of the previous conversion from the ADC, then wait at least 21 μs, and then read the result of the current conversion.

The supply voltage of the electric motors M1 and M2 is supplied through keys made on transistors VT1 and VT2. When a high level voltage appears at the outputs of the microcontroller PA2 and TIME, the transistors VT1 and VT2 open and the electric motors begin to rotate the tracks. In this embodiment, the product can move forward and turn by braking one of the tracks. If it is necessary to ensure reversing or turning by counter-rotating the tracks, then there should be eight transistors and an additional transcoder chip from three lines (in this case, the PA4 port is also used) to eight keys. Such a switch was assembled and tested by the author, but in practice it turned out that one can do without reverse gear, and the motor control device is greatly simplified.

The remaining units of the device are designed to sound the product, and their exclusion will not affect the operation of the control part. Microcircuits DA3 and DA5 of the ISD1400 series [4-6] differ from the ISD7 series described in [4004] by a shorter recording time (20 s) and a simpler interface that does not require microprocessor control. The inclusion of DA3 and DA5 chips corresponds to that described in the documentation for their use. When establishing, all short voice messages are recorded in the first of them, and one long voice message is recorded in the second.

Shift register DD2 serves to accumulate in it an eight-bit address from which the recording of the desired phrase begins. Before starting the search for a light source through the output PB2, the microcontroller sends a signal to the DA5 to start playing, and it plays a single long message. During the process of pointing and approaching the target, the microcontroller outputs through DD2 to the address inputs of DA3 the address of the beginning of the desired phrase, after which the signal to start playing the phrase is sent through the RVR output. Messages are amplified by a power amplifier based on the DA1 chip. The volume is adjusted by the trimming resistor R1. After completing the specified number of steps for pointing and approaching the light source, the model stops.

The PAO and PB4 pins (points A and B) are reserved for connecting two buttons with make contacts (the second pins of the buttons are connected to the common wire of the device). Inside the microcontroller, resistors connected to the +5 V power bus are programmatically connected to these pins. When the button contacts are closed, the voltage at the corresponding pin drops to 0. If you program the interrupt mode for the voltage drop at these inputs and add interrupt handling routines, you can "teach" car to respond to obstacles.

The codes of the program that must be entered into the memory of the microcontroller are given in Table. 1.

The microcontroller controls the rover
(click to enlarge)

The device is powered by a 5 V source through wires, consuming a current of about 0,5 A when moving forward (both motors are running) (depending on the motors used). It should be noted that at the moment of starting, the current consumed is much greater. The author got it at least more than 1,2 A per motor, and there was interference in the power circuit that caused the microcontroller to restart. It was eliminated by connecting resistors R2 and R3 in series with the motors.

Most parts of the device are mounted on a 125x65 mm breadboard (Fig. 3).

The microcontroller controls the rover

For microcircuits DA3 and DA5, 28-socket sockets are installed on it, and for DD1 - 18-socket. All resistors - MSC oxide capacitors - K50-35 or similar foreign production, the rest - KM. You can take almost any photodiode VD2. Three photodiodes of different types were tested, and a good result was obtained with all of them. The resistance of the resistor R12 in this case changed from 47 to 820 kOhm. If an incandescent lamp is used as a light source, it is desirable to use an IR photodiode, in which case sunlight will be less affected. Instead of the integrated zener diode LM385Z-2,5 (DA6), it is permissible to use the KS133A by reducing the resistance of the resistor R34 to 330 ohms. Replacing the KT863A transistors (VT1, VT2) is undesirable (they were chosen according to two parameters: a high base current transfer coefficient and a low emitter-collector saturation voltage).

At the time of recording voice messages, the DD1 microcontroller is removed from the panel, the DA3 chip is installed in place of the DA5, the necessary phrases are written into it, then it is returned to its place, and DA5 to its own and a long message is recorded. Upon completion of all operations, the microcontroller is also installed in place.

Messages to the chip installed in place of DA5 are recorded as follows. Before the first recording, using the switch SA1, the address 7h is set at the inputs AO-A00 (all SA1 contacts are in the closed position). This will be the address of the beginning of the first sound fragment in the chip's memory. Then press and hold the SB2 ("REC") button for the entire time of recording the desired phrase. After releasing the button, the recording stops, and the code of the end of the fragment is automatically recorded in the memory of the microcircuit at the end of the sound fragment.

Unfortunately, it is impossible to determine the exact address of the end. Therefore, with the help of SA1, an address is set that approximately corresponds to the end of the fragment with a "shortage". This can be done based on the time required to record a fragment, and the table of correspondence of addresses and recording time (in an abbreviated form - see Table 2).

The microcontroller controls the rover
(click to enlarge)

For the ISD1420, changing the address to 01h corresponds to a time period of 0,125 s. Short messages like "Target found" last about 1,5 seconds. After setting the address, briefly press the play button SB1 ("PLAT"). If the entered address is less than the address of the end of the fragment, then a piece from the end of the fragment will be heard, and the HL2 LED will flash briefly at the end. If the address was greater, then there will be silence for a relatively long time, and then the flash of the HL2 LED, which means that playback has reached the end of the memory of the chip.In this way, the address of the end of the message is determined.The address following the end of the previous message will become the address of the beginning of the next.All addresses from which messages begin should be carefully recorded, since they will need to be included in the program instead of those that the author got and correspond to the duration of the phrases he uttered.

If the volume of voice messages is insufficient, you can increase the resistance of the resistor R1 or use another amplifier with a differential input. The capacitance of the capacitor C6 can be reduced to 0,1 uF, this will speed up the start of the microcontroller. In the motor control module, it may be necessary to reduce the resistance of resistors R4 and R5 to 270 ohms.

Project files

Literature

  1. KR1878BE1 - 8-bit RISC microcontroller. - OJSC Angstrem.
  2. (description of KR1878BE1, translator program, programmer, etc.).
  3. Bogomolov D. Frequency meter on a microcontroller. - Radio, 2000, No. 10, p. 4 - 6.
  4. .
  5. - description of microcircuits of the ISD1420 series (files 1400_1.pdf- 1400_3.pdf).
  6. - description of various aspects of the use of microcircuits of the ISD1420 series and similar ones (file apin10.pdf - examples of circuits, apin03.pdf - time and address correspondence table, apin04.pdf - frequently asked questions, apin05.pdf - about how the microcircuit works, apin06 .pdf - about the use of chips and collaboration with the LM386, apin07.pdf - about addressing).
  7. Shitikov A. ISD4004-16M - single-chip speech recording/reproduction system. - Radio. 2002, no. 2, p. 19 - 21; No. 3, p. 15, 16.

Author: N.Ostroukhov, Surgut, Tyumen region

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

The composition of the intestinal microflora 06.05.2016

In 95% of people, 14 main groups of microbes are represented in the intestinal microflora, which make up the "core" of the human microbiome. This conclusion was reached by the authors of two international studies: one led by Professor Jeroen Raes from the University of Leuven (Belgium), and the second led by Dr. Alexandra Zhernakova from the University of Groningen (Netherlands).

The methodology for both studies was the same: volunteers (1106 in Belgium and 1135 in the Netherlands) gave stool samples, blood tests, completed a detailed questionnaire about their health and lifestyle, and also underwent some additional medical tests. Analysis of the collected data allowed scientists to identify 600 groups of microbes that inhabit the bodies of people, of which 14, as mentioned above, turned out to be practically a common "core".

Comparison of the composition of the microflora with the results of other tests also gave interesting results. Previously, it was thought that the composition of the human microflora is influenced mainly by such factors as whether a person was born naturally or by caesarean section, the duration of his breastfeeding and body mass index. However, it has now turned out that these factors together have only 20% of the impact on the diversity of microbes living in our intestines.

The key factors turned out to be quite different. These are the medications we take - including heartburn medications, antibiotics and statins - the efficiency of our breathing, stool consistency and age.

Both research teams set out to find one key factor that would serve as a good indicator of the overall health of our microbiome. The results were different. The first, "Belgian" group found a correlation between this indicator and the rate of passage of feces through the intestines, i.e., stool. The second, "Dutch" team identified another factor: it is the protein chromogranin A, which signals the stressful activation of the nervous and endocrine systems of the body. Its reduced concentration in human blood corresponds to a more diverse microflora, the scientists write.

In any case, these new data force us to reconsider the existing ideas about the composition of the microbiome of our body and what factors influence it. The discoveries made are of great importance for practical medicine.

Other interesting news:

▪ New series CKR relay Crydom

▪ Lightyear 0 - solar-powered production car

▪ Heatwaves became more frequent and lengthened

▪ Smart bracelet shock therapy

▪ Glasses with face recognition

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the Electrician website. PTE. Article selection

▪ garden cart professions article. Drawing, description

▪ article Why does a spider need a web? Detailed answer

▪ article Timber road train driver. Standard instruction on labor protection

▪ article The smallest permissible sections of cables and wires of electrical networks in residential buildings. Encyclopedia of radio electronics and electrical engineering

▪ article MicroTV Cornflower. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024