Skip to main content
Benjamin Brammer
Senior II
August 31, 2019
Solved

STM32 controller -0.4V to 3.6V ADC converter

  • August 31, 2019
  • 8 replies
  • 1448 views

Hello,

for an upcoming project I am searching for a low-power microcontroller with a rich peripheral set and the possibility to sample low frequency signals in the range from -0.4V to 3.6V .

As far as I have looked it up I will have no chance realising this project with a STM32L4x but maybe somebody has a good solution suggestion for me on that matter.

I preferably want to avoid an extra ADC chip.

best regards

Benjamin

This topic has been closed for replies.
Best answer by Benjamin Brammer

hello everyone,

thanks for all the possible solution suggestions. So far I will stick to a version using two different opamps. There is an excellent application note which describes correct gain and offset attenuation for this task by TI . I will scale from -0.4 to 3.6 --> 0 to 5V and then back --> 0 to 3.6V. Maybe I will leave it at 0 to 5V and use an external ADC, I don't know yet.

My specified range is no error it is correct. That has to do with the special project requirements.

best regards

Benjamin

8 replies

Uwe Bonnes
Chief
August 31, 2019

If the source you want to measure, you could use well choosen resistors to divide and offset -0.4 .. 3.6 V to 0.. Vref. If you have 5 Volt accessible and are willing to add two OPs, the attentiuate/shift can also be done with a high impednace source.

Benjamin Brammer
Senior II
August 31, 2019

but even if i shift the voltage I don't have a full scae range of 4V with the STM32. Off course i would use an opamp for buffering and later a filter

Uwe Bonnes
Chief
August 31, 2019

The range was the reason why I proposed some attentuation...

Benjamin Brammer
Senior II
August 31, 2019

ah ok. sorry then I misunderstood you. So if I would say I have this given voltage range and boost it up to be 5V instead of 4V and I want to scale 5V to a 3.6V range, I could use a division faktor of 1.4 and offset the opamp input with the most negative voltage possible. So in this case -0.4V/1.4 = -0.286V --> offset of 0.3V. Off course I need to take care every possible tolerance and accuracy to have a good headroom, right?

Dvorak.Peter
Associate II
September 2, 2019

This is too simple.

" signals in the range from -0.4V to 3.6V"

A 3.6V powered controller only needs 2 external resistors.

With the ADC full scale = 3.6V you need to attenuate the signal to 3.6/4

If your signal source is low impedance then use 1 kohm resistor from input signal to ADC pin.

Add a 9kohm resistor from the ADC input to the Vcc to pull up the -0.4V to 0V at ADC pin. ( 3.6/0.4 *1k = 9kohm)

 If the controller supply is lower, you will need a third resistor for ADC pin pulldown.

Piranha
Principal III
September 2, 2019

I'm wondering from where does the -0.4V to 3.6V range come. The thing is... it really looks like a misunderstood Absolute Maximum rating for some 3,3V chip.

S.Ma
Principal
September 2, 2019

use an op-amp to scale and shift the signals within operating range of the ADC.

The op-amp will also act like a follower by lowering the impedence required by the ADC.

Ideally get a calibrated reference onto another ADC channel.

Benjamin Brammer
Benjamin BrammerAuthorBest answer
Senior II
September 3, 2019

hello everyone,

thanks for all the possible solution suggestions. So far I will stick to a version using two different opamps. There is an excellent application note which describes correct gain and offset attenuation for this task by TI . I will scale from -0.4 to 3.6 --> 0 to 5V and then back --> 0 to 3.6V. Maybe I will leave it at 0 to 5V and use an external ADC, I don't know yet.

My specified range is no error it is correct. That has to do with the special project requirements.

best regards

Benjamin