2023-06-07 01:06 PM - edited 2023-11-20 03:42 AM
Hi,
on STM32F303 I use ADC with DMA (12 bit), I measure signals on 3 channels + Vrefin.
The input signal is pure sine wave 50 Hz (I can see it on scope). But when I measure it with ADC, so there is distored sine wave, I tried to change SAMPLING TIME, and also Sampling frequency. It changed, but this is the best result what I have got, but still distored. Is there any chance how to solve that problem?
There is no saturation, there is reserve in amplitude
2023-06-07 01:16 PM
this looks like clipping...
show at input 50% of this amplitude.
2023-06-07 01:57 PM
What's your hardware? Is VREF+ rock stable? Is ground arrangement perfect? Is the AC input perfect? Oscilloscope measurement was directly from signal on mcu pin? DC measurements are stable? Try to measure only one channel. Show individual points (read: where is the continuous curve from?)
JW
2023-06-08 05:48 AM - edited 2023-11-20 03:42 AM
Oscilloscope measurement is directly on mcu pin, DC measurements look stable.
I measure 230/50Hz like that: Maybe the current is to small to charge sampling capacitor in MCU?
also I found this image, but what is the value of Cadc?
2023-06-08 05:52 AM - edited 2023-11-20 03:42 AM
JW
2023-06-08 06:11 AM
Thanks! OK it looks like my sampling time is too fast . I have it already on 610_5 cycles, so I have no option to slow it down.
How can I sove it?
Some recommendations?
2023-06-08 06:38 AM
>looks like my sampling time is too fast
?? why ?
> I have it already on 610_5 cycles
? 810 cycles ?
too slow. try 8.5 cycles .
and half signal , 2490 -> 1k5 or so, just test !
2023-06-08 07:22 AM - edited 2023-11-20 03:42 AM
This is when I use ADC_SAMPLETIME_601CYCLES_5:
and thisi when 7_5 cycles:
I use ASYNC clock mode
2023-06-08 07:44 AM - edited 2023-11-20 03:43 AM
And this is with Sync clock/4 with 180_5 cycles:
Also I tried to measure each channel 2 times in row, and use only the second measurement. But it has basically no effect - result is the same
2023-06-08 09:00 AM - edited 2023-11-20 03:43 AM
this looks like: beginning clip / limiting and opamp with high feedback -> oscillations , when recover from overdrive.
again: show at input 50% of this amplitude. or use circuit, like i did for mains aquire:
and use 7.5 cycle .