I have a temperature sensor and when the relay turns on the sensor increases the voltage and then when it turns off the voltage drops therefore this affects my temperature why does this happen?
How are you powering the relay?
Is it a mechanical relay or solid-state?
Bare relay or a breakout board?
Does it have a transistor driver on it?
Most likely the coil drawing too much current for your power supply and affecting its regulation, but it's hard to say. It's a little weird that the voltage goes up. Down would make more sense.
The best way to power a relay is an external power supply, but 5V (VUSB) is usually fine for small relays. You should never power a mechanical relay coil from 3V3 or a directly from a GPIO. A transistor or MOSFET driver should always be used, and the coil must have a flyback diode.
1 Like
Hi, you can also post a picture of your project, for us to infer something - thanks!
1 Like