Last time we considered the basic mechanism of a MOSFET, so this time let's think about a simple implementation.

First, let's consider how to interpret MOSFET specifications, building upon the mechanism we discussed last time.
*This article aims to provide educational explanations from a mechanical engineering perspective regarding the safe hobby use of airsoft guns.
This does not promote acts of violence, the use of weapons, weapon modification, practical evaluation, or violation of laws and regulations.
How to interpret MOSFET specifications
Let's start by listing the basic items.
Maximum rating (set temperature)
Vds: Drain-source voltage
• Vgd: Gate-drain voltage
Id: Drain current
Idm: Drain pulse current
• Pd: Allowable loss
Vgs: Gate threshold voltage
I think the parameters of a MOSFET can be represented as follows in a diagram:

First of all, these are the maximum rated specifications, so the values for each item should never be exceeded. Basically, when using it normally, you divide these values by a safety factor.
In my area of expertise, the safety factor varies depending on the application and part, but it's usually between 1.2 and 1.5, and sometimes we go as low as 1.1 when pushing the limits. I think 1.5 is the safest bet.
Based on these points, we will now examine each parameter individually.
Vds: Drain-source voltage
I think this is the voltage that the MOSFET can handle. To use an analogy with an airsoft gun, it's the maximum voltage that can be applied to the motor. Or perhaps it's the maximum voltage of the battery. Exceeding this voltage seems to increase the likelihood of damage.
• Vgd: Gate-drain voltage
I think it refers to the maximum allowable voltage between the gate and drain. It means that there's a limit to the difference between the gate voltage and the drain voltage when you want to lower the gate voltage and raise the drain voltage. Therefore, if you don't choose the gate resistor correctly, it will likely break.
・Id: Drain current
I believe this represents the maximum current that can pass through the MOSFET. As the load increases and the motor's power requirements rise, the required current should also increase. If that required current exceeds the drain current, it will break.
Idm: Drain pulse current
I think this is the allowable current for a brief moment applied to the drain. If it exceeds this even for a moment, I think it will break. I think Idm (pulse current) > Id (steady-state current).
• Pd: Allowable loss
This refers to the power (watts) that a MOSFET can handle. Watts are voltage × current. This means that the maximum allowable voltage and maximum allowable current cannot be achieved simultaneously. This is something to be careful about.
Vgs: Gate threshold voltage
This is the key point: electricity will not flow to the DS unless the voltage applied to the gate exceeds this value. If you set the gate resistance to be just above Vgs, it will be a sensitive circuit, and even a slight change in the voltage applied to the gate due to disturbances will cause electricity to flow between the DS and the gate intermittently (perhaps what is called chattering in mechanical terms?), which may not produce the desired result.
These parameters might be best set to a safety factor of around 1.2.
Next is the temperature. This is important. From what I've researched, it seems that around 150°C is dangerous.
The temperature of a soldering iron varies depending on the type, but it's usually around 300-400°C, so you need to be careful when soldering, or it will break easily.
I've broken about 2 out of 6 so far.
Based on these factors, you should be able to use an FET by selecting one based on the power supply, motor, and load you will be using, and then determining the gate resistance and gate-source resistance within a range that does not exceed the rated voltage and does not exceed the gate threshold voltage.
You should be able to select and implement MOSFETs based on the voltage and current of the circuit in which they will be used.
However, this blog will mainly focus on electric airsoft guns, that is, analog machines that utilize DC motor (direct current motor) circuits.
The load on analog machinery changes depending on the situation and environment. Consequently, the load and power consumption of the DC motor also change significantly, so it is difficult to simply determine the voltage and current generated in the circuit based solely on the specifications of the motor and battery.
Therefore, before we get into implementing MOSFETs, let's consider the electrical characteristics of an electrical circuit using a simple DC motor (electrical circuit for an airsoft gun).
Electrical characteristics of electrical circuits using DC motors
Now, let's write a super simple electrical circuit to operate a DC motor.

When you switch on this circuit, electricity (current) flows to the motor and the motor rotates.
The electricity flowing to the motor here changes depending on the load on the drive mechanism (of course, within the limits of the battery's power capacity).
Therefore, assuming a constant load on the mechanism, let's create a graph with time on the horizontal axis and voltage on the vertical axis.

If the load on the mechanism is constant, the load on the motor will also be constant, meaning the voltage generated by the motor will also be basically constant (we will explain the details of DC motors separately).
Next, let's consider a case where the load on the mechanism is not constant, specifically, a case where the load on the motor, such as the spring in an electric airsoft gun, is not constant.

Because the motor load changes depending on the load on the gearbox, the voltage becomes a complex waveform.
In reality, the load changes in a complex way depending on the mechanical state, and as a result, the actual voltage waveform also becomes quite complex.
Furthermore, a characteristic of the mechanism is that during startup (when it starts moving), friction changes are intense, causing a sudden increase in load, so the voltage at the moment the circuit switch is turned on becomes quite high (apparently this is called spike voltage; with motors in the class of electric airsoft guns, the voltage might exceed 100V).
Even if you incorporate MOSFETs into a circuit with such voltage fluctuations, they may still be damaged by the instantaneous large voltages that occur (in the worst case, they may be destroyed in one go).

Damage to MOSFETs caused by voltage spikes in the voltage-time graph.

Furthermore, as explained in the SBD circuit description, when the motor is switched off, the motor's self-generated power (back electromotive force, back electromotive force) can cause an excessive reverse voltage to be applied to the MOSFET, which will damage it.

Image of damage to a MOSFET due to back electromotive force.

When a MOSFET is repeatedly damaged and eventually breaks down, it will end up in the state shown in the following diagram.

Since the physical switch doesn't function at all, and electricity flows through the circuit, causing the mechanism to operate, this becomes an extremely dangerous situation for an electric airsoft gun (the only solution is to remove the power supply).
Therefore, if we demand even higher voltage-resistant MOSFETs for safety reasons, the MOSFETs will become larger and more expensive, reducing their practicality.
Therefore, as someone with a background in mechanical engineering (control engineering studied in university and dabbled in it at work), I will design a circuit that can handle rapidly fluctuating voltages using simple and inexpensive electronic components.
Switch protection circuit using MOSFETs
First, here's the circuit using a MOSFET with the DC motor that I introduced last time.

Let's consider adding a resistor and capacitor to this circuit to protect the MOSFET from the large voltages (spike voltages) that are instantaneously generated due to the characteristics of the DC motor.

This is apparently also called a snubber circuit, and as an RC circuit alone, it exhibits the following time-voltage characteristics.

The capacitor's property of storing electricity is used to smooth the rise time when the switch is turned on. However, because the capacitor stores charge, the stored electricity flows out when the switch is turned off (I could include the calculation formula and the resulting graph, but let's start with the image).
If I were to compare the role of RC to a machine I'm good at, I'd say it's similar to a suspension system that absorbs sudden vibrations.
I thought that by utilizing this characteristic and connecting it in parallel with a MOSFET, the voltage change flowing between D and S would become smoother.
This is an image of the voltage across a MOSFET with a protection circuit.

I was thinking that smoothing out instantaneous voltages like this might reduce damage to the MOSFET. However, I think the response would worsen as the voltage characteristics become smoother.
Actually determining the specific values of capacitors and resistors, as well as the overall response of the circuit, would be difficult without thorough calculations and actual measurement data from a real device, but I tried to think about it conceptually first.
Back EMF countermeasures for DC motors
Next, let's consider countermeasures for the back electromotive force generated by a DC motor when it is switched off.
This simply uses a rectifier diode (SBD) to bypass the current flowing in the reverse direction.

Here's an article about the principles of rectifier diodes like SBDs. Please take a look if you're interested.

In this state, if a back electromotive force flows, I believe the electricity will bypass the MOSFET and flow towards the diode. Furthermore, the capacitor added to mitigate spike voltages can be expected to smooth out the excessive voltage (surge voltage?) momentarily generated by the back electromotive force.

To summarize, I came up with the following circuit.

Upon investigation, it seems that snubber circuits like the one shown in the following diagram are sometimes installed, but personally, since I'm attaching it to the circuit including the motor, it looks like it would have poor responsiveness. Also, with electric airsoft guns, it seems difficult to implement due to physical layout issues.

As of writing, I don't have an experimental environment, so this is just an idea, but I'd like to buy an Arduino (an inexpensive general-purpose microcontroller), a circuit board, and electronic components soon and try building it myself (I'll also buy an oscilloscope to measure actual values).
Summary and extras
This time, I've compiled a list of points to consider when actually implementing a MOSFET.
I'm a mechanical designer, so this is outside my area of expertise, but this circuit was designed with durability in mind (cost and efficiency were disregarded).

Ideally, we should be able to determine the optimal solution by formulating equations, performing calculations to obtain specific figures, creating graphs, drawing control block diagrams, and examining characteristics such as responsiveness. However, since the goal is simply to grasp the concept, this will suffice for now.
Incidentally, capacitor protection circuits are effective for smoothing out instantaneous power spikes, not just with MOSFETs, so if you're building your own, you should consider installing them (though responsiveness and efficiency will decrease).
Next time, we'll try installing it on an electric airsoft gun while looking at an actual MOSFET.

bonus
I previously wrote an article about a circuit using SBDs.

Upon further consideration, the back electromotive force generated by a DC motor is quite large instantaneously, so it seems safer to add a protection circuit (snubber circuit) to the SBD circuit as well.

Thank you for your time.

Comment:
Comment list (1)
In this article, the diode placed between the source and drain to counter back EMF is completely meaningless. That diode already exists as a body diode. The diode shown in the "bonus" circuit diagram is the diode used for back EMF countermeasures, and is generally called a freewheeling diode.