Skip to main content
MBhir.11
Associate III
March 23, 2021
Question

DAC output in STM32L151RCT6 MCU is not constant.

  • March 23, 2021
  • 1 reply
  • 1223 views

Hi,

I am using STM32L151RCT6 MCU and creating the project in STM32cube IDE .

i implemented DAC peripheral and kept 1.52 As input and did calculation like:

float value = 1.52; // Dac output

uint32_t var;

 var = (value * 4096)/3.3 ; // From datasheet

 HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, var);

i am getting output voltage as 1.55V to 1.56V ..

here my requirement is 1.55V but i am getting output varying from 1.55V to 1.56V...why that variation in output of DAC?

How can i make it constant ??

or it will like that or what??

Please help me to clear this

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
March 23, 2021

What hardware are you using? How is DAC loaded? Are there ADC conversions running? Our any other code influencing the analog part of the mcu, or introducing significant supply/ground current? Isn't it the measurement which is imprecise/noisy?

DAC stability among other things depends on VREF+ stability.

JW

Ozone
Principal
March 23, 2021

And - 10mV of a 1500mV signal is about 0.5%.

About what measurement device tolerance we are speaking here ?