Amp connected to arduino analog pin.

Hi all,

I've build an amp using the LM358 with a gain of 100. The input is attached to a thermocouple while the output is connected with an arduino pin.

I've tested the amp with a DMM- readings are from 0 to 3 volts obviuously depending on the input and in this case, heat.

Then loaded a simple program to view readings with the serial monitor.

The problem;
Readings didn't vary for nothing. 1022..1019..1023 and so on even when flame was not lit. (ie 0volts input)
I've also checked the program by using a pot so to be sure everything is ok

Any suggestions, please

Thanks
Kenneth Agius.

ps: Amp uses his own owe supply by 7805. All negs are connected together

This is normal and caused by noise. The reading from an A/D will generally change by a few numbers and there will be pickup and noise in your op-amp.

The general way is to take the average or running average of several readings to smooth out the noise. You can also try adding decoupling capacitor as close to the supply pins of the op-amp as possible to reduce the noise, but you will need a proper PCB layout to reduce pick up in the op-amp.

Grumpy_Mike

What I need is just a simple 1 or 0 when the flame is on or off. Can I connect the out of the amp though an opto-couple and use an Arduino digital pin instead. Will be the noise problem solved

Thanks
Kenneth Agius

1022..1019..1023 and so on even when flame was not lit. (ie 0volts input)

If you are indeed seeing these values with a 0v input, thats not so good. You should see about 0 with 0 volts.
Can you post code and a brief schematic?

Can I connect the out of the amp though an opto-couple and use an Arduino digital pin instead. Will be the noise problem solved.

If all you want is a 0V or not 0V input, then yes, an opto-couple will work, but a second op-amp set to Schmitt trigger around the target voltage would give you a much cleaner input to the arduino's digital pin.