May 12, 2024

Design concepts that peripheral circuits must know

For the resistor, I think everyone thinks it is simple, there is nothing to say. In fact, the resistance should be very extensive, and its role is completely different in different applications. I will summarize the basic usage and the areas that are easily overlooked.

1 concept

Resistivity (usually denoted by "R"), in physics, indicates the magnitude of the conductor's resistance to current. The greater the resistance of the conductor, the greater the resistance of the conductor to the current. Different conductors have different resistances, and resistance is a characteristic of the conductor itself. The resistance will cause a change in the amount of electron flow. The smaller the resistance, the larger the electron flux and vice versa. Superconductors have no resistance.

The resistance value of the resistance element is generally related to temperature, material, length, and cross-sectional area. The physical quantity that measures the magnitude of the resistance of the resistance is the temperature coefficient, which is defined as the percentage change of the resistance value for every 1 °C increase in temperature.

The main physical characteristic of a resistor is that it converts electrical energy into thermal energy. It can also be said that it is an energy-consuming component through which current generates internal energy. The resistor usually functions as a partial pressure or a shunt in the circuit. For signals, both AC and DC signals can pass through the resistor.

The resistance of the conductor is usually indicated by the letter R. The unit of resistance is ohm, referred to as Europe, the symbol is Ω (Greek, read as Omega), 1 Ω = 1V/A. Larger units have kilo ohms (kΩ) and megohms (MΩ) (mega = millions, or 1 million).

KΩ (thousand ohms), MΩ (megohms), their conversion relationship is:

1TΩ=1000GΩ; 1GΩ=1000MΩ; 1MΩ=1000KΩ; 1KΩ=1000Ω (that is, one thousand input rate)

Two resistors in parallel can also be expressed as

Series: R=R1+R2+. . . +Rn

Parallel: 1/R=1/R1+1/R2+. . . +1/Rn Two resistors in parallel can also be expressed as R=R1·R2/(R1+R2)

Definition: R=U/I

The formula: R = ρL / S (ρ represents the resistivity of the resistor, which is determined by its own nature, L represents the length of the resistor, S represents the cross-sectional area of ​​the resistor)

The resistance value of a resistive element is generally related to temperature and to the length of the conductor, the cross-sectional area, and the material. The physical quantity that measures the magnitude of the resistance affected by temperature is the temperature coefficient, which is defined as the percentage change in resistance value for every 1 °C increase in temperature. Most (metal) resistance increases with increasing temperature, and some semiconductors do the opposite. Such as: glass, carbon in the case of a certain temperature, there is a formula R = ρl / s where ρ is the resistivity, l is the length of the material, the unit is m, s is the area, the unit is square meters. It can be seen that the resistance of the material is proportional to the length of the material and inversely proportional to its area.

The physical quantity of the resistor: 1 ohm voltage produces a ohmic current and is 1 ohm resistor. In addition to the function of the resistor used in the circuit to control the current and voltage, it can also be used as a heating element.

2 resistance application

The main role of the resistor in the circuit is shunt, current limit, voltage divider, bias, filtering (combined with capacitors) and impedance matching.

Resistance is usually divided into three categories: fixed resistors, variable resistors, and special resistors.

In electronic products, it is most commonly applied with fixed resistors. Commonly used and commonly used are RT type carbon film resistors, RJ type metal film resistors,

RX type wirewound resistors, chip resistors widely used in recent years.

Resistor model name: R for resistance, T-carbon film, J-metal, X-wire winding, is the first letter of Pinyin. In domestically produced old-fashioned electronic products, it is often seen that the resistance of the exterior is coated with green paint, that is, the RT type. The red color resistor is RJ type.

According to the power, it can be divided into small power resistors and high power resistors. The high-power resistor is usually a metal resistor. In fact, it should be a metal (aluminum) heat sink outside the metal, so it can have more than 10W; it can be easily seen on the market in the electronics market. .

Metal resistors are typically used as loads or as outdoor heaters for small devices, as can be seen in some decoder boxes and all weather guards in CCTV.

The resistor acts as a current limiting and voltage dividing in the circuit. Usually 1/8W resistors are fully satisfactory. However, in the case of a 7-segment LED, the difference between the voltage drop of the LED and the supply voltage should be taken into consideration, and then the maximum current of the LED is considered, usually 20 mA (ultra-high brightness LED), if it is 2×6 (2 rows of 6 In series), the current is 40mA.

Different manufacturers choose different materials, and the pressure drop is also different. So you need to add electricity to measure it. However, do not let the current of a single LED exceed 20mA. At this time, the current will not increase in brightness, but the life of the LED will decrease. The size of the current limiting resistor is the voltage drop divided by the current. The power of the resistor can be calculated.

Potentiometer

The potentiometer is an adjustable resistor. Its resistance varies from 1 to nΩ. For example, N=102=10×10 is the power of 2, which is 1000 ohm, 1KΩ. Similarly, 502 = 5KΩ.

The potentiometer is divided into single-turn and multi-turn potentiometers. The single-turn potentiometer is usually gray-white with a cross-adjustable knob on the surface. It is placed in a fixed position before the factory, not at the 2 heads; the multi-turn potentiometer is usually blue, and the adjusted knob is a word. One-word small screwdriver is adjustable; multi-turn potentiometer is divided into two types: top adjustment and side adjustment, which is mainly convenient for debugging the circuit board.

Some are instrumentation equipment, usually analog circuits, there are some uncertain factors that need to be adjusted to achieve the best results; some are devices that need to output a variable thing, such as voltage and current, also need a potentiometer .

Row resistance

Is the sip n package, the more commonly used is the resistance of the 502 and 103 9-pin resistor row; like sip9 is 8 resistors packaged together, 8 resistors have one end connected together, is the common end, used in the row resistance A small white dot indicates. The row resistance is usually black and yellow; 51 system P0 needs a row resistor pull-up; otherwise, when it is input, the data cannot be read normally; when it is output, 7407 is OK, no pull-up resistor is needed; However, it is still not possible to pick up other chips. Interested can look at the structure of 51 P0; no interest, according to the gourd painting, it is correct.

Photoresistance

When the intensity of light incident on the photoresistor changes, the resistance value also changes. Obviously this is a property of semiconductor materials.

The change in light intensity can be detected using a photoresistor.

Resistor package

The resistor package is available in a surface mount and an axial package. The axial package is: axial0.4, axial0.6, axial0.8, etc.; axial is the meaning of the axis in English; the most commonly used surface mount resistor is 0805; of course, there is a larger; but larger Resistance is not very common.

3 current limiting resistor

Resistor as a current limit should be one of the most commonly used applications. For the peripheral design of a microcontroller, the application of the resistor is very important. In many cases, we must connect a current limiting resistor to the I/O port of the microcontroller to ensure that the peripheral circuit does not. Will use short circuit, overload and other reasons to burn out the I / O port of the microcontroller, or even the entire microcontroller.

For the current limit, everyone must be very clear, but what is your standard when choosing the resistance value? Do you know that the microcontroller port is the maximum input current? Do you know the maximum output current of the microcontroller? Do you know the maximum voltage that the microcontroller port can withstand?

Faced with these problems, I am afraid that many people are aware of the fact that they do not know why, and they rely on experience to obtain them. They do not fully calculate the value according to the requirements of the circuit. To this end, I ask these questions here, I don't want to teach you how to calculate these values. Anyone who knows Ohm's law should know how to calculate it. So, I just hope that everyone can understand these parameters of the MCU before choosing. Then, Calculated according to the parameters. Be sure to leave some reserved space when calculating.

IOL, what exactly does IOH mean?

When looking at the DATASHEET files of some components, I often encounter the parameters of the components, IOL, IOH, IIL, IIH. I also know that they refer to the maximum and minimum currents when the input and output are high and low, but when they are connected, they The matching problem has been very vague, such as: IOL=1.5MA; IOH=-300UA

The other input is:

IIL=-100UA; IIH=10UA;

Can they directly connect with each other? IOL, IOH, what exactly is it referring to? Is it a driver?

Reference answer:

IIL and IIH indicate the current value when the input is high and low, and the - sign indicates the current flowing from the device.

IOL and IOH indicate the current value when the output is low and high, and the same - sign indicates the current flowing from the device.

The first device you said means that it can sink (flow) 1.5mA when the output is low, and 300uA when the output is high. The second device indicates that 100uA will flow out when the input is low and 10uA when the input is high. |IOL|> |IIL|,|IOH|> |IIH| means that the output device can drive the input device.

4 pull-down resistor

Another application of the resistor is the pull-up resistor. Pull-up is to clamp the indeterminate signal through a resistor to the high level, and the resistor acts as a current limiter. Pull down the same reason. It is also the ability to clamp an indeterminate signal through a resistor at a low level.

Pull-up is the input current to the device, pull-down is the output current; the strength is only the resistance of the pull-up resistor is different, there is no strict distinction; for the non-collector (or drain) open-circuit output type circuit (such as ordinary gate circuit) to boost the current The ability of the voltage and the voltage is limited. The function of the pull-up resistor is mainly to output the current channel for the open-collector output type circuit.

►►1 When the TTL circuit drives the CMOS circuit, if the high level of the circuit output is lower than the lowest level of the CMOS circuit (typically 3.5V), then the pull-up resistor needs to be connected to the output of the TTL to improve Output a high value.

►►2 The OC gate must use a pull-up resistor to increase the high value of the output.

►►3 is to enhance the drive capability of the output pin, and some pull-up resistors are often used on the microcontroller pins.

►►4 On the CMOS chip, in order to prevent damage caused by static electricity, the unused pins should not be left floating. Generally, pull-up resistors are connected to reduce the input impedance and provide a discharge path.

►►5 chip's pin plus pull-up resistor to increase the output level, thus improving the noise margin of the chip input signal and enhancing the anti-interference ability.

►►6 Improve the anti-electromagnetic interference capability of the bus. It is easier to accept external electromagnetic interference when the pin is left floating.

►►7 Long-distance transmission in the resistance mismatch can easily cause reflected wave interference, plus, pull-down resistor is resistance matching, effectively suppressing reflected wave interference.

Pull-up resistor

Is the resistor from the high level of the power supply to the output

►►1 If the level is OC (Open Collector, TTL) or OD (Open-Drain, CMOS) output, then the pull-up resistor does not work. It is easy to understand that the tube cannot output high level without power. It is.

►►2 If the output current is relatively large, the output level will decrease (there is already a pull-up resistor in the circuit, but the resistance is too large, the voltage drop is too high), and the pull-up resistor can be used to provide the current component. Flat "pull high". (There is a resistor on the pull-up resistor inside the IC, when the total resistance is reduced and the total current is increased). Of course, the pull-up resistor of the tube operating in the linear range as needed should not be too small. Of course, this method is also used to achieve the matching of the gate circuit levels.

Why use pull-up resistors?

Generally, when the single button is used for triggering, if the IC itself does not have an internal resistor, in order to maintain the single button in the untriggered state or return to the original state after the trigger, another resistor must be connected outside the IC.

Digital circuits have three states: high, low, and high-impedance. Some applications do not expect a high-impedance state. They can be stabilized by pull-up or pull-down resistors, depending on design requirements. !

Generally speaking, I/O ports, some can be set, some can not be set, some are built-in, some need to be external, the output of I/O port is similar to C of a triode, when C is connected through a resistor and power supply Together, the resistor becomes a pull-up resistor, that is, the port is high when it is normal; when C is connected to ground through a resistor, the resistor is called a pull-down resistor.

Pull-up resistors are used to solve the problem of providing current when the bus drive capability is insufficient. The general statement is that the pull-up increases the current, and the pull-down resistor is used to sink the current.

5 typical applications

►►1 fixed level

When the peripheral does not receive control, we need to fix a peripheral or microcontroller I / O port at a fixed level, you need to connect the pull-down resistor as needed, for example:

In the above figure, for the key input, if there is no pull-up resistor, if there is no pull-up resistor, the MCU port will be in a suspended state, there is no certain level, except for the MCU with internal pull-up resistor, plus The pull-up resistor will, when there is no button, the MCU port will remain high. When there is a button, the MCU port will input a low level. For the buzzer, since it has the same effect as the button, without the pull-up resistor, it is impossible to distinguish the working state of the triode when there is no single-chip control. Therefore, a pull-up resistor must be added to ensure that there is no single-chip control. The triode is turned off and the buzzer does not work.

►►2 level input

Sometimes due to the design of the device itself, if the external pull-down resistor is not connected, the device cannot normally achieve high and low level conversion. For example, for an open-drain output I2C bus, if the pull-up resistor is not connected, it can only output a low level, and cannot achieve a high-level output. Plus a pull-up resistor ensures that when there is no control signal, it is pulled up. The resistor achieves a high level.

The second circuit design of the single chip: capacitor

Capacitors, as another basic component of electronic circuits, are familiar to everyone. Let's talk about some basic applications and considerations of capacitors. However, due to the wide application of capacitors, it may not be all-inclusive. If there is a place that netizens feel that they have not talked about, they hope that the public will be perfect.

1 concept

Capacitance, also known as "capacity", refers to the amount of charge stored at a given potential difference, denoted as C, and the international unit is Farad (F). Generally, the electric charge moves in the electric field. When there is a medium between the conductors, the electric charge is hindered and the electric charge accumulates on the conductor, causing the accumulated storage of the electric charge. The stored electric charge amount is called a capacitance. Capacitance is one of the most widely used electronic components in electronic devices. It is widely used in blocking, coupling, bypassing, filtering, tuning loops, energy conversion, and control circuits.

Capacitance (or capacitance) is the physical quantity that represents the charge capacity of a capacitor.

Capacitively, it is a static charge storage medium. It may be a permanent charge. This is its characteristic. It is widely used. It is an indispensable electronic component in the field of electronics and power. Mainly used in power supply filtering, signal filtering, signal coupling, resonance, filtering, compensation, charge and discharge, energy storage, DC blocking and other circuits.

In circuit science, given the potential difference, the capacitor's ability to store charge, called capacitance, is labeled C. In the International System of Units, the unit of capacitance is farad, labeled F.

The sign of the capacitor is C.

C=εS/d=εS/4πkd (vacuum)=Q/U

In the International System of Units, the unit of capacitance is Farah, referred to as the law,

The symbol is F. Since the unit of Farah is too large, the commonly used capacitance units are millifarad (mF), microfarad (μF), nanofarad (nF), and picofarad (pF). The conversion relationship is:

1 Farad (F) = 1000 millifarads (mF) = 1000000 microfarads (μF)

1 microfarad (μF) = 1000 nanofarads (nF) = 1,000,000 picofarads (pF).

The relationship between capacitance and battery capacity:

1 volt ampere = 1 watt hour = 3600 joules

w=0.5cuu

A capacitor, if the potential difference between the two stages is 1 volt, the capacitance of this capacitor is 1 method, namely: C = Q / U but the size of the capacitor is not by Q (charge) or U (voltage) Determined, namely: C = εS / 4πkd. Where ε is a constant, S is the facing area of ​​the capacitor plate, d is the distance of the capacitor plate, and k is the electrostatic force constant. A common parallel plate capacitor has a capacitance of C = εS / d (ε is the dielectric constant of the dielectric between the plates, S is the plate area, and d is the distance between the plates).

Definition: C=Q/U

The formula for calculating the potential energy of a capacitor: E=CU^2/2=QU/2=Q^2/2C

Multi-capacitor parallel calculation formula: C=C1+C2+C3+...+Cn

Multi-capacitor series calculation formula: 1/C=1/C1+1/C2+...+1/Cn

Three capacitors in series: C=(C1*C2*C3)/(C1*C2+C2*C3+C1*C3)

Capacitance refers to the ability to accommodate an electric field. Any electrostatic field is composed of many capacitors. There are capacitors in the electrostatic field. Capacitors are described by electrostatic fields. It is generally believed that the isolated conductor forms a capacitance with the infinity, and the conductor ground is equivalent to being connected to infinity and connected to the earth as a whole.

2 capacitor application

Capacitors exhibit different states depending on the location of the capacitor in the circuit. The common classifications are as follows:

►►1 is divided into three categories according to structure: fixed capacitors, variable capacitors and trimmer capacitors;

►►2 According to electrolyte classification: organic dielectric capacitors, inorganic dielectric capacitors, electrolytic capacitors and air dielectric capacitors;

►►3 by purpose: high frequency bypass, low frequency bypass, filtering, tuning, high frequency coupling, low frequency coupling, small capacitors;

►►4 frequency bypass: ceramic capacitor, mica capacitor, glass film capacitor, polyester capacitor, glass glaze capacitor;

►►5 low frequency bypass: paper capacitor, ceramic capacitor, aluminum electrolytic capacitor, polyester capacitor;

►►6 filter: aluminum electrolytic capacitor, paper capacitor, composite paper capacitor, liquid tantalum capacitor;

►►7 tuning: ceramic capacitors, mica capacitors, glass film capacitors, polystyrene capacitors;

►►8 high frequency coupling: ceramic capacitors, mica capacitors, polystyrene capacitors;

►►9 Low coupling: paper capacitors, ceramic capacitors, aluminum electrolytic capacitors, polyester capacitors, solid tantalum capacitors;

►►10 small capacitors: metallized paper capacitors, ceramic capacitors, aluminum electrolytic capacitors, polystyrene capacitors, solid tantalum capacitors, glass glaze capacitors, metalized polyester capacitors, polypropylene capacitors, mica capacitors.

Capacitance

* The basic function of capacitors is charging and discharging, but many circuit phenomena extended by this basic charging and discharging effect make capacitors have various uses, such as: in electric motors, use it to produce phase shift; In the flash, use it to generate high-energy instant discharges and so on. In electronic circuits, the use of different properties of capacitors is particularly high. Although many different uses, there are also very different uses, but their functions are all from charging and discharging. Below is a list of the roles of some capacitors:

Coupling Capacitor: The capacitor used in the coupling circuit is called a coupling capacitor. This type of capacitor circuit is widely used in RC-coupled amplifiers and other capacitive coupling circuits to isolate DC-DC.

Filter Capacitor: A capacitor used in a filter circuit is called a filter capacitor. This capacitor circuit is used in power supply filtering and various filter circuits. The filter capacitor removes signals in a certain frequency band from the total signal.

Decoupling Capacitors : Capacitors used in decoupling circuits are called decoupling capacitors. This type of capacitor circuit is used in the DC voltage supply circuit of a multistage amplifier. The decoupling capacitor eliminates unwanted low frequency crosstalk between each stage of the amplifier.

High-frequency vibration-absorbing capacitor: The capacitor used in the high-frequency vibration-damping circuit is called the high-frequency vibration-absorbing capacitor. In the audio negative feedback amplifier, in order to eliminate the high-frequency self-excitation that may occur, this capacitor circuit is used to eliminate The high frequency howling that the amplifier may appear.

Resonant Capacitor: Capacitors used in LC resonant circuits are called resonant capacitors, and such capacitor circuits are required in both LC parallel and series resonant circuits.

Bypass capacitor: The capacitor used in the bypass circuit is called bypass capacitor. If the signal in a certain frequency band needs to be removed from the signal in the circuit, the bypass capacitor circuit can be used. According to the frequency of the removed signal, there is a full frequency domain. (All AC signals) Bypass capacitor circuit and high frequency bypass capacitor circuit.

Neutralization Capacitor: The capacitor used in the neutralization circuit is called the neutralization capacitor. In radio high frequency and intermediate frequency amplifiers, TV high frequency amplifiers, this neutralization capacitor circuit is used to eliminate self-excitation.

Timing Capacitor: A capacitor used in a timing circuit is called a timing capacitor. A timing capacitor circuit is used in a circuit that requires time control by capacitor charging and discharging, and the capacitor controls the magnitude of the time constant.

Integral Capacitor: A capacitor used in an integrating circuit is called an integrating capacitor. In the synchronous separation circuit for scanning the potential field, the field synchronization signal can be taken out from the field composite synchronization signal by using the integrating capacitance circuit.

Differential Capacitor: A capacitor used in a differential circuit is called a differential capacitor. In order to obtain the apex trigger signal in the flip-flop circuit, the differential capacitance circuit is used to obtain a cusp pulse trigger signal from various types of (mainly rectangular pulse) signals.

Compensation capacitor: The capacitor used in the compensation circuit is called the compensation capacitor. In the bass compensation circuit of the deck, this low-frequency compensation capacitor circuit is used to boost the low-frequency signal in the playback signal. In addition, there is a high-frequency compensation capacitor. Circuit.

Bootstrap Capacitor: The capacitor used in the bootstrap circuit is called the bootstrap capacitor. The commonly used OTL power amplifier output stage circuit uses this bootstrap capacitor circuit to boost the positive half-cycle amplitude of the signal by positive feedback.

Dividing capacitor: The capacitor in the frequency dividing circuit is called the frequency dividing capacitor. In the speaker frequency dividing circuit of the speaker, the frequency dividing capacitor circuit is used to make the high frequency speaker work in the high frequency band, and the intermediate frequency speaker works in the middle frequency band, the low frequency. The speaker works in the low frequency range.

Load capacitance: refers to the effective external capacitance that determines the resonant frequency of the load together with the quartz crystal resonator. Standard values ​​commonly used for load capacitors are 16pF, 20pF, 30pF, 50pF, and 100pF. The load capacitance can be adjusted according to the specific situation. The adjustment can generally adjust the operating frequency of the resonator to the nominal value.

Tuning Capacitor: Connected to both ends of the oscillating coil of the resonant circuit to play the role of selecting the oscillating frequency.

Pad Capacitor: An auxiliary capacitor in series with the main capacitor of the resonant circuit. Adjusting it can make the frequency range of the oscillating signal smaller and significantly increase the oscillating frequency at the low frequency end.

The neutralization capacitor is connected between the base and the emitter of the triode amplifier to form a negative feedback network to suppress self-oscillation caused by the inter-electrode capacitance of the triode.

Stabilized capacitor: In the oscillating circuit, it acts as a stable oscillating frequency.

Timing capacitor: In the RC time constant circuit, it is connected in series with the resistor R to determine the capacitance of the charging and discharging time.

Acceleration capacitor: Connected to the oscillator feedback circuit to accelerate the positive feedback process and increase the amplitude of the oscillating signal.

Capacitance reduction: In UHF tuner circuits, capacitors connected in series to shorten the length of the oscillating inductor.

Clappa Capacitor: In a three-point capacitor oscillating circuit, a capacitor in series with an inductive oscillating coil acts to eliminate the effect of transistor junction capacitance on frequency stability.

Sira capacitor: In the capacitor three-point oscillating circuit, the capacitor connected in parallel with the two ends of the inductor oscillating coil acts to eliminate the junction capacitance of the transistor, making the oscillator easy to start at the high frequency end.

Stabilizing capacitor: In the discriminator, used to stabilize the amplitude of the output signal.

Pre-emphasis capacitor: In order to avoid the attenuation and loss of the frequency division of the audio modulation signal during processing, the RC high-frequency component is set to increase the network capacitance.

Deemphasis capacitance: To restore the original audio signal, the audio signal is required with attenuated by the high frequency noise components and pre-emphasis being lifted, set the RC network capacitance.

Phase shift capacitor: A capacitor used to change the phase of an AC signal.

Feedback Capacitor: A capacitor that is connected across the input and output of the amplifier to return the output signal to the input.

Bucking current limiting capacitor: connected in series in the AC loop, using the capacitive reactance characteristics of the capacitor to limit the AC current, thus forming a voltage dividing circuit.

Reverse-pass capacitor: used in the line scan output circuit, and connected between the collector and emitter of the line output tube to generate high-voltage line scan sawtooth wave reverse pulse, the withstand voltage is generally above 1500 volts.

S correction capacitor: connected in series in the deflection coil loop to correct the extended linear distortion of the edge of the tube.

Bootstrap boost capacitor: Use the charge and discharge energy storage characteristics of the capacitor to raise the potential of the circuit at a certain point, so that the potential at this point reaches twice the voltage value of the power supply terminal.

Elimination point capacitor: Set in the view-and-discharge circuit to remove the residual bright spot capacitance on the picture tube when shutting down.

Soft-start capacitor: It is generally connected to the base of the switching tube of the switching power supply to prevent excessive surge current or excessive peak voltage from being applied to the base of the switching tube when the power is turned on, resulting in damage to the switching tube.

The starting capacitor is connected in series with the secondary winding of the single-phase motor to provide a starting phase-shifted AC voltage for the motor, which is disconnected from the secondary winding after the motor is in normal operation.

Operating Capacitor: Connects in series with the secondary winding of the single-phase motor to provide phase-shifted AC current to the secondary winding of the motor. When the motor is in normal operation, it is connected in series with the secondary winding.

3 decoupling capacitor

Capacitors are used in a wide variety of applications, the most common of which is decoupling capacitors. This general application is next to the power supply in order to reduce the AC impedance of the power supply to ground (also known as bypass capacitor). In the absence of this capacitor, the AC characteristics of the circuit become very strange, and the circuit oscillates in severe cases. To this end, each power supply input pin of the microcontroller and other peripheral devices should be added with a bypass capacitor.

The impedance of the capacitor is 1/(2Ï€*f*C), and the higher the frequency, the smaller the impedance should be. Structurally, a small-capacity capacitor is at a high frequency, while a large-capacity capacitor is at a lower frequency, and the impedance of the capacitor becomes the lowest. Therefore, it is necessary to connect a small capacitor and a large capacitor in parallel with the power supply to reduce the impedance of the power supply to ground over a wide frequency range.

A small-capacity capacitor lowers the impedance at a high frequency, so if it is not disposed near the circuit, the lead of the capacitor grows, and the impedance of the power supply cannot be lowered due to the impedance of the lead itself. When using a small capacitor, it must be as close as possible to the power input pin of the device, otherwise it does not make sense to add this capacitor. Due to its low frequency characteristics, bulk capacitors can be properly spaced from the device during layout without problems. Even if there is no small capacitor C1 on the low frequency circuit, the circuit can work normally. However, in high-frequency circuits, C1 plays a more important role than the large capacitor C2.

Generally, a small-capacity capacitor is a ceramic capacitor of 0.01 to 0.1 uF (film capacitor is NG), and a large-capacity capacitor is an aluminum electrolytic capacitor of 1 to 100 uF. In practical applications, small-capacity capacitors often take 104 capacitors, and large-capacity capacitors often take 10uF capacitors.

Habitually speaking, the bypass capacitor also has two capacitors in size, forming two paths and also ensuring the reliability of the circuit.

The power supply is the basis for the circuit to work. Therefore, the bypass capacitor can be considered as the "insurance" for the operation of the circuit. In the circuit diagram, it is necessary to add a bypass capacitor, so from a person's application of the bypass capacitor, especially the layout can be seen whether it is a master.

4 coupling capacitor

Coupling capacitors, also known as electric field coupling or electrostatic coupling, are a coupling method due to the presence of distributed capacitance. The coupling capacitor is such that the two systems of strong and weak current are coupled and isolated by the capacitor, providing a high-frequency signal path, preventing the power frequency current from entering the weak current system, and ensuring personal safety. In addition to the above functions, the coupling capacitor with voltage extraction device can also extract the power frequency voltage for protection and reclosing to function as a voltage transformer.

The function of capacitive coupling is to pass the AC signal from the previous stage to the next stage. The coupling method is also a direct coupling and a transformer coupling method. The direct coupling efficiency is the highest, and the signal is not distorted. However, the adjustment of the front and rear working points is complicated and involved. In order to make the working point of the latter stage not affected by the previous level, it is necessary to separate the former stage and the latter stage in the DC direction, and at the same time, the AC signal can be smoothly transmitted from the previous stage to the latter stage, and at the same time, The way to accomplish this task is to use capacitive transmission or transformer transmission. They can transmit AC signals and block DC, so that the working points of the front and rear stages are not involved. But the difference is that when transmitting with a capacitor, the phase of the signal is delayed. When transmitting with a transformer, the high-frequency component of the signal is lost. Under normal circumstances, when a small signal is transmitted, a commonly used capacitor is used as a coupling element. When a large signal or a strong signal is transmitted, a common transformer is used as a coupling element.

The coupling capacitor takes advantage of one of the most important characteristics of the capacitor: direct crossover. Through this feature, the DC circuit and the AC circuit can be well coupled to ensure mutual coordination. For the peripheral circuits of the microcontroller, the more coupling capacitors used are where the microcontroller needs to communicate with the AC signal, such as ADC and DAC.

In AD on the DA circuit, we need to convert the digital signal and the analog signal to each other. To ensure that the digital likes and the analog like do not interfere with each other, we often need to connect a capacitor in series with the input or output of the microcontroller to couple the circuit. .

Since the coupling capacitor and the load R1 directly form a high-pass filter, the capacitance should be changed accordingly because the output terminal is connected to the input impedance of different output circuits. For this reason, it is crucial to consider what kind of load to pick up in advance.

5 starting capacitor

A capacitor used in an oscillating circuit that cooperates with an inductor or a resistor to determine the oscillation frequency (time) is called an oscillating capacitor.

Check the data sheet to find out the relationship between the actual frequency and the nominal frequency:

Fx = F0(1+C1/(C0+CL))^(1/2);

And CL = Cg * Cd / (Cg + Cd) + Cs; where Cs is stray capacitance, Cg and Cd are the two external capacitors we add, usually the values ​​are equal, they are connected in series with stray capacitance Is the load capacitance of the crystal CL.

The specific formula does not need to be considered, we can know that the reduction of the load capacitance can make the actual frequency Fx become larger.

We can only change Cg and Cd. Through preliminary calculations, it is found that CL changes by 1pF, and Fx can change several hundred Hz.

The original circuit uses two capacitors of 33pF, which is 16.5pF in parallel. Our chip capacitors are only 27pF, 33pF, 39pF, so we chose 27pF and 39pF in parallel, the capacitance is 15.95pF. After the capacitor was soldered, the measurement was more than 200 Hz larger than the original and fell within the design range.

Conclusion: The two capacitors on the crystal oscillator circuit can be unequal. The value of the trimmer capacitor can be used to fine tune the oscillation frequency of the crystal oscillator. However, if you measure a few crystal oscillators, the frequency is large and small, and the offset is large, then the crystal oscillator is not qualified.

For this capacitor, you should be familiar with it. Basically, no circuit with a microprocessor has at least one circuit with a starting capacitor. Although, most of the time, we are choosing these two capacitors according to experience. In fact, this is not scientific, and sometimes the crystal does not work. Therefore, it is still necessary to choose the appropriate starting capacitor. In fact, different crystal oscillators need different starting capacitors. When purchasing a crystal oscillator, you should choose a suitable crystal oscillator. Generally speaking, the crystal oscillator data sheet also provides the basis for selecting the starting capacitor.

Anyway, in general, we can still have capacitance based on experience:

In the main clock input circuit of the single chip microcomputer, it is generally possible to select a starting capacitor of about 22pF, and selecting a starting capacitor of 6pF in the RTC clock is no problem. Of course, if the clock requirements are strict, it is recommended to refer to the crystal data sheet and select the capacitor.

6 reset capacitor

As shown in the figure is a capacitor reset circuit. Al is a CPU integrated circuit, and one pin is a reset pin of the integrated circuit A1. The reset pin is generally represented by RESET. The circuit in the 1-pin circuit and the external circuit constitute a reset circuit, Cl is a reset capacitor, and Sl is a manual reset switch. The working principle of this reset circuit: the inner circuit of the I integrated circuit Al has a Schmitt trigger and a pull-up resistor R1, one end of which is connected to the DC voltage +5V, and the other end is connected to the 1st and the outside of the Al. The capacitor C1 in the circuit is connected.

After the power switch of the circuit is turned on, the +5V DC voltage charges the capacitor C1 through the resistor R1, so that there is no voltage across the capacitor C1 when the power is turned on (because the voltage across the capacitor cannot be abruptly changed), as the capacitor C1 is charged, The voltage on pin 1 of the integrated circuit A1 starts to rise, so that a reset pulse of sufficient time can be generated on the 1 pin of Al, and the time constant is generally 0.2 s.

With the charging of +5V DC voltage, the voltage on the 1 pin of Al reaches a certain value, all the circuits inside the integrated circuit A1 can establish the initial state, the reset operation is completed, and the CPU enters the initial normal working state. The purpose of this reset circuit is to make the DC voltage on the reset pin 1 of the integrated circuit A lag behind the specified time of the +5V DC working voltage of the integrated circuit A1, as shown in the voltage waveform shown in Figure 5-69. A problem.

The third circuit design of single chip microcomputer: inductance

As a special device capable of changing current, inductors are relatively rare in digital circuits and are generally used in power-related parts.

1 concept

Inductance of an ideal inductor is an attribute of a closed loop. When the coil passes current, a magnetic field induction is formed in the coil, which in turn generates an induced current to resist current flow through the coil. The interaction between this current and the coil is called the electrical inductive reactance, which is the inductance, and the unit is "Henry (H)".

电感是闭合回路的一种属性,即当通过闭合回路的电流改变时,会出现电动势来抵抗电流的改变。这种电感称为自感(self-inductance),是闭合回路自己本身的属性。假设一个闭合回路的电流改变,由于感应作用而产生电动势于另外一个闭合回路,这种电感称为互感(mutual inductance)。

自感

当线圈中有电流通过时,线圈的周围就会产生磁场。当线圈中电流发生变化时,其周围的磁场也产生相应的变化,此变化的磁场可使线圈自身产生感应电动势(感生电动势)(电动势用以表示有源元件理想电源的端电压),这就是自感。

互感

两个电感线圈相互靠近时,一个电感线圈的磁场变化将影响另一个电感线圈,这种影响就是互感。互感的大小取决于电感线圈的自感与两个电感线圈耦合的程度,利用此原理制成的元件叫做互感器。

电感符号: L

电感单位: 亨(H)、毫亨(mH)、微亨(μH),换算关系为

1H=10^3mH=10^6μH=10^9nH。

换算:数值X10的n次方如103 即为10X10的三次方nh 为10uh

除此外还有一般电感和精密电感之分

一般电感: 误差值为20%,用M表示;误差值为10%,用K表示。

精密电感: 误差值为5%,用J表示;误差值为1%,用F表示。

如:100M,即为10μH,误差20%。

2 电感应用

电感是用绝缘导线(例如漆包线,沙包线等)绕制而成的电磁感应元件。属于常用元件。

电感的作用:通直流阻交流这是简单的说法,对交流信号进行隔离,滤波或与电容器,电阻器等组成谐振电路.

调谐与选频电感的作用:电感线圈与电容器并联可组成LC调谐电路。即电路的固有振荡频率f0与非交流信号的频率f相等,则回路的感抗与容抗也相等,于是电磁能量就在电感、电容之间来回振荡,这就是LC回路的谐振现象。谐振时由于电路的感抗与容抗等值又反向,因此回路总电流的感抗最小,电流量最大(指f=f0的交流信号),所以LC谐振电路具有选择频率的作用,能将某一频率f的交流信号选择出来。

磁环电感的作用:磁环与连接电缆构成一个电感器(电缆中的导线在磁环上绕几圈作为电感线圈),它是电子电路中常用的抗干扰元件,对于高频噪声有很好的屏蔽作用,故被称为吸收磁环,由于通常使用铁氧体材料制成,所以又称铁氧体磁环(简称磁环)。在图中,上面为一体式磁环,下面为带安装夹的磁环。磁环在不同的频率下有不同的阻抗特牲。一般在低频时阻抗很小,当信号频率升高后磁环的阻抗急剧变大。可见电感的作用如此之大,大家都知道,信号频率越高,越容易辐射出去,而一般的信号线都是没有屏蔽层的,这些信号线就成了很好的天线,接收周围环境中各种杂乱的高频信号,而这些信号叠加在原来传输的信号上,甚至会改变原来传输的有用信号,严重干扰电子设备的正常工作,因此降低电子设备的电磁干扰(EM)已经是必须考虑的问题。在磁环作用下,即使正常有用的信号顺利地通过,又能很好地抑制高频于扰信号,而且成本低廉。

电感的作用还有筛选信号、过滤噪声、稳定电流及抑制电磁波干扰等重要的作用。

电感的主要参数有电感量、允许偏差、品质因数、分布电容及额定电流等。

电感量

电感量也称自感系数,是表示电感器产生自感应能力的一个物理量。

电感器电感量的大小,主要取决于线圈的圈数(匝数)、绕制方式、有无磁心及磁心的材料等等。通常,线圈圈数越多、绕制的线圈越密集,电感量就越大。有磁心的线圈比无磁心的线圈电感量大;磁心导磁率越大的线圈,电感量也越大。

电感量的基本单位是亨利(简称亨),用字母“H”表示。常用的单位还有毫亨(mH)和微亨(μH),它们之间的关系是:

1H=1000mH

1mH=1000μH

允许偏差

允许偏差是指电感器上标称的电感量与实际电感的允许误差值。

一般用于振荡或滤波等电路中的电感器要求精度较高,允许偏差为±0.2%~±0.5%;而用于耦合、高频阻流等线圈的精度要求不高;允许偏差为±10%~15%。

品质因数

品质因数也称Q值或优值,是衡量电感器质量的主要参数。

它是指电感器在某一频率的交流电压下工作时,所呈现的感抗与其等效损耗电阻之比。电感器的Q值越高,其损耗越小,效率越高。

电感器品质因数的高低与线圈导线的直流电阻、线圈骨架的介质损耗及铁心、屏蔽罩等引起的损耗等有关。

分布电容

分布电容是指线圈的匝与匝之间,线圈与磁心之间,线圈与地之间,线圈与金属之间都存在的电容。电感器的分布电容越小,其稳定性越好。分布电容能使等效耗能电阻变大,品质因数变大。减少分布电容常用丝包线或多股漆包线,有时也用蜂窝式绕线法等。

额定电流

额定电流是指电感器在允许的工作环境下能承受的最大电流值。若工作电流超过额定电流,则电感器就会因发热而使性能参数发生改变,甚至还会因过流而烧毁。

3 储能电感

在开关电源中,由于在开关过程中输出电流是不能间断的,所以需要一个能够在这个时候释放能量的器件,这就是储能电感。这个电感一直伴随着各种开关电源。几乎所有的开关电源都必须伴随着这样一个电感的存在。

例如,在单片机系统中最常使用的开关电源LM2576电源电路中

所有的开关调节器都有两种基本的工作方式:即连续型和非连续型,两者之间的区别主要在于流过电感的电流不同,即电感电流若是连续的则称为连续型;若电感电流在一个开关周期内降到零则为非连续型。每一种工作模式都可以影响开关调节器的性能和要求。当负载电流较小时,在设计中可采用非连续模式。LM2576 既适用于连续型也适用于非连续型。通常情况下,连续型工作模式具有好的工作特性且能提供较大的输出功率、较小的峰峰值电流和较小的纹波电压。一般应用时可根据下面公式进行电感的选择:(电压单位:V 电流单位:A)

4 隔离电感

使用电感对电源电路隔离也是比较常用的方法,在很多时候,我们需要把几个电源相互隔离以防其相互干扰,这时候最常使用的器件就是电感(有时会使用0Ω电阻代替)。

上图是一个单片机最小系统的一部分原理图,在图中我们可以看到。为了把单片机的数字地和模拟地进行隔离,使用了一个10uH的电感,以保证这两个电源的相对独立。

单片机外围电路设计之四:二极管

在单片机外围电路中,二极管的应用也非常广泛,而且二极管根据其应用不同,种类非常繁多,下面我们主要谈谈发光二极管、续流二极管、整流二极管、限幅二极管等。

1 概述

二极管又称晶体二极管,简称二极管(diode),另外

Solar energy system

Solar Energy System,Portable Solar Panels,Solar Power System,Solar Pv System

suzhou whaylan new energy technology co., ltd , https://www.whaylan.com