Right now I am testing an MCP6004 Op-amp IC. A sensor in my main circuit going to give me a signal in the range 0-0.5 V max. So, I want to amplify this in the 0-5V range so that my Arduino reads it accurately.
Now I want to test my op-amp, Arduino measurement accuracy, etc. so I did a trial test.
In this, I generated a low voltage test signal (generated from Arduino PWM) reading 0.5 V. The op-amp receives this signal and amplifies this in the 0-5V range so that my Arduino able to measure this signal.
The voltage gain circuit I have used is:
Case1:
- R1 = 90k, R2 = 220
- IC supply: Vdd = 4.97 V
- Output: Vin = 0.5 V, Vop = 3.54 V
Scope: blue is input, yellow is output
Case2:
- R1 = 90k, R2 = 10k
- IC supply: Vdd = 4.97 V
- Output: Vin = 0.5 V, Vop = 0.56 V
Scope: blue is input, yellow is output
My basic questions:
- My actual voltage is totally different and very little compared to the theoretical gain.
- Am I measuring the output signal correctly? That is, taking the average value?
- How do I measure such a signal in the Arduino? I mean, it is a PWM signal and we need to consider the signal frequency. I did 100 samples average approach, and as expected, it gives way different value.
- Am I doing something wrong?
Update: based on below-accepted answer, Case3: