Introduction
A metal oxide semiconductor field-effect transistor, or MOSFET is a type of transistor that is used for opening and closing a circuit. MOSFETs are the most manufactured human artefact on the planet. In Arduino projects, MOSFETs are typically used for switching power consuming actuators between On and Off states. Typical actuators include motors and stronger light sources. For building arduino spectrometers, MOSFETs are needed for supplying power to stronger light sources, including xenon and broad spectrum infrared LEDs.
MOSFET
A MOSFET has three pins: gate (g), drain (d) and source (s). The drain connects to the actuator (the machine or device that is put to work) and the source to the external power supply; the gate determines if the connection between the source and the drain is ON or OFF. For an N-channel transistor, the connection between the drain and the source is by default OFF. Only when a positive voltage over a given threshold is supplied to the gate does the circuit between source and drain close and the MOSFET put ON. The power supply to the gate is usually of low voltage and negligible current. For Arduino compatible N-channel MOSFETS, the threshold for the gate to switch between OFF and ON needs to be less than 5 (or 3.3) Volt.
N-channel MOSFETs can only be used as switches for DC system, and applied for regulating the negative (-), or ground side of the actuator. That means that the MOSFET source pin should be connected to the negative (ground) side of the external power source. Battery in this case. The MOSEFT drain pin is then connected to the negative (ground) side of the actuator (xenon light in this example). When positive voltage is supplied to the gate, an electric current can flow between the source and the drain, and the actuator is turned ON.
For modest power needs, including the external light sources used in the spectrometer projects presented here, the BS170 MOSFET is a most suitable candidate.