Thank you for showing the wiring of the mosfet clearly on the breadboard, and the details of the shared grounding. I wasn't sharing the ground properly, but now I have got the temperature control working, thanks to this video (and it is the fourth that I have watched looking for enlightenment). I am using a k-thermocouple and an LCD display but the mosfet circuit is the same.
@michaelkenney81846 жыл бұрын
Greatly appreciated the extent in which you explained your code. Wonderful job!
@zaynefontes46933 жыл бұрын
Bro this worked like a charm. Using this to pull in cool air into my electrical enclosure for my mobile solar panel kit to prevent a greenhouse affect. This is super useful because it will only use power when necessary to cool the enclosure what with the PWM and being able to set the desired temp. Thanks so much for this great video. This was basically the first time I was able to successfully make something work with the Arduino other than turn on an LED lol.
@jopplehead5 жыл бұрын
Thank you much. Great video, clear and clean. Much simpler than I expected. I need to choose a mosfet that will handle a 2 amp 200cfm 12vdc fan. My only trick now is how to mount the thermistor to my RF amp heatsink. I think I will give this a try. I was just going to switch the fan on using a relay and some op amp temp circuit, but the pwm capability of the Arduino is just too cool not to try. Take care :)
@BOBANDERSON51507 жыл бұрын
I REALLY enjoy your videos. You really explain everything in great details. Keep up with the awesome tutorials!! Subscribed for life!
@emmanuellatag54826 жыл бұрын
BOB ANDERSON up hnhAaw s d
@antoniomusico6 жыл бұрын
Thanks guy for your explanation! Eventually I used a MCP9700-E/TO temp sensor, instead of the thermoresistor and the resistance, and it worked perfect! :)
@olvano3 жыл бұрын
thank u very much ,i looked all over KZfaq for help ,to under limiting system your circuit is the only one that made sense .now im finish. my on or off grid ,anti-back-feed , chinese solar grid tie inverter diy ( simple energy limiter ) with arduino. Thanks again :)
@StanSorochan3 жыл бұрын
Sweet, thank you! Just need to wait for the parts to arrive and I'll have a controlled active cooler.
@vidabuena1013 жыл бұрын
Have been watching this video repeatedly for my project, and it helps a lot! Sad that Jacob is not uploading new videos...
@chanphongnguyen91725 жыл бұрын
I borrowed your idea for our final project, thank you a lot. What an amazing video.
@cr1zmo8565 жыл бұрын
Hey i was wondering what did you use to provide the 12 voltage for the fan?
@stubbornshark54753 жыл бұрын
Thank you, exactly what I needed. Also interesting you used a voltage divider on the A0 pin, that is a nice touch with the R1, cheaper than the TMPs used in many other applications. Additionally, 12V is probably better than Mains, so this is a relatively safe project.
@borsi993 жыл бұрын
Thank you so much for this very interesting video! You explained everything so well as a beginner in arduino I will try to rebuild this circuit. Wish you all the best and I hope you‘re going on with such interesting projects. Boris. 🇨🇭
@borsi993 жыл бұрын
Hi, I wanted to tell you that your project is very fine to me as an arduino beginner! One question: is it normal to hear the ringing sound of the fan maybe coming from pwm? Is there a solution against this ugly sound? Thanks! Boris, Swiss
@Dally_Sparkles5 жыл бұрын
You legend, exactly what i was looking for... I'm making solar powered cooling fans for beehives. using a Arduno Nano.. charge controller, lithium battery and some solar panels.
@vaizluca4 жыл бұрын
why were you making cooling fans for beehives?
@alkhashtee5 жыл бұрын
You are the beast of ARDUINO . Thank you very much
@Kntryhart6 жыл бұрын
I just replicated this setup...works as advertised. I opted to use a IRF540 MOSFET. Thank you for posting!!
@survivor3515 жыл бұрын
I did this circuit with another transistor but when the fan work witout %100 power, fan works with a like beep sound, ur circuit a problem like this
@robmormile39113 жыл бұрын
@@survivor351 bit late this response but use a 470uf 50V cap in parallel with your fan output wires. this will completely suppress the pwm noise.
@shaunoslade69424 жыл бұрын
Incredible. Finally someone who's building their code around their layout and not copying the code and pasting it .... hats off brother. So informative.
@user-uu5ks1tt4f Жыл бұрын
Where ?
@paulchan67206 жыл бұрын
well explained, i have learnt a lot from your videos !!
@carlch8907 Жыл бұрын
There's an observation about that gate drive... Whenever you are PWM switching an inductive load (i.e. like that fan), without a gate resistor, there's a good chance that gate is going to ring (oscillate), that might cause electrical noise issues that could interfere with other circuits, including parts of the microprocessor, especially if you are making that microprocessor to multitask. It happened to me with some serial data I was using, it looked all erratic and did not know where it came from until I hooked up a scope to the power supply line, you could see all kind of noise along... At first I thought the freewheel diode alone and the decoupling capacitor would eliminate good part of the noise, but it did not. The gate resistor was the saver here...
@jeffschlund86224 жыл бұрын
"what the heck is up guys" -subscribed
@romanandmel6906 Жыл бұрын
i would like to be good at this stuff but I suck, I have been looking around for a simple fan controller and this one Rocks, Simple and it works great, GOOD JOB
@sebastiangeppert75066 жыл бұрын
Awesome video. Thanks for the detailed explanations
@agstechnicalsupport6 жыл бұрын
Thank you for the instructive video on temperature controlled fan.
@angelugalilea51694 жыл бұрын
Hi Good day .
@oOcitizenOo5 жыл бұрын
Awesome tutorial! Thanks!
@chenegarnxt5 жыл бұрын
Great tutorial, thanks for sharing!
@UlysseLouigene3 жыл бұрын
Very nice, I was going to work on a similar project using a relay to turn on the fan. I like your idea better. Thanks
@hippoeug6 жыл бұрын
"WHAT THE HECK IS GOING ON GUYS"
@PiefacePete464 жыл бұрын
That's a useful video thanks Jacob. Perhaps adding a piezo buzzer that sounds when sensorVal is greater than 800? I realise there is no end to the list of "enhancements" that could be added.
@celtichongy5 жыл бұрын
Excellent project Jacob.
@wowzande Жыл бұрын
Trying my hardest to follow lol i have fans and a arduino im trying to cool down a car amplifer on its heatsink when the temperature goes up. I will study this video as reference. Thank you for this awesome information
@andersb72164 жыл бұрын
Amazing detail!
@nobentrix7 жыл бұрын
Thanks !!! Perfect work
@MrBobWareham6 жыл бұрын
Loved the video with a good explanation of the circuit thanks so much but a quick question where did you get the pencil? would love to buy one thanks Bob - UK
@DeezyDev5 жыл бұрын
silver promecha pencil, 3:54 you can kinda see the name. i thought it was cool too so i was trying to find it
@markconger80494 жыл бұрын
I’ll check the channel for follow up videos but a great next step would be to show an application of this with a much smaller Arduino (or clone) and a smaller fan in a project such as a Raspberry Pi enclosure.
@Alpejohn4 жыл бұрын
What the heck is up dude! (I laughed alot of your intro! Lol) Would it be possible to replace the temp sensor with a potentiometer? So i can control the speed up and down how i want? And i guess its possible to read the RPM, and "print" it to a display or something? Im figuring out how i can make a fan controller that shows fan rpm and can control pwm fans (for testing only, not to use in a computer or such things) I just want to be able to turn it up to full blast etc.
@elecnut82117 жыл бұрын
Good job. Thank you for making this. More videos ?
@RD-ni7qe3 жыл бұрын
Genuine question: would it not be easier to simply use a 4-wire PWM fan and control it directly via your PWM output pin, rather than driving a Non-PWM fan via a MOSFET? Would love to hear your thoughts on this, if you think there are Pro's and Con's, etc?
@Chikiwikie3 жыл бұрын
Exactly what I need Thanks.
@andreswanepoel48265 жыл бұрын
Great & simple solution. Well done
@danielorellana86074 жыл бұрын
Good video my guy, question though: what pencil is that because that looks really cool
@cleoagash3 жыл бұрын
steadler may be
@NienteNessuno5 жыл бұрын
I LOVE YOU, THANKS!!!
@ausprobierendannweisstdues86866 жыл бұрын
Nice Project! thx for the Code.
@MexiMaker7 жыл бұрын
is there any risk of having the motor emf Fry your board? I think heard that diodes are recommended for motors for that reason, but I don't know much about it.
@grinerpolevault4 жыл бұрын
This was an very helpful video, thanks so much! Question that you or perhaps another viewer could answer - Can I control the fan speed using a PWM signal sent to a MOSFET (such as a IRFLZ44n) or does the MOSFET only act as an "On/Off" switch that is controled by the PWM? Thanks.
@lamjeri4 жыл бұрын
In short, yes, you can use the IRFLZ44n to PWM controll a fan. Both of your questions together are a bit puzzling though. You can control the fan speed by using the MOSFET you said and the MOSFET does only act as an On/Off switch. PWM signal has a duty cycle and a frequency. Frequency of 1Hz (unreal, only for demonstration purposes) says that the signal repeats every second ( Time period = 1/frequency ). And duty cycle of 75% says that during this 1s time interval, the device will be on for 0,75s and off for 0,25s. You can make a PWM signal by simply switching power on and off by hand (nice way to test it). It works ok for a fan, but light sources, need much greater frequency.
@megabithero7 жыл бұрын
Now if only this guy taught my circuit analysis classes
@TonyRios7 жыл бұрын
*_Basic Engineering Circuits_* BOOK
@packets26616 жыл бұрын
Nice, thank you!
@miketony20694 жыл бұрын
Very thorough thank you
@Pedozzi4 жыл бұрын
fantastic video, what kind of fan are you using?
@Hardeepsingh-re8xn Жыл бұрын
well done sir...very informative video.....thanks for making
@schogaia7 жыл бұрын
This is just the perfect video for my upcoming arduino project. I'm planning to build a fan that keeps my smoker at a constant heat for various longjobs like pulled pork. You mentioned that the mosfet isn't powerful enough for a project like this. Could you be so kind and recommend a mosfet that will do the trick for sure? Thank you very much!
@TwoGunz20086 жыл бұрын
schogaia No he says the ardiuno is not powerfull enough to drive the fan, the mosfet is fine.
@Kntryhart6 жыл бұрын
I tried to reverse the code to have fan slow as temperature increased (as in a heater). But, the fan got into a loop where it would stop, run at full speed, stop, run at full sped, and so on. Any suggestions?
@johnheather2037 жыл бұрын
One more question. Do you think it is possible to display the temperature change from the circuit on a display? If possible, let me know how i can integrate in the circuit. Thank you very much
@nateplotnikoff11976 жыл бұрын
Could you not have your thermistor wired as a switch? Negative to negative post on which ever system is is your wanting to keep cool, say it was a heat sync. Mount the thermistor to the heat sync and run your + wire threw the thermistor to the fan.....? Just a question, lots of good info in your vid.
@frankjonathansaenz19114 жыл бұрын
Thanks. really helpfull!
@jenpau02696 жыл бұрын
thank you so much,.. i use attiny 85 and LM35 for this code
@peterlorne70776 жыл бұрын
Nice video! What Mosfet did you use? / Peter
@yvesboivin87023 жыл бұрын
2N7000
@peterlorne70773 жыл бұрын
@@yvesboivin8702 Thank you. !! Have a nice sommer. / Peter
@ryandyc3 жыл бұрын
If you are running a program on your computer that gives CPU temps, could you use those values to communicate with the Arduino and drive the fan based on those values?
@isaacr11666 жыл бұрын
Hey @Jacob Dykstra, what resister are you using?
@alexgoldstein75534 жыл бұрын
Thanks big time!
@emiliodubois14336 жыл бұрын
Do you get sound from the transistor? Tried with a mosfet and the 2n2222 and both are doing a whistle when not at full speed.
@fischer16724 жыл бұрын
how can I do this with a water thermostat that has VCC (red), Ground (black), and Data (yellow)
@zakielharbour91372 жыл бұрын
Hi I only have a 2k thermistor which resistance would you recommend to put on the second resistance. Also, im using a NPN transistor so what resistance would you put before the gate
@Cornflakes6914 жыл бұрын
Amazing tutorial thank you! When would you use a PID controller for the PWM?
@SZMBudo6 жыл бұрын
Hey man i was wondering if you could help me out? a tutorial on using multiple pressure sensors (6) with each one using the same principle to control a fan each (with a scaling value). any tips?
@bigfilsing7 жыл бұрын
great tutorial Thanks
@truely506 жыл бұрын
Can someone tell me the components that you use? from what I see for many it is not clear to them. Thank you
@ahmedemad74847 жыл бұрын
hi another question can i apply this test with 3 phase ac compressor connected with inverter , and which type of transistor has been used in this test....thank you very much
@scottcowen40715 жыл бұрын
Can you run a 120v fan on this setup with a relay or does it take more hardware then that?
@VIRVL Жыл бұрын
Very Nice Jacob.. very good explained. THank you.. i am working on a Irrigation PRoject.. i will share it with you if you want.. i m. in to the nodemcu. and oled..
@AdnanSharifTripleFluffyOG3 жыл бұрын
what are you using for your external powersupply to the DC fan?
@josipkrajinovic62217 жыл бұрын
Nice video! But to get the min/max values of the sensor I'd rather use arduino constrain function.
@brtszczesny6 жыл бұрын
Do you have some plans to create video with DS18b20 ? And maybe how to control PWM fan (4 pins)
@artursspiridonovs47716 жыл бұрын
Very solid video. Any chance you know, how to set up a circuit, where a heater is turned on once temperature falls below a certain point and a cooler is turned on once it is over a certain threshold by using a thermistor?
@lennartweber15026 ай бұрын
I am a genuine rookie. That being said: Wouldn't u just need to replace the temperature resistor that lowers it's resistance the higher the temperature gets with one that increases its voltage the higher the temperature gets and otherwise use the same circuit?
@nadiashifudin38214 жыл бұрын
Hi, I'm doing a floor brush that will move circular, and the speed can be adjusted. Do u think this motor suit the model?
@DJJOAOMARTINS6 жыл бұрын
The noise with low voltage are OK for you? It seems it makes to many noise
@emiliodubois14336 жыл бұрын
Great video!!! I know this vid is almost a year old, but anyway, here is the question: If I want to control the fan with a potentiometer, the "output" part of the system, is it just the mosfet and the fan? Thanks in advance!
@jacobdykstra84996 жыл бұрын
Emilio Dubois that is correct
@bestgoprovideo6 жыл бұрын
Can you give me a list of the pieces that I need to build this setup?
@hectorgonzalez74165 жыл бұрын
I wanna just use the fan I wanna set a set time to turn on the fan and for a certain amount of time how would I do that
@snnwstt7 жыл бұрын
The Arduino Uno specs are 40 mA per pin other than 5V and GND, 200 mA total (other than 5V and DNG), 1 A max through 5V and GND. So if the motor draw more than 1A, the ground, of the Arduino, may be unable to sink that current?
@robmormile39113 жыл бұрын
Awesome mate. Exactly what I needed to add some fans to my tv cabinet. ps4 with a 5ch surround sound amp, heats up like a bitch.
@kivijs137 жыл бұрын
Hey, what do I need from all of this, if I want to control the fan Just from time, like 1min 25% the next 50% no temperature sensor. Just thes time intervals?
@ankushagarwal52987 жыл бұрын
kivijs13 just use delays.. Switch it on on 25% and put a 1 min delay, then on 50% and a 1 min delay.
@rodneygian126 жыл бұрын
Great video. Very insightful. I have a few questions though. Can the 2N7000 handle a 3.3V PWM? and Does it heat up significantly when load is connected? How much is V across collector and emitter? Thanks in advance
@jacobdykstra84996 жыл бұрын
Rodney Yrureta according to the datasheet the maximum gate threshold voltage for a 2n7000 is 3v so yes 3.3 should trigger the gate but it is pretty close, however, 3v is the max so it should be fine. The transistor does not heat up much under normal operation. It is a switching transistor so the voltage drop across it is pretty low. It should remain cool switching any current less than its 500mA pulsed rating.
@rodneygian126 жыл бұрын
Ow. great videos and fast response too. You are the man!! LOL maybe I can add a resistor before the transistor to lower it down or is it more advisable to find another trans? I'm trying to control with pwm a 12V at about 400mA.
@lawrence1md6 жыл бұрын
@ Jacob could you add a time or a step to this?
@saadali-qj5fg7 жыл бұрын
thanks
@memz966 жыл бұрын
did u use a 3 pin fan or 4pin?
@Inertia8885 жыл бұрын
Intel's PWM fan startup limit was, I think ~30%
@johnheather2037 жыл бұрын
Hey!! nice video could you please list all the parts used in the project? Thanks
@OurFavourite7 жыл бұрын
can you please tell me the cost of the fan you used in your experiment
@JohnSmith-td6dn6 жыл бұрын
Whew guy take a breath...
@belalshehadah66456 жыл бұрын
Can I connect a DS18B20 temperature sensor instead of the thermistor ??
@NimishSomani7 ай бұрын
00:01 Creating a temperature-controlled fan controller using an Arduino and a thermistor. 01:57 Arduino allows for flexible control of fan speeds based on temperature. 05:28 Explaining the circuit setup for controlling fan speed using MOSFET 07:10 Arduino Temperature Controlled Fan Speed Wiring 10:51 Setting up the sensor pin and voltage divider network. 12:44 Understanding the temperature sensor readings. 16:22 Pulse Width Modulation (PWM) controls fan speed based on sensor values. 17:57 Explaining the fan's power startup and operation with PWM. 21:17 PWM control allows fan speed adjustment based on temperature. 23:08 Using fan speed control based on temperature sensor readings. Crafted by Merlin AI.
@bitsurfer01015 жыл бұрын
What happens if you have an internal short on the MOSFET? Is that going to fry the Arduino?
@lukasmunster89083 жыл бұрын
Hi, can I use the same 5V pin from Arduino (the one that goes to MOSFETs gate) for fan powering (instead +12V in diagram, see scheme at 0:44 in video)? In other words, the 5V Arduino pin will be connected to MOSFET gate, MOSFET drain will be connected to negative fan wire, positive fan wire will be connected to 5V Arduino pin. Could this work or (i) should I include 10k resistor between 5V pin and MOSFET or (ii) should I use lower voltage 3.3V pin of Arduino to connect positive fan wire and sacrifice a bit of small 5V fan speed..?? Thanks for advise.
@YanusDV4 жыл бұрын
Great tutorial
@vallurisaiphani68455 жыл бұрын
can anyone tell me about the list of components that are to be used
@freemanfreed15815 жыл бұрын
what is the rated voltage of the fan ??? can you use home fan with 220V?
@miguelitojuntura69775 жыл бұрын
is it possible to set 3 points in pwm? i would like to set my fan in low med and high speed. Is there anyone who knows how? thank you in advance
@jeffbanfieldsflwr35372 жыл бұрын
If I wanted to get into this stuff, what classes should I take?
@alexisentonfire7 жыл бұрын
I understand that in this case your switching the circuit on and off from positive to ground as a percentage of being fully on But what about a 3 pinout fan, Im trying to control a fan that has 3 pins, ones vcc ones signal and the others ground, I tried proving the 12v and the ground but when I use the analogWrite to control pwm signal it doesnot work, can you explain this??
@brzydka_i_bestia6 жыл бұрын
Usually 3-pin fans have VCC, Ground and a speed output so the motherboard can determine how fast the fan spins. To do what you want you need a 4-pin fan. These have VCC, GND, speed out and pwm in. You can also just PWM the VCC coming into the fan.
@dmiha04076 жыл бұрын
the 4 pin fans wont work with arduino because they need at least 5MHz PWM
@Rasmus09096 жыл бұрын
No they dont. It's a 25 KHz PWM for a normal PC 4 pin fan. Intel has a document on this.
@mitchibbitson80405 жыл бұрын
well i plugged a fan into my arduino mate pos and neg 2 holes spare
@mohammedomer71555 жыл бұрын
the one that he has is also a 3 pin fan if u would look closely.
@ReflectingMe20247 жыл бұрын
Jacob - I am totally new to Arduino but something struck me and I am curious to ask you. Why do you use the PWM output of the Arduino rather than an analogue out to provide you with the 0-5v into the MOSFET? Would the fan be better controlled with an analogue 0-5v signal to control the 0-12v supply circuit?
@jacobdykstra84997 жыл бұрын
John Burns analog out on arduino is not true analog, it is pwm. It can be filtered into analog voltages but mosfets are really good with all the way on or off states and not in between. most likely the mosfet will latch into the full on state once the threshold voltage is reached.
@ReflectingMe20247 жыл бұрын
Thanks for the reply Jacob. I'm new to Arduino and when I wrote the initial reply I thought the Uno had analogue outputs - when really they're simply the digitised PWM outs as you say. I am thoroughly enjoying coding and learning - just managed an LM35 temp sensor thing, and am going to work on a huge (for me) project which will utilise some of what I learned watching your vid, so thanks for that.
@rapunzeleh5464 жыл бұрын
what am i missing here... i can get the thing to work with a transistor and 12v fan and a separate power supply for the fan. but i want to run the entire thing from a bank of 12v batteries that run my beehouse/hives etc. this is to turn on small fans to extract humidity from each hive in the winter when they're all insulated up. obviously i already have the stepdowns to go from 12 to 5vdc, but i just can't noodle the wiring for the 5vdc fan... it should be easier right? just set the value of the fan speed based on the output of the sensor pin, and.... and... that's the part i don't seem to get. if i just make two spliced wires so the 5vdc goes to the sensor and the fan, clearly it will run forever without the logic. so it has to go in and out of either the nano (want to keep everything small and cheap - multiple hives)
@farahbasaric40015 жыл бұрын
I have few questions: 1) if you are to use 5V fan, do you need to modify resistor values and if yes, what values should they be? 2) as I understand it, the type of transistor depends upon the voltage that I use to speed up the fan, and which one would I use for my case of 5V-fan? I would be really thankfull if someone answered me because I'm having this as my project and I can't find this information anywhere.
@timmundt52365 жыл бұрын
1) no. The resistors are only used to read a sensor value. But when using a 12V Fan you might need a bigger Mosfet or transistor 2)you can use almost any type of Mosfet e.g. the IRLB8743PBF but the Gate Threshold Voltage shouldnt be too big (2-4V)