+/- 10 Volt to 0/+5 volt

Hi,

I'm trying to read the output of a load cell conditioner using an Arduino Mega. The problem is that the output of the conditioner is in the range -10:+10 Volt. How can I rescale this signal in order to be able to read it using my Arduino ?

Thanks !

One way would be to use a battery or other isolated power supply for the Mega (or for the load cell & its conditioner), and then a 4:1 resistor divider to convert the 20 v to 5 v.

Or use a DC-DC $ignal isolator between the cell conditioner and Mega.

Since you're using the Mega's ADC, presumably high resolution and accuracy is not a requirement, so resistors with low temperature coefficient may not be necessary.

And for better stability, use one of the Mega's internal reference voltages (and different resistor divider), not the default 5v.

To read a higher voltage, a voltage divider with two resistors is used and GND is required.
To also read a negative voltage, a voltage divider with three resistors is used and both GND and a fixed voltage are required. There is a formula for that, which I can not find at the moment.

The internal reference should be used to read a voltage, but the three-resistor-voltage-divider also requires a accurate voltage. Perhaps the 3.3V can be used for that.

afbeelding
The values of the resistors are chosen at random.

@jremington mentions one here: Voltage divider to scale negative ranges to positive ranges - #9 by jremington
But I don't see the formula.

[ADDED] After searching for a while I still can not find the formula :cry:

Kirchhoff's laws can be used for that.

Here you go. The simple algebra is left as an exercise.

I think I have something:
3R

R1 = 47k
R2 = 10k
R3 = 15k
The 3.3V is used as a fixed voltage for the three-resistors-voltage-divider.
The analogReference(INTERNAL2V56); is used.
As a result, the -10V ... +10V can be measured.
When 0V is applied, then the resulting value of analogRead() is not 512, but a little higher.

For the resistor values, I put A0 somewhere halfway of 2.56V with R2 and R3. Then I calculated R2 // R3 to that voltage halfway, and with that I calculated R1. But I don't really know what I'm doing.

Please stop trying to melt my brain :stuck_out_tongue_winking_eye:

Here is the governing equation (refer to schematic in reply #5)

Vout (1/R1 + 1/R2 + 1/R3) = V1/R1 + V2/R2

For a desired Vout, there are infinitely many solutions, because only the ratios of the resistance values matter. Judicious choices for a couple of the resistors greatly simplifies the problem.

Thanks a lot ! The circuit with the three resistances is working perfectly.