So I am making a simple project wich involves using a relais and arduino and transistor to turn on a lamp/motor.
I have been told to use a "freewheeling diode" (I don't know how to pronounce it in english so correct me if im wrong!). But ive seen some people on youtube and other sites not use a transistor and freewheeling diode. And it still works so what is the purpose of the transistor and the freewheeling diode? My teachers told me to use one. I"ll add a sketch down below so it may become clear. (Image does not belong to me).
Thanks in advance.