cancel
Showing results for 
Search instead for 
Did you mean: 

DAC output offset spec with output buffer enabled

calvin
Associate III

Hi,

Currently, we are facing an accuracy problem when using the built-in DAC on the STM32F407 (with buffer enabled). As the built-in reference voltage measured 2.0005V, we set the DOR to 0x800, expecting to get 1.25V on the DAC output. However, we actually measured 1.238V, which is 122mV away from the ideal. All tests were made with the DAC under no load.

 

As I've seen in datasheets and many posts, the mentioned DAC output range will be 0.2V~ (VDDA-0.2V) when the buffer is enabled. Could I suspect that the DAC output offset specification is within (IDEAL ±0.2V)? Given the 122mV error mentioned above, it's hard to estimate the output accuracy without any listed specifications to refer to.

 

Overall, I think the built-in buffer actually works and is usable, but we really need more information about it to leverage it better.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

2.5005 / 2 - 1.238 = 0.01225

That's an error of ~12.2mV, higher than 12 LSB, but much closer to what you should be expecting.

 

> However, as it lists ±12LSB at VREF+ = 3.6V, does this mean the offset error only occurs within 12LSB when VREF+ = 3.6V? If a VREF+ voltage other than 3.6V is applied, is the error then not estimable?

The datasheet tests specific conditions, but the limits should be comparable to similar setups.

 

> This resulted in the 0x800 being 1.6201V, which should be near 3.271/2 = 1.6335V, yet there was still a 132mV error.

You mean 13.2 mV?

 

A good test would be to disable the buffer, and disable any external loading, and see if the outputs fall in line with what the datasheets guarantee.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

11 REPLIES 11
TDK
Guru

The 0.2V~ (VDDA-0.2V) spec is the rails. It should be considerably more accurate than +/- 0.2V. In this case, +/- 12 LSB.

TDK_0-1703651529613.png

 

> As the built-in reference voltage measured 2.0005V, we set the DOR to 0x800, expecting to get 1.25V on the DAC output. However, we actually measured 1.238V, which is 122mV away from the ideal.

Not sure I follow the math here. If VREF+ is 2.005V , a 12-bit DAC output of 0x800 should be near 1.0025 V.

If you feel a post has answered your question, please click "Accept as Solution".
calvin
Associate III

>Not sure I follow the math here. If VREF+ is 2.005V , a 12-bit DAC output of 0x800 should be near 1.0025 V.

It's my typo, and there is something that needs clarification. The voltage of VREF+ is measured at 2.5005V, and it comes from an external voltage sourced from the AD7175-2 REFOUT.

However, as it lists ±12LSB at VREF+ = 3.6V, does this mean the offset error only occurs within 12LSB when VREF+ = 3.6V? If a VREF+ voltage other than 3.6V is applied, is the error then not estimable?

I didn't actually test applying 3.6V to both VDDA and VREF+, but I tried to tie VREF+ to VDDA, which was applied with a stable voltage measured at 3.271V. This resulted in the 0x800 being 1.6201V, which should be near 3.271/2 = 1.6335V, yet there was still a 132mV error.

While the DS are not clear in this regard, I believe the offset/gain specs are given for the buffer off case.

How is the DAC loaded in your circuit?

JW

2.5005 / 2 - 1.238 = 0.01225

That's an error of ~12.2mV, higher than 12 LSB, but much closer to what you should be expecting.

 

> However, as it lists ±12LSB at VREF+ = 3.6V, does this mean the offset error only occurs within 12LSB when VREF+ = 3.6V? If a VREF+ voltage other than 3.6V is applied, is the error then not estimable?

The datasheet tests specific conditions, but the limits should be comparable to similar setups.

 

> This resulted in the 0x800 being 1.6201V, which should be near 3.271/2 = 1.6335V, yet there was still a 132mV error.

You mean 13.2 mV?

 

A good test would be to disable the buffer, and disable any external loading, and see if the outputs fall in line with what the datasheets guarantee.

If you feel a post has answered your question, please click "Accept as Solution".
calvin
Associate III

>> This resulted in the 0x800 being 1.6201V, which should be near 3.271/2 = 1.6335V, yet there was still a 132mV error.

>You mean 13.2 mV?

Yes, I mean it!  My poor calculation ...

In my actual case, I set the DAC to 1229, expecting to get 0.75V (VREF=2.5V). There were two boards doing the same thing; one measured 0.748V, and the other measured 0.733V, both with buffer enabled. I'm not sure if that board has a broken MCU or if it's just a variation in part quality.

In my case, the ±12LSB was calculated as a ±7.3mV potential error, but if it goes up to 17mV, how can I estimate the maximum?"

Hi,

For the test, the DAC output was left floating.

I also thought that the listed offset specification only applied when the buffer is off; the buffer amplifier should have a different specification.

> the buffer amplifier should have a different specification

I agree, and IMO as a minimum, the fact, that gain/offset is given for buffer OFF should be clearly marked in the DS.

But it is what it is.

The STM32 are a huge digital circuit with some analog functions slapped on. Few users realize that analog functionality built on what is primarily cheap digital process, is nothing short of miracle; it is actually very hard to do and full of compromises. Unfortunately, this does not show when looking at specs, which appear to be mediocre, if compared to dedicated analog devices (pun intended).

The 'F4 is relatively old, some 12 years now. If you look at newer STM32 e.g. 'L4 or 'G4, their DAC do have separate specs for buffer OFF/ON; however, their buffer opamp has a digital trim and its initial value is determined at manufacturing. That's the magic; but as all magics, it's not free - it means both silicon area, read, cost; and testing time for each individual part, read, cost.

JW

PS. How much error did you measure with buffer OFF?

TDK
Guru

I'd also like to see the test with the buffer off. Presumably, it should fall within the limits specified by the datasheet. Agree the datasheet is lacking specificity here, couldn't find anything else that explored this further on the F4.

If you feel a post has answered your question, please click "Accept as Solution".

For buffer off, all output results are quite close to the IDEAL, and there is a larger dynamic range even when the DOR setting is within 100LSB to a few LSB, without significant offsets. This suggests that the DAC itself performs quite well.

anyway, below shows a bit of test result:

VREF=2.5V

Buffer ON:

DORIDEALmeasured voltageerror
10240.6250.612-0.013
20481.2501.238-0.012
30721.8751.864-0.011
40952.5002.490-0.010

 

Buffer OFF:

DORIDEALmeasured voltageerror
10240.6250.626+0.001
20481.2501.248-0.002
30721.8751.873-0.002
40952.5002.498-0.002

 

Buffer ON:

DORstepIDEALmeasurederror
1024500.6250.611-0.014
1074500.6560.642-0.014
1124500.6860.672-0.014
1174500.7170.703-0.014
1224500.7470.734-0.013
1274500.7780.764-0.014
1324500.8080.795-0.013
1374500.8390.825-0.014
1424500.8690.856-0.013
1474500.9000.887-0.013
1524500.9300.917-0.013
1574500.9610.948-0.013
1624500.9910.978-0.013
1674501.0221.009-0.013
1724501.0531.040-0.013
1774501.0831.070-0.013
1824501.1141.101-0.013
1874501.1441.131-0.013
1924501.1751.162-0.013
1974501.2051.192-0.013
2024501.2361.223-0.013