That's a very interesting proposition... I suck at analog electronics, but I'm an expert MCU programmerHave you considered the possibility of scrapping the hardware synchronous detector and doing it in software? This may not be possible, but the implementation would be pretty trivial if you could arrange your ADC to sample at a multiple of the 420Hz, e.g. say 8 samples/cycle. The demodulation would simply mean changing your averaging to add 4 samples, then subtract the next 4, add the next 4 and so on. There are many refinements to this to reduce harmonic responses, but this simple basic technique would work pretty well. If you always calculate over a whole number of cycles (average over 8N), then there is a perfect null at 420Hz and you don't need the RC filters etc.. As you are averaging over many samples you would increase your resolution past 16 bits (as at present), but with no offsets to worry about.
The one thing that may be tricky is ensuring the phasing of the +/- is correct.
Thanks, I tried looking them up, but I think those chips are discontinued.Doubt it is a drop in replacement, but LM1496 / 1596
Simply drive the REF pin of the AD8221 to shift the signal to be always positive. Set the gain to keep it within the range of the ADC.That's a very interesting proposition... I suck at analog electronics, but I'm an expert MCU programmerand know how to keep things in perfect sync.
But wouldn't the ADC have to accept both positive and negative voltages at it's input? Or wouldn't the ± square wave have to be rectified before reaching the ADC?
All the circuit examples I see in the datasheet connect REF to ground. Are you suggesting that I just connect REF to +Vs? Or should I connect REF to +Vs when input is positive and switch to -Vs when input is negative?Simply drive the REF pin of the AD8221 to shift the signal to be always positive. Set the gain to keep it within the range of the ADC.
Read the datasheet!All the circuit examples I see in the datasheet connect REF to ground. Are you suggesting that I just connect REF to +Vs? Or should I connect REF to +Vs when input is positive and switch to -Vs when input is negative?
I think it's pretty clear to us that I do not know how the REF thingy works at all...
Just did.... and stared at it... until I think something clicked...Read the datasheet!
You mean like this?You can also couple the signal through a capacitor into two equal value resistors in series between V+ and ground.
That will offset the voltage to be 1/2 of V+.
Not quite.You mean like this?
With the "Out" connected to the non-inverting input of the voltage follower opamp?
Not quite.
The "Out" is the "In" and the correct "Out" to the op amp input (or A/D input) is the junction of R1 and R2.
Sorry, still not right.
I think I get it now... that way the voltage divider will consume almost zero current since the opamp's input has a very high impedance.
I'm relieved... I thought that my IQ was shrinking here...Okay, I see the problem.
We are talking about two different approaches to the same end.
My circuit is placed at the instrumentation amplifier output and is in place of the offset bias applied to the output zero reference by U2.
If you apply the bias as you show with U2, and R1 and R2, then you don't need the capacitor or anything else connected.
Connect it to ground and make it hefty to filter out any power supply noise being fed into REF.To what node in the circuit are you referring that I should connect C1 to?
Thanks, had already considered that.Connect it to ground and make it hefty to filter out any power supply noise being fed into REF.
@crutschow, is this what you meant I could use to protect the ADC's input from over and under voltage being output by the instrumentation amplifier?A common way to limit the signal amplitude is to use a series resistor and a standard or Schottky diode to the V+ supply (cathode to supply)
No. A single resistor goes in series with the amplifier output and then to the diodes which connect directly to ground and V+ with no other resistors.@crutschow, is this what you meant I could use to protect the ADC's input from over and under voltage being output by the instrumentation amplifier?