Supplemental Explanation of Solenoid Modules (Patreon)
Content
I wrote an article about solenoid modules on my blog, but it became too much of a technical explanation, so I will give a supplementary explanation on patreon.
https://note.com/solder_state/n/n69736e61ec54
- MAX4466 microphone module
It is inexpensive and has high sound quality, but the audio picked up by the microphone is amplified up to 125 times.
Because of the large amplification factor, the microphone is greatly affected by noise on the 5V power supply line. It is very noisy, especially when other digital modules or OLEDs are connected.
As a countermeasure, it is recommended to add a capacitor to the power supply line or separate the power supply for the microphone module.
- Countermeasure of FET heat generation
Driving an actuator with high current consumption, such as a solenoid, will cause the MOSFET to heat up, leading to failure in the worst case.
There are several ways to reduce MOSFET heat generation.
1. Select a FET with low ON-resistance.
The amount of heat generated by a FET is proportional to its power consumption, i.e., the square of the current, and its on-resistance.
Small, inexpensive FETs have an on-resistance of 1Ω, while power MOSFETs have an on-resistance of 2mΩ to 30mΩ, a difference of several tens of times in heat generation.

2.Reduce gate resistance.
A large gate resistance of the FET increases the time it takes to turn the FET fully ON; an incomplete ON state of the FET increases the amount of heat generated due to the increased ON resistance.
A value between 100Ω and 1kΩ is ideal.
The advantage of increasing the gate resistance is the reduction of noise during FET switching, but since its frequency is above the audible range, it is not a major concern in audio circuits.
3.Choose a large size FET
The larger the FET size, the more efficient the heat dissipation.
The heat dissipation efficiency is written in the Channel(or junction)-to-ambient thermal resistance on the data sheet, and the smaller the value, the better the heat dissipation efficiency.
The larger package has a thermal efficiency of 83°C/W, while the smaller package has a thermal efficiency of 417°C/W, a difference of 5 times.


-active clamp circuit
The reverse voltage generated when the current flowing to the solenoid is stopped will destroy the FET without a protection circuit.
A common solution to reverse voltage is to use a freewheeling diode, but this time I used an active clamp circuit.
The advantages of active clamp circuits are described in the BLOG, so I will omit them.
In an active clamp circuit, when the back EMF exceeds the Zener voltage, the current flows through the Zener voltage to the gate of the FET, turning on the FET momentarily. the momentary turning on of the FET allows the back EMF to flow to the GND.

Oscilloscope waveforms
Blue: gate-source voltage of FET
Yellow: drain-source voltage of FET
The moment the gate voltage turns off, the drain voltage rises. The drain voltage is clamped by the Zener diode, and the gate voltage remains HIGH while the drain voltage is clamped.
-PWM cycle of Arduino
The PWM frequency of the Arduino 3pin is 490Hz, but is changed to 120Hz by changing the register.
The reason for the change to 120Hz is that the energization time was too short at 490Hz and the solenoid was not driven sufficiently.
The register to change the frequency is in the following part of the source code.
// 9pin pwm setting
TCCR1B &= B11111000;
TCCR1B |= B00000100;
By changing the last three digits of TCCR1B, the PWM frequency of Pin 9 can be changed.
If the PWM frequency is set to 120 Hz, the solenoid also has the disadvantage of oscillating at 120 Hz.
This vibration must be dampened so that the microphone does not pick up the sound of the vibration.
In this case, we placed silicone between the solenoid and the panel to dampen the vibration. The light blue sheet in the photo is silicone.
