G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Share Posted June 14, 2017 A quick one... maybe... so I'm almost done building my 3D printer enclosure (hopefully I can post some shots later this week...), and I want to set up a fan to extract heat from the enclosure. I bought a 120mm fan and drilled out a hole and attached it to the rear plexiglass panel. Now.. what I want to do is (and as simple as possible...) connect a potentiometer to the fan to control how fast the fan spins. I tried to read up on potentiometers, and did the best I could. I had a spare 10k one from the Steampunk goggles build (which I have yet to start...), but it was too much, the fan would only spin with it wide open. So I bought a 1k potentiometer, and I can somewhat control it, but it still doesn't have any range to it, for lack of a better explanation... so do I need something lower? Hope I'm making sense.. please ask questions if I don't make sense... THANKS!! Link to comment Share on other sites More sharing options...
G+_Black Merc Posted June 14, 2017 Share Posted June 14, 2017 Three wire or two wire fan? If it is a three wire(similar to CPU fans in a computer) their is a solid chance that a pwm signal can control its speed. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Author Share Posted June 14, 2017 It's actually a 4-wire, so I believe the last 2 are Signal and Control. But wasn't sure I'd need either if I just wired two of the three terminals on the potentiometer. With the 1k connected, I have to turn the potentiometer to full, then I back off a bit and it slows. With the 10k I'd have to crank it to full to get it moving, but if I turned it even a smidge it would turn off. I didn't want to get too crazy with this, even though I'm proud of what I built so far... Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted June 14, 2017 Share Posted June 14, 2017 I was thinking the same thing as Black Merc? before I read this: analog.com - Why and How to Control Fan Speed for Cooling Electronic Equipment | Analog Devices It looks like both 2 wire and 3 wire fans can be controlled with PWM and the 3rd wire is apparently to get the fan speed back from the fan. I suspect it's possible to PWM with discrete logic using a 555 timer or something, but an Arduino would definitely work and maybe be easier (though a transistor, MOSFET, or relay would still be needed to switch the 12V). Alternatively, you can probably use a PC fan speed controller like this one to control the speed, but that's not as much fun. Zalman Fan Speed Controller https://www.amazon.com/dp/B000292DO0/ Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Author Share Posted June 14, 2017 I guess another option, which would fit right in here, would be to use a Pi Zero with a temp sensor (I assume they are available) and when the enclosure reaches a certain temp the fan kicks in. I have a spare one, so maybe I'll try that too... would it be hard to code something like that? Link to comment Share on other sites More sharing options...
G+_David Peach Posted June 14, 2017 Share Posted June 14, 2017 A temp sensor controlling a PWM signal would be a great place for an Arduino. A Pi Zero would work but it is overkill and to turn it off requires a shut down process like a computer. If you are already running OctoPrint on another Raspberry Pi for your printer, you could use that Pi for temperature control. Fr. Robert Ballecer, SJ?, this would be a great Know How project: Arduino + temp sensor to control PWM fan speed. I'm sure fits into the Grow How series. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Author Share Posted June 14, 2017 David Peach I do have an Arduino hanging around waiting for Steampunk goggles, but I can surely steal it for this. Any ideas on where to start? I'm new to Arduino (and Pi too...) Link to comment Share on other sites More sharing options...
G+_David Peach Posted June 14, 2017 Share Posted June 14, 2017 Anything that shows how to control LED with PWM will be the same code. But there is one thing to note, you should have a diode in line so that the spinning fan motor won't send electricity back to your Arduino. Here is just one Instructable that shows it. I didn't read it to see if it was the best or clearest. But controlling LED with PWM it's exactly the same concept and you will find many more tutorials in doing that than someone talking about PWM control for a fan. instructables.com - Using PWM to Control the Light Intensity of a LED Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Author Share Posted June 14, 2017 Awesome! Thanks for giving me a starting point. So I guess the +/- for the LED would be swapped with the fan. I'll check that out... thanks!!!! Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted June 14, 2017 Share Posted June 14, 2017 Something to watch... Your fan is probably 12v - maybe 5v. Your Arduino is 5v - maybe 3.3v. A 5v Arduino might be able to drive a 5v fan and 5v might be enough to get a 12v fan to start moving slowly, but the fan probably draws more current than is recommended through the Arduino. Other than that, the PWM is the same. You just need a transistor or solid-state relay to switch the 12v. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Author Share Posted June 14, 2017 Would a Pololu voltage converter device work? I think my fan is 12v, but it doesn't say Link to comment Share on other sites More sharing options...
G+_David Peach Posted June 14, 2017 Share Posted June 14, 2017 Ben Reese? is right. I had forgotten that you also need to know how to trigger a higher voltage with PWM. This complicates it a bit, but still doable with an Arduino. I don't know anything about the Pololu device, but what I read quickly does not sound like that is the answer. That will boost the voltage but create much more of a current draw than what the Arduino can handle. So now you need to also learn how to trigger a higher voltage through a beefy transistor or MOSFET. A relay is probably not fast enough to for PWM (but I'm not certain about that). This would be a fun project to work out if I were home, but I'm away from all my food this week. For now learn about controlling an LED via PWM. That is going to be identical to what you will do in the final project. Then learn about powering and controlling 12V LED strips through PWM. That also will be the same as the final project. Then you should have all the pieces in place. Link to comment Share on other sites More sharing options...
G+_Black Merc Posted June 14, 2017 Share Posted June 14, 2017 Didn't padre' do christmas lights that were 12v but had a 5v data line? Thinking that pushing data is not the same as pushing power... Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted June 14, 2017 Share Posted June 14, 2017 Would an Electronic Speed Controller work for this? Controlled by 5v and handles much higher voltage. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 14, 2017 Author Share Posted June 14, 2017 Ben Reese You mean like for a quad?? Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted June 14, 2017 Share Posted June 14, 2017 Ken Jancef yes, that's what I'm thinking. I was under the impression they use PWM to control the speed, but maybe that's not the case. Probably way overkill for the low current needed for a PC fan. Link to comment Share on other sites More sharing options...
G+_Spudz Productions Posted June 15, 2017 Share Posted June 15, 2017 If you have a 555 timer chip laying around you can make a control super simple and cheap with just two diodes and a capacitor. Your pc fan probably requires 12 volts to operate so this is probably your best solution. instructables.com - Simple (and Dirty) Pulse Width Modulation (PWM) With 555 Timer: 3 Steps Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 15, 2017 Author Share Posted June 15, 2017 Spudz Productions Thanks for the link. I read it, and it looks promising. The problem is that even though I've been a computer tech for over 20 years, I don't know too much about circuitry like this, and even though the article has a schematic in it, I am a noob when it comes to this. I have no trouble soldering and putting it all together, but I can't tell where stuff goes from reading the schematic... I did bookmark the link, and really want to do it. So I'll brush up on my schematics... Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted June 15, 2017 Share Posted June 15, 2017 Ken Jancef I feel the same way. I've seen the 555 timer in so many projects I kinda want to get one just to learn how it works. Perhaps something like this would be a good Know How project just for the general principles. If only Fr. Robert Ballecer, SJ? didn't already have a backlog of Ideas... Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 15, 2017 Author Share Posted June 15, 2017 Ben Reese Yea, I'm sure Fr. Robert Ballecer, SJ has enough ideas to take him into next year! The one thing I don't like is that when you have to buy one, you have to get them in bulk, which I understand. But for a guy like me, who needs a pack of 20 when I need just one?! It's all good though. But yea, I wish he could do an episode about the 555 sometime. I'm going to leave it as-is for now, and maybe make the 555 a summer project. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 15, 2017 Author Share Posted June 15, 2017 This is how it looks now... I turn on the fan by cranking the potentiometer, then back off a bit to slow it down... Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted June 15, 2017 Share Posted June 15, 2017 Nice. If that works for you, it may be the best way to do it. On one of those links I was reading that when using a potentiometer, the fan probably has to get at least 50% power to start moving then you can back it off a little. It just needs enough voltage to get it going. PWM would give full 12v with each pulse, so theoretically you can make it turn slower with that method. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 15, 2017 Author Share Posted June 15, 2017 Ben Reese I agree. I would like it that way, so I'll read up on the 555 method. Thanks for the help... Link to comment Share on other sites More sharing options...
G+_David Peach Posted June 15, 2017 Share Posted June 15, 2017 Don't let me slow you down on the 555 project, they are amazing, but it also doesn't get you to the point of being able to have it regulate the temperature automatically like you can with an Arduino, temp sensor and PWM. Link to comment Share on other sites More sharing options...
G+_Shooter_FPV (Shooter_FP Posted June 15, 2017 Author Share Posted June 15, 2017 David Peach Oh, no... no worries at all. I might escalate to that someday, but the 555 is intriguing me anyway. For now I'll keep it like it is. Over the summer I'll dig into the 555. Link to comment Share on other sites More sharing options...
Recommended Posts