Go Down

Topic: DAC0 only output 22 mv to 0.78v  (Read 2228 times) previous topic - next topic

Dung-auto

Dear all

i read specification then DAC output from 0.25V to 2.75V
but i test in Board arduino Due with code :
Code: [Select]
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

ard_newbie


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

Dung-auto

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 ?



ard_newbie

#3
Jun 12, 2017, 10:45 am Last Edit: Jun 12, 2017, 10:55 am by ard_newbie
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

Dung-auto

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?
Code: [Select]
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



ard_newbie


Google for: Arduino DUE + DAC MCP4922

Dung-auto

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


ard_newbie

 
There are numerous tutorials on internet on how you can drive a BLDC motor such as this one:
http://www.instructables.com/id/BLDC-Motor-Control-with-Arduino-salvaged-HD-motor/

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


Dung-auto

 hi ard_newbie

i was buy BLDC in link :
http://www.orientalmotor.com.sg/products/sc/bl_blh_f/

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

Dung-auto

 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

https://en.wikipedia.org/wiki/Operational_amplifier_applications


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


MasterT

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

Dung-auto

Thanks MasterT  support test my code.

That mean, Modul DAC in my Arudino Due is broken


MasterT

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.

Dung-auto

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 ?

MasterT

Google is your friend, this article may worth to read https://www.maximintegrated.com/en/app-notes/index.mvp/id/2398

Go Up