Input To Arduino To Adjust Voltage Output

OK, Been a little while since I have asked anything but here goes.

I've working on a project where we are using Unity 3D to send information out to the Arduino.

In one case we have a LDR sensor that sends a float to Unity and we use that to adjust an On screen slider to show the Value of the LDR.

Now here is what I'm wonder, We basically want to do a similar thing but in reveres where we send a float to the Arduino From Unity to see if we can adjust voltage output, kind of like stepping up and down the voltage based on the slider value on screen.

Any thoughts on a good way to approach this?
I'm also wondering if the two values would conflict or if the Arduino is able to cope with the two different sets of values.

Thanks :slight_smile:

to see if we can adjust voltage output, kind of like stepping up and down the voltage based on the slider value on screen.

Variable voltage output from the Arduino? No... The Arduino doesn't have a DAC so there's no true analog output.

AnalogWrite() is [u]PWM[/u] which can "act like" variable DC to control the speed of a motor or to fool the eye so an LED appears dim.

Hi,

UNO doesn't have DAC, but DUO does, but its 0 to 3.3V
Or you could add a DAC to the Arduino.

Check other variants of Arduino
Try here;

https://www.arduino.cc/en/Main/Products

Tom.. :slight_smile:

Thanks, Yeah I know the Arduino can't adjust output voltage above 5V but I was thinking maybe something along the lines of having each stage of our readout bar or slider perhaps send a signal so if the value was say something like:
if float value = 1
then maybe have the arduino code light up an LED or trigger a relay that could send the correct voltage level.

Maybe something like that using a shift register even from one arduino pin.... would something like that be possible?

If you want an analog voltage output, just get an external DAC like an MCP4811.