Motor interfering with LED PWM - PT4115

Hi all,

I have an LED array that uses a PT4115 for dimming (One of these: https://secure.flickr.com/photos/madworm_de/6622028359/)
I also I have 12v brushless motor (PC fan) connected to the arduino with a TIP-120 transistor.

When the PT4115 is given a PWM signal of 0 and the fan is anything less than 255 the LED lights up dimly, flickering in sync to the motor revolutions.
I've tried putting a 10K resistor between the LED PWM pin and GND but it's still picking up the motor interference.

Both share the same 12V power source.

Any suggestions to prevent this?

  1. You have no decoupling on your 12V supply.
  2. You can't PWM a brushless fan, its not a motor, its an entire circuit including a motor control chip.

MarkT:
....
2) You can't PWM a brushless fan, its not a motor, its an entire circuit including a motor control chip.

I generally agree with you MarkT, but in this case I have to take exception if this is a typical PC fan. The OP isn't trying to read the RPM wire, so it should work fine. PCs have been doing it like this for way more than 10 years. The Hall sensor will be toggling on and off, but it will always power on in the appropriate mode since the magnets are permanent.

EDIT: I'll try to find some time later and hook up on to the scope. I want to see if the Hall sensor really goes off once the duty-cycle is over some certain amount. I have seen caps on the circuit boards of fans I've disassembled so they may be why there isn't any problem.

What's powering the board?

I managed to smooth it out by sticking a 100uf capacitor across the battery terminals. Would a larger capacitor be preferable?

The fan appears to work fine - I did have issues with the fan making a noise but resolved this by changing the PWM Frequency to (31.250 kHz) with:

TCCR1B = _BV(COM0A1) | _BV(COM0B1) | _BV(WGM00); //AFFECTS PIN 9 & 10

The board is powered by USB (common ground) for testing - long term I will be using a 12v - 5v switching voltage regulator from the 12v source.

afremont:

MarkT:
....
2) You can't PWM a brushless fan, its not a motor, its an entire circuit including a motor control chip.

I generally agree with you MarkT, but in this case I have to take exception if this is a typical PC fan. The OP isn't trying to read the RPM wire, so it should work fine. PCs have been doing it like this for way more than 10 years. The Hall sensor will be toggling on and off, but it will always power on in the appropriate mode since the magnets are permanent.

EDIT: I'll try to find some time later and hook up on to the scope. I want to see if the Hall sensor really goes off once the duty-cycle is over some certain amount. I have seen caps on the circuit boards of fans I've disassembled so they may be why there isn't any problem.

I repeat, you cannot PWM the supply to a brushless fan, it is not a motor, it is a motor control circuit.

(let me explain a bit - the fan circuit has a control chip and decoupling capacitor - one expects a constant
supply voltage for correct operation and the other struggles to maintain a constant supply voltage.
If you PWM the supply rail you'll generate large current spikes into the decoupling capacitor (here with
a lead-acid battery they could be many amps), and probably upset the operation of the chip. The large
current spikes will be why there's so much interference.)

I see...
So what would be the best solution to provide a lower voltage to the fan? I guess I need to incorporate smoothing of the signal somehow?

You'd need a fan with a control input - I believe these usually have 4 wires.

MarkT:
I repeat, you cannot PWM the supply to a brushless fan, it is not a motor, it is a motor control circuit.

(let me explain a bit - the fan circuit has a control chip and decoupling capacitor - one expects a constant
supply voltage for correct operation and the other struggles to maintain a constant supply voltage.
If you PWM the supply rail you'll generate large current spikes into the decoupling capacitor (here with
a lead-acid battery they could be many amps), and probably upset the operation of the chip. The large
current spikes will be why there's so much interference.)

Cool, thanks for the explanation, they are kind of rare around here at times. :wink: I understand what you are saying about the decoupling cap. Still I've seen plenty of people doing a simple PWM on a fan. It must be that once the duty cycle is high enough, the "controller" remains powered on during the off period of the PWM. That's why I want to take a close look with a scope and see what's going on with that.

This seems typical of the few fans I've taken apart:

I know that more modern fans require automatic rotor-lock detection with auto restart. These would need a lot more circuitry like you are describing, hence (I think) the 4-wire fans that we see now.

Many bad circuits appear to work, doesn't mean they will be reliable! PWMing for motors is done to the windings directly which are inductive and smooth out the current. Some brushless fans will be cheap and
have little / no decoupling, so PWM might work reasonably, others will be better designed and not like PWM!

PWM works on resistive and some inductive loads (motors are a good example as they use laminations to
reduce eddy-current losses (important for PWM). In theory a capacitive load could be PWM'd with a
switched current source nice and cleanly, but not a witched voltage source.

All I can say is that I've seen many bad circuits that appeared to work. :wink: I see what you're saying and I agree it's not the right way to do it, but I have to say I've seen it done a pile of times. Maybe PC fan makers take/took all this into consideration in the good old days.

I'm trying to find a fan that has PWM but it appears the 3rd (yellow) wire is for speed sensing, not PWM control?

madlan:
I'm trying to find a fan that has PWM but it appears the 3rd (yellow) wire is for speed sensing, not PWM control?

You want a four wire fan. They are the only ones that I know of that have a specific PWM input wire. They are designed to pulsed at 25kHz.