For the diode on relay's coil, it is simply that a coil is inductive and when turn off, it produce a spike, if not discharge by a diode, it will disturb the power supply of the coil. Here is a schematic (you can use a plain diode such 1N4001 or equivalent) :
For the diode on relay's coil, it is simply that a coil is inductive and when turn off, it produce a spike, if not discharge by a diode, it will disturb the power supply of the coil. Here is a schematic (you can use a plain diode such 1N4001 or equivalent) :