Analog voltage modifier

Hi I am in need of a code that I can interface a 0 to 5 volt analog system and output a modified analog signal. Modified signal will be adjustable with a potentiometer to boost the output. At the lowest setting the input and output will be 1:1 ratio. At the highest pot setting the input will be 0 and the output will be 5.

Also the encoder has an equal and opposite output so that will need coded the same way but backwards, so basically there will be two inputs and two outputs plus a potentiometer.

Seems very doable if somebody could help me that would be great. Please PM me for more details and what you would charge to do this

Thanks

TheMachinist:
Hi I am in need of a code that I can interface a 0 to 5 volt analog system and output a modified analog signal. Modified signal will be adjustable with a potentiometer to boost the output. At the lowest setting the input and output will be 1:1 ratio. At the highest pot setting the input will be 0 and the output will be 5.

Also the encoder has an equal and opposite output so that will need coded the same way but backwards, so basically there will be two inputs and two outputs plus a potentiometer.

Seems very doable if somebody could help me that would be great. Please PM me for more details and what you would charge to do this

Thanks

If you bothered to read the Arduino specs, you would change you mind about what is very doable.

Paul

Paul_KD7HB:
If you bothered to read the Arduino specs, you would change you mind about what is very doable.

Paul

Not sure I understand what you mean? I would think this is a fairly simple operation. Instead of voltage dividing, it needs to be multiplied. I am just not experienced enough with writiing anything beyond simple code to attempt without a lot of spare time on my hands. Maybe I am missing somthing?

Do post some examples or images of voltage levels and their relationships. I also have no idea what you want, what the role of the encoder could possibly be, let alone the role of an Arduino in this whole thing.

Ok, so I have a potentiometer signal I want to interface with the arduino. It puts out 2 signals.

One is 0-5v, the other is 5-0v. This is a redundant system

I want to increase those readings and print them to 2 output pins

Those readings will be increased/multiplied using an adjustable pot value.

Say the inputs were getting a reading of 2.5v and the pot was set to half way. It would then print out double the value =5v and 0v.

So something like:

Serial.print(F("Pot value: "));
Serial.print(analogRead(inputPin) * 10 / 1023.0);
Serial.println(F(" V."));

Not that I see any practical use of doing this, but hey, it's your party.

TheMachinist:
Not sure I understand what you mean? I would think this is a fairly simple operation. Instead of voltage dividing, it needs to be multiplied. I am just not experienced enough with writiing anything beyond simple code to attempt without a lot of spare time on my hands. Maybe I am missing somthing?

Yes, missing the fact the Arduino cannot output a variable voltage. Particularly one greater than the 5 volts used to power the Arduino. To do what you want, you need additional devices and circuitry like an digital to analog converter chip and additional power with the higher voltage you require.

Paul

Paul_KD7HB:
Yes, missing the fact the Arduino cannot output a variable voltage

If what OP really wants to do is increase the actual voltage from 0-5V to 0-10V, they'd isimply need an OpAmp. That'd do the job just fine, for both pots - even if it has to be reversed for the second (5V input gives 0V output; 0V input gives 10V output).

Even simpler would be of course to connect the pots to 10V in that case.

But in #4 they mention "print out double the value"... that's more of an Arduino operation, and no actual >5V voltages involved.

Nothing of all this makes sense to me, though. More and more suspecting this is an XY problem.

Sorry I didn't clarify that the output voltage will never be over 5v. I know that voltages to and from arduino can not exceed 5v. I am not asking to increase them over that amount. We are dealing with an analog 0-5v system.

I am interfacing an existing control system that uses redundant signals in case one pot fails the other is there to catch it and set an alarm

The modified signal is being sent to the pre-existing control after I use the arduino to increase these value's This will lie to the system i am intercepting putting me in control of the position if the encoder which is attached to the motion device I am controlling.

This equation will need to be performed twice in the code, that way the existing control doesn't wig out when it sees mis-matched values that don't line up equal but opposite.

Maybe this will help clear things up. It really isn't that complicated, just hard to explain.

Schematics and some block drawings will definitely help.

Also as you ask to double the voltage you appear to lose half the range of the pots.

TheMachinist:
Sorry I didn't clarify that the output voltage will never be over 5v. I know that voltages to and from arduino can not exceed 5v. I am not asking to increase them over that amount. We are dealing with an analog 0-5v system.

Are you familiar with PWM? That is what you get from Arduino's ADC, no 0-5V

Cheers,
Kari

GaryP:
Are you familiar with PWM? That is what you get from Arduino's ADC, no 0-5V

Easy enough to turn into a pretty stable voltage with an RC filter, maybe even two in series for added stability. Add an OpAmp as voltage follower if you need any significant current out of that (as in >1 mA).

But it still doesn't make sense as you're doing a lot of effort into recreating what you already had.

If the OP simply wants to to use the arduino to read one voltage and output (not just print to the serial console) another, he can also consider using a DAC and is not restricted to a range of 0 to 5 volts output e.g. https://www.analog.com/media/en/technical-documentation/data-sheets/159561fc.pdf