How does the microcontroller read the 0-10V sensor signal?

Publisher:快乐旅人Latest update time:2022-12-12 Source: zhihu Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As shown in the figure below, two resistors are used to divide the voltage. The resistance value can be 2:1. After dividing the voltage, 1/3 of the voltage of the signal source is obtained. In this way, the signal varying between 0-10V can be converted into a voltage between 0-3.33V. signals that change between times. As shown in the figure below, it is the most basic resistor voltage dividing sampling principle diagram. I used 2K and 1K resistor dividers.

The simulation waveform is shown in the figure below.

To improve the above figure, use R3 and C1 to form a low-pass filter circuit to filter out high-frequency interference signals during the transmission process. The resistors and capacitors should be close to the ADC pins of the microcontroller during PCB layout. Diode D1 is a clamping diode, which is used to ensure that VF1 can be maintained at a safe voltage when there is a circuit failure (such as R2 being soldered or R2 and R1 resistors being soldered in the wrong position, etc.), or when a peak surge voltage occurs, so as not to damage the microcontroller. . D1 in the circuit should choose a Schottky diode with reduced conduction voltage.

The figure below shows that when R1 and R2 are deliberately soldered to the wrong position, diode D1 starts to work, clamping VF1 at a safe voltage, protecting the microcontroller.

In the above circuit, current will flow through R3 during operation, which affects the sampling accuracy. Continuing to optimize the above circuit, an input and output Rail-to-rail op amp is used to form a voltage follower.

The circuit uses the characteristic that the input impedance of the op amp is infinite under ideal circumstances. It has little impact on the R1 and R2 voltage dividing circuits during signal collection, making the resistor voltage dividing results more accurate.


Careful friends should have noticed that the clamping diode for protection has been removed from the circuit. So, does such a circuit still have the ability to protect the microcontroller when a fault occurs? The answer is yes. For the specific reasons, you can review the input and output rail-to-rail in the op amp parameters.


Reference address:How does the microcontroller read the 0-10V sensor signal?

Previous article:How a microcontroller can elegantly read 0-10V sensor signals (2)
Next article:How should I learn microcontroller? Can it be done quickly?

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号