cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the output of the DAC full zero voltage?

evilbob
Associate II

Good day. Faced such a situation. I want to get at the output of the DAC zero level (writing to the register is trivially 0). That's just absolute zero does not work, on the output of the microcontroller there is somewhere around 70mV. The influence of the external circuit can be excluded, since it is checked with the output physically disconnected from the rest of the circuit.

Has anyone come across this? Or to paraphrase a question, did anyone get a complete zero on the DAC?

Stm32l151, so the DAC is configured and working properly, performs its function (except for zero). Clocking DAC and port A is present, just did not copy here ....

//---------DAC-------------      
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AN;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;      
   
GPIO_InitStructure.GPIO_Pin =  DAC0_Pin;
GPIO_Init(DAC0_Port, &GPIO_InitStructure);   
  
DAC_InitStructure.DAC_Trigger =   DAC_Trigger_None;
DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;
DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Enable;//Disable;//
DAC_Init(DAC_Channel_1|DAC_Channel_2, &DAC_InitStructure);
      
DAC_Cmd(DAC_Channel_1, ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R,0);

Should I turn off the buffer? The datasheet says "Voltage on DAC_OUT output if DAC output buffer OFF = 0.5mV". What about total voltage zero?

1 ACCEPTED SOLUTION

Accepted Solutions
AvaTar
Lead

> Should I turn off the buffer?

Yes.

If you read the datasheet further, the DAC zero offset voltage can be up to 200mV with output buffer enabled.

Better turn the buffer off, and use an external buffer amplifier. The output impedance of the DAC is about 1 MOhm without the internal buffer, pretty useless to drive anything directly.

View solution in original post

5 REPLIES 5
AvaTar
Lead

> Should I turn off the buffer?

Yes.

If you read the datasheet further, the DAC zero offset voltage can be up to 200mV with output buffer enabled.

Better turn the buffer off, and use an external buffer amplifier. The output impedance of the DAC is about 1 MOhm without the internal buffer, pretty useless to drive anything directly.

Well thank you. What about absolute zero at the output of the DAC? It can be obtained by setting 0 in data holding register?

Uwe Bonnes
Principal III

There is also an zero offset error . Some bit above zero may still give zero output or zero may give some Millivolt output. The DAC is not absolute correct. Read the spec again carefully.

As Uwe Bonnes said, read the datasheet carefully.

Even when setting an output value of 0 (zero), there will be some offset, but nothing compared to the buffered mode.

If you require high accuracy, consider an external DAC. Analog circuitry in a high frequency, clock-driven digital chip like an MCU is always a compromise (say, cheaper).

evilbob
Associate II

I thank everyone for the answers. You confirmed my guesses.