In this exercise, the focus in on creating an alarm that once it is set off, it latches onto that setting. When the alarm is set “on”, power goes through the switch (a jumper cable in this experiment) to GND instead to base of the transistor. Once the alarm is set “off”, buy opening the switch (or removing the jumper cable that went to GND), power is applied to the base of the transistor, which activates the relay and powers the signal of the alarm: a green LED.
A signal diode is used in this experiment. This piece of hardware blocks “bad voltage” from flowing back up the wire. For this experiment, power from the relay has the potential to flow back up to the emitter and base of the transistor and to the switch. The only reason it has this potential is because the NO leg of the relay is not connected to GND. If it was, a diode would not be needed.
If you take a look at the pictures, you’ll notice that there is an exploded LED. Originally the LED in this experiment, which was red, didn’t have a 2K2 resistor to GND. When the circuit was plugged to PWR, 12volts raced to the LED, which caused it to explode and create quite some noise. This was a friendly reminder to make sure all components are given the proper amount of power.