Nothing to see here ... - Tag - Prusa i3A blog about hacking, programming, astronomy, and other unrelated stuff2022-05-09T07:27:03+02:00Jean-Christophe Ronaurn:md5:4aca13830534db85deafa89a62b675acDotclearAdding a fan to a Sanguinololu v1.3burn:md5:6f17d5324f1b524b5ccb2a77131ab3102014-09-14T14:24:00+02:002022-04-24T22:36:48+02:00JC3D PrintingPrusa i3RepRap<p>Few months ago, I completed the build of my <a href="http://reprap.org/wiki/Prusa_i3">RepRap Prusa i3</a>, and decided in the process to add a fan to it.</p>
<p><img src="http://blog.rona.fr/public/.fan_mounted_m.jpg" alt="fan_mounted.jpg" style="display:table; margin:0 auto;" title="fan_mounted.jpg, sept. 2014" /></p>
<p>There are several parts that can benefit from a fan, but since I'm exclusively printing PLA, I was mainly interested in cooling down the print itself. I easily found some nice fan mounts on <a href="http://www.thingiverse.com/">Thingiverse</a>, but I had some difficulties to find the fan connector of my Sanguinololu 1.3b. And for good reasons, since there is none. Well, not dedicated to a fan at least.</p> <p><br /></p>
<h4>A 5V to 12V PWM converter</h4>
<p>Here is a list of what I used to add a regular 12V PC chipset fan to you my Sanguinololu v1.3b (should work on v1.2 or superior) :</p>
<ol>
<li>A 2-pin 40mm 12V fan (3-pin should work too using the 12V and GND pins only)</li>
<li>An <a href="http://www.irf.com/product-info/datasheets/data/irlms2002.pdf">IRLMS2002 SMD MOSFET</a></li>
<li>A 10 kOhm SMD resistor</li>
<li>An <a href="http://www.onsemi.com/pub/Collateral/MBR0530T1-D.PDF">SMD Schottky diode</a></li>
<li>Three 2-pin connectors (one for the FAN, two for the Sanguinololu)</li>
<li>A piece of heat-shrink tube</li>
<li>Some wire</li>
<li>Some <a href="http://en.wikipedia.org/wiki/Kapton">Kapton</a></li>
</ol>
<p>The idea was to use the 5V PWM pin from the Sanguinololu to pilot the 12V fan. In order to do so, I used a simple MOSFET and a 10 kOhm pull-down resistor. I also added a flyback diode to the fan that the MOSFET is controlling. Of course, if you have a 5V fan, you just need the flyback diode.<br />
In order to have a nice connector for the fan and no piece of PCB hanging, I tried to fit everything inside the heat-shrink tube.</p>
<p>The schematic of the converter :
<a href="http://blog.rona.fr/public/Fan-Schematics.png"><img src="http://blog.rona.fr/public/.Fan-Schematics_m.png" alt="Fan-Schematics.png" style="display:table; margin:0 auto;" title="Fan-Schematics.png, sept. 2014" /></a>
<br />
<br /></p>
<h4>Building it</h4>
<p>I first soldered the diode directly on the 2-pin connector.</p>
<div align="center">
<p><a href="http://blog.rona.fr/public/IMG_20140317_113359.jpg"><img src="http://blog.rona.fr/public/.IMG_20140317_113359_m.jpg" alt="IMG_20140317_113359.jpg" title="IMG_20140317_113359.jpg, sept. 2014" /></a>
<a href="http://blog.rona.fr/public/IMG_20140317_115021.jpg"><img src="http://blog.rona.fr/public/.IMG_20140317_115021_m.jpg" alt="IMG_20140317_115021.jpg" title="IMG_20140317_115021.jpg, sept. 2014" /></a></p>
</div>
<p>Then I soldered two of the MOSFET Drain pins on the 2-pin connector GND pin (on the other side of the connector this time).
The blue paste was some nail polish I put to isolate the 12V pin, but it did not work as expected since the heat was melting the nail polish... Eventually, I had to use some Kapton instead, but this is not shown in the pictures.</p>
<p><a href="http://blog.rona.fr/public/IMG_20140317_151757.jpg"><img src="http://blog.rona.fr/public/.IMG_20140317_151757_m.jpg" alt="IMG_20140317_151757.jpg" style="display:table; margin:0 auto;" title="IMG_20140317_151757.jpg, sept. 2014" /></a></p>
<p>The last component needed was the pull-down resistor I soldered between the Gate and Source pins.</p>
<div align="center">
<p><a href="http://blog.rona.fr/public/IMG_20140317_172754.jpg"><img src="http://blog.rona.fr/public/.IMG_20140317_172754_m.jpg" alt="IMG_20140317_172754.jpg" title="IMG_20140317_172754.jpg, sept. 2014" /></a>
<a href="http://blog.rona.fr/public/IMG_20140317_172821.jpg"><img src="http://blog.rona.fr/public/.IMG_20140317_172821_m.jpg" alt="IMG_20140317_172821.jpg" title="IMG_20140317_172821.jpg, sept. 2014" /></a></p>
</div>
<p>Here is the final result with the protecting heat-shrink tube :</p>
<p><a href="http://blog.rona.fr/public/IMG_20140317_174624.jpg"><img src="http://blog.rona.fr/public/.IMG_20140317_174624_m.jpg" alt="IMG_20140317_174624.jpg" style="display:table; margin:0 auto;" title="IMG_20140317_174624.jpg, sept. 2014" /></a></p>
<p>To connect it to the Sanguinololu, I used two 2-pin connectors : one for the 12V and GND pins, and one for the D12 5V PWM pin (leaving one hole of the connector empty).<br />
It had be connected as follows :</p>
<p><img src="http://blog.rona.fr/public/Sanguinololu_connector.png" alt="Sanguinololu_connector.png" style="display:table; margin:0 auto;" title="Sanguinololu_connector.png, sept. 2014" />
<br />
<a href="http://blog.rona.fr/public/IMG_20140913_153431.jpg"><img src="http://blog.rona.fr/public/.IMG_20140913_153431_m.jpg" alt="IMG_20140913_153431.jpg" style="display:table; margin:0 auto;" title="IMG_20140913_153431.jpg, sept. 2014" /></a></p>
<p>I then printed these <a href="http://www.thingiverse.com/thing:168303">nice fan mount and duct</a> from Thingiverse, and mounted everything in place.</p>
<div align="center">
<p><a href="http://blog.rona.fr/public/IMG_20140913_153626.jpg"><img src="http://blog.rona.fr/public/.IMG_20140913_153626_m.jpg" alt="IMG_20140913_153626.jpg" title="IMG_20140913_153626.jpg, sept. 2014" /></a>
<a href="http://blog.rona.fr/public/IMG_20140913_153708.jpg"><img src="http://blog.rona.fr/public/.IMG_20140913_153708_m.jpg" alt="IMG_20140913_153708.jpg" title="IMG_20140913_153708.jpg, sept. 2014" /></a></p>
</div>
<p><br /></p>
<h4>Final touch</h4>
<p>From a software point of view, the fan needed to be enabled with the proper pin in the Sanguinololu firmware.
I'm using <a href="https://github.com/kliment/Sprinter">Sprinter</a> as firmware, so I had to edit Sprinter/pins.h, and replace</p>
<p><code>#define FAN_PIN -1</code></p>
<p>by</p>
<p><code>#define FAN_PIN 4 // D12 PWM pin</code></p>
<p>in the Sanguinololu pin assignment (MOTHERBOARD == 62).
<br /></p>
<p>Once the firmware rebuilt and flashed, I had a working fan mounted on my Prusa i3 !</p>