Welcome! Log In Create A New Profile

Advanced

Add a fan into pin D9

Posted by eli1012 
Add a fan into pin D9
November 10, 2023 04:43AM
Hello I plug the pump into pin D9 and change the Configuration adv (It is a pump I want to work it like the fan, so just turn on and turn off), so I dont also need the condition about the temperature- this line:

#define EXTRUDER_0_AUTO_FAN_PIN 9 //for pin D9
#define EXTRUDER_1_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed


But after I tryed the command M106 S200 and also M106 P0 S200 in printrun it does nothing, shoud I change something in configuration.h?
I am a begginer so I dont know.

Thank you so much

Edited 1 time(s). Last edit at 11/10/2023 04:46AM by eli1012.
Re: Add a fan into pin D9
November 10, 2023 05:14AM
Auto fans are controlled by marlin, not the operator

The parameters are set with

#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed

EXTRUDER_0_AUTO_FAN turn on when the extruder 0 temperature is > EXTRUDER_AUTO_FAN_TEMPERATURE at EXTRUDER_AUTO_FAN_SPEED
Otherwise it is off


M106 is the g-code to control non auto fans

Edited 1 time(s). Last edit at 11/10/2023 05:30AM by Dust.
Re: Add a fan into pin D9
November 10, 2023 05:27AM
Oh thank you, so what I need to do, to control it with G code M106?
Re: Add a fan into pin D9
November 10, 2023 06:30AM
set #define EXTRUDER_0_AUTO_FAN_PIN -1 to disable the auto fan

Than you can control it with M106


the gcode controllable fan is on D9 by default on a RAMPS

Edited 1 time(s). Last edit at 11/10/2023 06:56AM by Dust.
Re: Add a fan into pin D9
November 10, 2023 07:01AM
I set it back to - 1, but how can I control the pin D9 now.
It does not work at all.

So I have the pump in D9. And change nothing in Marlin (the extruder auto has - 1)... What I shoud do to control the pump.
Sorry But I absolutely have no idea what to do.
Thank you
Re: Add a fan into pin D9
November 10, 2023 07:27AM
Need to see your configuration files. Please attach them

I suspect you have set something like #define MOTHERBOARD BOARD_RAMPS_14_EEB which disables the fan..

But it could be other things.

Edited 1 time(s). Last edit at 11/10/2023 08:24AM by Dust.
Re: Add a fan into pin D9
November 10, 2023 09:13AM
This are the configuration files...
I actually want the add there a peristaltic pump, it is a robot which works on Marvil same as 3D printer. So I want to control the pump with M106 and M107. I suppose it is the same for the fan

Edited 2 time(s). Last edit at 11/10/2023 09:23AM by eli1012.
Attachments:
open | download - Configuration.h (33.2 KB)
open | download - Configuration_adv.h (20.4 KB)
Re: Add a fan into pin D9
November 10, 2023 09:33AM
That is ancient code,

Seems to be from [bitbucket.org]

If you look in [bitbucket.org]
Lines 650 onwards you see

#if MOTHERBOARD == 33 || MOTHERBOARD == 35 || MOTHERBOARD == 67 || MOTHERBOARD == 68
    #define FAN_PIN            9 // (Sprinter config)
  #else
    #define FAN_PIN            4 // IO pin. Buffer needed
  #endif


Since you have #define MOTHERBOARD 34
then the FAN_PIN in this code is set to IO PIN 4


Which is basically what I guessed

From lines 60-61 in Configuration.h

// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)

34 disables stock fan pin. and uses D9 as extruder1 heater pin.

set #define MOTHERBOARD 33

Edited 4 time(s). Last edit at 11/10/2023 09:42AM by Dust.
Re: Add a fan into pin D9
November 10, 2023 09:48AM
Thank you so much
Sorry, only registered users may post in this forum.

Click here to login