Go Down

### Topic: Noise on Analog Inputs when GSM/GPRS Shield is powered (Read 1 time)previous topic - next topic

#### keith_erskine

##### Oct 10, 2013, 03:52 am
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:

[font=Courier]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[/font]

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.

#### keith_erskine

#1
##### Oct 10, 2013, 08:52 pm
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?

#### keith_erskine

#2
##### Oct 12, 2013, 03:52 am
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/

#### pito

#3
##### Oct 12, 2013, 11:45 amLast Edit: Oct 12, 2013, 12:02 pm by pito Reason: 1
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.

#### keith_erskine

#4
##### Oct 12, 2013, 01:43 pm
Thanks Pito - I'll be going to the parts store today for those capacitors.

#### MarkT

#5
##### Oct 12, 2013, 02:10 pm
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

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.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up

Please enter a valid email to subscribe