Does this sensor amplifier circuit look sound?

Edit: just realized i did some of these calculations with 3.3v in mind.

I'm using the ACS758LCB-50B to measure the AC line current. The sensor outputs vss/2 at zero amps. The maximum current i would concivably have to measure is 20 amp RMS so peaks of 28,3 amps. My sensor increase/decrease it's voltage by 40 mV per amp so at 28,3A max peak it should be wandering 0,040 * 28,3 = 1,132.

This will only use 68,6% 45,2% of my ADCs resolution and i have an unused op-amp in circuit so i desided to boost it a bit.
I offset the voltage of the inverting line by half of vcc. The feedback is divided so that the op-amp would have to increase it's output signal by 125,6% making our previous output of +-1,132 to 1,422. This is 86% 56% of my ADCs resolution wich i'm happy with.

Just want to know if i'm shooting straight here.

The design for the op amp is wrong.

Get rid of the Vcc/2 voltage divider at the negative input, which leaves you with a non-inverting amplifier with gain of (1 + 1/3.9) or 1.26.

What, exactly, do you want the amplifier to do? The posted description is unclear.

It would be easier to reply if your diagram had component numbers to refer to. You have 2 voltage dividers joined together and your description suggests you think they behave independently, which is not the case. Keep the 2 * 10k resistors on the negative input. Use 1 resistor from the output back to the negative input as feedback. It will see the 10k resistors as if they were in parallel, so effectively 5k. If your feedback resistor is 5k you should get a gain of 2, but don't reply on it being precisely that.

Sorry, something else I forgot. There will be a difference between the nominal Vss/2 output of the sensor and the nominal Vss/2 set by your 2 * 10k resistors. That difference will be amplified and appear as an offset at the output of the opamp. The solution is to use a pot for the divider and adjust it to get rid of the offset. Even better is to just use a low value pot in the middle of 2 resistors, say a 1k pot with 10k resistors either side. That way you can only adjust a little bit either side of Vss/2, meaning the travel of the adjustment is more for a given change which makes it easier to get a fine adjustment right.

Thank you both for the replies!

jremington:
The design for the op amp is wrong.

Get rid of the Vcc/2 voltage divider at the negative input, which leaves you with a non-inverting amplifier with gain of (1 + 1/3.9) or 1.26.

What, exactly, do you want the amplifier to do? The posted description is unclear.

That would offset my reading. When the sensor reads zero amps it outputs 2,5v wich would be amplified to 3,15v.

PerryBebbington:
Sorry, something else I forgot. There will be a difference between the nominal Vss/2 output of the sensor and the nominal Vss/2 set by your 2 * 10k resistors. That difference will be amplified and appear as an offset at the output of the opamp. The solution is to use a pot for the divider and adjust it to get rid of the offset. Even better is to just use a low value pot in the middle of 2 resistors, say a 1k pot with 10k resistors either side. That way you can only adjust a little bit either side of Vss/2, meaning the travel of the adjustment is more for a given change which makes it easier to get a fine adjustment right.

Like this?

Here is how the first circuit posted will behave, with a 1V amplitude sine wave, offset by 2.5V as input (output shown in plot).

The second circuit has unpredictable gain, depending on the pot setting.

RippoZero:
Just want to know if i'm shooting straight here.

Change the 1k resistor to 2k2, lose the 3k9 completely, you'll have a gain of 1.44 about the
mid-rail point.

Think of the 10k/10k divider as a 5k return to the mid-rail, which is exactly what its equivalent to,
and you'll see its a 2k2/5k0 divider in the negative feedback path giving 1.44 gain as mentioned.

No point trimming the centre point of the system in hardware, dead easy to do
in software as you know the signal is AC.

Oh, and perhaps get a decent opamp that can actually do rail-to-rail, not the 358

[ Also there are other approaches since you know the signal frequency is fixed you can
amplify it relative to a low pass filtered version of itself, but really the 3-resistor circuit
is nice and straightforward ]

Like this?

Yes, exactly. However, the suggestions you've had since mine are better still.

The second circuit has unpredictable gain, depending on the pot setting.

True of course, but I think the amount of change is tiny if all is being done is to trim out a slight difference between the two nominal Vss/2 voltages.

Do you actually need to measure the current at many points in the wave form or are you just interested in the RMS value? Assuming the second then I suggest you ignore the negative half cycle and only measure the peak of the positive half cycle. You will need to detect the zero crossing and wait a 1/4 cycle to take the measurement. I have just done this successfully for measuring mains voltage.

I took a page from jremington's book and tried some simulation myself. I made it work with stable gain by using active components. A voltage refference or another op-amp is two solutions.

I think the sensible thing to do here is to stick with the potentiometer divider but i'll chuck a voltage refference in there for emotional reasons.

MarkT's idea is the simplest and does pretty much what you want, with known, fixed gain.

The gain equation for the two equivalent configurations is