Pages: [1]   Go Down
 Author Topic: Voltage Mapping  (Read 609 times) 0 Members and 1 Guest are viewing this topic.
Chile
Offline
Sr. Member
Karma: 0
Posts: 260
 « on: August 21, 2011, 10:33:12 am » Bigger Smaller Reset

I need to make some votage conversions, to get an input for different devices. And there is one situation I cant solve: I managed to get an output that varies between 2 and 10 V, ths serve as an input for another device that wants something between 0 and 10V. And I need a voltage as close to 0V as possible. So the methods of using a votage divider is not helping, and using some diodes (resting each 0.7V) will not work, because both will lower the upper limit.
I've seen some circuits with OpAmp, but they need a negative voltage supply, and I´m trying to avoid that.
What kind of other solution is there to be explored?
 Logged

Global Moderator
Netherlands
Offline
Shannon Member
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
 « Reply #1 on: August 21, 2011, 03:44:13 pm » Bigger Smaller Reset

You might design something that switches automatically between two levels at a certain voltage. ?

ONe transistor blocks at 5V the other opens...

 Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Chile
Offline
Sr. Member
Karma: 0
Posts: 260
 « Reply #2 on: August 21, 2011, 04:15:40 pm » Bigger Smaller Reset

Not able to undstrand this solution.

Maybe the explanition wasn´t the best.

What I´m trying to achieve is the equivalent of the map() function this way:

map(x, 2, 10, 0, 10)
with the values expressed in voltages.

 Logged

Manchester (England England)
Offline
Brattain Member
Karma: 604
Posts: 33432
Solder is electric glue
 « Reply #3 on: August 21, 2011, 04:29:45 pm » Bigger Smaller Reset

I am not sure what you want to do. Why did you talk of potential dividers?
What is your solution now that gives you the problem? Diagrams would help.

If you have a voltage that doesn't go down to zero and you want it to you can put two or three diodes in series to shave of the DC offset. However that messes up the top end so you will have to provide more there.
 Logged

Global Moderator
Netherlands
Offline
Shannon Member
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
 « Reply #4 on: August 21, 2011, 04:37:15 pm » Bigger Smaller Reset

Is the problem hardware? (my assumption...

Or software ?

Tell us more about the project so we get a better picture..
 Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Chile
Offline
Sr. Member
Karma: 0
Posts: 260
 « Reply #5 on: August 21, 2011, 05:21:00 pm » Bigger Smaller Reset

The problem is hardware, quite outside the pure Arduino world, but controlled by it.

I´ll try to show a better picture:

• supply voltage for the circuit is 12V and GND
• one device gives an outupt of 2 to 10V
• another device wants  it´s input starting with 0V, max 10V (or 12V)
• I want to connect this two devices
• A 2V reference is available

The solutions that I explored, and don´t give me a direct solution are:
• voltage divider: it will just divide, but cant get the lower limit to 0V
• adding diodes in series: will lower the upper input also

I just mentioned the map() function for illustration purpose only.

So far I got to two possible solutions:
• add the diodes and then amplify the voltage
• use a rail to rail OpAmp as a differential amplifier, like the following from wikipedia

Will that work?
As allways, thanks for the help.

 Logged

Left Coast, CA (USA)
Offline
Brattain Member
Karma: 361
Posts: 17263
Measurement changes behavior
 « Reply #6 on: August 21, 2011, 06:25:45 pm » Bigger Smaller Reset

Quote
I´ll try to show a better picture:

supply voltage for the circuit is 12V and GND
one device gives an outupt of 2 to 10V
another device wants  it´s input starting with 0V, max 10V (or 12V)
I want to connect this two devices
A 2V reference is available

Unless it's mandatory that you scale the external circuitry to the arduino 0-5vdc range for maximum steps of resolution, just use appropriate sized passive voltage dividers such that the maximum possible external measurement signal equals 5vdc, then use specific software map() functions for each different analog input pin.

The first channel can use a resistor divider (/2), giving a 1-5vdc measurement range so the map function could be map(channel1_reading, 205,1023, 0, myMaxUnits#1);

The second channel if indeed 0-10vdc max, use also a /2 divider for that signal giving 0-5vdc input, and map(channel2_reading,0,1023,0,myMaxUnits#2).

That should at least let you move on with the project. You can always come back and design and build external hardware op-amp to scale and offset that channel1 voltage if it's really required, but it's probably really not needed.

Lefty

 Logged

Chile
Offline
Sr. Member
Karma: 0
Posts: 260
 « Reply #7 on: August 22, 2011, 10:17:22 am » Bigger Smaller Reset

Thanks retrolefty. You helped me thing out of the box.
Regards.
 Logged

 Pages: [1]   Go Up