Can you tell us more about where the negative voltage come from and maybe we can find a way to turn it into unipolar signals. Worst case you can purchase a bipolar A/D converter for a few dollars and program it with SPI or I2C interface.
We want to use the output from a current sensor which is a 50 Hz sinusoidal AC voltage max 4 V (peak to peak) centered around 0V. We want to get the peak value of this i/p in digital form for processing on the board.
I see 2 options:
DC shift it by 2.5V and AnalogRead the values. Program the Arduino to calculate the peak voltage somehow.
Make a rectifier circuit + RC filter to convert to DC voltage which will be in the range of 0 to 4 V and can be used directly by the program on the Board
Option 2 appears better, can you suggest a circuit?
If its a current transformer, and the output is floating, you cheat and make the 0 side 2.5 volts from a voltage divider and a smoothing capacitor. The output from the other side of the output windings then wanders up and down around 2.5 and stays positive relative to the real ground. and you feed it to an analog pin and measure the voltage around a thousand times a second to build up the AC waveform.
Using a simple rectification circuit won't work since you'll lose the first 0.6 - 0.7 volts to the diodes. Other than that it gets complicated with op amps and stuff....
If you're measuring current (power consumption) be warned that it gets very messy at low loads with less than optimal power factors (typical household loads in other words) you get a spikey mess waveform which is practically impossible to makes sense of in software.
I gave up and just read the meter, its easier and more accurate.....