PWM PC fan for solder fume extraction

bogbean

Member
Here's a solder fume extractor that uses an 08M2 to pwm a small PC fan to provide variable fan speed control.
It was the first time I'd pwm'd a motor so I learnt a few things along the way. The hardest part of this project was shoehorning all the bits into the enclosure. To save space I use female header sockets to accept the AXE027 breadboard cable adaptor.

One LED serves as a power indicator, the other is pwm'd at the same duty as the motor. My idea was that the differential brightness between the two LEDs should indicate how fast the fan is being driven.

The airflow cutouts are functional but not particularly pretty. Behind the air intake there is a layer of activated carbon sponge (got from eBay), I was surprised that it really does seem to absorb the flux fumes on contact.

I had some fun playing with the frequency of the pwm cycle to minimise an audible 'knocking' as the motor is driven. A 47uF capacitor C2 at the driving transistor's base took away the nearly all the knocking sound.

I initially ran into problems driving the final built version of the circuit, which taught me a lesson of not quite breadboarding what I was intending to build. I believe the voltage to the 08M2 was dropping too low with the considerable current draw when run off 3 x AA NiMH batteries and perhaps was too unstable. In desperation I removed the polarity protection diode D1, added a 330uF capacitor across the input terminals to the boost converter and had to power the circuit from a USB source (it draws 1A from the USB supply when running steadily at 100% but over 2A when the motor is spinning up). That got things working; although the fan still doesn't operate when the duty cycle is below approx 25%, it was good enough for me to stop tinkering and just move on. I think things would be better if I had supplied 12V and regulated down from there where needed.

Code:
symbol adcIn = b0        ;
symbol period = b1
symbol duty = w1

init:
period  = 255    ; with pwmdiv4, f = 977 Hz
pwmout pwmdiv4,C.2,period, 511    ; 


main:                     ; make a label called 'main'
    readadc C.4,adcIn    ; read pin C.4 into variable 0-255 bits
    duty = adcIn * 4 + 3
    pwmduty C.2,duty
    pause 1000;
    goto main             ; jump back to the start
 

Attachments

PhilHornby

Senior Member
It was the first time I'd pwm'd a motor so I learnt a few things along the way.
...
I had some fun playing with the frequency of the pwm cycle to minimise an audible 'knocking' as the motor is driven. A 47uF capacitor C2 at the driving transistor's base took away the nearly all the knocking sound.
But doesn't the presence of that capacitor, mean that you aren't actually PWM'ing the motor?

As in, R2 and C2 integrate the output of the Picaxe and convert it into a variable, analogue voltage.

(This is as much a question as a statement - I claim no great expertise in hardware-related things :) )
 
Last edited:

bogbean

Member
Hmm good point, I hadn't considered that!
I'm quite a newbie but I think that with R2 = 1K and C2 = 47uF the RC time constant should be 47ms but my PWM period is much less at approx 1ms. So for most settings of the speed control pot I'd expect C2 to soak up the PWM'ing and remain constantly charged enough so to keep the motor's driving transistor saturated on most of the time, especially considering that Q1 is a darlington transistor.

Now I'm wondering how I actually achieve any kind of speed control! I might have a go at a version 2 of this circuit to see If I can understand it better.
 

PhilHornby

Senior Member
I had a bit of fun, playing with an online emulation of this circuit at Falstad.com/circuit

See: here

You can alter the PWM duty cycle with a slider and switch the capacitor in and out of circuit. I twiddled the motor characteristics until it seemed 'representative' ...

I can't get the 'scope (which is supposedly showing the PWM output) to display anything meaningful.
 

Attachments

bogbean

Member
Thanks for taking the time to model this! I've never seen this circuit resource, it looks much more approachable than attempting to use spice for the first time.
I was able to see a sensible trace if I slowed the simulation down and right-clicked to edit the waveform generator to select a pulsed form with a duty of 25%. I think the slider for the duty cycle generates duty >>100%.
That made more sense although I didn't see a difference in results with the capacitor in the circuit or out of it.
 

PhilHornby

Senior Member
I've never seen this circuit resource, it looks much more approachable than attempting to use spice for the first time.
Yes - but it does seem to have its fair share of 'idiosyncrasies' ..
That made more sense although I didn't see a difference in results with the capacitor in the circuit or out of it.
No - me neither ... it behaves as though only the tiniest part of the PWM range has any effect - the rest of the time, it looks like the transistor is driven hard on ... with the motor on full power. It did strike me, that it's probably theoretically possible to get the motor on half-power ... with 6V @ 0.5A across the transistor. At this point, the smell of melting transistor would be added to the solder fumes ;)

I hate to mention this ...

You could probably control the motor speed, by altering the voltage coming out of that boost module. Remove the preset and run three wires to your external pot.

Not as much fun though :)
 

bogbean

Member
I reworked the circuit with a 12V supply and regulate down for the picaxe, it doesn't seem to suffer supply voltage instability this way.
I also ditched the capacitor at the transistor base and avoided a 1kHz PWM to cut down on a PWM humming sound. I tried different PWM frequencies and found at 15.6kHz there was no PWM noise (to my ears, might be different for younger pairs), there was still a bit of gurgling at 61Hz but the fan would run to lower duty cycles so I went for that and am growing fond of the gurgling now.

I didn't try an external pot in the boost module but that's an interesting idea for skinning this cat another way.
 
Top