My First Project... Is it possible? And yes i have searched!!!

Hi, I have had an idea in my head for a while to solve an issue I have.

I need to a device that will accept an input from .01v- 5.00v and then output a different voltage on a different pin in the same range.

So i have a couple questions that i havent been able to find clear answers to

  1. Can the Arduino do this?
  2. The values will be fixed, for example .78v input will always require 1.94v output Do i need to set up a database or just code all 500 different options from .00-5.00v?

Thanks, I really appreciate any help you can provide, I have always been a car guy and computer guy, and finding the Arduino is really going to allow me to combine both and really allow me to modify both in new ways!

Mark

Is there some rule? Like, between 0 and 1 volt input, you want 0 to 2 volts output? If so you can code that rule in.

But yes, it is do-able.

I should point out though that you don't output voltages as such. You can output PWM (pulses) and put them through a filter to smooth out the pulses. The standard analogWrite only takes a byte (0 to 255) as an argument so you only get 256 different values. You could get more by using one of the the timers and tweaking the parameters to it.

If you want more than 5V output (which your example implies you might) then you would also need to use a transistor of some sort to switch a higher voltage.

Could also add an external DAC so that the 10-bit input can be turned into a 10 or 12 bit output, instead of a filtered 8-bit PWM output.
Part like an MCP4811 or MCP4821

Marky522:
2. The values will be fixed, for example .78v input will always require 1.94v output Do i need to set up a database or just code all 500 different options from .00-5.00v?

That depends whether there is any predictable relationship between the input and output values. If the relationship follows a formula, you can just code in the formula. If you don't have a formula but know that the output varies smoothly as the input changes and know the output value for specific input values, you could hard-code a lookup table with enough values to show the 'shape' of the relationship and use interpolation to determine the output value for a given input.

If the relationship is completely arbitrary, you would need a lookup table with an entry for every possible input value.