Project 3 - Fluctuating Temperature

Hello Arduino Community,

I am working on project three (love-o-meter), and noticed that the temperature readings coming into the serial console can show swings of about 3F (converted from C to F).

I was reading the datasheet of the TMP sensor and see they are recommending adding on a capacitor to help prevent voltage fluctuation/have a more consistent read out. http://www.analog.com/media/en/technical-documentation/data-sheets/TMP35_36_37.pdf

I tried reading ahead but do not fully grasp the concept of the capacitor.

Questions: 1. At a high level, I understand a capacitor as a bucket full of water (electricity). When the capacitor is full, it would spew electricity, much like an overflowing bucket of water. When we see variance in voltage, the capacitor would pour out needed electricity to help smooth things over? Can you confirm this is the correct understanding of a capacitor? Likewise, can you please chastise me on whether or not I used the terms electricity properly here? I am unsure if you would reference the overflow as voltage or current :(

1. Based on the datasheet, I see the capacitor goes from Power to Ground, and the Power end of the TMP sensor goes to Power as well. I am a bit confused, my mind wants me to take one lead of the capacitor from power and have the other lead be connected to the Power lead of the TMP sensor. Can you please help clarify how the capacitor is used/how it should properly be connected?

Appreciate the help in advance and sorry about the newbie questions :confused: -stromb0li

You have the basic idea. and yes it connects from power to ground. here is a good tutorial. http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Can I use the ceramic capacitors that come with the Arduino?

With the capacitor, once it is "full", does that change the current/will damage the sensor or not really since it can only flow as high as the power source will let it?

I don't know what kit you have but yes a just about any ceramic capacitor usually between .01uF - 47uF is fine.

Yes the capacitor can only charge up to supply voltage and only adds it's power when the supply voltage drops so it will not damage anything. It sort of fills in the gaps when the supply fluctuates keeping it steady.

Ah, I think I get it now! So to recap, the reason why we don't put the capacitor inline is so in the event the power source isn't sufficient, the sensor will still work as we have our Positive or Power flow going to ground. In the scenario where I would put the capacity inline, I would have PWR to PWR or positive to positive, which would not allow the sensor to pull from the capacitor.

Is that correct?

It would not allow the capacitor to charge.

There are always fluctuations the capacitor simply tries to smooth them out.