Convert Arduino PWM 5V to analog output 0-10V

Hi,

I want to convert the Arduino PWM output that is in the range of 0 - 5V to an analog output in the range of 0-10V.

I have uploaded the circuit I have designed. edit... PWM out is wrong its DC 0-10v OUT

The circuit can be divided in two parts:

  1. An RC filter to get an analog output from the PWM signal that Arduino outputs. I have read some information about this kind of filters and it's seems that there is a rule that establish the relation between the time constant of the RC filter and the period of the PWM signal: the RC time contant should be greater than the period. In my case the time constant is 100 times greater.

  2. An operational amplifier with a gain of 2 to obtain the output in the range of 0-10V.

I have made some test with the circuit and seems to work properly but I don't have much experience with electronics so I would be grateful if someone can check if the design is correct.

Second i will probably use all 4 outupt as i need to use them in 4 light 0-10v light ballast for aquarium use

Thanks in advance.

You could run the PWM into a transistor switching 10V and filter its output.
Op-amp outputs are, for the most part, low current.

How much current is required by a 0-10V light ballast for aquarium use, anyway?

Keep in mind when using op-amps that is very difficult to get a perfect 0 volts DC output when the PWM value = 0. Even so called 'rail-to-rail' op-amps only get closer to zero then normal op-amps. To get 100% accurate conversion utilizing op-amps often requires using a negative rail voltage rather then just a positive and ground rail.

http://forum.arduino.cc/index.php?action=dlattach;topic=94426.0;attach=14482

Instead of 12V, use 10V

gc9n:
0-10v light ballast for aquarium use

I'm not sure what a 'light ballast' is (is it anything to do with the circuit used to initiate a neon tube?) but if you're going to power the lamp via this circuit, in effect you will be discarding all the unused voltage as heat which will make it very inefficient. How much power do you need to output? Does it actually need to be an analog output - is there any possibility of using a PWM output instead?

This s the ballast

Pin 6 and 7 is the control dimmer 0-10v analogue , there is already a 10v load there ..

If I connect 5v DC the lights intensity will be 50%

So, the circuit in Reply #3 is too difficult for you or what?

to be honest , yes , the lm324 have 4 outputs and i need to "drive" 4 ballasts, so is more "clear", one chip for everything + arduino , in my bench everything working flawlessly

There's nothing wrong with your opamp circuit.
It wasn't clear whether you were getting the desired result from your original post.
X2 non-inverting amplifier , A = 1 + (R2/R1) -- fine, fine, fine.
The output is labelled "PWM", but it shouldn't be PWM there, only a "pure" DC level.

YES !! i just realized that , your correct i was made a mistake this is as you said pure dc out not PWM
Thanks every one , i will upload a Fritzing PCBout if someone else need this

Why not using a common transistor NPN?

this is the Fritzing.. is case someone need this.

i am not expert in pcb design (i didnt test it yet)..

marnieros2.fzz (20.1 KB)