Skip to content

How does the DAC and gain circuit work in practice? #80

Open
@KevinOConnor

Description

@KevinOConnor

Hi. I'm trying to understand how the DAC and opamp gain circuit work in practice on the Haasoscope.

At first glance the circuit appears to be a simple "differential amplifier" circuit (eg, as described at https://www.electronics-tutorials.ws/opamp/opamp_5.html ). However, my Haasoscope doesn't seem to work like that in practice.

For a standard differential amplifier, if I connect a 1x probe (zero ohms) then I'd expect the voltages to roughly follow the formula probe_voltage = dac_voltage * (1 + input_resistor/feedback_resistor) - adc_voltage*input_resistor/feedback_resistor. So, if I connect a 1x probe to GND, and I want the ADC to receive 0.900V (128 reading on the ADC, center line at 0V in the application), then I'd expect to set the DAC voltage to 0.7615V ( (0 + 0.900*1100000/200000) / (1 + 1100000/200000) ).

In practice, however, to get 0.900V on the ADC I need to set the DAC voltage to 1.0575V (2115 in the software) on my Haasoscope (v9.01 board purchased in Nov 2022). This is puzzling because this is a higher voltage at INA- than at OUTA on the opamp, while a standard differential amplifier would always have a higher voltage at OUTA than INA-. As part of investigating this, I setup the Haasoscope in the above configuration and applied a multimeter to the pins of the MAX4416, and I can confirm that the DAC voltage is 1.0575V (probe on INA+ pin), that the opamp does maintain a corresponding voltage of 1.0575V on INA- pin, and that the ADC voltage is receiving 0.900V (OUTA pin).

My best guess is that leakage current from the IN+ pin to the IN- pin on the opamp is dominating the stable state voltage. (The mcp4416 has only a 60Kohm differential resistance, which is rather small relative to the 400Kohm and 4Mohm feedback resistors.)

So, I'm wonder if there is a better understanding of how the opamp circuit is supposed to work in practice? Or perhaps I'm missing something important, or have an incorrect understanding of the circuit.

Ultimately I'd like to be able to write software that can take a user supplied voltage range and automatically configure the DAC voltage and 10x gain mode accordingly. However, I haven't been able to determine a good formula for predicting an appropriate DAC setting. I can kinda predict the results when using "gain1x mode" (there seems to be a static offset of ~0.350V from nominal predictions), but I haven't found a simple pattern when in "gain10x mode".

Let me know if there is a better place to discuss topics like this.

Thanks in advance,
-Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions