How current single-chip sampling

Original Address :: https://blog.csdn.net/qq_33486777/article/details/97273358

 

How current sampling single-chip
microcontroller engineer in the interview process, often encounter some of the same problems, the author summarizes the ten questions a higher rate of problems, for your reference. Now we have to analyze microcontroller engineers often encountered three of interview questions: How microcontroller sample current?
MCU module AD conversion principle I here do not explain, interested partners can find a small degree of your mother understand, Baidu has a very detailed introduction. Note that, to detect the desired signal through the AD port must take this signal converted into a voltage signal, so that the microcontroller can recognize.

Voltage sampling
we look at a circuit diagram of the voltage sampled microcontroller (1), AIN_Vbat connected microcontroller AD detection port, the detected voltage Vbat need R31 and R37 via a resistor divided voltage, obtained by dividing a voltage to the AD port to detect the microcontroller, partial pressure Vbat because of the need to be mapped to the microcontroller port sampling range AD, such as the 90V maximum voltage Vbat, microcontroller AD module reference voltage is 3.3V, then we need to be mapped to 0-90V 0-3.3V. Because this is a direct voltage detection signal, it is not necessary to directly convert AD port to the microcontroller, R31 and R37 to FIGS species partial pressure, C30 and R32 for filtering interference.


Current sampling
Closer to home, how does the current single-chip sampling? As previously mentioned, the microcontroller AD module identification is a voltage signal, the current to be sampled would need to convert the current into a voltage signal. The general practice is to increase the load end of a current sampling resistor, such as selecting a resistor of 0.05Ω, the time when the current is 2A, then the differential pressure across the resistor is V = IR = 0.052 = 0.1V; so that you can this voltage signal is transmitted to the microcontroller for detecting AD port. However, this voltage is only 0.1V, the microcontroller AD interface resources are not fully utilized, the detection error will be large, so we want this voltage is amplified. Can you increase the sampling resistor it? Obviously not work, because increasing the sampling circuit loss resistance increases. Such as increased resistance of 1 [Omega] sample, then when the current is 2A, when the power consumption of the resistor is P = I2R = 22 * 1 = 4W. This loss is not allowed. So we can only add to this little amplifier voltage signal is amplified. FIG. (2) is a current sampling circuit, RlOO current sampling resistor, resistance 0.05 ohms. The circuit magnification N = 120K / 5.1K = 23.5 times. Manipulation circuit R29 = R30, R24 = R35, that is, the magnification N = R24 / R29 = R30 / R35. The authors break down specific principles in a future article for you.


SCM sample calculation table
Figure (3) is the ADC sampling automatically calculated excel table, the input circuit parameters to automatically calculate the data, there is a need of a small partner can micro-channel search "DPJGCS", focus on the author's micro-channel public number "chip technology exchange station ", and then reply" AD calculation table "to obtain the parts excel. If the article helpful to you, please pay attention to micro-channel public number of follow-up for you to push more of the article, thank you!


----------------
Disclaimer: This article is CSDN bloggers' single-chip technology and application "of the original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/qq_33486777/article/details/97273358

发布了136 篇原创文章 · 获赞 306 · 访问量 437万+

Guess you like

Origin blog.csdn.net/xqhrs232/article/details/103838599