Home JGAurora A5 & A3S Modifications & Upgrades

FAN controlled by RRD Fan Extender

skysurferskysurfer Posts: 37🌟 Super Member 🌟
Hi,

i like to build in my A3S an driver coller controlled with an RRD Fan extender.
This Fan Extender will connected to the Servo's pin and will controlled with the pin D11 and D6.

I have a try behind me without really result.
The reason ...

I have made the changing according this page ... also in the firmware.
Then i made tests for it with the command M42 Px Sxxx.

When i send the command M42 P4 S255 ... i get no action from the fan. the same with P5.
When i send the command with P11 or P6 then the fan's are running ore can be stopped.

So i have think, i must change in the firmware the pin's to 11 and 6.
So i have done it and then it was no action by the fan's.

What is going wrong ?

Many thanks for the help.

«1

Comments

  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    edited July 2018
    There is a spare heater output on the MKS gen L. You can control a fan from there without needing the RRD fan extender

    Otherwise, perhaps you can post your firmware zip and we can check it?
    Post edited by Samuel Pinches on
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    Samuel, you mean D9 as spare heater output ?
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    Yes.
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    here the section from Configuration_adv.h

    /**

     * Controller Fan

     * To cool down the stepper drivers and MOSFETs.

     *

     * The fan will turn on automatically whenever any stepper is enabled

     * and turn off after a set period after all steppers are turned off.

     */

    //#define USE_CONTROLLER_FAN

    #if ENABLED(USE_CONTROLLER_FAN)

      #define CONTROLLER_FAN_PIN FAN1_PIN  // Set a custom pin for the controller fan

    Here is the question witch pin must be used (D11, D6, D5 or D4) and what ist number ?

      #define CONTROLLERFAN_SECS 60          // Duration in seconds for the fan to run after all motors are disabled

      #define CONTROLLERFAN_SPEED 255        // 255 == full speed

    #endif

    // When first starting the main fan, run it at full speed for the
    // given number of milliseconds.  This gets the fan spinning reliably
    // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
    //#define FAN_KICKSTART_TIME 100

    // This defines the minimal speed for the main fan, run in PWM mode
    // to enable uncomment and set minimal PWM speed for reliable running (1-255)
    // if fan speed is [1 - (FAN_MIN_PWM-1)] it is set to FAN_MIN_PWM
    //#define FAN_MIN_PWM 50

    // @section extruder

    /**
     * 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 -1
    #define E1_AUTO_FAN_PIN -1
    #define E2_AUTO_FAN_PIN -1
    #define E3_AUTO_FAN_PIN -1
    #define E4_AUTO_FAN_PIN -1
    #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
    #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed


  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    Ok, so which pin output do you want to use to control the fan?


  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    edited July 2018
    I can only use the red market Pins from the SERVOS connector.
    On the RRD Fan Extender is connected ro PIN D11 and D6.

    The reason behind is, i like to have fan for cooling the driver controlled (on/off) by the firmware when the motors are working and later the same for the extruder FAN when i have found an 12V FAN.
    I know that the A3S works with 24V, but for the 12V side i have an stepdown between.
    Actually i have taken the wire from 12/24V+ connector (one the left top side from the schematik) have splittet it to get the power.






    Post edited by skysurfer on
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    edited July 2018
    Ok, then yes, then for controller fan pin, you want to use "6" or "11". Lines that you need to change are in bold.

    The order that these pins are set is important to understand:

    1. First, the ID for each board is defined in boards.h:

    #define BOARD_MKS_GEN_L         53    // MKS GEN L

    2. Then, configuration.h sets the motherboard type:

    #define MOTHERBOARD BOARD_MKS_GEN_L

    3. The board ID of 53 is used in pins.h to load the right pin file 

    #elif MB(MKS_GEN_L)

      #include "pins_MKS_GEN_L.h"         // ATmega1280, ATmega2560

    4. Then the detailed pins file is loaded from pins_MKS_GEN_L.h, which in turn references the original RAMPS pinout.
    #define BOARD_NAME "MKS GEN L"
    // Power outputs EFBF or EFBE
    #define MOSFET_D_PIN 7
    #include "pins_RAMPS.h"

    5. the RAMPS pinout is loaded from pins_RAMPS.h, which defines the fan pins:
      #define IS_RAMPS_EFB
      #define FAN_PIN        RAMPS_D9_PIN
      #define HEATER_BED_PIN RAMPS_D8_PIN

    6. So at no point in this chain, is a controller or extruder fan defined. FAN1 is only used if you have a second nozzle, fan0 for nozzle 0, and fan1 for nozzle 1. Therefore, you can enable extra fans from configuration_adv.h safely:

    #define USE_CONTROLLER_FAN // <-- need to uncomment this line, this is the fan above stepper drivers

    #define CONTROLLER_FAN_PIN 6   // Set a custom pin for the controller fan

    #define E0_AUTO_FAN_PIN 11 // this is fan on the extruder cold end

    7. However, pin 6 and 11 are already set in pins_RAMPS.h,  so we need to go back and disable the functions that they are set for:

    #ifdef IS_RAMPS_13
      #define SERVO0_PIN        7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
    #else
      #define SERVO0_PIN       -1
    #endif
    #define SERVO1_PIN          -1
    #define SERVO2_PIN          5
    #ifndef SERVO3_PIN
      #define SERVO3_PIN        4
    #endif

    That should hopefully work...
    Post edited by Samuel Pinches on
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    Many thanks ... i am working on it and come back when ready
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    edited July 2018
    Hi Samuel,

    point 1 - 3 are all ok.

    But now i hang on point 4. i unstand not realy which file you mean.
    I think you mean the "pins.RAMPS.h" ?

    4. Then the detailed pins file is loaded, which in turn references the original RAMPS pinout.
    #define BOARD_NAME "MKS GEN L"
    // Power outputs EFBF or EFBE
    #define MOSFET_D_PIN 7
    #include "pins_RAMPS.h"

    My list from pins.RAMPS.h


    /**
     * Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
     *
     * Applies to the following boards:
     *
     *  RAMPS_14_EFB (Hotend, Fan, Bed)
     *  RAMPS_14_EEB (Hotend0, Hotend1, Bed)
     *  RAMPS_14_EFF (Hotend, Fan0, Fan1)
     *  RAMPS_14_EEF (Hotend0, Hotend1, Fan)
     *  RAMPS_14_SF  (Spindle, Controller Fan)
     *
     *  RAMPS_13_EFB (Hotend, Fan, Bed)
     *  RAMPS_13_EEB (Hotend0, Hotend1, Bed)
     *  RAMPS_13_EFF (Hotend, Fan0, Fan1)
     *  RAMPS_13_EEF (Hotend0, Hotend1, Fan)
     *  RAMPS_13_SF  (Spindle, Controller Fan)
     *
     *  Other pins_MYBOARD.h files may override these defaults
     *
     *  Differences between
     *  RAMPS_13 | RAMPS_14
     *         7 | 11
     */

    #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
      #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
    #endif

    #ifndef BOARD_NAME
      #define BOARD_NAME "RAMPS 1.4" << must i make here the change to "MKS GEN L" ?

    #endif

    The next point:
    >> // Power outputs EFBF or EFBE
    >> #define MOSFET_D_PIN 7
    >> #include "pins_RAMPS.h"

    i can not find it in the file pins.RAMPS.H

    Sorry for it, i hang now.



    Post edited by Samuel Pinches on
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    edited July 2018
    Sorry, I forgot to include some details: 
    4. is about pins_MKS_GEN_L.h
    5. is about pins_RAMPS.h.

    So the flow of the compilation is 
    boards.h -> configuration.h ->  pins.h -> pins_MKS_GEN_L.h -> pins_RAMPS.h

    The point of my explanation is that we need to check all these files for where the pins are defined.
    In this case, we need to change pins_RAMPS.h as 6 and 11 are already defined there.

    You do not need to change the board name - the MKS Gen L is based on the pinout of the RAMPS board. So this is already setup. But, this means that you need to also change the pins in pins_RAMPS.h to achieve the result you want.
    You do not need to change any files except 6. configuration_adv.h and 7. pins_RAMPS.h
    Post edited by Samuel Pinches on
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    edited July 2018
    i have made now a function test without any change in the firmware.

    with the comand M42 P6 S255 in can turn the fan and with M42 P6 S0 turn off. (now PWM)
    with the comand M42 P11 S255 and S0 the same as by pin 6, but here i can control also the speed with Sxxx between ca. 150 until 255. This depending on the fan i think.

    Now the question is ... what i must change in the firmware, that i can switch on/off the fan on PIN 6.

    It's not enough to work with point 6 - 7 ?

    #ifdef IS_RAMPS_13
      #define SERVO0_PIN        7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
           >>which pin i muste take ?

                    by the board schema under SERVO1 and 2 is no pin with 7

    #else
      #define SERVO0_PIN       -1
    #endif
    #define SERVO1_PIN          -1
    #define SERVO2_PIN          5          >> why 5 ? 

    #ifndef SERVO3_PIN
      #define SERVO3_PIN        4         >> why 4 ?

    #endif

    I am totaly confused :o:(
    Post edited by Samuel Pinches on
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    edited July 2018
    what is on pin 6? Controller fan, or extruder cold end fan? The only changes you need to do are the BOLD text in my post above. The rest is the original code, from the files for reference.
    Post edited by Samuel Pinches on
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    edited July 2018
    Sorry Samuel,
    this was a misstake in the time. As you have written your last message i was also on writting and have not seen your post.

    I check it again.

    Actually it's only planed an FAN for the driver on pin 6 (i think you means this with Controllr fan)... not more.
    PIN 11 i like to have free for the future. I don't know what is comming.

    I come back with the result.
    Post edited by skysurfer on
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    Ok! I am sorry if I have not been very clear. Hopefully this is making more sense for you now. Best of luck! :smile:

  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    Before i hat an misstake, for the planed fan i like the pin 11, because he have no PWM controll.

    So i have controll all and made the changes in "Configuration_adv.h"
    to >> CONTROLLER_FAN_PIN 11.

    As i written before, without firmware changing i could controll both connectors with the comand M42.

    Now, after update the firmware i can only controll the pin 6.
    On pin 11 i have no reaction.

    Is this normal, that then the PIN 11 is closed for external comands ?

  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    edited July 2018
    Have you changed pins_RAMPS.h?

    You need to change:
      #define SERVO0_PIN       11
    to
      #define SERVO0_PIN       -1
    Otherwise this pin is allocated to the servo0 function.
    Post edited by Samuel Pinches on
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    edited July 2018
    I haven't done it.
    But now it's done. I have set all #define servo to -1 loaded up and test it.
    The same as before.
    One pin 6 i have an action by pin 11 not.
    Post edited by skysurfer on
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    hmmm.... and when you move an axis, the fan does not turn on?
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    this i have testet  in this minutes.

    B)B)B) I'm very happy ...

    when i move the Y-Axis then the fan start ... then when i disable the motors, after ca. 60 sec. the fan stoped.

    The goal is reached.

    Many many thanks to you Samuel, for your help and patience

  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    This is a success - congratulations!  B) 

    Also, for helpful posts, there is always a “thanks” button at the top of posts.

    Happy printing!
    Thanked by 1skysurfer
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    now i must change the steps/mm, because the DRV8825 will be used with 1/32 steps.
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    That should be easier :)

    FYI: If you plan to keep the DRV8825 for a while, you may want to also look into salmon skinning and diode smoothers

    https://jgaurorawiki.com/a5/tlsmoothers
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    the first tests assembled looks good ... the X/Y/Z-axes run 100 mm when i say to run 100 mm.
  • skysurferskysurfer Posts: 37🌟 Super Member 🌟
    edited July 2018
    Hi Samuel,

    TL smoother are ordered
    and i hope this are the same smoother.

    I have read the articel about the TMC2208 driver and now i am looking for it to buy.
    Can i buy every TMC2208 driver ?
    Or do I have to pay attention to something special?
    I have seen that there are different drivers for TMC2208.
    Must i do something with this drivers ?
    e.g. cut some pins ?
    Or can i use it as i get it ?
    It's only the X, Y axes to replace ore also the X axis and extruder ?

    I hoppe you can help me.
    Post edited by skysurfer on
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    I am not an expert with the TMC drivers. But there are others on the forum who have tried the TMC2208 and report that it is easy to install.
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    We can definitely help you if you run into problems. 👍
  • Samuel PinchesSamuel Pinches Posts: 2,997Administrator
    The tmc2100 upgrade is a little more common:
    https://jgaurorawiki.com/a5/stepper-drivers
Sign In or Register to comment.