It’s done… The mighty Nano has been deployed in my TV cabinet, behind the Xbox One. The TMP36 thermistor is resting at the end of a cable on top of it. When the XB1 is turned on and the temp rises to 30 degrees, the fan kicks in, and will give a smooth stepping of speed up until 50 degrees, where the fan is maxed out. (I’m hoping I never get to this stage!!).
But, in the true spirit of tinkering, I’ve already got at least 3 improvements/changes that I want to put in to the next version!!
Firstly, the RPM calculation isn’t working properly, but that’s moot anyway, because I’ve got no way of showing what it is!
Secondly, the flashing LED is a bit pointless, because the on board one is bright enough, but in any case, it wouldn’t be needed if #1 is done.
Thirdly, I need to mount it properly, in a box.
I’ve done this before and obviously didnt learn my lesson. I copied the circuit onto the coppered side of the stripboard so I can mark the points to cut the tracks, and then did the cuts before I put the components on! But of course, when I turned the board over, its reversed everything!
Deep breath, and repeat: I’m a noob, I’m a noob…
I had to wait for the thermistor and other bits to arrive through the front door, so took some time to try and find some software to help mock up the stripboard layout. I found one for Windows 8.1, but its not perfect. I might just try to do it in Word or something. Anyway, the final bits arrived, and got installed into the breadboard, and amazingly, it WORKS!
Functionally, I measure the temp every few seconds, and map anything between 30 and 50 degrees to a duty cycle of 90 to 255 PWM output. (90 is about the slowest this fan will go). I’ll document the code in another post, when I’ve got a circuit to show. I do a bit of a trick with the constrain statement to get the transistor to kick in.
Ok, my first project is a replacement for a previous gadget I’d knocked up to cool my devices under my TV, as they are in a new cabinet with very little vertical headroom.
The current one just adjusts the voltage to the 12v PC fan with the aid of a variable resistor, and a thermistor. Set to the right value, the voltage to the fan increases to its startup level when the temp goes a few degrees above ambient.
My brief for my Arduino powered one is to use a PWM fan, and adjusting the ‘duty cycle’ based on the analogue input from the thermistor. Also, I wanted to add an LED for feedback, and a transistor to turn off the fan completely when the temperature is around room temp.
As you can see, I’m not there yet. Stay tuned.