Pages: [1]   Go Down
Author Topic: Fan only spins when given 255 pwm using TIP120  (Read 195 times)
0 Members and 1 Guest are viewing this topic.
Seattle, WA
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the first diagram here:
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

When I put a full 255 out, it spins fine, when I put even 250, then the fan just hums. Any ideas what could be causing this?
Logged

Online Online
Edison Member
*
Karma: 41
Posts: 1271
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We need to know more.
When you use a 12V motor on a 5V power supply, that could be the cause.
Or you have mixed up the pins of the transistor. Or the resistor to the base is too large, for example 330k instead of 3k3.
Logged

Global Moderator
Italy
Online Online
Brattain Member
*****
Karma: 333
Posts: 22907
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Like a whistle?
I think it's because the PWM isn't a real analogic signal but a square wave. So the fan could "sense" that, creating a whistrle.
You don't ear the noise if you use a pwm of 255 because the Arduino does a "trick" by disabling the PWM and writing an HIGH signal on the pin.

You could try to put an RC filter between the pin of the MCU and the base of the transistor, made with a 10K resistor and a 100nF capacitor.
Logged


Seattle, WA
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The fan requires 12V and I am using a 12V power supply. I have tried a 1k resistor and a 220 resistor with the same results. I am fairly certain that I don't have the pins confused, I have looked over it several times and even pulled everything out and started over.

The noise is more of a hum than a whistle I would say.
Logged

Oregon, USA
Offline Offline
Edison Member
*
Karma: 68
Posts: 2318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Most small fans use brushless DC motors, and the circuitry in some of those does not work correctly with PWM power, or with reduced voltage.
Logged

"It seems to run on some form of electricity"

Seattle, WA
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Most small fans use brushless DC motors, and the circuitry in some of those does not work correctly with PWM power, or with reduced voltage.

If I connect a lower voltage dc power supply directly to the fan, it works fine. I am not sure if this is meaningful.
Logged

Seattle, WA
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was able to find the stats on the motor I am using:

http://catalog.pelonistechnologies.com/item/blowers/rb7530-series-dc-blower/rbm7530b1
Logged

Global Moderator
Italy
Online Online
Brattain Member
*****
Karma: 333
Posts: 22907
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried the RC filter before the base pin?
Logged


Seattle, WA
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried the RC filter before the base pin?

Sorry, was going through my parts looking for things. This actually works. I had tried some different resistors/capacitors earlier without luck, but it seems I wasn't using a large enough value for either.

Is there an easily understandable resource for how to select these values? I am still pretty novice overall..
Logged

Global Moderator
Italy
Online Online
Brattain Member
*****
Karma: 333
Posts: 22907
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try to use an online calculator, like this one:
http://sim.okawa-denshi.jp/en/PWMtool.php
Logged


Offline Offline
Faraday Member
**
Karma: 66
Posts: 2565
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

With a "filter" you're smoothing  the PWM into a DC level.
I think that, if this "noise" bothers you, you ought to change the Timer so that it runs at an "ultrasonic" frequency.
Choose an output with a timer other than the one that will affect millis()

http://playground.arduino.cc/Main/TimerPWMCheatsheet

http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Global Moderator
Italy
Online Online
Brattain Member
*****
Karma: 333
Posts: 22907
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think he just could experience some noise reduction by changing the pin at which he connected the transistor.
Pins 5 & 6 work at ~976 Hz, that's almost the double of the frequency of the other PWM pins (3, 9, 10, 11) that work at ~490 Hz.
Logged


Seattle, WA
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think he just could experience some noise reduction by changing the pin at which he connected the transistor.
Pins 5 & 6 work at ~976 Hz, that's almost the double of the frequency of the other PWM pins (3, 9, 10, 11) that work at ~490 Hz.

I will try this, but noise isn't really an issue currently. It initially wasn't spinning at all (that was the issue). Still, I will check this out anyhow thanks.
Logged

Offline Offline
Faraday Member
**
Karma: 66
Posts: 2565
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Then something's up here, something dissonant.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Pages: [1]   Go Up
Jump to: