So I am working on controlling a relay using an Arduino UNO signal and a 2N3904. The relay coil spec sheet says it needs min 3.75 V / 185 mA max. When I measured the relay it was only 102 mA at 5 V. The strange thing is the xstr temperature staying at about 32 deg C, @ 28 C Ambient temp. It has been running for about 8 hours now with no change. I expected it to go to around 46 C.
I Googled and saw that the circuit needed a diode across the coil to keep the voltage down while the coil switches off.
I tried to model it using Everycircuit, but could not get it to work. I mean when I first create the circuit it will show the 200 V spike once or twice but then it stops showing the spike.
That is until I was trying to see how fast I could switch the relay. I added a square wave pulse voltage and then the spike started to show again. It was strange though, the size of the spike is dependent on the pulse and sensor speed in the chart section.
Does anyone know why it will now show the spike without the pulse?
Anyway, the manual switching now shows the spike and if you close the switch to the Flyback diode (1N4007) the spike goes away. Taadaaa