Application: The circuit is for ground fault detection. When a fault current of 20mA flows through the primary of the current transformer (1:660), it generates a current of ~30uA in the secondary. This current drops across the 10k resistor to give ~5-6mV. This is amplified and given to a comparator to generate a \$(V_{CC}-1.5)V\$ which will be given as an input to arduino. The arduino will then turn off the relays which will cut off the mains power.
My problem is as follows: I am using a voltage divider network to generate \$\pm2.5V\$ for powering the LM358. The first part which is the inverting amplifier works correctly and I get a 0.5V output at pin 1 for a 5mV input. Now I want the second op-amp to generate a high voltage whenever the input to it is \$\ge 0.5V\$. So I am using the second op-amp in comparator mode. I use a 20k trim pot to generate 0.45V reference for the inverting terminal of the second op-amp. Since the trim pot is connected to +2.5V rail in the circuit, it acts parallel to the voltage divider network (which powers the op-amp) and there is no longer a equal \$V_{CC}/2\$ drop across the two resistors. Now that the rails are no longer \$\pm2.5V\$, the op-amp fails to function correctly. Can anyone help me out with this? I know I could go for a dedicated dual power supply but I am trying to operate using a single supply only.