434 views|7 replies

28

Posts

0

Resources
The OP
 

STM32 fan speed control and speed measurement solution consultation. [Copy link]

Due to company requirements, all fans in the equipment need to be speed controlled and monitored.

The whole system has 12 DCDC four-wire fans. The fan itself has a sensor to output PWM signals, and outputs 2 PWM signals per rotation. There are dedicated terminal pins to control the speed through external input PWM waveform!

Now we need to control and monitor the speed of each fan, but I can't think of a suitable way!

Speed control is not a big deal, at worst all fans can be connected to one PWM control pin, but if speed monitoring needs to be monitored for each fan, where are there so many input capture channels to capture the PWM frequency?

I wonder if there is a better solution to monitor the speed of 12 fans in a resource-saving way?

STM32 uses the most basic STM32F103C8T6

This post is from stm32/stm8

Latest reply

A few dozen milliseconds is a long time for a single-chip microcomputer, which can execute tens of thousands of instructions. Therefore, there is no problem for the single-chip microcomputer to read the speed of 12 fans in sequence (actually reading the count value of the counter chip).   Details Published on 2024-10-10 21:06
 

28

Posts

0

Resources
2
 
I would like to ask you, is it possible for me to use three four-to-one multiplexers to control 12 DCDC DC fans through the ordinary IO port of the microcontroller to switch them to the input capture channel of TIM2 for speed measurement?
This post is from stm32/stm8
 
 

2w

Posts

0

Resources
3
 

[The whole system has 12 DCDC four-wire fans. The fan itself has a sensor to output PWM signals, and outputs 2 PWM signals per rotation. There are dedicated terminal pins that can control the speed through external input PWM waveform! ]

The fan outputs "two PWM signals per revolution", which is probably not a PWM signal? PWM is "pulse width modulation", which means that the pulse frequency remains unchanged but the duty cycle changes to transmit information. "Two PWM signals per revolution" obviously has a frequency that is proportional to the speed, while the duty cycle remains unchanged.

This post is from stm32/stm8
 
 

2w

Posts

0

Resources
4
 

[The whole system has 12 DCDC four-wire fans. The fan itself has a sensor to output PWM signals, and outputs 2 PWM signals per rotation. There are dedicated terminal pins that can control the speed through external input PWM waveform! ]

The input to the fan may be a PWM signal, which changes the average voltage across the fan motor by changing the PWM duty cycle, thereby changing the fan speed.

This post is from stm32/stm8
 
 
 

2w

Posts

0

Resources
5
 

[The whole system has 12 DCDC four-wire fans. The fan itself has a sensor to output PWM signals, and outputs 2 PWM signals per rotation. There are dedicated terminal pins that can control the speed through external input PWM waveform! ]

However, it is impossible for the microcontroller to output a PWM signal to control the fan, because the power that the microcontroller pin can output is too small. There must be a drive circuit between the microcontroller and the fan (the simplest drive circuit is a transistor).

This post is from stm32/stm8
 
 
 

2w

Posts

0

Resources
6
 

[But if the speed monitoring needs to be done by each one, how can there be so many input capture channels to capture the PWM frequency? ]

This is relatively easy. The microcontroller is expanded with 12 counter chips to measure the cycle of the fan output pulse.

According to you, the fan outputs two pulses per revolution. The fan's speed is not very fast, at most tens to hundreds of revolutions per second. Then the pulse period of the fan output is tens of milliseconds. For such a frequency, the measurement period is more accurate. That is, the pulse output by the fan controls the "gate" of the counter chip, so that the counter chip counts a certain frequency (for example, thousands of Hz to tens of kHz). The microcontroller reads the count value and knows the fan speed.

This post is from stm32/stm8

Comments

That's awesome! I solved my doubts in one go. Thank you very much! I plan to use optocoupler plus Darlington to control the fan output, and 12 counter chips to capture the input!  Details Published on 2024-10-19 10:08
 
 
 

2w

Posts

0

Resources
7
 

A few dozen milliseconds is a long time for a single-chip microcomputer, which can execute tens of thousands of instructions. Therefore, there is no problem for the single-chip microcomputer to read the speed of 12 fans in sequence (actually reading the count value of the counter chip).

This post is from stm32/stm8
 
 
 

28

Posts

0

Resources
8
 
maychang posted on 2024-10-10 21:06 [But if the speed monitoring needs to be monitored by each, how can there be so many input capture channels to capture the PWM frequency? ] This is relatively easy. Single chip...

That's awesome! I solved my doubts in one go. Thank you very much! I plan to use optocoupler plus Darlington to control the fan output, and 12 counter chips to capture the input!

This post is from stm32/stm8
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list