Low-frequency and ultra-low-frequency signals are widely used in medicine, electrochemical research and experimental teaching. Especially in the field of electrochemistry, ultra-low-frequency signal generators have become an indispensable part of electrochemical instruments. Electrochemical instruments equipped with square wave, triangle wave and sine wave generators can study various transient behaviors of electrochemical systems; equipped with slow linear scanning signals or step wave signals, steady-state (or near-steady-state) polarization curve measurements can be automatically performed. However, there are few signal generators suitable for the field of electrochemistry on the market. Traditional signal generators cannot meet professional needs and the purchase cost is too high. This paper introduces a signal generator controlled by a single-chip microcomputer, which can output square waves, triangle waves and sine waves. The frequency range of the generated waveform signal is 0.125 mHz (millihertz) to 80 Hz, the output analog signal voltage range is -10 to +10 V, and the amplitude and frequency of the output signal have a certain adjustment range. Compared with the traditional signal generator, this signal generator has the following characteristics: this signal generator can meet the requirements of the electrochemical field for signal generators, the lowest frequency can reach 0.125 mHz, reaching the advanced level in China, and the signal generator has high precision, low distortion, stable performance, simple circuit structure and small size at ultra-low frequency.
1 Working principle
The input parameters of the ultra-low frequency signal generator include scanning mode, upper and lower limit levels, and waveform frequency. Among them, the scanning mode has three options: single, round trip, and continuous; the upper and lower limit levels are between -10 and +10 V, and the upper limit level is greater than the lower limit level; the waveform frequency range is 0.125 mHz to 80 Hz. There are three output waveforms: square wave, triangle wave, and sine wave. When the signal generator is powered on, it is reset and cleared first, and then the system is initialized. The user inputs parameters such as scanning frequency, upper and lower limit levels, and scanning mode into the single-chip microcomputer through the keyboard, and displays them through the LCD. According to a certain algorithm, each functional module is accurately adjusted, and the analog switch that controls the instrument in the integral circuit module is disconnected to start the signal generator to output the required signal waveform.
2 Waveform Generation Principle
The signal generator can generate continuous square waves, triangle waves and sine waves with adjustable frequency and peak-to-valley values. The following is a detailed introduction to the generation principles of the three waveforms.
2.1 Sine Wave Generation Principle
Since the lowest frequency of the signal generator can reach 0.125 mHz, the traditional sine wave generation circuit can no longer meet the requirements. The instrument uses a 16-bit digital/analog converter DAC8532 to generate sine waves. Compared with the RC bridge sine wave oscillation circuit and the LC sine wave oscillation circuit, this method is simple, reliable and has high stability.
2.2 Square Wave Generation Principle
The traditional square wave generation circuit consists of a hysteresis comparator with an inverting input and an RC circuit. The RC loop serves as both a delay link and a feedback network, and the automatic conversion of the output state is achieved through RC charging and discharging. However, the generated square wave cannot meet the requirements of ultra-low frequency, and the amplitude and frequency of the waveform are difficult to adjust. The square wave generating circuit of this system is generated by the continuous conversion of CMOS analog switch. The circuit uses ADG201A as the analog switch. When the switch is open, the circuit outputs a high level; when the switch is closed, the circuit outputs a low level. The amplitude of the square wave
is determined , and the period is determined by the frequency of the analog switch conversion. The circuit is simple and can meet the requirements of ultra-low frequency. Moreover, the square wave generated by the circuit is a continuous analog waveform, and the amplitude and frequency are easy to adjust.
2.3 Principle of triangular wave generation
The triangular wave of this signal generator is generated by an integration circuit. Unlike the traditional triangular wave generating circuit, the generation process of this triangular wave is a closed-loop control system, as shown in Figure 1. The square wave generating circuit controls the integration direction of the integration circuit. The output of the integration circuit is sent to the comparator for comparison with the upper and lower limit levels input by the user, and the comparison result is sent to the RS trigger. When the output of the integration circuit is higher than the upper limit level input by the user (or lower than the lower limit level), the RS trigger controls the square wave generating circuit to reverse its output voltage, and continues to send the output of the integration circuit and the upper and lower limit levels input by the user to the comparator for comparison, and repeats the process over and over again, thereby outputting the waveform of the required signal.
3 Hardware Circuit Design
3.1 Hardware Circuit Design Based on AT89C52
The circuit block diagram is shown in Figure 2.
3.2 LCD display circuit
Previously, LEDs were commonly used in display terminals, but they were gradually eliminated because they could not conveniently display Chinese characters and graphics. This signal generator uses the OCM4X8C LCD display module for display. OCM-4X8C is a graphic dot matrix LCD display module with a serial/parallel interface and a Chinese character library inside. The control driver of this module adopts the ST7920 of Taiwan Silicon Creation Electronics Company, so it has a strong control and display function.
The LCD screen of OCM4X8C is 128×64 dot matrix, which can display 4 lines, 8 Chinese characters per line. In order to facilitate the simple and convenient display of Chinese characters, the module has a 2 Mb Chinese font CGROM, which contains 8 192 16×16 dot matrix Chinese font libraries; at the same time, in order to facilitate the display of English and other commonly used characters, it has a 16 Kb 16×8 dot matrix ASCII character library. The LCD display circuit is shown in Figure 3. LEDA is the positive pole of the backlight source of the LCD display module, connected to the +5 V power supply; LEDK is the negative pole of the backlight source, connected to the ground; PSB controls the serial/parallel connection mode. When the PSB pin of the module is connected to a low level, the module enters the serial interface mode. The serial mode uses the serial data line R/W, the serial clock line E and the chip select terminal RS to transmit data, which constitutes a 3-wire serial mode. According to the serial operation timing programming, the display can be displayed. [page]
3.3 E2PROM circuit
Serial E2PROM is an online electrically erasable and writable memory, with small size, simple interface, reliable data storage, online rewrite, low power consumption, and low voltage writing. It is widely used in single-chip microcomputer systems. E2PROM can be used to store the initialization state table of the signal generator. After the single-chip microcomputer is reset and cleared, the table is directly called to initialize the system. The connection circuit between AT24C64 and single-chip microcomputer is shown in Figure 4.
4 System Software Design
The software program is the core of realizing the ultra-low frequency signal generator. It accurately adjusts the digital potentiometers that control the upper and lower limits of the level and the DAC8532 that controls the input voltage according to the keyboard input parameters, so that the signal generator can work normally. The software flow is shown in Figure 5.
Previous article:Traffic light design based on single-chip multi-computer communication
Next article:A Design Scheme of Digital Voice Thermometer
Recommended ReadingLatest update time:2024-11-16 21:24
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Isn’t it great to be able to match everything with just one click? Come and join the Mouser Flip Challenge!
- Qorvo Online Design Conference - Mastering BLDC and PMSM Solutions
- Review summary: Domestic FPGA Anlu SparkRoad development board
- 【 Don't miss it! 9/10@Shenzhen】2019 WPI/TI Latest PoE Solutions Seminar
- Puzhong Technology 51 MCU Development Board v3.0 Dynamic Digital Tube Part
- STM32F103 timer clock not understood
- MicroPython plugin for PyCharm
- Sentenced to 4 years! Megvii Technology driver attempted to extort 3 million yuan from the chairman but failed
- Why do clocks use 32.768K crystals?
- Problems and Solutions in TMS320F206 Simulation Debugging