uart Related Articles
Stay Ahead with Expert Electronics Insights,
Industry Trends, and Innovative Tips
- Electronic Components
- News Room
- General electronic semiconductor
- Components Guide
- Sort by
- Robots
- Transmitters
- Capacitors
- IC Chips
- PCBs
- Connectors
- Amplifiers
- Memory
- LED
- Diodes
- Transistors
- Battery
- Oscillators
- Resistors
- Transceiver
- RFID
- FPGA
- Mosfets
- Sensor
- Motors, Solenoids, Driver Boards/Modules
- Relays
- Optoelectronics
- Power
- Transformer
- Fuse
- Thyristor
- potentiometer
- Development Boards
- RF/IF
- Semiconductor Information
- Sensors
- PCB
- transistor
IntroductionThink about the modern embedded systems around you—your smartphone, smartwatch, or even the smart appliances in your home. These devices are constantly exchanging information in the background, working together to deliver the seamless experiences we have all come to expect. At the core of this communication lies the Universal Asynchronous Receiver Transmitter, or UART.UART is a key player in serial communication for many embedded applications. It converts parallel data into serial form for transmission and then back to parallel form for processing. This guide will walk you through everything you need to know about UART, from its basics to its real-world applications, advantages, and limitations.Whether you're an engineer working on embedded system designs, a hobbyist tinkering with microcontrollers, or simply someone interested in understanding serial communication, this guide will help you get to grips with the fascinating world of UART. What is a UART?The Universal Asynchronous Receiver Transmitter (UART) is a hardware component or module that facilitates serial communication by converting parallel data into serial form. Unlike synchronous protocols, UART doesn’t need a clock signal to synchronize data transmission between devices. Instead, it relies on start and stop bits to signal the beginning and end of a data transmission, making it both simple and versatile.UART is composed of two main parts: the transmitter and the receiver. The transmitter takes parallel data and sends it serially over a communication line, while the receiver collects the incoming serial data and converts it back into parallel form for the device to process. How Does UART Work?To understand how UART works, we need to explore how it transmits and receives data. UART works by breaking down parallel data into a sequence of bits, which are then transmitted serially. Each byte of data is preceded by a start bit, followed by the data bits, an optional parity bit for error checking, and concluded with one or two stop bits.The start bit signals the beginning of a transmission, usually involving a transition from a high voltage (idle state) to a low voltage. The data bits are then transmitted—generally 5 to 9 bits, depending on the configuration. The optional parity bit helps detect errors during transmission, while the stop bit marks the end of the data packet.On the receiving end, the UART module interprets these bits by identifying the start bit, reading the data bits, verifying the parity, and checking for the stop bit. This process enables reliable communication between devices with minimal complexity. Key Features of UARTAsynchronous Communication: Unlike SPI or I2C, UART does not need a clock signal, which makes it easier to implement and less resource-intensive.Simple Interface: UART requires just two signal lines for communication—one for transmitting data (TX) and one for receiving data (RX).Configurable Baud Rate: The speed of communication, defined as the baud rate, is adjustable. Common baud rates include 9600, 115200, and others, making UART flexible for different applications.Error Detection: The optional parity bit allows for basic error detection, which is useful in environments where data integrity is crucial. Applications of UARTUART is extensively used in embedded systems and serves as a communication bridge between microcontrollers and peripherals. Here are some common applications of UART:Microcontroller to PC Communication: UART is often used to establish communication between microcontrollers and PCs. This is commonly done through USB-to-UART converters, which are great for debugging or data logging purposes.Bluetooth Modules: Many Bluetooth modules, like the HC-05 and HC-06, use UART to communicate with microcontrollers, providing an easy way to add wireless capabilities to projects.GPS Modules: GPS modules typically use UART to output serial data, which microcontrollers can then read to get location information.Debugging and Diagnostics: UART is a popular choice for debugging in embedded systems. By connecting the UART port to a serial console, developers can monitor the system’s behavior, making it easier to diagnose issues. Comparing UART with Other Serial Communication ProtocolsUART is just one type of serial communication protocol, and it’s important to know when to use it compared to other options like SPI and I2C.SPI (Serial Peripheral Interface): SPI is a synchronous communication protocol that requires a clock signal. It’s faster than UART and ideal for high-speed data transfer, but it requires more signal lines and doesn’t easily support multiple devices on the same bus.I2C (Inter-Integrated Circuit): I2C is another synchronous protocol that uses two lines (SCL and SDA) for communication. It supports addressing, which makes it better suited for connecting multiple devices. However, it has more overhead compared to UART and requires careful timing.In summary, UART is simpler to implement and well-suited for point-to-point communication where speed isn’t a critical factor. It’s a great choice for applications with minimal device connections. Advantages of UARTEase of Implementation: UART is straightforward to set up, with simple hardware requirements and minimal software configuration.Low Cost: With only two wires needed for communication, UART is cost-effective in terms of both hardware and design complexity.Flexible Baud Rate: UART allows for adjustable baud rates, providing flexibility when connecting devices with different communication speed requirements. Limitations of UARTShort Distance Communication: UART is not ideal for long-distance communication as the signal can degrade over extended cables, leading to data corruption.Point-to-Point Limitation: UART is generally limited to point-to-point communication. It’s not designed for multi-device communication without additional hardware.Speed Constraints: Compared to protocols like SPI, UART operates at slower speeds, making it unsuitable for high-speed data transfers. Choosing the Right UART ConfigurationChoosing the right UART configuration for your project involves several considerations:Baud Rate: Ensure that both devices use the same baud rate to prevent data errors.Parity Bit: Determine whether error detection is needed. Adding a parity bit can help detect transmission errors, enhancing reliability.Number of Stop Bits: Depending on the required reliability, you can choose between one or two stop bits. Two stop bits provide greater reliability but reduce the overall data rate.Flow Control: For higher data rates, consider implementing hardware flow control (RTS/CTS) to prevent data loss when the receiver cannot keep up with the incoming data. Real-World Example: UART in Microcontroller ProjectsA common use of UART is in microcontroller projects involving peripheral modules like GPS, Bluetooth, or Wi-Fi. For example, when building a GPS tracker, the GPS module typically communicates its location data to a microcontroller via UART. The microcontroller can then process this data and send it to another module, such as a Bluetooth transmitter, to relay the location to a smartphone.Another practical application is debugging firmware for IoT devices. By connecting the UART to a USB-to-serial converter, debug messages can be sent from the device to a PC terminal, helping developers understand what the firmware is doing in real-time and diagnose any issues. ConclusionThe Universal Asynchronous Receiver Transmitter (UART) is an essential component in embedded systems, providing a reliable, low-cost means for serial communication. Its ease of use and flexible baud rate make it a popular choice for a wide range of applications, including debugging, data transmission, and peripheral integration.While UART has its limitations—such as being point-to-point and having slower data transfer speeds compared to other protocols—its simplicity and effectiveness make it indispensable in many embedded projects. By understanding how UART works and knowing when to use it, you can design better, more reliable systems and appreciate the intricacies of serial communication.Ready to explore more? At Kynix Electronic, we offer a range of components, including UART modules and integrated circuits, to meet your embedded system needs. Visit our site today and discover the perfect components to kickstart your next project with confidence!
Allen On 2024-11-27
IntroductionSimply put, an oscillator is a device that can convert DC power into AC power without external signal excitation. The so-called "oscillation" implies alternating current. This article will mainly explain the circuits of different sine wave oscillators, including their working principles, how to realize their functions, circuit composition and comparison of advantages and disadvantages of different forms of circuits. This article uses a large number of circuit diagrams and formulas to explain in detail, which can help you understand in a better way.Basics of oscillators and their different typesCatalogIntroductionCatalogI The Principle of Feedback Oscillator1.1 How Does the Feedback Oscillator Work?1.2 Equilibrium Conditions1.3 Starting Conditions of the Oscillator1.4 Stable Conditions of the Oscillator1.5 General Composition of Sine Wave OscillatorII LC Oscillator Circuit2.1 The Composition Principle of the Oscillator2.2 Capacitive Feedback Oscillator2.3 Inductive feedback oscillatorIII RC Oscillator Circuit3.1 Brief Introduction of RC Oscillator and its Circuit3.2 RC Phase Shift Oscillator3.3 Wien Bridge OscillatorIV Quartz Crystal Oscillator Circuit4.1 What is a Quartz Crystal Oscillator?4.2 Quartz Crystal4.3 Quartz Crystal Oscillator CircuitV Non-sine Wave Generating Circuit5.1 What is a Non-sine Wave Generating Circuit?5.2 Rectangular Wave Generator5.3 Triangle Wave and Sawtooth Wave Signal GeneratorVI QuizⅦ FAQI The Principle of Feedback Oscillator1.1 How Does the Feedback Oscillator Work?The feedback oscillator is when the power is turned on, the various electrical disturbance signals in the loop are selected by the frequency selection network, and the signal of a certain frequency is fed back to the input terminal, and then the cycle of amplification → feedback → amplification → feedback , The amplitude of the signal increases continuously, and the oscillation is established from small to large. As the signal amplitude increases, the amplifier will enter a non-linear state, and the gain will decrease. When the feedback voltage is exactly equal to the input voltage, the oscillation amplitude will no longer increase and enter a balanced state. As can be seen from the figure below, the feedback oscillator is a closed loop composed of an amplifier and a feedback network. The amplifier is usually a tuned amplifier with an oscillation circuit as a load. The feedback network is generally a linear network composed of passive components.Figure1. Block Diagram of Feedback OscillatorIn order to generate self-oscillation, there must be positive feedback, that is, the signal fed back to the input terminal and the signal at the input terminal of the amplifier have the same phase. For the above figure, suppose the voltage amplification factor of the amplifier is K(s), the voltage feedback coefficient of the feedback network is F(s), and the closed-loop voltage amplification factor is Ku(s), thenby We can writeIf a certain frequency ω1=ω, then T(jω1) is equal to 1. From the above formula, we can see that Ku(jω) will tend to infinity. This shows that there is no external signal, and self-excited to produce signal output, namely self-oscillation. Therefore, the condition of self-oscillation is that the loop gain is 1.Definition:1.2 Equilibrium ConditionsThe equilibrium condition of the oscillator isthis can also be expressed asIf a certain frequency ω1=ω, then T(jω1) is equal to 1. From the above formula, we can see that Ku(jω) will tend to infinity. This shows that there is no external signal, and self-excited to produce signal output, namely self-oscillation. Therefore, the condition of self-oscillation is that the loop gain is 1. The above two formulas are the amplitude and the phase equilibrium conditions respectively. Equilibrium conditions are also called "two conditions for maintaining self-oscillation". The amplitude balance condition determines the amplitude of the oscillator output signal, and the phase equilibrium condition determines the frequency of the oscillator output signal. But it must be pointed out that the loop can only meet the phase equilibrium condition at a certain frequency (f), which is the resonant frequency (f0) of the loop.1.3 Starting Conditions of the OscillatorWhen the oscillator is in actual application, there should be no external signal Us(s) shown in Figure 1. The initial source of oscillation is electrical signals such as electrical shock and various thermal noises that inevitably exist when the oscillator is switched on.It can be seen from the establishment process of the oscillation that in order to make the oscillator start-up, the feedback voltage Uf and the input voltage Ui should be in phase at the beginning of the oscillation (that is, positive feedback); Uf>Ui should be required in amplitude, that is:Vibration conditions: φA+φF=2nπ(n=0,1,2,•••)AF>1 Simply put, as we know, the condition of unity gain must be met to make the oscillation continue. But to start the oscillation, the voltage gain of the positive feedback loop must be greater than 1, so that the amplitude of the output voltage can reach the required potential. Then the gain must be reduced to 1, so that the output voltage can be maintained at the required potential and the oscillation phenomenon can continue. Transition from |T(jω)|>1 to |T(jω)|=1 when the oscillator is workingThe amplifier must work in the linear amplification region of the transistor when amplifying small signals.When the oscillation is started, the amplifier works in the linear region. At this time, the output of the amplifier increases linearly with the increase of the input signal; as the amplitude of the input signal increases, the amplifier gradually enters the saturation or cut-off region from the amplification region, and enters a nonlinear state. The closed-loop gain of will decrease with the increase of the input signal, as shown in the figure below:Figure2. Graphical Representation of Amplitude ConditionsWhen the loop gain drops to |T(jω)|=1, the growth process of the amplitude will stop, and the oscillator will reach a balanced state and perform constant amplitude oscillation. It can be seen that the transition of the oscillator from amplified oscillation to steady amplitude oscillation is realized by the non-linear characteristics of the amplifier. When the oscillating circuit is powered on, the current of the transistor increases abruptly from zero, and the sudden change current contains a wide spectrum component. The start-up process of the circuit is very short! As long as the circuit satisfies the starting conditions, after the oscillator is powered on, there will be an output signal with stable amplitude at the output.Figure3. Circuit Start-up Process1.4 Stable Conditions of the OscillatorIf the loop gain characteristic has two equilibrium points A and B, among them, point A is stable and point B is unstable.Figure4. Stable Conditions of the OscillatorIt can be seen from the above discussion that in order to stabilize the equilibrium point, |T(ω0)| must have a negative slope change near UiA.Stable conditions are divided into amplitude stable conditions and phase stable conditionsTo make the amplitude stable, the oscillator must have the ability to prevent amplitude changes at its equilibrium point. Then the amplitude stability condition should beSince the feedback network is a linear network, which means the size of the feedback coefficient does not change with the input signal, so the amplitude stability condition can be written asThe phase stability depends on the increase of ω, and the decrease of , meaning that the phase characteristic of the parallel oscillator circuit ensures the phase stability.Therefore, the phase stability condition is. The higher the Q value of the loop, the larger of the value of , and the better phase stability.1.5 General Composition of Sine Wave Oscillator(1) Amplifying circuit-realize energy control.(2) Positive feedback network-meets the conditions for starting vibration.(3) Frequency selection network-only one frequency satisfies the oscillation condition to obtain a sine wave output of a single frequency. Commonly used frequency selection networks include RC frequency selection and LC frequency selection(4) Amplitude stabilization link-makes the circuit easy to start and oscillate stably, with little waveform distortion. Examples of oscillation circuits:High frequency resonant amplifier and sine wave oscillatorFigure5. High Frequency Small Signal Resonant AmplifierFigure6. Mutual Inductance Coupled OscillatorII LC Oscillator CircuitLC oscillators can be divided into three types: mutual inductance coupled oscillators, inductive feedback oscillators and capacitive feedback oscillators according to their different feedback networks.This section focuses on different types of feedback LC oscillators and three-point oscillators.2.1 The Composition Principle of the OscillatorFigure7. General Form of Three-terminal OscillatorThe basic circuit is the so-called three-terminal (also called three-point) oscillator, which means the circuit formed by connecting the three terminals of the LC loop and the three electrodes of the transistor respectively, as shown in the figure. The three-terminal LC oscillator is a feedback type LC oscillator. In order to obtain positive feedback, the feedback circuit must make the instantaneous polarity of the transistor's AC voltage meet a certain phase relationship: when Vbe is negative, Vce should be positive, namely, Vbe and Vce are in reverse phase, and Veb and Vce are in phase. Only when the reactance Xce and Xeb have the same properties can they be guaranteed to be in phase. When the resistance of the loop element is very small, its influence can be ignored, and the influence of the input impedance and output impedance of the transistor can also be ignored. To maintain oscillation, the circuit must meet the requirements. Otherwise, the loop resonance condition cannot be met.The criteria for the three-terminal oscillator circuit to meet the phase equilibrium condition is as follows:(1) The reactance properties of Xce and Xeb are the same, but the reactance properties of Xcb are opposite. That is, ce and be are the same resisting piece, and cb resisting piece.(2) The oscillation frequency should satisfy 1Xo+Xcl-XolBased on this criterion, it can be quickly judged whether the oscillating circuit composition is reasonable or not.Three-terminal LC oscillatorThe three-terminal LC oscillation circuit is often used, and its operating frequency is about a few MHz to a few hundred MHz. The frequency stability is also higher than that of the transformer coupled oscillation circuit, which is about 10-3~10-4. After some frequency stabilization measures, it can be higher. There are many types of three-terminal LC oscillators, mainly: Inductance three-terminal type, also known as Hartley oscillator; capacitor three-terminal type, also known as Colpitts oscillator; series type improved capacitor three-terminal type, also known as Clapp parallel type improved capacitor three-terminal type , Also known as Sellier oscillator. The three-terminal oscillator has two basic circuits, as shown in the figure below.Figure8. Capacitive Feedback Oscillator and Inductive Feedback Oscillator2.2 Capacitive Feedback OscillatorCapacitive feedback three-terminal oscillator is an electronic component, also called Colpitts oscillator, which is a kind of self-excited oscillator. It is composed of a series capacitor, an inductance circuit and a positive feedback amplifier. It is named because the three end points of the two series capacitors of the oscillating circuit are connected to the three pins of the oscillating tube respectively.Figure9. Capacitive Feedback OscillatorAs shown in the figure, use C2 to feed back part of the voltage of the resonant tank to the base. The three end points of the LC resonant tank are respectively connected to the three electrodes of the transistor, so it is called a capacitive feedback three-terminal oscillator, or Colpitts oscillator. The vector analysis method can be used to prove that the circuit meets the phase balance condition. As long as the ratio of C1 and C2 is appropriately selected and the amplifier has enough amplification, the circuit can oscillate.Figure10. Capacitive Feedback OscillatorAdvantages of Colpitts circuit:(1) Good oscillation waveform;(2) The frequency stability of the circuit is high. If the capacitance of the circuit is increased appropriately, the influence of unstable factors on the oscillation frequency can be reduced;(3) The operating frequency of the three-terminal circuit of the capacitor can be made higher. The output and input capacitors of the oscillator tube can be directly used as the oscillation capacitor of the loop, and the operating frequency can reach a very high frequency range of tens of MHz to hundreds of МHz. Disadvantages of Colpitts circuit:When adjusting C1 and C2 to change the oscillation frequency, the feedback coefficient will also change, which will affect the starting conditions and working status. But as long as a variable capacitor is connected to both ends of L and C1 and C2 are fixed capacitors, the feedback coefficient will not be affected when the frequency is adjusted.2.3 Inductive feedback oscillator(1) Circuit compositionIn order to overcome the shortcomings that the transformer primary coil and the secondary coil in the transformer feedback oscillation circuit are not tightly coupled, the N1 and N2 of the transformer feedback oscillation circuit can be combined into one coil. As shown in the figure below, in order to strengthen the resonance effect, the capacitor C is connected across the entire coil. This is the inductive feedback oscillator circuit, or Harley oscillator.Figure11. Inductive Feedback Oscillator Circuit(2) Working principle✿The circuit includes four parts: amplifier circuit, frequency selection network, feedback network and non-linear element (transistor), and the amplifier circuit can work normally.✿Use the instantaneous polarity method to judge whether the circuit meets the phase condition of sine wave oscillation: disconnect the feedback, add the input voltage with frequency f0, give its polarity, and judge that the polarity of the feedback voltage obtained from N2 is the same as the input voltage , So the circuit satisfies the phase condition of sine wave oscillation.✿As long as the circuit parameters are selected properly, the circuit can meet the amplitude condition and produce sine wave oscillation. The following figure shows the AC path of the inductive feedback oscillation circuit. The three ends of the primary coil are connected to the three poles of the transistor, so the inductive feedback oscillation circuit is called an inductive three-point circuit.Figure12. AC Path of Inductive Feedback Oscillator Circuit(3) Advantages and disadvantagesThe coupling between N2 and N1 in the inductance feedback oscillation circuit is tight, the amplitude is large, and it is easy to oscillate; when C uses a variable capacitor, a wide adjustment range of oscillation frequency can be obtained, and the highest oscillation frequency can reach tens of MHz. Since the feedback voltage is taken from inductance, it has greater reactance to high-frequency signals, and the feedback signal contains more high-order harmonic components, and the output voltage waveform is not good. The following introduces two improved capacitor three-terminal oscillation circuits:Clap oscillator:The following figure (a) is the principle circuit of the Krapper oscillator, and (b) is its AC equivalent circuit. Its characteristic is that a capacitor C3 is added to the inductance branch of the aforementioned capacitive three-point oscillating resonant tank. Its value is relatively small, requiring C3<< C1, C3<< C2.Figure13. Clapp OscillatorRegardless of the influence of the capacitance between the poles, the total capacitance CΣ of the resonant circuit is the series connection of C1, C2 and C3, namely. Thus, the oscillation frequency is .The condition for the above formula to be true is that C1 and C2 must be selected relatively large. It can be seen that the influence of C1 and C2 on the oscillation frequency is significantly reduced, so the influence of the capacitance between the transistors connected in parallel with C1 and C2 is also very large. It is smaller, and the stability of the oscillation frequency is improved. Sellier oscillator:Figure14. Sellier Oscillator so the oscillation frequency:L is the inductance of the inductance coil of the resonant amplifier circuit; C is the total capacitance of the resonant circuit. In the LC resonance circuit, the inductance L(H)/capacitance C(F)=105~106, which can achieve better results.III RC Oscillator Circuit3.1 Brief Introduction of RC Oscillator and its Circuit● What is an RC oscillator?(1) The sine wave oscillator has no input signal and is a positive feedback amplifier with a frequency selection network. If resistors and capacitors are used to form a frequency selection network, it is called an RC oscillator, which is generally used to generate 1Hz-1MHz low-frequency signals. The frequency selection effect of the RC frequency selection network is not as good as that of the LC resonant circuit, so the waveform and stability of the RC oscillator are worse than that of the LC oscillator.(2) RC oscillator can be divided into sine wave oscillator and non-sine wave oscillator according to whether the output wave type is sine wave.(3) There are many kinds of RC oscillation circuits: bridge type, phase shift type, double T type, the most commonly used is bridge type oscillation circuit, namely RC series-parallel frequency selection network. ● Features of RC oscillator(1) RC phase-shift oscillator features: simple, poor frequency selection, unstable amplitude, inconvenient frequency adjustment, generally used in occasions with fixed frequency and low stability requirements. Frequency range: several hertz-tens of kilohertz(2) RC series-parallel network oscillator features: it can easily and continuously change the oscillation frequency, it is convenient to add negative feedback to stabilize the amplitude, and it is easy to get a good oscillation waveform.(3) Double T frequency selective network oscillator characteristics: good frequency selection characteristics, difficult frequency modulation, suitable for generating single frequency oscillation. ● RC oscillator circuitThe oscillating circuit composed of RC frequency selection network is called RC oscillating circuit, which is suitable for low-frequency oscillation, and is generally used to generate low-frequency signals of 1Hz~1MHz. The circuit is composed of four parts: amplifier circuit, frequency selection network, positive feedback network, and amplitude stabilization link. The main advantage is simple structure, economic and convenient. According to the different forms of the RC frequency selection network, the RC oscillator circuit can be divided into an RC lead (or lag) phase shift oscillator circuit and a Wien circuit oscillator circuit. For RC oscillator circuits, increasing the resistance R can reduce the oscillation frequency, and increasing the resistance does not need to increase the cost. The frequency of the sine wave generated by the commonly used LC oscillator circuit is relatively high. If a sine wave with a lower frequency is to be generated, the oscillation circuit must have a larger inductance and capacitance. This will not only cause the components to be bulky, heavy and inconvenient to install, but also difficult to manufacture. high cost. Therefore, the sinusoidal oscillation circuit below 200kHz generally adopts an RC oscillation circuit with a lower oscillation frequency.3.2 RC Phase Shift OscillatorThe phase shift oscillator is an oscillator composed of an advanced phase shift or a lag phase shift circuit as a frequency selection network and an inverting amplifier. It has the advantages of simple circuit, economy and convenience, but the effect of frequency selection is poor, the amplitude is not stable enough, and the frequency adjustment is inconvenient. Therefore, it is generally used for occasions with fixed frequency and low stability requirements. Its oscillation frequency is:Figure15. RC Phase Shift Oscillator Schematic Diagram3.3 Wien Bridge OscillatorThe RC series-parallel frequency selection network and amplifier can be combined to form an RC oscillator circuit, and the amplifier part can be an integrated operational amplifier. As shown in the figure, the RC series-parallel frequency selection network is connected between the output of the operational amplifier and the non-inverting input to form positive feedback. Rt and R1 are connected between the output of the operational amplifier and the inverting input to form negative feedback. . The positive feedback circuit and the negative feedback circuit constitute a Wien bridge circuit, and the input and output ends of the operational amplifier are respectively connected across the diagonal of the bridge. Therefore, this kind of oscillation circuit is called a Wien bridge oscillation circuit.Figure16. Wien Bridge OscillatorThe oscillating signal is input from the non-inverting terminal, so a non-inverting amplifier is formed. The output voltage is in phase with the input voltage, and the closed-loop voltage amplification factor is equal to: When the RC series-parallel frequency selection network is ω=ω0=1/RC, Fu=1/3, εf=0, so as long as |Au|=1+(Rt/R1)>3, that is, Rt>2R1, oscillation The circuit can meet the self-excited oscillation amplitude and phase start-up conditions to produce self-excited oscillation, the oscillation frequency f0=1/2πRC. Using double adjustable potentiometer or double adjustable capacitor can easily adjust the oscillation frequency. In the commonly used RC oscillator circuit, the high stability capacitor is generally used to switch the frequency band (coarse frequency adjustment), and then the double variable potentiometer is used to fine-tune the frequency.IV Quartz Crystal Oscillator Circuit4.1 What is a Quartz Crystal Oscillator?Quartz crystal oscillator refers to a device made on the principle that the crystal resonates due to the piezoelectric effect when the frequency of the electrical signal is equal to the natural frequency of the quartz crystal. It is a key component of crystal oscillators and narrow-band filters.Although the appearance, size and frequency of the quartz crystal oscillator are different, the structure principle is basically the same. In order to improve the stable and reliable operation of the quartz crystal, the shell components of the quartz crystal oscillator will be sealed and evacuated. Or fill with nitrogen.4.2 Quartz Crystal(1) StructureFigure17. Structure of the Quartz Crystal(2) Basic characteristicsApplying an electric field between the plates→mechanical deformation of the crystalMechanical force is applied between the plates → the crystal generates an electric fieldPiezoelectric effect: alternating voltage → mechanical vibration → alternating voltageWhen the alternating voltage frequency = natural frequency, the amplitude is the largest → piezoelectric resonanceThe natural frequency of mechanical vibration is related to the size of the wafer, and the stability is high.4.3 Quartz Crystal Oscillator CircuitThe high quality factor of quartz crystal is used to form an LC oscillator circuit.(1) Parallel Type quartz crystal oscillatorFigure18. Parallel Type Quartz Crystal Oscillator Quartz crystal works between fs and fp, which is quite a large inductance, and forms a capacitive three-point oscillator with C1 and C2. Because the Q value of the quartz crystal is very high, which can reach more than several thousand, the circuit can obtain high oscillation frequency stability.Figure19. Frequency Characteristics of Parallel Quartz Crystal Oscillator (2) Series type quartz crystal oscillatorFigure20. Series Type Quartz Crystal Oscillator Circuit The quartz crystal works at fs, which is resistive and has the smallest impedance, the strongest positive feedback, and zero phase shift, which meets the phase balance condition of oscillation.For frequencies other than fs, the impedance of the quartz crystal increases, and the phase shift is not zero, then the oscillation condition is not met, and the circuit does not oscillate.Figure21. Frequency Characteristics of Series Quartz Crystal OscillatorV Non-sine Wave Generating Circuit5.1 What is a Non-sine Wave Generating Circuit?It is composed of an integrating circuit and a hysteresis comparator circuit. The role of the integrator circuit is to produce a transient process. The hysteresis comparator acts as a switch, that is, the steady state is destroyed by the continuous closing of the switch, and a transient process is generated.Commonly used non-sine wave generating circuits include rectangular wave generating circuits, triangular wave generating circuits and sawtooth wave generating circuits, etc. They are often used as signal sources in pulse and digital systems.5.2 Rectangular Wave GeneratorIt is composed of hysteresis comparison circuit and RC timing circuit. The output has no steady state and there are two transient states; if the output is high level, it is defined as the first transient state, and the output is low level as the second transient state.Basic components:(1) Switching circuit: The output has only two situations of high level and low level, called two states; therefore, a voltage comparator is used.(2) Feedback network: self-control, when the output is in a certain state, it breeds the condition of turning into another state. Feedback should be introduced.(3) Delay link: Make the two states maintain a certain period of time and determine the oscillation frequency. Use RC circuit to achieve.Circuit composition:Figure22. Rectangular Wave Generating Circuit5.3 Triangle Wave and Sawtooth Wave Signal GeneratorThe circuit structure of the triangle wave generator: hysteresis comparator + inverting integratorworking principle:Figure23. Circuit of Triangle Wave Generator Sawtooth wave generator: change the forward and reverse charging time constant of the integrator, thereby changing the duty cycle.Figure24. Circuit Diagram of Sawtooth Generator uo1=+UZ, D is cut off, charging time constant: R4C.uo1=-UZ, D is on, charging time constant: (R6∥R4)C≈R6C.Figure25. The Waveform of the Sawtooth GeneratorVI QuizLC resonant circuits are used in:a) RF and ultrasonic oscillators.b) AF and ultrasonic oscillators.c) LF sweep oscillators.d) Variable frequency crystal oscillators. Answer: aⅦ FAQ1. What are the uses of an oscillator?Oscillators have very high precision and accuracy usually <100 ppm variation at a max. So with this kind of accuracy, the oscillator can be used as a clock of the microcontroller (the clock is the most essential part of the microcontroller, without an accurate clock, the functionality will be erratic because we cannot expect the output at the same time we have designed it for). All the quartz-based watches use an Oscillator (32kHz quartz crystal) to keep the time. SO if your timekeeping devices are running with an oscillator, you can imagine the accuracy.Oscillators can additionally be used to generate waveforms required in test benches. In almost all the applications where timing and synchronization are very essential, an oscillator finds its place. For example, in communication systems (whichever electronic communication you consider let it be a telephone, lan, anything) an oscillator is the heart.An oscillator can be used in power systems to generate accurate power waveforms. 2. What is the function of a local oscillator?A local oscillator is used in transmitters and receivers to add or subtract an amount to a basic carrier and modulation. Very handy, as it’s easiest to build up a carrier and modulate it at a low frequency, like 445Kc or 10.7MHz, and then add to it a “LO” to get it up to the FM band or the Gigahertz Wifi or radar bands. The same thing on receive, you first use a 'LO' to subtract down to an intermediate frequency where it’s so much easier to amplify and filter. 3. How do you make a crystal oscillator?The simplest is to use a logic inverter. Put a crystal between the input and output. Some schematics show some caps from the crystal legs to the ground and some show a series resistor. 4. Which type of circuit is used in the oscillator?Types of Oscillators: Harmonic Oscillators & Crystal Oscillators. Harmonic or linear oscillators produce a sinusoidal output where a signal increases and decreases at a predictable level over time. Two basic types are RC, or resistor/capacitor circuits, as well as LC, or inductor-capacitor circuits. 5. What is an Oscillator and the types of oscillators?An oscillator is a type of circuit that controls the repetitive discharge of a signal, and there are two main types of the oscillator; a relaxation, or a harmonic oscillator. This signal is often used in devices that require a measured, continual motion that can be used for some other purpose. 6. What is the basic principle of an oscillator?There are many types of electronic oscillators, but they all operate according to the same basic principle: an oscillator always employs a sensitive amplifier whose output is fed back to the input in phase. Thus, the signal regenerates and sustains itself. This is known as positive feedback. 7. What is the working of the oscillator?Oscillators convert direct current (DC) from a power supply to an alternating current (AC) signal. They are widely used in many electronic devices ranging from simplest clock generators to digital instruments (like calculators) and complex computers and peripherals etc. 8. How does an oscillator work without input?An oscillator circuit uses a vacuum tube or a transistor to generate an AC output. ... For continuously generating output without the requirement of any input from the preceding stage, a feedback circuit is used. From the above block diagram, the oscillator circuit produces oscillations that are further amplified by the amplifier. 9. What causes oscillation?If a constant force such as gravity is added to the system, the point of equilibrium is shifted. ... In the spring-mass system, oscillations occur because, at the static equilibrium displacement, the mass has kinetic energy which is converted into potential energy stored in the spring at the extremes of its path. 10. What is the difference between oscillator and inverter?The oscillator is a generalized term for an active circuit that produces a periodic waveform. The inverter is a specialized term for a system that contains an oscillator and produces large amounts of power(such as AC) from a source (like a DC battery). The oscillator has no input and produces an oscillating wave as output.
kynix On 2020-07-31
In daily production and life, ultrasonic ranging sensors are mainly used for non-contact automatic parking distance control (PDC) of automobiles, obstacle avoidance robots, construction sites and industrial working environments that require liquid level, well depth, pipeline length, etc. In general, there are two commonly used ultrasonic distance measurement methods: - The ultrasonic ranging system based on single chip microcomputer or embedded equipment; - An ultrasonic ranging system based on CPLD (complex programmable logic device). In order to understand the design and application of ultrasonic ranging sensor, let us first understand the working principle of ultrasonic sensor. Introducing ultrasonic sensor & taking HC-SR04 as an example Catalog I What is ultrasonic sensor? II Methods for ultrasonic ranging III Principles for ultrasonic ranging IV Conclusion FAQ I What is ultrasonic sensor? Figure 1. Working principle of ultrasonic sensor ranging An ultrasonic sensor is a sensor that converts an ultrasonic signal into another energy signal (usually an electrical signal). Ultrasonic is a mechanical shock wave generated in elastic media with a frequency greater than 20 kHz. Because of its strong directivity, slow energy consumption and relatively long propagation distance, it is often used in non-contact ranging. In addition, ultrasonic has the big ability to penetrate liquid and solid, especially in the sunshine opaque solid. When an ultrasonic hits an impurity or an interface, itwill produce a significant reflection to form an echo, and when it hits a moving object will cause a phenomenon called Doppler Effect. Therefore, ultrasonic ranging has a good adaptability to the environment, and ultrasonic distance measurement can be well compromised in real time, precision, and price. II Methods for ultrasonic ranging At present, there are various methods for ultrasonic ranging: - round-trip time detection; - phase detection; - acoustic amplitude detection. The principle is that the ultrasonic sensor emits ultrasonic waves of a certain frequency, propagates through the air medium, and is reflected back after reaching the measurement target or the obstacle. After being reflected, the ultrasonic receiver receives the pulses, and the time it takes, is the round-trip time, which is related to the distance traveled by ultrasonic waves. Measuring the wave propagation time to get the wave propagation distance: Assuming that s is the distance between the measured object and the range finder, the time measured is t / s, and the velocity of ultrasonic propagation is expressed as v/m·s-1, then there is a relation (1): s=vt/2 (1) When the accuracy is required, the influence of temperature on the ultrasonic propagation speed needs to be considered, therefore the ultrasonic propagation speed is corrected according to relation (2) to reduce the error. v=331.4+0.607T (2) Where T is the actual temperature, the unit is °C; v is the propagation speed of ultrasonic wave in the medium, and the unit is m/s. Figure 2. Working principle of ultrasonic ranging sensor III Principles for ultrasonic ranging The principle of ultrasonic ranging is to transmit ultrasonic waves in a specific direction through an ultrasonic transmitter, and start timing at the same time as the transmission. When ultrasonic waves propagate in the air and hit an obstacle, they will immediately return and be received by the ultrasonic receiver, and stop timing immediately. The ultrasonic ranging sensor uses the principle of ultrasonic echo ranging and uses precise time difference measurement technology to detect the distance between the sensor and the target. It has the advantages of small angle, small blind area, high measurement accuracy, non-contact ranging, waterproof, anti-corrosion, and low cost. Ultrasonic ranging sensors are usually used in a way that one transmitter corresponds to one receiver, but there are also multiple transmitters corresponding to one receiver. Therefore, the ultrasonic distance sensor can measure the return and return time of the ultrasonic wave to determine the distance of the object. This is how the ultrasonic distance sensor works. For the ultrasonic distance sensor, we recommend to use the Korean Hagisonic ultrasonic distance sensor module HG-C40U. Figure 3. Ultrasonic distance sensor module HG-C40U Ultrasonic distance sensor module has two optional transmission modes: - Free operation mode: when there is power supply, the sensor itself can send trigger and burst signals and it is usually for basic applications; - External trigger mode: the external system (controller or processor) controls trigger signals for advanced applications. These two modes are suitable for a variety of purposes. In addition, the sensors also involve the choice of two input power supplies: - Low voltage (5V) for the processor circuit, the distance to the obstacle can be measured is 3.5m; - High voltage (12V) for the controller circuit, the distance to the obstacle can be measured is 5m. The data is transmitted by UART (universal asynchronous receiver-transmitter) with a resolution of less than 5mm. On the other hand, users can select different setting modes according to their own environment needs. Such as free-running / UART triggering / external trigger settings, etc. At the same time, on the basis of baud rate of UART communication, the user can also decide whether to set up the circular buffer or not. The output signal uses high performance ASIC (application-specific integrated circuit) chip to ensure stable transmission and sensitive reception, and the communication between sensor and PC uses "interface board" (RS232, power regulator). The data show that the real received ultrasonic wave can be amplified in real time by using the monitor program on PC, the distance value can be output by UART (ASCII, mm), and then the detection signal can be converted into the rectangular TTL level signal (square wave) in real time. IV Conclusion Ultrasonic sensors are reliable, cost-effective and efficient solutions for distance sensing, level and obstacle detection. Once you understand how ultrasonic sensors work and which ultrasonic technology is most suitable rather than excellent, you can make more informed decisions about the correct sensor system for your application. FAQ 1. What type of sensor is ultrasonic sensor? ultrasonic / level sensors measure the distance to the target by measuring the time between the emission and reception. An optical sensor has a transmitter and receiver, whereas an ultrasonic / level sensor uses a single ultrasonic element for both emission and reception. 2. How many types of ultrasonic sensors are there? four types. All together there are four types of ultrasonic sensors, classified by frequency and shape: the drip-proof type, high-frequency type, and open structure type (lead type and SMD type). 3. What is the range of ultrasonic sensor? For ultrasonic sensing, the most widely used range is 40 to 70 kHz. The frequency determines range and resolution; the lower frequencies produce the greatest sensing range. At 58 kHz, a commonly used frequency, the measurement resolution is one centimeter (cm), and range is up to 11 meters. 4. Can ultrasonic sensor detect human? Finally, ultrasonic sensors assist in detecting people for autonomous navigation of robots. Ultrasonic sensors can be used to set multiple tripwire distances to help navigate around people. Additionally, the high read rate allows you to quickly detect when a person may enter your robot's path. 5. Is ultrasonic sensor harmful? Occupational exposure to ultrasound in excess of 120 dB may lead to hearing loss. Exposure in excess of 155 dB may produce heating effects that are harmful to the human body, and it has been calculated that exposures above 180 dB may lead to death. 6. How do ultrasonic sensors work? Ultrasonic sensors work by emitting sound waves at a frequency too high for humans to hear. They then wait for the sound to be reflected back, calculating distance based on the time required. This is similar to how radar measures the time it takes a radio wave to return after hitting an object. 7. Why is ultrasonic sensor used? Ultrasonic sensors are used primarily as proximity sensors. They can be found in automobile self-parking technology and anti-collision safety systems. ... Ultrasonic sensors are also used as level sensors to detect, monitor, and regulate liquid levels in closed containers (such as vats in chemical factories). 8. Where are ultrasonic sensors used? Ultrasonic sensors have been used throughout many applications and industries. They are used within food and beverage to measure liquid level in bottles, they can be used within manufacturing for an automated process and control maximising efficiency on the factory floor. 9. Is ultrasonic sensor waterproof? Most ultrasonic distance sensors aren't waterproof which can be a problem if you need your project to withstand the elements outdoors. ... This sensor is suitable for outdoor applications such as car reversing sensors, security alarms, industrial inspection, etc. 10. Is ultrasonic sensor analog or digital? Usually, ultrasonic sensors are integrated with an Analog-to-Digital converter (ADC). 11. How do ultrasonic sensors measure distance? As the name indicates, ultrasonic sensors measure distance by using ultrasonic waves. The sensor head emits an ultrasonic wave and receives the wave reflected back from the target. Ultrasonic Sensors measure the distance to the target by measuring the time between the emission and reception. 12. How accurate is the ultrasonic sensor? The more accurate ultrasonic sensors can achieve 0.1 – 0.2% of the detected range under perfectly controlled conditions, and most good ultrasonic sensors can generally achieve between 1% and 3% accuracy. 13. What can ultrasonic sensors detect? Ultrasonic sensors can measure the distance to a wide range of objects regardless of shape, color or surface texture. They are also able to measure an approaching or receding object. 14. Are ultrasonic sensors affected by smoke? Ultrasonic sensors are superior to infrared sensors because they aren't affected by smoke or black materials, however, soft materials which don't reflect the sonar (ultrasonic) waves very well may cause issues. 15. Which is better ultrasonic or IR sensor? Ultrasonic sensors work using sound waves, detecting obstacles is not affected by as many factors. If reliability is an important factor in your sensor selection, ultrasonic sensors are more reliable than IR sensors. If you're willing to compromise reliability for cost, infrared sensors are ideal for your application.
kynix On 2018-07-12
Join our mailing list!
Be the first to know about new products, special offers, and more.
Feature Posts
How Resistors Work: From Basic Principles to Advanced Applications2025-07-30
DC Switching Regulators: Principles, Selection, and Applications2025-05-30
FPGA vs CPLD: In-depth Analysis of Architecture, Performance and Application2025-05-07
MOSFET Technology: Essential Guide to Working Principles & Applications2025-05-04
SMD Resistor: Types, Applications, and Selection Guide2025-04-30