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.
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
-
990.8 KB Views: 26