Pages: [1] 2   Go Down
Author Topic: How to eliminate noise of the LM35 connected to Analog pin of Arduino..?  (Read 5262 times)
0 Members and 1 Guest are viewing this topic.
INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have connected LM35 to the arduino's analog pin..
The problem is the sensor cable is little longer so the reading is a bit noisy...

How do I eliminate this noise...??
Add a capacitor to the analog pin and Ground...??
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, it's an analogue device to placing a capacitor on the analogue input point will dampen the noise.   

If you can analyse the noise you might be able to narrow it down to an item of equipment - and cure the problem at source.

You do not state whether or not you are using screened cable.  Ideally you should be and this must be isolated from all terminals at the sensor end and connected to the analogue ground at the Arduino end.  The ground wire which is connected to the LM35 should be fed as one of the cores within the screened cable.

As to capacitor size, something like a 0.1microfarad should do the job.
Logged

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried using the LM35 with 1 mtr cable to an Arduino Duemilanove board, There was no noise...

But when I connect the same LM35 with the same length cable to a project board made on a vero board there is a noise of 10°C in the reading..

I tried with another analog pin but the problem is same...

So I connected a 0.1uf non polarized cap between the GND and the analog pim the noise came down to 1°C. Then I tried with a 47uf polarized cap. that gave me good results, no noise..

But now my question is that as I am using the cap am I getting a true reading all the time...
In case the temperature rises and then cools down very quickly will the reading take time to decrease due to the capacitor's stored charge...??
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Something on your veroboard is creating serious noise.  may I suggest you provide both a circuit diagram and photos of both sides of your board.  Also, do you have any active circuits on the board (such as amplifiers or oscillators etc)

As to the large capacitor, yes it will grossly dampen any transient temperature changes.
Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11639
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The LM35 claims to have a low output impedance of 0.1 ohm - just placing a capacitor across that is likely to cause problems of overloading the output when it changes.

Instead use an RC low pass filter, say 1k in series to a 100uF capacitor to GND - that gives a time-constant of 0.1 second and doesn't overload the output.  Its unlikely you'll be seeing temperature changes at more than a few Hz.
Logged

[ I won't respond to messages, use the forum please ]

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Something on your veroboard is creating serious noise.  may I suggest you provide both a circuit diagram and photos of both sides of your board.  Also, do you have any active circuits on the board (such as amplifiers or oscillators etc)

I am attaching the pics here..
 

The circuit is pretty simple..
I have a 16x2 LCD attached to PINS 12, 11, 5, 4, 10, 9
a voltage divider with R1 = 2.2k & R2 = 820R is connected to A0 to measure voltage.
A LM7805 as a voltage regulator for the circuit.
2 nos. tactile buttons attached to A5 & A4.

Thats all what I have...

I tried with opening the 1mtr wire from the A1 ( pin for LM35) and connected the LM35 to the A2 with a Short wire, the noise persists. So I tried connecting the LM35 to A3 still the problem persist.

I even detached all the other connections from the Analog pins.. Still the problem persists... smiley-sad

So I pulled up an Arduino Duemilanove board and connected the LM35 to It and checked.. There was no noise...
So the LM35 is good..


What may be causing the noise...
« Last Edit: February 16, 2012, 11:14:57 pm by Joy » Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11639
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That circuit doesn't connect to the AREF pin so can't have the required decoupling capacitor on AREF that's needed for low-noise ADC performance... All Arduino boars do this to my knowledge.
Logged

[ I won't respond to messages, use the forum please ]

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That circuit doesn't connect to the AREF pin so can't have the required decoupling capacitor on AREF that's needed for low-noise ADC performance... All Arduino boars do this to my knowledge.

Ok...I missed that... smiley-razz

Now I have connected a 104K pf between GND and the AREF pin...

But still the problem persists... smiley-sad
Logged

0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 303
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ciao,

have You decoupled the power input of the LM35 too?

Here You can find a project using 2 LM35.

UberFridge hardware and schematics
http://www.elcojacobs.com/uberfridge-hardware-and-schematics/

As You can see from the schematics there is a RC filter + LM35 power in decoupling to avoid power (there are 2 probes in this project: probe1 and probe2 in the schematics).

Also take a look at another article that Elco Jacobs posted about hardware noise reduction + code to reduce noise and improve measurements.
Eleminating noise from sensor readings on Arduino with digital filtering
http://www.elcojacobs.com/eleminating-noise-from-sensor-readings-on-arduino-with-digital-filtering/

Have a nice day,
Marco.


« Last Edit: February 17, 2012, 06:42:43 am by Marco Benini » Logged

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By trial and errors I found that connecting a 10K resistor Between the LM35 sensor pin and the GROUND the noise goes away...
Should I use that...??
« Last Edit: February 17, 2012, 07:23:13 am by Joy » Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And what's the crystal for that appears on the left of the circuit.   Your LCD display will use multiplexing to encode the characters which itself will generate lots of noise.  You therefore need to ensure its supply is decoupled as close as possible to the display power connects.

I know it's difficult to keep wires separated but all those wires crossing over each other will also cross-couple any noise signals to where they aren't wanted - particularly the one from the crystal (if it's an active part of your circuit)
Logged

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And what's the crystal for that appears on the left of the circuit.   Your LCD display will use multiplexing to encode the characters which itself will generate lots of noise.  You therefore need to ensure its supply is decoupled as close as possible to the display power connects.

I know it's difficult to keep wires separated but all those wires crossing over each other will also cross-couple any noise signals to where they aren't wanted - particularly the one from the crystal (if it's an active part of your circuit)

Reading your post I removed both the Xtal wires and freshly connected a xtal below the board( soldered the xtal directly on the pins 9 and 10 )..

Still the problem persists..

So I removed the LCD and still found the problem persists... smiley-sad
Logged

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found that the power supply is causing the problem...
As I am using a LM7805 to power the circuirt I tried a 12 volt battery but still the noise existed..
Then I powered the circuit with the LM7805 and with a %v power supply from another arduino board(original)
There was no noise at all... smiley

So what may the problem be...???
I tried 3000uf filter caps before the LM7805 and a 0.1uf non polar capon the 5volt... still the problem was there...
« Last Edit: February 17, 2012, 08:42:11 am by Joy » Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Time for an accurate circuit diagram of the components you actually have wired into the system.  Sounds like you've missed out the required capacitors on the voltage regulators.  See vendor data sheets for subject regulators, where the manufacturers specify what capacitance is required at regulator input and output to prevent oscillation.
Logged

INDIA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 382
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Time for an accurate circuit diagram of the components you actually have wired into the system.  Sounds like you've missed out the required capacitors on the voltage regulators.  See vendor data sheets for subject regulators, where the manufacturers specify what capacitance is required at regulator input and output to prevent oscillation.

smiley-razz how funny when I am using the small 7805 (TO- 92) there is no noise, this small 7805 does not even require a cap on its output..

But whenever I am trying to use big one there  is a lot of noise.. smiley-sad. and on its output without a filter cap it will not even boot the atmega...smiley-razz



This is the circuit of ripple rejection as on the datasheet... smiley-sad
huh its too big... smiley-sad
« Last Edit: February 17, 2012, 11:31:59 am by Joy » Logged

Pages: [1] 2   Go Up
Jump to: