need variable voltage

Hi guys,

I am a newbie to arduino n also electronics. I am working in a project where I require variable voltage of 9v to 10v from arduino to run my project and take some data in it. Is it possible with a voltage regulator?? Don't curse me if the question is silly..thnx in advance for the help.. I know that arduino Max output voltage is 5v(4.88v). Please help me

The "analog output" from the Arduino is pulse-width-modulated 5V. You control the duty cycle from 0/255ths to 255/255ths. If you put that through a low-pass filter (resistor and capacitor) you can get a good approximation of a 0V to 5V analog output. You could run an op-amp on a higher voltage (say, 12V) configured as a voltage doubler to boost the voltage range to 0V-10V. If you want more precise control in the 9V to 10V range there is probably some way to offset the op-amp output. Ideally you'd have the op-amp gain of 1/5th (probably takes two op-amps) and offset of 9V so you'd get 256 steps between 9V and 10V.

A simpler way to get the PWM output up would be to put it through a transistor connected to the high voltage and then smooth it.
However as you have not said what current you need from this variable voltage it is hard to say what your best circuit is.

It is not as easy a thing to do as you think.

And of course it matters how much current this variable output is meant to provide.

One possibility is adapting a circuit used with a variable (or fixed) output voltage regulator (often these are set with a pair of resistors to set the output voltage, but a lower voltage reference voltage may be able to do the same job.

Offhand I'd say you might get away with taking the PWM output, smoothing it with RC filter, put through a unity-gain op-amp circuit (perhaps with more low-pass filtering) to the ground leg of a 7808 8V regulator. If the opamp used can sink enough current to keep the 7808 happy you will then have an 8+V volt regulator (where V is the output voltage from Arduino/opamp). A 7806 regulator could also work this way.