I'm testing "rail to rail" op amps using this simple circuit - a non-inverting buffer.
Using a UNO I generate a series of step voltages using PWM at 31kHz or 3.9kHz using an RC filter.
(I've tried both with identical results)
The step voltage is sustained for around 400-500msec between changes.
Step voltage is calculated by measuring Vcc with the "secret voltmeter", then Vstep = n * Vcc/255.
I measure the voltage vFilter at the input of the op amp and VDUT at the output, using A0, A1 ADC's.
Here is the simple test circuit
The graphs are created in excel by copying and pasting the output from the serial monitor, plotting VFilter and VDUT against the calculated ouput voltage in mV.
I've added markers to VDUT
I've included the code for completeness although I dont feel its very relevant, as it works very well with the LMC6482, and all I have done between tests is change the op amp. Even the pin-outs are identical.
I've also checked the results (roughly) with a 10k potentiometer providing the input voltage, and measuring voltages with multimeters. So it would not appear to be connected to the program or measurement using the arduino.
The puzzle -
1: why is the filter voltage affected - the input bias current for the op amps should not move it more than a millivolt at most.
and the output -
2: why does the tracking misbehave above 4500mV - limited compliance? but the load is just the adc input.
3: but why does it go crazy below 1500mV?
The TLC2272 and TLV2462 are referenced in this TI application note -
Application of Rail-to-Rail Operational Amplifiers
solarChar.ino (6.73 KB)