I am currently working on a project where I am measuring the amount of voltage produced from a thermoelectric generator, TEG, based on a small temperature difference. The voltage out of the TEG is very small, in the millivolt range and the arduino is having trouble reading the values. I am able to read the values from the arduino, but they tend to stick to the same values for a certain time until a significant change happens, so the voltage drop over a time period is not smooth. After a bit of research, it was concluded that I would need to incorporate an op amp so the voltage would be at desired levels to the arduino. I am pretty certain the op amp has the correct configuration so I think the problem is in my coding. Any help would be greatly appreciated as I am fairly new to using an arduino. And please let me know if i skimped out on any information. Thanks.
Suggest you print out the raw values from the analog read to see whether it's changing smoothly as you're expecting. This function returns an int, by the way, not a float. If you're looking at the raw value, it'd be best to treat it as an int.
After measuring the op amp with a DMM I'm not sure it works any longer. I may have burned out one of the op amps, but just in case, I have included a picture of the layout of the op amps to make sure the wiring is actually correct. I modeled it on Multisim and it appears to be correct.
I also checked the raw values using the basic analog serial read example with the arduino and the values out we fairly smooth, but when using the an "int" instead of a "float" I don't get the precision needed to make a smooth graph for my project. Using the code from my first post, I have also included a picture of the graph from the data output of the arduino without using an op amp. I would like the curve to be smooth, and the expected output is supposed to decease exponentially. Any help is greatly appreciated.