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

Onboard tachometer on the PIC16C84 microcontroller. 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

The magazine "Radio" describes a lot of instruments for measuring the speed of the crankshaft of an internal combustion engine - both analog and digital. The digital tachometer with a quasi-analogue scale, presented to your attention, is noticeably simpler than other similar ones according to the circuit and at the same time has better accuracy characteristics. The author managed to achieve such high results using the modern PIC16C84 microcontroller. The tachometer is built in such a way that it is equally convenient to use it both while driving and when adjusting the engine in the garage.

When operating a car that does not have a built-in tachometer, electronic tachometers are used to control the engine speed. Made according to various schemes, they show the measured rotational speed either in digital form or in the form of an LED scale [1]. Scale instruments are more convenient, but less accurate due to the finite number of scale elements. Based on the circuit processing of pulse sequences, such devices are very sensitive to the temporal parameters of the pulses, which manifests itself in the instability of readings when the temperature changes and the scale flashes. This limits the field of application of electronic scale tachometers, in essence, only to indicate the speed of rotation, since it does not allow recording readings with the accuracy necessary, for example, for adjusting a carburetor or engine diagnostics.

On-board tachometer on the PIC16C84 microcontroller

The use of software processing of pulses from the speed sensor allows you to combine the convenience of the scale and high accuracy of readings, turns the engine shaft speed indicator into a real measuring device. For this purpose, programmable peripheral microcontrollers from Microchip Technology Inc. are most suitable. (USA) with high speed and port capacity.

The tachometer described below uses the PIC16C84 microcontroller, with which readers are already familiar from the publication [2]. Its feature is the presence of a programmable memory device with electrical program and information erasure (EEPROM) with a capacity of 1K (14 bits and 64 bytes, respectively. This made it possible to do without external memory and significantly simplify the device. The tachometer is easy to manufacture, reliable in operation and does not require adjustment .

On fig. 1 shows the appearance of an electronic tachometer. It is equipped with two LED scales and can operate in two modes: indication and measurement. In display mode, the entire speed range from 0 to 6000 min-1 divided into 12 parts - divisions forming an overview scale with a resolution of 500 min-1. In the measurement mode, the device operates in the range from 300 to 3000 min.-1 and the overview scale has a resolution of 250 min-1.

On-board tachometer on the PIC16C84 microcontroller

Together with the overview scale, an extended scale of 0...200 min works in this mode.-1. It is formed by four LEDs and therefore has a resolution of 50 min.-1.

The reading of the frequency value n is formed by adding two components: n = 250N0 + 50Np, where N0 and Np - the number of luminous elements of the survey and stretched scales, respectively.

The measurement error is equal to the division value of the extended scale, i.e. 50 min-1, which is quite sufficient for solving practical problems.

The principle of operation of the tachometer is based on the direct measurement of the pulse repetition period taken from the breaker contacts, followed by the calculation of the engine shaft speed and displaying the result on a discrete scale. In this case, the measurement of time intervals is realized by counting calibrated time intervals - discretes, generated by software from clock pulses. The averaging interval is 10 periods.

On fig. 2 shows the circuit diagram of the tachometer. It consists of a central processor, an input shaper, an indication unit and a power supply.

The central processor is made on the microcontroller DD1. It has two ports: A with five and B with eight pins, which can be programmatically configured to both input and output information. Inputs RA0-RA3, RB2-RB5 are configured to output information, RB0 and RB1 are configured to input, and RA4, RB6 and RB7 are not used. The central processor is clocked by the built-in clock generator, the frequency of which is set by the quartz resonator ZQ1. The processor is reset when the power is turned on by the R2C1 circuit at the MCL input. Resistor R3 serves to limit the current of this input, and diode VD1 - to quickly discharge the capacitor C1 when the power is turned off.

The input shaper is assembled on the DD2.1 element and the DD3.1 trigger according to the scheme from [3] and is supplemented with a preamplifier on the VT1 transistor. The base circuit of this transistor includes elements that increase the noise immunity of the input driver [4].

From the output of the shaper, the pulses are fed to the input of the element DD2.2, which performs the functions of a buffer, and to the input of the D-trigger DD3.2, included by a frequency divider by two. At the output of this trigger, a pulse sequence of the "meander" type is formed with a repetition rate that is half the input.

The buffer element DD2.2 is designed to connect other automotive electronics devices (for example, an ignition unit) to it. The output of this element also serves to control the operation of the input shaper. The pulse repetition rate at the output of the DD2.2 element is equal to the sparking frequency. Element DD2.2 and trigger DD3.2 are optional, they only add additional flexibility to the technical solution of the device.

The generated pulse sequence is fed to the RB0 input of the DD1 processor, which processes it according to the built-in program using interrupts. The required type of measurement is selected by the toggle switch SA1, which changes the input mode RB1 of the processor.

On-board tachometer on the PIC16C84 microcontroller

The display unit consists of two LED scales HL1-HL4 and HL5-HL17 and a decoder DD4, DD5. The survey scale is formed by LEDs HL6-HL17, which are connected to the outputs of the decoder, assembled on the code converters DD4 and DD5 [5]. At the input of the decoder from port A of the DD1 processor, a signal is received that carries a binary code for the speed value, which leads to the activation of the corresponding number of scale LEDs. The HL5 LED indicates the device is on, since its glow corresponds to the zero code at the decoder input.

The second scale - stretched - is formed by LEDs HL1-HL4, which are connected to the outputs RB2-RB5 of the processor through current-limiting resistors R5-R8.

The device is powered from the twelve-volt on-board network of the car. Through the SA2 power switch and the R15C7 input filter, the DC voltage is supplied to the DA1 stabilizer, from the output of which a voltage of 5 V is supplied to all components of the device.

The processing program is entered into the memory of the processor using the programmer; it takes about 400 bytes (see table).

The details of the tachometer, with the exception of LEDs, toggle switches and the DA1 stabilizer, are mounted on a printed circuit board, the drawing of which is shown in fig. 3.

Chip stabilizer DA1 is installed on a heat sink with a cooling surface of 25 cm2. The stabilizer used by the author has a fully insulated plastic case. In the case of using a domestic stabilizer KR142EN5A (or KR142EN5V), it is better to install it on the heat sink through an insulating gasket.

The tachometer display, which is the front panel of the device, is assembled on LEDs of the KIPM11 series. Two toggle switches SA1 and SA2 are also mounted here - any miniature ones are suitable.

The frequency of the ZQ1 quartz resonator determines the settings in the program so that the value of the time increment, taking into account the prescaler of the processor, lies within 20...160 µs. A larger frequency value leads to an overflow of the processor counter, a smaller value reduces the resolution of the device. In practice, it is possible to use resonators for frequencies up to 4 MHz, preferably in a metal case with wire leads (for example, RK-374). The resonator is attached to the board with a wire clamp, the ends of which are soldered into two holes A.

Two groups of contacts on the board, indicated by the numbers 1-4, must be respectively connected with a bundle of four conductors.

On-board tachometer on the PIC16C84 microcontroller

The PIC16C84-04/P controller can be replaced by the PIC16C84-10/P and use a quartz resonator with a frequency of up to 10 MHz. It is also possible to use the more affordable PIC16F84 microcontroller, which differs from the PIC16C84 in the type of program memory (flash memory). It should be noted that the operating temperature range of this microcircuit is from 0 to +70°C. If it is necessary to use a tachometer and at sub-zero temperatures, it is better to use a controller with the letter I in the designation (corresponding to a temperature range of -40 ... + 85 ° С).

Transistor VT1 can be any low-power silicon npn structure with a static current transfer ratio of at least 100.

Literature

  1. Lomakin L. Electronics behind the wheel (annotated index). - Radio, 1996, No. 9, p. 55, 56.
  2. Ganzhenko D., Kabakov E., Korshun I. PIC and its application. - Radio, 1995, No. 10, p. 47-49.
  3. Biryukov S. Suppression of impulses "bounce" of contacts. - Radio, 1996, No. 8, p. 47, 51.
  4. Maslov A. Modernization of a quasi-analogue tachometer. - Radio, 1993, No. 9, p. 36, 37.
  5. Chudnov V. Linear scale in the tachometer. - Radio, 1993, No. 3, p. 13.

Publication: cxem.net

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

Optimal conditions for the most efficient operation of laser plasma accelerators 17.09.2017

Traditional electron accelerators have long become one of the main types of scientific instruments, extremely intense and short radiation pulses produced by synchrotrons and free electron lasers allow scientists to study matter and processes occurring on an atomic scale. But even the smallest electron accelerators now occupy an area comparable to the area of ​​a football field.

An alternative to traditional electron acceleration technologies is the laser-plasma acceleration method, which, with a small size of the accelerator, makes it possible to obtain a beam of accelerated high-intensity electrons. But accelerators of this type have one drawback - with their help it is very difficult to obtain a stable beam of electrons with a stable brightness. And this problem was solved by physicists from the research center HZDR (Helmholtz-Zentrum Dresden-Rossendorf), Germany, who managed to determine a number of parameters for creating optimal operating conditions for a laser-plasma electron accelerator.

The principle underlying the technology of laser-plasma acceleration is quite simple, a powerful laser beam is focused in a gas medium, which under its influence turns into a plasma, into an ionized state of matter. The energy of the laser beam causes the electrons to leave their "native" atoms, which creates a kind of "bubble" of a strong electric field in the volume of the plasma. This region of the electric field, which follows the pulse of laser light, is a wave that travels almost at the speed of light. And the electrons trapped on the crest of this wave are also accelerated almost to the speed of light. Exposure of these electrons to an additional pulse of laser light produces bright and ultrashort X-ray pulses, with the help of which scientists "see through" the studied samples of various materials.

The strength of secondary X-ray radiation directly depends on the number of high-energy electrons involved in this process. However, when a large number of electrons are accelerated, the plasma wave decays due to the influence of effects associated with these electrons and their electric field, which, moreover, adversely affects the shape of the beam. The distorted shape of the beam and the instability of the plasma wave lead to the fact that the beam contains electrons with different levels of their energy and other parameters.

"But in order to be able to use an electron beam for high-precision experiments, a stable beam consisting of electrons with the same parameters is required," says physicist Jurjen Pieter Couperus, "All the electrons in the beam must be in the correct place at the right time."

Scientists from HZDR carried out a number of works aimed at improving the quality of the electron beam produced by laser-plasma accelerators. They found that adding a small amount of nitrogen to helium, which is used to create plasma, greatly improved the situation. "We can control the number of electrons riding the plasma wave by changing the concentration of nitrogen," explains Jurien Peter Kuperus, "In our experiments, we found that the ideal case is when the plasma wave carries electrons with a total charge of exactly 300 picocoulombs. Even the smallest deviation from this value in any direction leads to energy dissipation, which reduces the quality of the generated beam. "

The performed calculations have shown that in order to generate a high-quality one, it is still required that the peak current of electron movement on the plasma wave crest be at least 50 kiloamperes.

“Using the ultrashort pulses of DRACO's petawatt laser, we will be able to generate a high-quality electron beam at a peak current of 150 kiloamperes,” says Jurien Peter Kuperus, “This will exceed the capabilities of all modern large-scale electron accelerators by as much as two orders of magnitude. And this will allow us to create very compact next generation X-ray sources".

Other interesting news:

▪ Caterpillar saliva against plastic

▪ Toshiba TC358870XBG - 4K HDMI/MIPI Dual-DSI Converter

▪ openwork bike

▪ Electric price tag

▪ Alibaba AI Processor

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Welding equipment. Article selection

▪ article On a par with the century. Popular expression

▪ article The leaves of which plant can withstand a weight of up to 30 kg? Detailed answer

▪ article Shipbuilder-repairman. Standard instruction on labor protection

▪ article On-board control system with speech output of information. Encyclopedia of radio electronics and electrical engineering

▪ article Electrical installations of residential, public, administrative and domestic buildings. Accounting for electricity. 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