Welcome! Log In Create A New Profile

Advanced

Marlin 2.0 + Ramps 1.4 need help with Fan Extension board

Posted by PHerbie 
Marlin 2.0 + Ramps 1.4 need help with Fan Extension board
April 15, 2023 01:37AM
Hi,

Can someone please help me to add an RRD Fan extender to my Ramps 1.4?

I have a Ramps 1.4 Board running Marlin 2.0.9.2. I have a printer with Extruder, Extruder fan and heatbed and so my mortherboard in Marlin is set as "BOARD_RAMPS_14_EFB". I also have a BL-Touch installed on Servo port D11.

All is working perfectly except now i would like to add a part cooling fan (and have it software controlled).
The part cooling fan is currently installed in my Bear extruder upgrade, but i am just switching it on or off manually. (unless i forget.....yuck).

I read that the only/best way to do that is to get an RRD Fan Extension board for Ramps. (if there's a better way, i am all ears).
So, I purchased this board. But it normally goes over all of the Servo pins and that is where the BL-Touch is installed, so that won't work for me.

I have read i can install the RRD Fan Extender board offset two pin steps to the right, so only covering the D5 & D4 pins and then use it that way. Then i guess i use either D5 or D4 to plug the fan into. Fan only has 2 pins, +ve and -ve.

So, firstly, is this correct? should i leave the BL-Touch where it is and install the fan extender board offset to the right so it only connects to D5 & D4 set of pins?

And then, Where do i need to tell Marlin that my part cooling fan is on D5? Where do i make that change?
(there seems to be lots of pins...h files and i am really confused as to which is the file i am using).

I also see there's a later update to Marlin, and i do intend to move to that at some stage. Not sure if i should do that before or after trying to get this part cooling fan fully operational.
But if it helps, i can do that prior to playing with the part cooling fan.

Any assistance would be greatly appreciated. (i am a bit of a newbie.....but this is how you learn).

Thanks
Re: Marlin 2.0 + Ramps 1.4 need help with Fan Extension board
April 15, 2023 08:34AM
With BOARD_RAMPS_14_EFB the part cooling fan is defined as #define FAN_PIN MOSFET_B_PIN ie D9

This is controlled with M106/M107 ie gcode, normally generated by you slicer.

So I'm rather confused by your description above... you already have a software controlled parts cooling fan

So let take a step back..

Fans 101:

Controller fan: cools the controller. can be setup to turn on automatically when stepper drivers or mosfets are enabled. See USE_CONTROLLER_FAN in Configuration_adv.h
Hotend fan: Cools the fins on the hotends to keep the cool end of the hotend cool. This is often wired directly to power, or can be set as a auto fan to turn on when hotend is > 50C See E0_AUTO_FAN_PIN in Configuration.h
Parts cooling fan: for cooling down freshly printed plastic This is always uses FAN_PIN. It is controlled via g-code generated by your slicer.

If your wanting a separate software controlled fan, you set it up as FAN1_PIN then you can control this with gcode M106 P1 S{speed}

Regarding the Fan expander, yes you can move it to the right 2 most pins and use D5 and D4


To use D5 as your part cooling fan you need to add #define FAN_PIN 5 to Your configuration.h , but then D9 is no longer doing anything

Edited 2 time(s). Last edit at 04/15/2023 08:41AM by Dust.
Re: Marlin 2.0 + Ramps 1.4 need help with Fan Extension board
April 15, 2023 07:03PM
Sorry for confusion.

I currently have an Extruder fan connected to D9 and working perfectly. That's fan is all good.

i am wanting to connect up my Part Cooling fan. and have that also software controlled (to turn on after first couple of layers).
Confusion is it exists but not currently connected to RAMPS. i am running it from an external power source.
So, as you describe the Parts Cooling Fan above, controlled by g-code generated from prusaslicer is what i want to do.

So from your explanation, i can install the Fan extruder offset to the right so that it is connected to D5 & D4. And then connect up my Part cooling fan to it. and that leaves my BL-Touch alone.
Thant's great, thanks.

Then if i just need to add the "#define FAN_PIN 5" to configuration.h, that should be easy.

I will give that a try.

Thanks for your help.
Re: Marlin 2.0 + Ramps 1.4 need help with Fan Extension board
April 18, 2023 03:43AM
ok. it's working. but i must say it has been a bit of a saga.

Firstly, thanks Dust for putting me on the right path.

As discussed, i connected the RRD Fan board over the RAMPS pins D5 & D4. And i connected 12v to it, And i connected my part cooling fan to the left 2 pins.
I then added "#define FAN1_PIN 5" to my Marlin configuration.h file. and flashed the printer. (that screwed the eprom settingsa...but that's another story, fixed that).

Then using pronterface i attempted to issue an M106 P1 S100. nothing. then M106 P1 s150, nothing. Then M106 P1 S255, nothing. I could not get it to work.Tried a different fan, nothing. Found 12v to run the fan in isolation, it's fine.

After a while, i pulled the fan and wired in a multimeter. Sure enough, nothing. Then i wired the multimeter to the RIGHT 2 pins on the board, and again nothing. Until i entered M106 P1 S255. it worked.
So, i reassembled it all and with pronterface M106 P1 S255 turns the fan on, any other "speed" e.g. M106 P1 S0 or M106 P1 S150 turns the fan off. (is that because it's a servo port???)
Not what i was expecting, i hoped to control the speed, but hey, it works. All or nothing, i can live with that.

Then i tried the fan settings in my PrusaSlicer. and i could not get the fan to turn on. Eventually editing the g-code file, i could see that prusaslicer was not issuing the M106 command.
Tried lots of settings and no luck. Googled it and i saw people saying i could add some custom g-code in the BEFORE_LAYER_CHANGE section.
So, again after a bit of trial and lots of error, i added the following line and i have finally got the part cooling fan doing what i wanted. e.i. automatically turning on after the first few layers.

I added this custom g-code (and some comment lines):
{if layer_num >=2}M106 P1 S255{endif}

I also added M106 P1 S0 to the end g-code to turn off the fan at the end of the print.

and, all that now does what i want. the fan auto turns on (at full speed) after the first few layers. Ideally i would like finer control of the fan speed, but not as important as having the fan auto-starting.

Thanks for your help
Re: Marlin 2.0 + Ramps 1.4 need help with Fan Extension board
July 05, 2023 12:25PM
Hi,
I am looking to get this extender working. I have a printer with 2 hotends and 2 part cooling fans. Marlin should switch from one fan to the other, depending on which nozzle is in use.

Have you looked at the FANMUX config lines in configuration.h ?

Maybe instead of feeding 12V into the board, feed it PWM 12V to get your fan speed? I'd assume the logic part of the chip is 5V

I am going to try and get this working with an SKR 1.4 Turbo by modifying the lines in configuration.h, not working yet. The pin definitions are different for the SKR.

/**
* Part-Cooling Fan Multiplexer
*
* This feature allows you to digitally multiplex the fan output.
* The multiplexer is automatically switched at tool-change.
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
*/
//#define FANMUX0_PIN -1
//#define FANMUX1_PIN -1
//#define FANMUX2_PIN -1
#define FANMUX0_PIN P1_00
#define FANMUX1_PIN P0_26
#define FANMUX2_PIN -1
Re: Marlin 2.0 + Ramps 1.4 need help with Fan Extension board
July 05, 2023 04:57PM
FANMUX is not what you think it is.


FAN0_PIN is used for extruder 0
FAN1_PIN is used for extruder 1
Sorry, only registered users may post in this forum.

Click here to login