I am making an Arduino Thermostat. The arduino draws power from an adapter and the relay draws power from the 5v arduino. I have an LED that changes color according to temperature brackets.
The heater, which i want to turn ON and off is also plugged in the same power strip.
The problem is: when the relay swtiches, there is a noticeable change in brightness on the LCD and LED light. Somewhere the voltage changes, but i can't figure out why and how to avoid it.
If I power the Arduino with a 9v battery instead of an adapter, things are fine, and there is no change in display or LED.
Why is this happening and how can I prevent it?
"""(if it matters at all, i am using Pololu (https://www.pololu.com/product/3101) instead of Arduino Uno"""
In case schematic is not viewable, here is a bigger image: