Arduino Forum

Products => Arduino Yún => Topic started by: aboudou on Oct 03, 2013, 09:58 pm

Title: Yun and TMP36 strange behavior
Post by: aboudou on Oct 03, 2013, 09:58 pm
Hello everybody,

I've setup an Arduino Yun to provide the following graphs :
- ambient light, with a photo resistor and a voltage divider, which work well :
- ambient temperature, with a TMP36 sensor, which has a strange behavior :

As you may see, there is a regular temperature / voltage drop which happens every 31/32 hours, and I can't explain it, and this voltage drop only happens with temperature measure, not light measure.

The photoresistor and TMP36 are powered by the same +5V pin, photoresistor output is measured with A0 pin, and TMP36 with A1 pin. There's a 100 µF capacitor near VCC and GND pins of the TMP36 sensor.

Light and temperature values are gathered every 10 minutes by a cron job on Linux side via a REST query. Arduino sketch just wait for the REST query and return A0 and A1 values. Temperature measurement is not a single shot : when temperature is asked, I take 10 measure each 1 second, then return the median value.

I can't really explain :
- Why the voltage drop
- Why it only happens to temp measure
- Why it happens regularly, every 31/32 hours.

If someone here have an idea, (s)he's welcome :-)

Title: Re: Yun and TMP36 strange behavior
Post by: thombrooks on Nov 15, 2013, 06:03 am
I'm sorry I don't have an idea on how to help you with your problem, but would you mind if I asked you how you made sure that cron is running when the board boots up?

I have created a crontab entry, but don't see cron in the ps (process) list. I can see a script for it in /etc/init.d which is linked from /etc/rc.d .... 


I love answering my own question:

found here,

/etc/init.d/cron enable
/etc/init.d/cron start

Now hopefully the next person to google this will find the answer quicker.   :)