Relay module Terminal connections

Here is the best I can find out about the diode question:

sparkfun.com/commerce/tutori … als_id=119

Note: The 1N4148 diode is connected in a odd fashion for a reason. This is placed between power and ground in a reverse fashion. When the coil of the relay is de-activated, it acts like an inductor, trying to suppress current change. This can cause some havoc on the 5V power rail. When this happens, the 1N4148 will forward bias causing the current stored in the coil to flow happily back to the 5V rail protecting the power supply and the near-by parts.