Raiser
Newbie level 3
Hello,
I am using a custom built PCB having two STM32 microcontrollers. There are four motors around the PCB, each of them drawing 4-5A current.
I am trying to measure battery voltage on the PCB using one of the ADC channels of the microcontroller. I calibrated the ADC values with voltmeter and a power supply by changing the voltage on the ADC input pin. The voltage is measured from a voltage divider circuit connected to the battery (resistors are selected for 3.3V). The problem is; I am getting correct voltage measurements from ADC when the motors is not running. However, if I turn the motors on, I am getting incorrect voltage measurements, with an error about 0.7 volts.
I think that the problem is related to analog GND, cable lengths and magnetic noise.
Any suggestions and solutions about this problem?
Any helps will be appreciated.
Regards,
Mert
I am using a custom built PCB having two STM32 microcontrollers. There are four motors around the PCB, each of them drawing 4-5A current.
I am trying to measure battery voltage on the PCB using one of the ADC channels of the microcontroller. I calibrated the ADC values with voltmeter and a power supply by changing the voltage on the ADC input pin. The voltage is measured from a voltage divider circuit connected to the battery (resistors are selected for 3.3V). The problem is; I am getting correct voltage measurements from ADC when the motors is not running. However, if I turn the motors on, I am getting incorrect voltage measurements, with an error about 0.7 volts.
I think that the problem is related to analog GND, cable lengths and magnetic noise.
Any suggestions and solutions about this problem?
Any helps will be appreciated.
Regards,
Mert