DAC0 only output 22 mv to 0.78v

Dear all

i read specification then DAC output from 0.25V to 2.75V
but i test in Board arduino Due with code :

int value=0;

void setup() 
{
  analogWriteResolution(12);
  pinMode( DAC0, OUTPUT);
}

void loop() 
{
analogWrite(DAC0, value );  
value++;
delay(100);
if(value>4095)
value=0;
}

I measured the pin output DAC0 the voltage change from 22mv to 0.78v

i don't understand ? why?

please help me. thanks

Maybe your DAC0 is burned. Try with DAC1, and always hook a 1 or 2K resistor in serie to each DAC.

I try ADC1 also output from 22mv to 0.7v

when analogWrite(DAC0, 0); // voltage = 22 mv
analogWrite(DAC0, 4095); // voltage = 0.7v

I can still control the ADC in this voltage range --> it still work ?

Is it because I measured the voltage directly from the DAC pin, causing damage ?

Don't confuse DAC and ADC controller ...

analogWrite(DAC0, 4000) as well as analogWrite(DAC1, 4000) should be close to 2.7 V, if they are close to 0 V your 2 DACs are burned.

Google for: Arduino DUE + DAC MCP4922

i want write "I try DAC1 also output from 22mv to 0.7v"

Such a broken module is DAC

But I still do not understand why it still changes from 22mV to 0.7V when I control?

int value=0;

void setup() 
{
  analogWriteResolution(12);
  pinMode( DAC0, OUTPUT);
}

void loop() 
{
analogWrite(DAC0, 0 );     // = 22 mV
delay(2000);
analogWrite(DAC0, 2000 );  // = 395 mV
delay(2000);
analogWrite(DAC0, 4095 );  // v = 750 mV
delay(2000);
}

i still using IC LM358 Amplifiers from 22mV ->750mV to 180mV -> 3.6V

Google for: Arduino DUE + DAC MCP4922

oh thank you support DAC MCP4922

my project is AGV ( automated guide vehicle ) in my factory

The motor for AGV is BLDC ( brushless DC ) of oriental motor

but the control BLDC by voltage input from 0v to 5V ,

so i want using 2 DAC ( DAC0, DAC1 ) in arduino Due board to the controller for driver BLDC ( using IC LM358 convert form range 0.25v->2.75V to range 0V -> 5V compatible with control BLDC)

but when test DAC of arduino Due are burned ,

if DAC of Arudino is not burned , i can using this solution ?

if add using MCP4922 so very complex

There are numerous tutorials on internet on how you can drive a BLDC motor such as this one:

And NO, DACs are not designed to drive BLDC motors...

hi ard_newbie

i was buy BLDC in link :

Driver have Speed Control by DC Voltage 0 -> 5V

i will try use DAC0,1 control this driver ( LM358 convert range from 0 to 5Vdc )

i will test now, then inform to you the results

thank you

hi ard_newbie

i was test in Due and board test , using LM358 convert range 22mv->750mV to 0.02V ->4.99V to the control BLDC

I'm not sure there is stability? When to use long term?

Your code is running like a charm on my DUE, 1/6 (560mV) - 1/2 - 5/6(2.76V), IDE 1.8.3, Due 1.6.11

Thanks MasterT support test my code.

That mean, Modul DAC in my Arudino Due is broken

Max. load for DAC's is 5 kOHm. Seems it weakest pins on all arduino board. You shouldn't scale 0.78V , if it's broken you can't rely on it, it may fail completely any moment.

OK MasterT

now , i only test modul DAC in arduino Due with panel test

after i will notice when using DAC modul is not broken

if DAC modul is not broken , what do you thing when i am convert voltage DAC from range 0.25V->2.75V to range 0 ->5V , => control voltage to driver brushless DC motor ?

Google is your friend, this article may worth to read Create a Customer Service Case  · Support Portal

Ok Thank you

ard_newbie:
Google for: Arduino DUE + DAC MCP4922

Thanks you ard_newbie,
i was test MCP4922, it is good work and very easy