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 and ADC Values, how to get 12Bit?

Status
Not open for further replies.

Mr.Big

Junior Member level 3
Junior Member level 3
Joined
Apr 17, 2014
Messages
28
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,400
With an Atmega with 10 bits, I have no problem to get absolutely stable values.
With the Atmaga wobbles maximum 1 digit.
With the STM32 it is absolutely impossible for me to get stable 10Bit or 12Bit!

Is it only possible with the STM32 if you put the controller in sleep mode?!
I have tried everything, with different grounding, capacitors etc pp.
If I use a special ADC IC with 12Bit it is no problem.
And if I have to put it in sleep mode every time, what is the maximum number of measurements possible?

Translated with www.DeepL.com/Translator (free version)
 

Hi,

even with a 10 bit ADC you can never expect stable digital value with a random but clean DC input.
There´s always a chance for jump when the analog value is a t the edeg form one digital value to the other. in worst case (0x01FF to 0x200) all 10 bits will change.

You can get stable values only with
* clean analog input
* clean Reference voltage
* clean GND
* and a little hysteresis (at least 1 LSB + PP-overall noise)

Noise also depends on bandwidth - and for sure on other noise sources. Sleep mode usually reduces noise.
For sure a 100Hz 10 or 12 bit Delta Sigma ADC with built in digial filter may generate less noise than an 10MHz SAR ADC.

Now you don´t give any details about your application. (schematic, PCB-layout, code, bandwidth, expected noise, real noise, sampling rate, filtering ...)
Thus it´s impossible to give detailed assistance.

Klaus

BTW: I´m using STM32F107 with interrupt driven ADC sampling and filtering (no sleep) and get stable values down to +/-1mV on a 33V input range. This equals 14 bit resolution.
 

Do you have a Nucelo BOard or something or an own?
--- Updated ---

I really tried many things.
With AVR no problem, sometimes without any 100nf capacitor!!
But with STM32 , no change:-(
 

Averaging helps, some ap notes attached.


Regards, Dana.
 

Attachments

  • AtoD averaging.rar
    1.7 MB · Views: 95

Hi,

Own designed board.

If you need help you need to give useful informations.

Klaus
 

No, averaging isn't the way...
Again. With AVR a got stable WORD +-1 Digit
With STM32 it doesn't.

Averaging is a real bad way, and has nothing to do wth goodd Design.
Bevore averaging, the core Value must be stable,. and the datasheet says +-2 Digit at 12BIt
And don'T get this +-2 Digits only with STM32!!
With an real 12BIT ADC, it isn't any problem, or an XMEGA
 

Hi,

your design needs to fit your requirements.
We don´t see your design nor clear requirements.
This makes further discussion useless.

Just complaining will not solve your problem.
It´s on you...

"Averaging" is by far no bad way. It is one kind filter out of many. And if your ADC ouput is noisy ... you will need a filter. I see no way around it.
Where and what filter depends - again - on your design and your requirements.

What I can do: I can confess that the datasheet specification is valid.

Klaus
 

Bypass capacitors, not all have equal esr performance for the same C value -

1608226488626.png


" Averaging is a real bad way, and has nothing to do wth goodd Design. " Its one
of many tools used in ADC work. Averaging very effective when dealing with uncorrelated
noise. As correlation rises in noise source effectiveness drops.

When you do an ADC design not uncommon to start with a higher res ADC and
as you accumulate errors in your error budget wind up at goal, eg. start with
a 16 bit to get to 10 bits over T and V and PSRR and Vref and INL and DNL errors.

Questions :

1) Are you seeking absolute or relative accuracy ? Design goal of either ?
2) Is this design over T and V and PSRR and....variation ?
3) Whats in the signal path in front of the A/D ?
4) What is design goal for resolution and accuracy ?



One other technique to insure a part is "quiet" is to shut down operations like PWM, UART, COMM,
and other internal operations that contribute to internal buss noise which then affects ADC
conversion operations. Also shut off un-used clocks....

ST32 errors -

1608228734179.png


Of course these all add......unless the ET includes the 4 other errors shown.



Regards, Dana.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top