2022-09-26 11:54 PM
Hello together,
im using in my project the µC "STM32F302C8T6-LQFP48 pinout" on a self designed PCB with another HW-components and a part of this project is to measure ADC values, which I do over DMA.
Generally, it is working, (when I supply only the PCB over a common laboratory power supply, @15V, 40mA) but if I set/plug the PCB into an development environment on which high current´s (approx. 30 amps DC with 4 volts) are flowing nearby (approx. 10 cm), then only the internal read adc value "VREFINT_DATA" fluctuates.
What kind of cause could trigger the fluctuation ? (I know it´s a little specific)
Is there a specific procced regarding internal Vref ?
Is the internal Vref read value sensitive regarding EMC?
Is there some workaround or adjustment (HW,SW sided) ?
Here the background infos:
ADC-clock: 50 Mhz,
Sample time of all 3 Channels are 601.5 cycles
I also tried different clock speeds and sample times without success.
Im using in my code 3 ADC values over DMA.
· DmaValue[0] == is the actual VREFINT output value converted by ADC like "VREFINT_DATA" in the reference manual (RM0365). Which I use to calculate the VDDA (VDDA = 3.3 V ₓ VREFINT_CAL / VREFINT_DATA)
· DmaValue[1] == is the ADC value to measure a battery voltage
· and DmaValue[2] == is the ADC value to measure the temperatur over an analog temp sesnor (MCP9700T-E/TT)
Rough topology described in "Figure_1"
ADC settings in “ADC_DMA settings“
DmaValue[1] and DmaValue[2] are stable if the PCB is plugged in the nearby current environment, only VREFINT_DATA is fluctuating with spikes about +- 150 value counts. (nominal value is 1532 and my VREFINT_CAL is 1533).
I also stabilized my VDDA with 1uF and one parallel 10nF capacitors as recommended in the „AN2834“ Application note.
The MCU and temp sensor are supplied with an ldo voltage regulator (LP2985A-33DBVR) with a stable output of 3.3V. I also tried to replace the LDO with a DC source (Button cells of round about 3V) and also tried the DC source at PIN 9 and 8 (VDDA/Vref+ and VSSA/Vref-) of MCU => DmaValue[0] // VREFINT_DATA still wiggle.
Im using 4 layers in my PCB design (Layer1 = Top-layer with signal wires, Layer 2 = GND, Layer 3 = 5V-Layer and Layer 4 = 3.3V-Layer).
Unfortunately I didn´t have a cut off area right under the MCU, which might also cause this fluctuation?
But the question is, why stays DmaValue[1] and DmaValue[2] then stable ?
Layer topology shown in “PCB_Layer“
Thanks in advance.
2022-09-27 12:59 AM
The abstraction of "ground" is a common fallacy when it comes to high current/noisy environment, and "ground layer" makes the problem (I mean the psychological problem not the physical) surprisingly worse (as you stop to be aware of it).
Currents flowing on common paths cause voltage drop. Separate the high current flow from the "measurement" ground as much as possible. Draw yourself the individual ground nodes (on sources, loads, the mcu) but don't draw the ground symbol onto them, but draw resistors between them. Think, where the current flows.
JW