Do you guys think this noise comes because of the Arduino code?
or the signal itself does not stable enough? When I see the oscilloscope the two sine wave look stable there is no noise.
In my experience when working with analog signals to be read by Arduino, I usually test with external power supply for Arduino not the USB cable. I noticed differences in reading using external supply compared to USB cable attached to your laptop or computer.
dozcoov:
In my experience when working with analog signals to be read by Arduino, I usually test with external power supply for Arduino not the USB cable. I noticed differences in reading using external supply compared to USB cable attached to your laptop or computer.
Do you know what happen inside Arduino when you plug external power supply with USB?
Does Arduino cut the power from USB and use USB only for data transfer and completely depends on external power supply?
Tell us more about the sensor.
What is the t/t output voltage of the sensor.
How much of the A/D range does it use.
Is the output impedance less than 10k.
Leo..
+1 for telling us more about the sensor, and all the wiring. Also, please post code using code tags ("</>" button).
There are many sources of noise, such as whatever is providing the signal, exposed unshielded wires and sensors, breadboards, USB and wall wart power packs, etc.
Batteries are the least noisy source of power and a battery powered Arduino is less susceptible to environmental noise, for example from AC house wiring.
jremington:
+1 for telling us more about the sensor, and all the wiring. Also, please post code using code tags ("</>" button).
There are many sources of noise, such as whatever is providing the signal, exposed unshielded wires and sensors, breadboards, USB and wall wart power packs, etc.
Batteries are the least noisy source of power and a battery powered Arduino is less susceptible to environmental noise, for example from AC house wiring.
It is NDIR CO2 sensor from Alphasense. It produces two AC signal about 2.5Hz.
I attached the schematic of the readout circuit. The two Active and Reference outputs are directly connected to the Analog input of Arduino.
I used bread boards to build those lamp driving and readout circuits.
When I connected external power supply, the signal becomes stable but not much.
For Op-amp I used LM358.
I am trying different method but the results is not getting better yet.
The schematic diagram from post#0 assumes a positive AND negative supply for the opamps.
If you have used a single 5volt supply, the circuit won't work.
You could try replacing R5, R6 with a (well decoupled) voltage divider, so the +inputs are at 2volt bias.
Leo..