Noise on Analog Inputs when GSM/GPRS Shield is powered

I'm getting fluctuations on an analog temperature sensor when the Arduino GSM Shield is powered up.

I'm Using a TMP36 sensor, reading Vout on one of the Analog pins and doing the math to get a temperature reading. I'm using the GSM Shield on an Arduino Uno and everything is solid up to the point that I turn power on to the "phone" part.

I made a simple sketch that measure the voltage output of the TMP36 and also looks at the input voltage to the sensor. The sample rate is every 5 seconds:

0.67 volts 17.38 degrees C 5.00 vIn
0.68 volts 17.87 degrees C 5.00 vIn
0.68 volts 17.87 degrees C 5.00 vIn
0.67 volts 17.38 degrees C 5.00 vIn <-- Power on GSM Shield
0.67 volts 17.38 degrees C 5.00 vIn
0.63 volts 12.99 degrees C 5.00 vIn
0.63 volts 12.50 degrees C 5.00 vIn
0.64 volts 14.45 degrees C 5.00 vIn
0.62 volts 12.01 degrees C 5.00 vIn

So according to the output, the input voltage is holding steady, but the output voltage varies significantly. The other analog sensors in my project (light and pressure) are working fine while the GSM shield is powered .

I'm not using a reference voltage, is that something to try? Could this be an RFI issue that I can attenuate with some ferrite cores?

Before I breakdown and buy the One Wire temperature sensors, I'd like to know some ideas on how to fix the analog issue.

Thanks in advance....Keith

An Update:

Reading the forum, I put an analogRead() with a delay(25) before I read the temp sensor. This seemed to fix the problem, but it comes back after 12 minutes. Here's a graph of what's happening:

Any other ideas on what I should try. Why would I get 10 minutes of good readings and then get bad data after that?

Ok - another update:

I think I've solved the problem. If you set digitalPin(3, HIgh/LOW) you turn the Serial RX pin on the modem on/off and thereby power it down. Having power off, I can get a clean reading from the analog input attached to the TMP36. The enclosed graph shows the difference:

The temperature is higher because I finally turned the heat on in my house. You can read more details of powering the modem on/off here at http://comoyo.github.io/blog/2013/08/09/How_to_efficiently_operate_the_Arduino_GSM_shield_with_a_battery_pack/

The gsm shield may take a lot of current from the voltage regulator, it heats up and becomes unstable - and its output voltage changes plus minus many millivolts (and when you use Vcc as the reference for the ADC, with sensor's 10mV/degC sensitivity, the temp reading will jump as seen on your graphs). Switching the radio off may keep the voltage regulator cool.

I would also block analog inputs with a small ceramic capacitor against ground (ie 1nF) when using gsm radio in the vicinity, as the radiated power may influence the inputs readings.

Thanks Pito - I'll be going to the parts store today for those capacitors.

Yes, I'd agree, the GSM shield is throwing tonnes of RF power around, add those ceramics
as close as possible to the Arduino chip's pins if you can (direct on the back of
the board even). Even short lengths of PCB trace can act as aerials to a nearby
radio transmitter.

Check the power supply voltage with a multimeter to see if its being affected by the
transmit pulses (GSM transmission is very bursty). A separate 5V regulator for the
GSM board is an obvious fix if so.