The voltage output type sensor typically outputs a voltage range of 0-5V or 0-10V. If we choose not to use an external ADC conversion chip due to cost considerations but instead sample the ADC module within the MCU chip, but as the voltage range of the AD acquisition in STM32 is 0-3.3V, in this case, we need the sampling circuit as shown in the figure below.
In the figure, R1 and R2 form a resistor voltage divider circuit, which converts the input voltage ranging from 0 to 5V into a voltage range of approximately 0 to 3V. The subsequent rail-to-rail operational amplifier voltage follower plays the role of impedance matching, isolating the sensor from the ADC sampling module and reducing signal attenuation. To prevent damage to the subsequent ADC module circuit caused by overvoltage and negative voltage, clamp protection diodes are added to the power supply and ground respectively, ensuring that the input voltage of the ADC module is always within the range of -0.7V to 3.3V + 0.7V. At the same time, to suppress the influence of high-frequency noise, an RC low-pass filter needs to be added before ADC sampling. The cutoff frequency of the low-pass filter should be selected according to the bandwidth of the signal. For example, if the signal bandwidth is 100Hz, the cutoff frequency can be set to 100Hz or slightly higher, such as 1kHz. If R2 is 1.5K and C1 is 100nF, then the cutoff frequency fc is approximately equal to 1KHz.
Xml سياسة الخصوصية المدونة خريطة الموقع
حقوق النشر
@ شركة مايكرو ماجيك كل الحقوق محفوظة.
دعم الشبكة