High‑Speed Hair Dryer Product Development Solution: Hardware and Program Code

The core of high‑speed hair dryers lies in FOC control for 100,000+ RPM brushless motors and intelligent constant‑temperature safety logic. Below is a standardized development framework based on mainstream MCUs (such as G32F031 by Geehy, Infineon PSOC C3 or domestic FU6812), covering hardware architecture and core program logic.

1. Hardware System Architecture
Hardware design requires high‑computing‑power real‑time control, low‑noise switching and multi‑layer safety protection.
Current Sampling: Single‑resistor sampling (low‑cost) or dual‑resistor sampling (high‑precision), amplified with built‑in operational amplifiers.
Temperature Detection: NTC thermistor placed near the air outlet or heating wire, sampled via ADC.
Negative‑ion Generator: Driven directly by AC high‑voltage with independent circuits, no MCU control required.
Power Management
- Auxiliary high‑voltage power supply: AC220V to 12V/5V, supporting fast switching (<10 ms). High‑voltage startup chips such as BP85226DF are recommended.
- Bus voltage sampling: Resistor divider to detect DC‑bus voltage for over‑/under‑voltage protection and feed‑forward control.
Power Driver Stage
- Option A (Discrete solution): 3× N‑MOSFETs plus gate drivers. Low cost yet demanding PCB layout with equal‑length traces.
- Option B (IPM module, recommended): Single‑phase IPM such as LKS1D5003D by Ling‑Ou or BPP1D5007QA by BPS. Integrates pre‑drivers and MOSFETs, simplifying peripherals and improving heat dissipation.
Recommended Main‑controller MCUs: Require main frequency ≥48 MHz, built‑in op‑amps / comparators, hardware FPU and multi‑channel PWM.
- Geehy G32F031: Cost‑effective, supports 20 kHz carrier frequency.
- Infineon PSOC Control C3: High‑performance, supports up to 100 kHz carrier frequency.
- Lianxin FU6812L: Highly‑integrated with built‑in FOC algorithm libraries to shorten development cycles.
Sensing & Protection Critical PCB guidelines: Minimize power‑loop area; enlarge copper area on switching nodes for heat dissipation; route analog sampling traces away from high‑power traces to avoid noise coupling.
typedef enum {
STATE_READY, // Standby, offset calibration
STATE_CHARGE, // Pre‑charge, suppress inrush current
STATE_TAILWIND, // Forward / reverse wind detection
STATE_ALIGN, // Initial rotor alignment
STATE_START, // Open‑loop startup ramp‑up
STATE_RUN, // Closed‑loop FOC operation
STATE_STOP, // Deceleration & shutdown
STATE_FAULT // Fault protection: over‑current / over‑temperature / stall
} MotorState_t;
High‑frequency Interrupt Service Routine (FOC Control Loop)
Triggered every 20‑50 μs (20‑50 kHz switching frequency) to execute current‑loop computation.
void ADC_IRQHandler(void) {
// 1. Read three‑phase current (single‑resistor solution reconstructs Ia, Ib, Ic based on PWM timing)
float Ia = ADC_GetChannel(0) - Current_Offset;
float Ib = ADC_GetChannel(1) - Current_Offset;
// 2. Clarke transform: three‑phase stationary → two‑phase stationary frame
float Ialpha = Ia;
float Ibeta = (Ia + 2*Ib) * 0.57735f; // 1/sqrt(3)
// 3. Park transform: two‑phase stationary → two‑phase rotating frame, using estimated angle theta_est
float Id = Ialpha * cos(theta_est) + Ibeta * sin(theta_est);
float Iq = -Ialpha * sin(theta_est) + Ibeta * cos(theta_est);
// 4. Current‑loop PI control, output Vd, Vq
float Vd = PID_Calc(&Id_PID, 0.0f, Id); // Target Id = 0
float Vq = PID_Calc(&Iq_PID, Iq_ref, Iq); // Iq_ref comes from speed loop
// 5. Inverse‑Park transform + SVPWM to generate duty‑cycle
float Va, Vb, Vc;
Inverse_Park_SVPWM(Vd, Vq, theta_est, &Va, &Vb, &Vc);
// 6. Update PWM registers (dead‑time configured in hardware)
PWM_UpdateDuty(Va, Vb, Vc);
// 7. Observer updates estimated rotor angle and speed for next cycle
Observer_Update(&theta_est, &speed_est, Ia, Ib, speed_est);
}
Low‑speed Control & Safety Logic (Main Loop / Timer Interrupt)
Executed every 5‑10 ms for speed‑loop processing, temperature control and key‑scan.
void Control_Task_10ms(void) {
// 1. Outer speed‑loop PI, output Iq reference
if (state == STATE_RUN) {
float speed_err = Target_Speed - speed_est;
Iq_ref = Speed_PID_Calc(speed_err);
// Amplitude limiting for protection
if (Iq_ref > Iq_Max) Iq_ref = Iq_Max;
}
// 2. Intelligent constant‑temperature control (PID + lookup table)
float temp = Read_Temperature_ADC();
if (temp > TEMP_SAFE_LIMIT) {
Heater_Power = 0; // Cut off heating
Fan_Speed_Max(); // Full‑speed forced cooling
Set_Fault_Flag(OVER_TEMP);
} else {
// Incremental variable‑gain PID: fast heating at low temperature, anti‑overshoot at high temperature
Heater_Power = Temp_PID_Calc(Target_Temp, temp);
}
// 3. Multi‑condition fault detection
if (Bus_Voltage > OVER_VOLT_THRESH || Bus_Voltage < UNDER_VOLT_THRESH) {
Enter_Fault_STATE(VOLTAGE_FAULT);
}
if (speed_est < 1000 && Iq_ref > 0.5f) {
Enter_Fault_STATE(STALL_FAULT); // Stall protection
}
}
2. Key Debug Parameters & Recommendations
- PI parameter tuning sequence: Tune inner current‑loop first (bandwidth > 1 kHz), then outer speed‑loop. Current‑loop bandwidth should be at least 5× higher than speed‑loop.
- Adaptive observer bandwidth: Lower bandwidth at low speed to suppress noise; raise bandwidth at high speed for accurate phase tracking.
- Startup strategy: Adopt “tail‑wind detection + forced‑drag startup”. If reverse impeller rotation is detected, apply braking before forward startup to avoid mechanical damage.
- Acoustic‑noise optimization: Set PWM carrier frequency between 20‑25 kHz to avoid sensitive human‑audible bands; random carrier‑frequency modulation can also spread noise spectrum for better subjective noise performance.
This is technical blog content; work‑task mode can help complete alternative titles, image‑matching suggestions and publishing‑ready materials. Would you like to use it?




