ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Barograph. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Measuring technology The device is designed to record changes in atmospheric pressure during the flight of a model aircraft. It is based on the MCS-51 family microcontroller and non-volatile memory chip. Analog-to-digital conversion is implemented in software. The recorded information can be transferred to a computer and used, for example, to plot the flight altitude. Performing measurements is perhaps the most common "profession" of microcontrollers. In this case, the voltage proportional to the measured parameter is first converted into a digital equivalent - a multi-bit binary code. Upon completion of this operation, the microcontroller receives from the analog-to-digital converter (ADC) a signal of readiness to transfer the result to it in parallel or serial form. However, such a solution is not always justified, since the need to use the ADC as a separate microcircuit or even built into the microcontroller inevitably increases the cost of the device, and sometimes its power consumption. Secondly, adding an ADC to the design of the microcircuit complicates the device and reduces its reliability, since it is required to organize many electrical connections between it and the microcontroller. But often, especially with low requirements for the speed of analog-to-digital conversion, it can be implemented using a simple program for a cheap microcontroller that does not have a built-in ADC. The barograph, whose circuit is shown in the figure, uses the still popular AT89C2051 (DD1) microcontroller without a built-in ADC, belonging to the MCS-51 family in terms of architecture and instruction set. Atmospheric pressure sensor - MPX4115A (B1). Proportional to the measured pressure, the output voltage of the sensor, amplified by the op-amp DA1.1, is fed to one of the inputs of the voltage comparator built into the microcontroller. At its other input, a linearly increasing voltage is supplied, which is formed on the capacitor C5 when it is charged with a stable source current on the zener diode VD1 and the transistor VT2. The deviation of the law of change of this voltage from the linear one does not exceed ±0,3%. The result of the conversion is the number of pulses counted by the internal timer-counter of the microcontroller, received at its input from the moment the voltage on the capacitor begins to rise until the moment it is equal to the amplified sensor voltage recorded by the comparator. After that, the microcontroller generates a pulse at the output P1.4, which opens the transistor VT1. Capacitor C5 is discharged through resistor R10 and an open transistor, after which the measurement cycle is repeated. The timer operates in Mode 0, it is eight-bit, its counting input receives pulses with the frequency of the microcontroller's crystal oscillator divided by 12, which have passed a preliminary five-bit divider. At the frequency of the quartz resonator ZQ1 Fkv = 11,059 MHz, the frequency of the counting pulses is equal to Fsch \u12d Fkv / (2 * XNUMX5) = 11059/384 = 28,8 kHz. Since the state of the prescaler at the end of the count is stored in the TNO register of the microcontroller, the total bit length of the conversion result reaches 13. If the barograph is turned on with the SB1 button pressed, the conversion results are stored in the 24LC02B (DS1) non-volatile memory chip connected to the microcontroller via the I2C interface. If, at the time of power-on, the SB1 button was not pressed, all information previously recorded in non-volatile memory is sent byte-by-byte through the XS1 connector to the RXD input of the computer's COM port. Any terminal program running on the computer can accept it. The shaper of the output signal corresponding to the RS-232 standard is the op-amp DA1.2, included as a comparator. Although the version of the microcontroller program offered to readers does not provide for receiving information from a computer, the level converter required for this is available in the barograph. It is assembled on a transistor VT3. The XS1 connector must be connected to the computer's COM port connector directly or using a "modem" (without crossover) cable. In most cases, it is enough to have only two wires in the cable - the RXD and SG circuits. To organize the reception of information transmitted by the computer by the barograph, one more, TXD, will be required. The remaining five wires and jumpers between the contacts of the XS1 connector are only needed for the correct operation of computer programs that generate the DTR and RTS control signals and analyze the state of the DCD, DSR and CTS inputs. In the microcontroller program, the speed of its serial port is set to 9600 baud. The barograph is powered by two galvanic batteries with a voltage of 9 V (for example, "Krona"). When developing the program, examples of the implementation of communication via the I2C interface of the AT89C2051 microcontroller with a memory chip were used on the Atmel website. Author: K. Dunaev See other articles Section Measuring technology. Read and write useful comments on this article. Latest news of science and technology, new electronics: The world's tallest astronomical observatory opened
04.05.2024 Controlling objects using air currents
04.05.2024 Purebred dogs get sick no more often than purebred dogs
03.05.2024
Other interesting news: ▪ CO2 emissions will save the Earth from the ice age ▪ The world's largest Cherenkov telescope launched ▪ The harm of music before bed ▪ New Year's Eve comes a second later ▪ Sleep doubles memory efficiency News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ site section Preamplifiers. Article selection ▪ article It's a son of a bitch, but it's our son of a bitch. Popular expression ▪ Alant article. Legends, cultivation, methods of application ▪ article Intercom on the network 220 V. Encyclopedia of radio electronics and electrical engineering
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |