RGB leds and LM35 problem

Hello. I bought recently an arduino uno and start testing it. I tried a lm35 and a lcd screen and it work just fine. Stable readings and accurate. Now that i connected an rgb led i have a problem with unstable readind +/- 2 degrees. If i comment out the rgb outputs it all works ok . I tested all solution as separate gnd for lm35, capacitor at both power supplies,rc filter to lm35 etc.

Anyone with any idea?
http://www.ledlumo.co.za/led-module-3-leds-samsung-powered-rgb-range/ this is my led!

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int analogread=0; //set pin A0 for analog
float tempC;
int redPin= 6;
int greenPin= 9;
int bluePin= 10;
int blueTemp= 0; int greenTemp= 0; int redTemp= 0; int celsius=0;
void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(bluePin,OUTPUT);
pinMode(analogread,INPUT);
  // Print a message to the LCD.
  lcd.setCursor(2,0);
  lcd.print("Temps Test 1");
  lcd.setCursor(6,1);
  lcd.print("LM35");
  delay(2000);
}

void loop() {
analogWrite(bluePin,0);
analogWrite(greenPin,0);
analogWrite(redPin,0);  

 float atemp=analogRead(analogread);
 float milivolts=(atemp/1023)*5000; // timi apo sensor / 1023 bit * 5000mV
 celsius=(milivolts/10);
 tempC=celsius;
 
 if(tempC<0){
analogWrite(bluePin, 255);}
else if(tempC>0&&tempC<=24){
blueTemp= map(tempC, 0, 24, 255, 0);
analogWrite(bluePin, blueTemp);}
else if(tempC>24){
analogWrite(bluePin, 0);}

if(tempC<15){
analogWrite(greenPin, 0);}
else if(tempC>15&&tempC<=30){
greenTemp = map(tempC, 15, 30, 1, 254);
analogWrite(greenPin, greenTemp);}
else if(tempC>30&&tempC<=40){
greenTemp = map(tempC, 30, 40, 255, 0);
analogWrite(greenPin, greenTemp);}
else if(tempC>40){
analogWrite(greenPin, 0);}

if(tempC<30){
analogWrite(redPin, 0);}
else if(tempC>=30){
redTemp= map(tempC, 30, 60, 1, 255);
analogWrite(redPin, redTemp);}
else if(tempC>60){
analogWrite(redPin, 255);}

  lcd.setCursor(0,0);
  lcd.print("Temp:");
  lcd.print(celsius);
  lcd.print((char)223);
  lcd.print("C"); 
  lcd.setCursor(0,1);
  lcd.print(" mV:");
  lcd.print(milivolts);
  delay(500);
  lcd.clear();
  }

The LM 35 is very sensitive to the reference voltage (more precisely, the calculation you use is).

milivolts=(atemp/1023)*5000;

The 5000 in this formula refers to 5V (5000 mV). If the voltage you supply is not exactly 5V then you will get errors. Adding in an RGB LED may drop the voltage sufficiently to cause an error of a few deg C.

You can get around this by calibrating the sensor using the internal Arduino reference voltage rather than the nominal 5V in the formula. I have code for this in my LM35 library (link to my libraries in the footer below) which you can use as a template, or just use the library.

I change the reference voltage to 1.1 and its more stable. Its only change by +- 0.2. I will try with an external power supply instead of pc usb and see if it can get better. Thanks!