This time, I would like to think about turning the motor on and off by turning the Arduino port on and off.

Without thinking about anything, try connecting the Arduino port directly to the motor. The motor was fixed to the breadboard with double-sided tape. By the way, the propeller attached to the tip of the motor is an original work that my son made with the remainder of the plastic model. (^. ^) Double-sided tape is convenient to have a thick double-sided tape that can be peeled off as shown below.

Now, let’s write and run the following program. It is a simple one that moves the motor for 3 seconds and repeats the stop for 3 seconds. If you try it, you can see, but unfortunately, this doesn’t work at all. The maximum current that can be output from the Arduino port is 40 mA. Motors used in hobbies, etc., require 500mA when loaded and 250mA when loaded. So it cannot be moved. To move it, it is necessary to use a transistor (FET) for motor drive. This time, I will drive the motor using a power transistor, MOSFET (Field Effect Transistor) 2SK2231. First, build a circuit using transistors on the breadboard. Capacitors and diodes connected in parallel with the motor are attached to protect the transistor from the counter electromotive force generated from the motor. I think that it is well known that the motor is also a generator. It’s also familiar with bicycle lights. Since the motor rotates due to inertia when the current supply is stopped, current and voltage (electric power) are generated from the motor itself. A diode and a capacitor are sandwiched in parallel with the motor in order to escape/damage the current generated in the opposite direction. (Please note the direction of the diode. The black mark is the direction of current flow.) This is the picture after the actual assembly. Let’s expand a little more for clarity. Compare G, D, and S written in 2SK2231 with the circuit diagram. Let’s run it with the same program as before. This time, it should move with the help of transistors.

Circuit Diagram

Arduino Code

I moved!

I think the contents of this time were for my son. First of all, it’s enough if you can see that you can’t run the motor directly from the Arduino port.