ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Drawn signal generator. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Measuring technology The signal at the output of this generator has a shape that matches the curve "drawn" by the user on the graphic LCD screen with a resolution of 128x64 pixels. Such a generator is useful for testing various electronic devices. With it, you can, for example, select the waveform of the most unusual timbre for electric musical instruments. The frequency of repetition of the "drawn" curve at the output of the generator can be changed from 0,2 to 7500 Hz and even higher if you draw not one, but several periods on the screen. For example, if you draw 64 pulses, then their frequency can be changed from about 12,8 Hz to 470 kHz. The lower edge of the indicator screen corresponds to zero voltage at the first output of the generator, and the upper edge corresponds to the maximum positive voltage, which can be changed from 0 to approximately +3,5 V by the regulator available in the generator. The signal at the second output differs in that it does not have a constant component. In addition, at this output, at a low frequency of repetition of the curve, distortion of its shape is possible. The generator can be powered from any source of stabilized DC voltage of 5 V. It consumes only 18 mA. When the power is turned off, the shape of the curve available on the screen is stored digitally in the non-volatile memory of the microcontroller, and when it is turned on, it is restored. The generator circuit is shown in fig. 1. Its main parts are the DD1 microcontroller (PIC16F873A-I / P) and the HG1 graphic LCD (MT-12864J-2FLA). The description of the indicator can be found in [1], and the features of its docking with the microcontroller - in [2]. The microcontroller clock frequency of 20 MHz is set by the ZQ1 quartz resonator. The R1C1 circuit is designed to set the microcontroller to its initial state when the power is turned on, and the VD1 diode ensures fast discharge of the capacitor C1 after the power is turned off. Buttons SB1-SB3 control the generator. The microcontroller outputs the binary codes of the readings stored in the memory of the signal "drawn" on the LCD screen with a given frequency to the outputs RA0-RA5. Resistor R2 serves as a load for the RA4 output, which, unlike other microcontroller outputs, is made according to an open drain circuit. To the outputs RA0-RA5, a binary code converter is connected to a voltage proportional to its value, assembled from resistors R3-R8. Note that each of the resistors here has a resistance half that of the previous one. This is necessary for correct conversion and must be strictly observed. However, the resistance of the resistor R7 is slightly less than the calculated one, equal to 6 kΩ, which partially compensates for the effect of the resistor R2 on the conversion characteristic. Resistors R3-R8 indicated on the resistance diagram must be selected with the greatest possible accuracy from among the nearest standard ratings. Their resistance should be measured during the selection process with the same digital instrument. The smaller the required resistance of the resistor, the more accurately it must be selected. To facilitate the selection, each resistor can be made up of two resistors connected in series. One of them should have a resistance close to the required, but less than it, and the second should add the rest. The emitter follower on the transistor VT1 eliminates the influence of the generator load on the operation of the code-to-voltage converter. Resistor R9 sets the operating point of the transistor so that at low voltage levels simultaneously at all outputs RA0-RA5, the voltage at the emitter of the transistor is as close as possible to zero, but it remains in active mode. This eliminates the distortion of the lower (on the LCD screen) part of the "drawn" signal. Capacitor C5 smooths out the steps of the digitally generated signal. When working with low-frequency signals, its capacitance may need to be increased several times, and with high-frequency signals, it may need to be reduced. Variable resistor R10 regulate the amplitude of the output signal. Resistor R12 protects the transistor from damage if output 1 is accidentally shorted to a common wire when the variable resistor slider is in the upper position according to the circuit. Capacitor C6 does not pass the DC component of the generated signal to output 2. Capacitor C4 is a blocking capacitor in the generator power circuit, and a selection of resistor R11 achieves the best image contrast on the indicator screen.
The generator is assembled in a housing with dimensions of 80x60x24 mm and is similar in design to the pocket oscilloscope described in [3]. The appearance of the generator is shown in fig. 2. The first time you turn on the instrument with the newly programmed microcontroller, a straight line will be displayed at the bottom of the LCD screen. In the future, this is the curve of the form specified in the previous session. Work begins by pressing one of the generator buttons. After pressing the SB1 button, a signal of the form shown on the screen appears at the outputs of the generator. By pressing SB2 they switch to the mode of changing its frequency, and by pressing the SB3 button - to the mode of entering or correcting the shape of the curve on the screen. In the frequency change mode, the SB1 button decreases its value, and the SB3 button increases it. The initial frequency is 476 Hz. There are a total of 511 fixed frequency values within the previously specified range. Immediately after entering the input mode and adjusting the curve, the conditional cursor is always located on the first point on the left of the curve. When the SB3 button is pressed, the dot moves up the screen, and when it reaches the top of the screen, it appears from the bottom. When the button is released, the dot stops. Having set the first point in the desired position, by pressing the SB2 button they go to the second, setting it, go to the third and so on. Point 128 on the right edge of the screen will be followed by point 1 on the left edge of the screen. Having drawn the desired waveform in the described way, turn on the generator by pressing the SB1 button. In this case, the entered curve will be written to the non-volatile memory (EEPROM) of the microcontroller. Therefore, after turning off the power of the device and turning it on again, you do not have to re-enter it.
The signal can be heard in headphones by connecting them to the generator output, or seen on the oscilloscope screen (Fig. 3). The sweep speed of the oscilloscope was set to 0,2 ms/div and the sensitivity of its vertical channel to 0,5 V/div. The microcontroller program can be downloaded from ftp://ftp.radio.ru/pub/2014/03/genf.zip. Literature
Author: A. Pichugov See other articles Section Measuring technology. Read and write useful comments on this article. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ Mars is poisonous to bacteria ▪ The first smartphone running Android 4.0 Ice Cream Sandwich ▪ Neutrinos will tell why we exist News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the Electrician website. Article selection ▪ article From the sleeve vest. Popular expression ▪ article What is lasagna? Detailed answer ▪ article Japanese lacquer tree. Legends, cultivation, methods of application ▪ article Quadro-effect installation. Encyclopedia of radio electronics and electrical engineering ▪ article Ball in the hole. Focus Secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |