Skip to main content
ManishNair
Associate III
December 25, 2020
Solved

STM32F030K ADC injects voltage on pin

  • December 25, 2020
  • 5 replies
  • 2241 views

Hi, Can anybody help to point out why the pin voltage on adc input goes high as soon as i start the adc. When I connected a 10K resistor between AIN1 and GND (VDDA=VDD=3.3V), the voltage dropped to 1.6V. I tried HAL_ADC_START , Start with IT , DMA and calibration, but the voltage returns. I added 2 Sec delay for debug and verified the thing occurs when start command is given..

This topic has been closed for replies.
Best answer by TDK

Ah, so it's a transient spike and the voltage tends to zero during sample and hold period. This is expected. Your sampling period (under 3us) is pretty small, so you'll need to ensure the source is sufficiently low-impedance.

Looks like a 1K resistor is okay, but 10K is not.

5 replies

waclawek.jan
Super User
December 25, 2020

This is normal. You have to use low impedance signal source.

JW

TDK
December 26, 2020

> the voltage dropped to 1.6V

What voltage? PA0? VDD?

If PA0 (or whatever pin you're using) is connected to GND with a 10kOhm resistor, and nothing else is on the circuit, you should get 0V on that pin. If you see something else, that suggests a hardware issue.

The voltage when the pin is floating doesn't matter. Measuring an infinite impedance signal is nonsense, as JW mentions.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ManishNair
Associate III
December 26, 2020

Hi Tdk,

"What voltage? PA0? VDD?" - PA1 voltage

PA1 is configured as AIN1 and this pin is pulled down via 10K res.

The ADC reads this input and gives correct voltage... I fed this input with a potential divider (of course 10K pulldown is also considered in design) for voltage measurement in one unit and across a 0.05Ohm shunt with 5K trimpot for current measurement. The Voltage on pin PA1 reduces to 20mV in shunt application even in no load..

Please refer the attached wave form. Connection - 1K resistor and 0.1uF Capacitor in parallel, connected across AIN1(PA1) and GND.. It shows some sort of differentiated wave.

0693W000006Gue8QAC.jpg 

TDK
TDKBest answer
December 26, 2020

Ah, so it's a transient spike and the voltage tends to zero during sample and hold period. This is expected. Your sampling period (under 3us) is pretty small, so you'll need to ensure the source is sufficiently low-impedance.

Looks like a 1K resistor is okay, but 10K is not.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ManishNair
Associate III
December 26, 2020

Thanks TDK,

The problem solved with 1K res and 239 cycles... Still the transient is there but averaging with DMA overcomes it.. Thank you for your kind support

0693W000006GulEQAS.jpg