1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Smart fan control upgrade using RRD Fan Extender

Discussion in 'Mods and Upgrades' started by danzca6, Nov 13, 2016.

  1. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    I've been working on a few modification upgrades to my Robo R1 the last couple weeks. One thing I think we can all agree on is that fan noise on the Robos are loudest part of the printer. You turn on the printer and 3 fans turn on right away. You have the PSU fan, the hotend cooling fan, and the RAMPS cooling fan. I found a way to introduce smarter control of when those fans turn on.

    None of this is new and mysterious. Just something I found and did some research on to implement and I wanted to share with you all in case you wanted to do this as well. Won't make any difference in quality of prints of course, but might give you some peace if the fan noises get to you. I also like having the electronics work smarter not harder.

    First for the PSU, changing to a UI switching PSU of higher quality such as this Mean Well http://a.co/8trWjde. This PSU only turns the cooling fan on when needed. Makes for a far better noise experience when using the Robo. I also turned mine over so not all the fan noise echos through the Robo enclosure and bits of plastic don't fall into the fan from the main printing area.

    Second part of this upgrade is something cool I ran into when working with new Marlin 1.1.0 firmwares that I didn't stumble upon before with the Robo flavored Marlin firmwares, but it does exist in those as well. Using what is called an RRD Fan Extender for the RAMPS board, you can code smart controls around when and how the hotend cooling fan and the RAMPS cooling fan turn on using the servo pins on RAMPS board. For example, don't turn on the hotend cooling fan until it reaches 50C and only turn on at 80% power and turn off when the temp cools below 50C. Another is don't turn on the RAMPS cooling fan until a stepper motor has been moved and turn off after all steppers have been idle for a minute also with the ability to control the fan power.

    I know you can also upgrade to better quality fans that are bigger, quieter, or both. The stock 25mm fan for the hotend is a howling banshee. You can upgrade to a 30mm or even a 40mm if you want. With the bigger fans you can normally dial down the speed of the fan and still get as much air as the stock 25mm with less noise. For now, let's just focus on the stock fans.

    NOTE: This has been tested on a standard RAMPS 1.4 board found on the Beta and R1 models of the Robo and not on the newer R1+ customized RAMPS boards. The R1+ doesn't have the header pins installed for the servo control and I don't have one of those boards to test. Theoretically, you can solder in 3 4pin headers into the board and this will still work, but I have not been able to test. More than happy to work with someone with an R1+ that wants to try this or if someone has upgraded their R1+ board to a standard RAMPS 1.4 and would like to send me their old one I can try it out to see if it works.

    Parts Needed:
    RRD Fan Extender (~$6) - http://www.ebay.com/itm/330949831305
    2 ~4in 22awg wires for making a jumper
    3-1x2P Dupont Connector Housing Female (I bought an assortment) http://a.co/7GARjGi

    How it works (all pic are from the eBay sellers post and some modified by me):

    NOTE:
    before doing anything electrical on your printer, please unplug both the USB and power cord from the Robo during this installation process.

    Lower left of RAMPS board where PSU connections are. You can see there are 4 servo headers on the standard RAMPS D11, D6, D5, and D4. These are analog and can change the power for output from 0 to 255 instead of a digital 1 or 0 for on off. This gives us the ability to change the fan speed in the firmware that I will explain further in the guide.

    The RRD extender pictured below plugs directly into those pins. Then you take (or make) a short 4" or so wire jumper to go from the current two pins that the RAMPS cooling fan plugs into and plug that into the RRD extender (more pics of this below). CAUTION: the orientation of how you plug this jumper in matters and I will explain that below as well.
    servo pins.jpg

    Here is the RRD extender and the female connectors that plug into the RAMPS. Make sure to plug in where the RRD male pins are up and away from the RAMPS. That's pretty obvious because it would interfere with the stepper drivers if you plug it facing the other way.
    s-l500.jpg

    Here is a picture of it all wired up. Notice where the red and black wires of the jumper are on the RAMPS and on the RRD? I circled them in blue. There really should be markings on the RRD for +/- but mine didn't have them. So please note that on the RAMPS red is on top and black is on the bottom. On the RRD black is on top and red is on the bottom. This is the correct way for the RRD I bought. If it is reversed it will burn up the wire. So please be careful to hook these up correctly.
    RAMPS Jumper.jpg

    Here are the pins on the RRD. I colored the tips for red being + and black being -. The one that really matters is pins 1 and 2. The others will just run the fan in reverse if you have them backwards.

    1-negative from RAMPS board
    2-positive from RAMPS board
    3-positive from hotend cooling fan
    4-negative from hotend cooling fan
    5-positive from RAMPS cooling fan
    6-negative from RAMPS cooling fan
    s-l500 (1).jpg

    One thing I had to do was make a connector end for the hotend cooling fan since mine was just wired into the 5A power input along with the PSU. I have a decent set of crimpers and the parts for that, but if you just have a solder iron on maybe another dead fan laying around you could splice in the end connector from that spare fan and solder together and that will work just as well. Just be sure to use electrical tape, or shrink tubing, to isolate the bare wires from themselves.

    Firmware Changes:
    Now that you have it all hooked up. We then need to change the firmware. Now you first need to know what pics the RRD is using. The eBay listing for the one I got specifically called out "2 (PWM controllable) channels (D6/D11)". I have seen other installation guides out there using D5/D4. Depending on where you buy yours, it could very. Make sure to check so you know what to set it to in the firmware.

    In Configuration_adv.h there are two sections. One is for setup of the RAMPS cooling fan and the other is for the hotend cooling fan.

    RAMPS cooling fan: Notice the pin I changed it from -1 to 6 per the spec for my RRD. You can also define how long the steppers are disabled prior to turning it off. I kept the 60 second default. Finally there is power for the fan. I kept mine at full power, but when I install a larger fan with more CFM I may back that down to 200 or lower. One more thing to note is that heating the bed will also turn on this fan.
    Code:
    //This is for controlling a fan to cool down the stepper drivers
    //it will turn on when any driver is enabled
    //and turn off after the set amount of seconds from last driver being disabled again
    #define CONTROLLERFAN_PIN   6   //--ROBO-DANZ-RRD Set to 5 - Pin used for the fan to cool controller (-1 to disable)
    #define CONTROLLERFAN_SECS  60  //How many seconds, after all motors were disabled, the fan should run
    #define CONTROLLERFAN_SPEED 255 // == full speed
    Hotend cooling fan: Again, here we set the pin to 11 from - per the specs of my RRD. You can change the temp threshold to be whatever temp, I think 50C is enough for my taste. Finally the fan speed can be adjusted. You might be able to go a bit lower with the 25mm banshee fan, but just be careful. Once I install my 30mm fan I will probably go down to 200 power to reduce the noise even more since that fan has higher CFM.
    Code:
    /**
    * Extruder cooling fans
    *
    * Extruder auto fans automatically turn on when their extruders'
    * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
    *
    * Your board's pins file specifies the recommended pins. Override those here
    * or set to -1 to disable completely.
    *
    * Multiple extruders can be assigned to the same pin in which case
    * the fan will turn on when any selected extruder is above the threshold.
    */
    #define E0_AUTO_FAN_PIN 11  //--ROBO-DANZ-RRD Set to 4
    #define E1_AUTO_FAN_PIN -1
    #define E2_AUTO_FAN_PIN -1
    #define E3_AUTO_FAN_PIN -1
    #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
    #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
    That's it. Just compile and upload the new firmware and you are ready to do some testing. I would STRONGLY advise you do a quick power on test prior to buttoning everything up. If you wired the jumper wire backwards, you want to know right away and turn off. So keep your hand on the switch to turn off right away if needed. You'll know after a couple seconds. Not to scare anyone, just want you to be aware.

    I tested this by starting the printer up and using the manual controls on either the LCD controller if you have one or in the slicer program you use. First I moved one axis to make sure the RAMPS fan turned on and then turned off 60 seconds later. I then warmed up the hotend to 60C and made sure the hotend cooling fan turned on at 50C and then off when things cooled down under 50C. The direction the fans blew air was correct. Been printing this week with this mod in place and no issue. If you have any questions let me know. I debated about putting a video of the installation process together as well. If enough interest, I could do that I guess. Enjoy and cheers!
     
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    This is definitely a mod I would do to my printer when I'm done with all these other stupid upgrades I am currently working on. Just too many things on the plate.

    But I am very glad to see you write this up. Now what would be cool is to take a look at your rPi and config.yaml in ~\.octoprint and add some custom controls to play with the fans direct from OctoPrint! :D
     
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    If you think the fans on the Robo are loud... never hang out near a delta printer. Oh, boy... the steppers sing.
     
  4. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    Thanks. I was looking at a way I could open the the settings and control over to the LCD. Putting that control on OctoPrint sounds cool. I may have to look at that. Always looking for ways to tinker with the printer.
     
  5. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    No, but I have tried a variety of steppers.... from cheap to, well, not. All are noisy :)
     
  7. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    That link wasn't for a stepper, but a damper for steppers
     
  8. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    You might play with M43 to see if it can report the fan values
     
  9. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    Already have and yes it can
     

Share This Page