Go Down

Topic: Arduino Mega 2560 (Read 344 times) previous topic - next topic

johnkgw

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?

Krodal

Could you change the subject to "servo valve" ?
Can you add a link to that valve ?

Retroplayer


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.

CrossRoads

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.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up