Hi, new here. I bought an lm324n and set up a non inverting amplifier to amplify voltage coming from a voltage divider. The output of the amplifier is then fed to my atmega8a adc. But the adc reads fluctuating voltage values like 0V,1V, etc. Sometimes voltage stays at 0V, and after a couple of serial prints it shoots back up. I know the adc is working properly since i get fairly stable and accurate readings when i skip the amplification altogether and directly connect the voltage divider output to the mcu adc.
The circuit is messy due to all the wires. The ic on the right is the opamp and the one on the left is the mcu. For the non inv amp configuration both of the resistors are 1k to achieve a gain of 2.
Also see the attached files below, the unit is volts: