Fan Speed Control
Bpaddock
Posts: 6
Hello all!
I'm trying to build a laptop cooler with a temperature controlled variable speed fan. I've ordered the main components such as a DS18B20 temperature sensor and a 12VDC pwm computer case fan. I have seen multiple projects similar to this on the internet, but I need help controlling the fan speed. The one I found uses 5V fans not 12V.
Here's my problem. I want to use the pbasic command pwm to tell the fan what speed to operate at using duty and duration. The problem is the duty is only rated for 0-5V and I need to output pulses at 12V for the fan to operate at its optimum rpm range. Is this possible? Do i need to use a transistor to switch the fan up from 5v to 12V or what? Any help we be amazing.
Thanks!
Brian
I'm trying to build a laptop cooler with a temperature controlled variable speed fan. I've ordered the main components such as a DS18B20 temperature sensor and a 12VDC pwm computer case fan. I have seen multiple projects similar to this on the internet, but I need help controlling the fan speed. The one I found uses 5V fans not 12V.
Here's my problem. I want to use the pbasic command pwm to tell the fan what speed to operate at using duty and duration. The problem is the duty is only rated for 0-5V and I need to output pulses at 12V for the fan to operate at its optimum rpm range. Is this possible? Do i need to use a transistor to switch the fan up from 5v to 12V or what? Any help we be amazing.
Thanks!
Brian
Comments
·Click here....>>>>>· Fans
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Thanks for the reply. Yeah, I've found a bunch of 5V fans, but i was just wondering if there was any other way.
Yes, you need to use a switching transistor to control the current for the fan. This switching transistor will drop a small amount of voltage across it that will "take away" from what's available for the fan (usually about 0.3V - typical for a saturated switching transistor). The fan will use as much current as it needs, in your case 150mA (not 2A!)
If you need to control the fan's speed, you should be able to use what's called PWM (pulse width modulation). This turns the fan on and off rapidly so the average current (and average speed) is what you want. A BS2 can't do anything else when it's generating PWM signals, so that may not be practical. If you really need to control the fan's speed, there are some external circuits that can take responsibility for the actual PWM operation so the Stamp doesn't have to do it.
Thank you so much for pointing me in the right direction. So basically, if i want to use the BS2 pbasic command PWM, I could'nt say take the temperature using a DS18B20 at the same time? If not, what external circuit will i have to build to free up the BS2 but still use PWM? What does it consist of?
So I got the fans figured out, but i have another problem. I ordered 3 DS18b20's thinking I could use them with the BS2 but in reality the commands owin and owout only work with the bs2p. Is there any way to get these to work with the BS2 I saw a code by PH Anderson, but I'm not sure exactly how everything is hooked up. Should I just forget it and use a LM34 sensor to make my life easier?