Temperature sensor


I followed this guide to interface with a LM35 temperature sensor:


The reading appeared very accurate over USB, but when I hooked it up to a mains power supply it suddenly began to vary wildly (sometimes as much as +-10 degrees.


This makes it pretty useless to me. Has anyone else experienced this before?



It looks like your power supply is noisy and you could do with more decoupling. http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Yup, looks like that might do the trick. I'll give it a try.



Uncanny! I was going to post on here tonight about this very same problem.

Just read the link about de-coupling. One quick question if I may....

I've got my ATMEGA168 sat in a socket soldered up on veroboard. The 5V supply comes from a 7805 voltage regulator which has a 10uF electrolytic capacitor across the output terminals.

Should I be looking to replace that capacitor (as a starting point) with a 47uF electrolytic capacitor and also use a 0.1uF across the ATMEGA's VCC and Supply pins?

Sorry for hijacking the thread.

Should I be looking to replace that capacitor

No don’t replace, add to the capacitors a 0.1uF for the HF noise.