Arduino Forum

Using Arduino => Project Guidance => Topic started by: johnkgw on Feb 07, 2013, 10:25 am

Title: Arduino Mega 2560
Post by: johnkgw on Feb 07, 2013, 10:25 am
Hi all, i would like to convert the PWM signal generated from the Arduino Mega 2560 of 0 to 5V to an analog signal of -10 to 10 V to input into my servo valve that is controlling my cylinder. Anyone can help to advise if there is such component and any recommendation?
Title: Re: Arduino Mega 2560
Post by: Krodal on Feb 07, 2013, 11:46 am
Could you change the subject to "servo valve" ?
Can you add a link to that valve ?
Title: Re: Arduino Mega 2560
Post by: Retroplayer on Feb 07, 2013, 12:21 pm

Hi all, i would like to convert the PWM signal generated from the Arduino Mega 2560 of 0 to 5V to an analog signal of -10 to 10 V to input into my servo valve that is controlling my cylinder. Anyone can help to advise if there is such component and any recommendation?


Hmm... the PWM is not generating a "real" analog voltage. You need a DAC for that. PWM works for stuff like motors because it sees an "average" voltage becuse of the duty cycle. Digital circuitry would just see pulses. The ATMega2560 does not have an on-board DAC, so the cheapest method is to build one out of a R2R ladder using several pins but the results will not be linear. There are also DAC chips you can use with only a couple pins. The DAC chip would allow you to set your - and + voltage values.

Another route is to use opamps with proper feedback to scale your voltage to the +- voltages.

Getting a DAC chip is the easiest way.
Title: Re: Arduino Mega 2560
Post by: CrossRoads on Feb 07, 2013, 05:03 pm
How much current does the servo valve require?
Best bet is 4-quadrant DAC with +/-12V supply that can output +/-10V signal.
May need a power amp if the servo valve needs higher current.