Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

STM32 PCB ADC Voltage Measurement Problem

Status
Not open for further replies.

Raiser

Newbie level 3
Newbie level 3
Joined
Jul 5, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,307
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
 

The reference is zero volts, AGND is connected to ground.
 

The STM32 A2D must have a finite reference voltage.

Sorry, I misunderstood.

AVCC is connected to 3.3volts. For the chip I am using (STM32F103RB), there is no analog reference input pin. Also, I could not found any register containing internal reference voltage setting.
 

It is a good idea to use an external voltage reference. Using the supply 3.3 VDC as a reference expose the analogue measurements to all the PSU noise.
 
  • Like
Reactions: Raiser

    Raiser

    Points: 2
    Helpful Answer Positive Rating
Thank you, klystron. I will try it.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top