Table of Contents
How is ADC used to measure current?
This means a dc current can be indirectly measured by a microcontroller’s ADC channel by first converting the current into voltage. The simplest way of doing this is to place a resistance in series with the current path and measure the voltage drop across it.
How do you convert voltage to bits?
For an 8-bit ADC with 0-5V input range, each bit results into 19.48mV or roughly 20mV. Therefore, in your software you can simply multiply this number 20 (or 19.48 to be precise) to get the voltage reading.
How do you find reference voltage?
The reference voltage, 2.56 V, is represented by the maximum conversion value, 1024, so the scaling factor is 1024/2.56 = 400 bits per volt. The input is therefore divided by this factor to obtain a display in volts.
What is the reference voltage and operating voltage of STM32?
The reference voltage is equal to the voltage at which the microcontroller is operating. When the STM32 board is powered via USB cable then the operating voltage is 3.3V. You can also measure the operating voltage by using a multimeter across the Vcc and ground pin on the board. So the above formula fits into our case as shown below
How does adadc work in STM32 microcontroller?
ADC in STM32. The ADC embedded in STM32 microcontrollers uses the SAR (successive approximation register) principle, by which the conversion is performed in several steps. The number of conversion steps is equal to the number of bits in the ADC converter. Each step is driven by the ADC clock. Each ADC clock produces one bit from result to output.
How to measure mains voltage in ADC?
This DC voltage can be simply scaled with a voltage divider, perhaps a potentiometer, and fed directly into the ADC input. Here is a typical circuit which is very good for monitoring mains voltage…
What is the range of stm32f103c8 12-bit ADC?
This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. Now in the case of STM32F103C8 we have 10 channels, 12-Bit ADC with an input range 0V -3.3V. It will map input voltages between 0 and 3.3 volts into integer values between 0 and 4095.
https://www.youtube.com/watch?v=1UPf-Z8ol50