MzjgIrHz6x

STC-7676839A

 
Overview
This project develops a smart mini fan based on
the STC8H8K64U chip. The fan should have on/off control, multi-speed adjustment, and a display of the current fan speed. (An OLED screen is not included as it can be inserted into the pin header above the chip; I currently do not have a 4-pin OLED display.)

Hardware requirements: STC8H8K64U chip, DC motor, various capacitors and resistors, OLED screen, switch, etc.

2. Hardware Design

: Microcontroller Selection: The STC8H8K64U microcontroller is suitable for this type of control project due to its enhanced 8-bit microcontroller features.
Motor Module: A DC motor is selected as the fan's power source.
Control Module: The switch receives user input, such as on/off and speed adjustment commands.
Display Module: An OLED screen displays the current fan speed (i.e., RPM) in real time.

3. Software Design

: PWM Speed ​​Control: Since the STC8H8K64U microcontroller does not have a built-in PWM hardware module, software simulation of PWM waves is needed to control the motor speed. The duty cycle of the PWM wave determines the average voltage of the motor, thus controlling the speed.
Interrupt handling: External interrupts are used to respond to user button operations, such as fan start, stop, and speed adjustment.

 
A demonstration video is attached.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 18:26:58

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号