2023-11-29 09:36 PM
Hello,
I am trying to read the value from the INA186A3IDCKR current integrated circuit using the ADC2_INO channel on the stm32f103c8t6 microprocessor. My ADC channel is connected to the Vout section. When I examined the datasheet, I did not come across a formulation, but I want to use the adc value Vout I read in the formulation I will find.
Can you help me?
(Below is the usage of the integrated circuit)
2023-11-29 10:08 PM
So reviewing the data sheets.
The GAIN is 100, your Rsense is not specified
If VS connects to VREF+ an ADC reading of 4095 is that voltage
Voltage across IN pins will be (ADCVALUE / 4096.0) * (VREF / 100.0)
The voltage drop across Rsense relates to current using Ohm's Law
2023-11-30 02:47 AM
When I apply this formulation, the adc value changes, but the Vout value is read as 0, so the current value is also 0. Is there a library I should add to perform the calculations that I missed?
2023-11-30 02:57 AM
Actually, Vref doesn't connection Vss.
2023-11-30 03:17 AM
I think Tesla means the MCU's VREF+ pin, where's that connected?
Maybe you should start checking with a DMM:
- is there some current through the sense resistor?
- what's the output voltage of the INA? That should be V(INA) = I * Rsense * 100
If that's working, then you can work on the ADC stuff.
2023-11-30 08:44 AM
VREF+ / VDDA and VREF- / VSSA
Depending on the parts and pins these may be internally bonded, or need to be externally.
The analogue supply is used for the POR, VCO/PLL, ADC and DAC.
There's VREFINT which is an internal 1.2V reference you can use to calibrated the ADC / external supply
I'm not familiar with your design beyond what you've shared here.