I am working on an AVR project that involves measuring tempereture with an analog sensor (TMP36) and switching a heater on and off through relay to keep the temperature at desired level.
However, I've noticed that every time I switch the relay on, it causes the output voltage of the sensor to instantly drop, quite consistently by 0.01V to 0.02V (it's up to 2°C difference, so not negligible). To check whether that's AVR related problem or not I have constructed a simple test circuit, shown below. I simply enable the transistor by pushing down the button and observe voltage readings at sensor pins with a multimeter. It still shows the same behavior as with the AVR - switching on relay causes the same voltage drop.
Max current of my power supply is 5A, so it shouldn't be a power related problem.
Another important fact is that it doesn't matter if there's anything connected to relay's switching pins - this behavior seems only to depend on the relay coil being switched on and off.