Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CH340-fan-control - USB fan control script

Featured Replies

I own a few Android TV boxes that have poor thermal designs that are prone to overheating when under sustained load. This can either cause your device to significantly slow down or shut down entirely. This can be fixed by cutting a hole in the bottom on your TV box above the SoC and sticking a small USB fan on it. In my case I am using a AC Infinity 40mm x 20mm USB Fan that cost me £10.

 

CH340-fan-control is a python script to only activate my TV boxes USB fan when required by using a USB relay module. I'd expect somebody (or several somebodies) have already wrote a similar script for the same device but I failed to find it so here is my effort at fixing this common TV box issue. Hopefully someone else will find it useful.

https://github.com/danboid/CH340-fan-control

 

CH340+fan.jpg

X96-Air+fan.jpg

That looks like a good start - but my "dream" is a PWM-controlled fan which will spin slowly/fast depending on the temperature.

I couldnt imagine that nobody before has built something like this.

The PWN controlled fan could be controlled by the SBC itself or by a small MCU like a arduino...

On 6/9/2021 at 2:26 PM, guidol said:

The PWN controlled fan could be controlled by the SBC itself or by a small MCU like a arduino...

 

I'm very rusty in electronics, but it should be easier than you might image, as long most SBC expose PWM pins.

What you need is a NPN transistor (or even better a logic-level mosfet) and a resistor.

The PWM pin controls the base of the transistor (the resistor goes in the middle between), the emitter of the transistor goes to ground and the collector of the transistor goes to the negative of the fan.

The positive of the fan goes straight to power source.

 

Correctly dimensioning the thing is the challenge, but if you use a logic-level mosfet in place of the transistor you don't need to do any calculation and you may omit the resistor too (but it's better to place it anyway, a 470ohm should be suitable there).

 

Oh i did something myself, i got a cheap 5v usb fan 30mm for 0,01$ on aliexpress (bonus new signup otherwise is less 4$).
But is directly powered by usb so i can just decide if it must be ON or OFF and cannot control it otherwise.
 

DC-5V-12V-24V-3010-30mm-30x30x10mm-ventola-di-raffreddamento-con-dissipatore-di-calore-ventola-BGA.jpg.ef28903a52f1c4a38315cad87eef50ef.jpgphoto_2023-01-01_17-46-13.thumb.jpg.db02b88f56c8f77460f38fa5ecbdb88d.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.