Hardware The LCD module is connected up in exactly the same way as Project 17. The rotary encoder is also connected up in the same way as previous projects. The relay will require about 70 mA, which is a bit too much for an Arduino output to handle unaided, so we use an NPN transistor to increase co the current. You will also notice that a diode is connected in parallel with the relay coil. This is to no prevent something called back EMF(electromotive force), which occurs when the relay is turned off. The sudden collapse of the magnetic field in the coil generates a voltage that can be high enough to con damage the electronics if the diode is not there to effectively short it out if it occurs.