Part #/ Keyword
All Products

DIY Desktop Fan Shutdown Mod

2024-07-15 14:10:00Mr.Ming
twitter photos
twitter photos
twitter photos
DIY Desktop Fan Shutdown Mod

To add a long-press shutdown function to the SANPNT US1 desktop fan, follow the method described in this article, which requires only three components.

The three components are a 1M resistor, a 1uF capacitor, and an Nmos transistor.

First, lift the ground connection of the 8th pin of the microcontroller and leave it floating, then make the following modifications as shown in the diagram:

· Connect the D (drain) of the Nmos transistor to the 8th pin of the microcontroller and the S (source) to GND.

· Place a 1uF capacitor between the G (gate) and S (source).

· Connect the G (gate) to the 4th pin of the microcontroller (the button) through a 1M resistor.

The original functionality remains unchanged, with 4-speed settings. When you press and hold the button for about 2 seconds in any speed setting, the indicator light will dim, and the fan speed will slightly decrease. Releasing the button will turn off the fan immediately.

In its static state, the battery power pulls the 4th pin of the microcontroller up to 10K. The added 1M resistor pulls up the voltage level of the 1uF capacitor, turning on the Nmos transistor and supplying power to the microcontroller. When the button is clicked, the microcontroller switches speeds. Due to the presence of the 1M resistor, the voltage across the 1uF capacitor does not drop quickly, allowing the microcontroller to continue working. When the button is pressed and held, the 1uF capacitor discharges through the 1M resistor and the switch to the ground, causing the Nmos transistor to turn off. The microcontroller loses power and resets, turning off the fan when the button is released.

(Note: 1uF and 1M roughly result in a 2-second delay. You can adjust the components, such as using a 0.1uF capacitor and a 10M resistor to achieve a 2-second delay, but it's not recommended to use too small a capacitor.)

image.png

image.png

image.png

Another option is to add an independent microswitch for shutdown. You can make use of the onboard integrated lithium protection chip. Connect the power pin to BAT- (not GND, as connecting to GND will cause the lithium protection to lock, while BAT- will not lock). A microswitch here will enable the shutdown function when clicked. Since the lithium protection supplies power through a 100-ohm resistor, a brief current draw of up to 42mA may occur when the button is clicked, but this can be ignored.

image.png

Using the lithium protection modification doesn't effectively shut down the microcontroller during charging, as the charging chip is connected after the lithium protection. You can extend the long-press shutdown circuit by connecting the G (gate) of the Nmos transistor to the ground via a microswitch for an independent single-button shutdown.

image.png

Both methods can coexist without interfering with each other. If you need a low-speed mode, you can modify the lower-end resistor of the boost sampling network. For example, 47k ohms is the first speed setting. Increasing the resistance will lower the boost voltage in the first setting, creating a low-speed mode. However, since other speed settings parallel all previous lower-end resistors, changing the first setting resistor will also affect the voltages of other settings. Adjust according to your needs using the standard voltage calculation formula.

You can also achieve a long-press shutdown by cutting the positive terminal, which is more versatile and reliable compared to cutting the negative terminal with an Nmos transistor. The circuit is similar to the first diagram but with an added 1M resistor and a Pmos transistor.

image.png

image.png

The completed modification looks similar to the diagram below:

image.png

image.png

* Solemnly declare: The copyright of this article belongs to the original author. The reprinted article is only for the purpose of disseminating more information. If the author's information is marked incorrectly, please contact us to modify or delete it as soon as possible. Thank you for your attention!