I like to use a fan when I solder. Some people think that is silly and I don't care much to argue the point. No over-reaction, no paranoia, none of that. I just figure the less of those fumes that I inhale and the less of those fumes that get into my eyes, the better. I am not suggesting an expensive filtered fume extractor is mandatory although I would probably use one if it were given to me.
What I normally used to use in the past was an AC fan that you would likely call an office or desk fan - maybe 12-14" in diameter. Rather bulky for a bench, but it was effective in mitigating concentrated fumes. So, I had it in my head to build a small fan that could be brought out just for soldering.
I have some familiarity with PIC chips and PWM and an 1840 seemed like a reasonable choice.
Here is the schematic that I came up with, simple as it is. Five switches control the fan - off, 25%, 50%, 75% and 100%.
Then the asm code (see attached) and the bread-board circuit
The fan that I used is *very* small, and very cheap, but actually performs well.
The circuit and program work great! No whine, no stalling at 25%, it performs as well as I hoped that it would. Just a couple of notes...C2 is mandatory and a larger value might be needed for another fan. I did not use a serial resistor on the gate of the mosfet - I saw no difference if I added one. I still struggle a bit with determining when one is necessary. R6 is a habit with me, I like things pulled down if the thing could be floating. Also, there is a lot to using PWM with fans - read about that if you are interested.
On the code - it's pretty straightforward. I am using a 10K duty cycle (if I calculated correctly). There is a trade-off between PWM resolution and PWM duty cycle as I recall - so don't think that you can get ultrasonic frequencies with 10 bit resolution. Anyways, I am sure there are plenty of people on here who know much more about the details and there is much information on the subject available online (some of it quite good and some of it just plain wrong). While the data sheet can be cumbersome, especially if you are not familiar with Microchip, all the info is actually in there.
OK, so now, it is time to take it off the breadboard and into an enclosure so that the project can be used conveniently. That is the part that I hate because I am not too good with those skills (I am being kind). Often times, working circuits will simply stay on the breadboard. For me, the fun is in designing and coding something that works, not packaging.
So, it sits on the breadboard for a few months....and a few more months...makes its way onto a list of things to do and so on and so forth.
Then, I come across this in a brick and mortar store - can't remember exactly, but I think it was maybe $8.
Has a built-in rechargeable battery. Can be charged from a USB port or charger. Runs while charging and works fine off of a 5V power bank when I have forgotten to charge it. Runs for a couple of hours on a full charge. Plenty effective for directing the fumes away from me while soldering. It is small enough (5.5" X 4") to easily position while soldering. Three speeds and the highest is effective even at a distance that is far enough to be well out of the way.
I simply can't do better than that.
So, at the end of the day, the circuit gets taken off the bread board. The components go into a labelled bag along with the printed schematic and a note about the programming. No time was wasted. I learned a lot and have increased my arsenal, so-to-speak.
PS: with regard to the code and schematic...I am fine with comments and even criticisms. In fact, if you see something that is just plain wrong, please do let me know so that I will learn. If you see something that could be improved, I welcome the discussion if it also contains some clear explanation of why it is an improvement. If you are wondering why I did something in the way that I did, the answer is usually..because that is the way that works
What I normally used to use in the past was an AC fan that you would likely call an office or desk fan - maybe 12-14" in diameter. Rather bulky for a bench, but it was effective in mitigating concentrated fumes. So, I had it in my head to build a small fan that could be brought out just for soldering.
I have some familiarity with PIC chips and PWM and an 1840 seemed like a reasonable choice.
Here is the schematic that I came up with, simple as it is. Five switches control the fan - off, 25%, 50%, 75% and 100%.
Then the asm code (see attached) and the bread-board circuit
The fan that I used is *very* small, and very cheap, but actually performs well.
The circuit and program work great! No whine, no stalling at 25%, it performs as well as I hoped that it would. Just a couple of notes...C2 is mandatory and a larger value might be needed for another fan. I did not use a serial resistor on the gate of the mosfet - I saw no difference if I added one. I still struggle a bit with determining when one is necessary. R6 is a habit with me, I like things pulled down if the thing could be floating. Also, there is a lot to using PWM with fans - read about that if you are interested.
On the code - it's pretty straightforward. I am using a 10K duty cycle (if I calculated correctly). There is a trade-off between PWM resolution and PWM duty cycle as I recall - so don't think that you can get ultrasonic frequencies with 10 bit resolution. Anyways, I am sure there are plenty of people on here who know much more about the details and there is much information on the subject available online (some of it quite good and some of it just plain wrong). While the data sheet can be cumbersome, especially if you are not familiar with Microchip, all the info is actually in there.
OK, so now, it is time to take it off the breadboard and into an enclosure so that the project can be used conveniently. That is the part that I hate because I am not too good with those skills (I am being kind). Often times, working circuits will simply stay on the breadboard. For me, the fun is in designing and coding something that works, not packaging.
So, it sits on the breadboard for a few months....and a few more months...makes its way onto a list of things to do and so on and so forth.
Then, I come across this in a brick and mortar store - can't remember exactly, but I think it was maybe $8.
Has a built-in rechargeable battery. Can be charged from a USB port or charger. Runs while charging and works fine off of a 5V power bank when I have forgotten to charge it. Runs for a couple of hours on a full charge. Plenty effective for directing the fumes away from me while soldering. It is small enough (5.5" X 4") to easily position while soldering. Three speeds and the highest is effective even at a distance that is far enough to be well out of the way.
I simply can't do better than that.
So, at the end of the day, the circuit gets taken off the bread board. The components go into a labelled bag along with the printed schematic and a note about the programming. No time was wasted. I learned a lot and have increased my arsenal, so-to-speak.
PS: with regard to the code and schematic...I am fine with comments and even criticisms. In fact, if you see something that is just plain wrong, please do let me know so that I will learn. If you see something that could be improved, I welcome the discussion if it also contains some clear explanation of why it is an improvement. If you are wondering why I did something in the way that I did, the answer is usually..because that is the way that works