I want to build an analog switch that can switch between different current values. I did a quick search online to find analog switches and came across the ADG512. I simulated the following circuit in ADISimPE to understand how it works. The input to D1 is from a Howland circuit.
When the IN1 value is 5V, everything works fine(red plot) and the current through R1 is as I expect it to be, but when I change the value to 0, the output(green) does not go to 0V (or near 0V) and the negative cycles are still present. I do not understand why this is so.
Adding an offset solves the problem. Can someone explain why the negative cycles still exist and are there switches that would ground my output if nothing is connected? I feel the problem exists because the output is floating when the switch is off. Either that or just the negative part is latched.