Welcome! Log In Create A New Profile

Advanced

Two slic3r controlled fans

Posted by hakimio 
Two slic3r controlled fans
March 30, 2015 04:57PM
I have Rambo board which has two PWM controlled outputs for two fans. I am using Marlin firmware and Slic3r Gcode generator. I have printed this bowden mount and attached two fans to it. Would it be possible to control the second fan using GCode instead of having it set to a fixed value without modifying Marlin firmware logic?
Re: Two slic3r controlled fans
April 02, 2015 04:47AM
These two are effectively a single fan. Just like the z-motors on a Prusa. I believe you should connect them in parallel to a single connector on the board so it controls both the same.


ShapeForger
Re: Two slic3r controlled fans
April 02, 2015 08:25AM
Thanks for your answer, krakadu. However, I have already modified Marlin to suit my needs. The modification was rather simple - just had to add pin definition in pins.h and call to analogWrite() function in planner.cpp.
Re: Two slic3r controlled fans
April 24, 2015 07:46PM
> Hakimo, can you describe a little what you did in pins.h and planner.cpp?

I use a rambo board and am trying to add an always on, 2nd fan to my set up. I have one already using FAN0 PIN #8. I want another which is always on for my e3d hotend. In pins.h for a rambo board, #301, in that section I see
#define FAN_PIN            8
would I simply add
#define FAN_PIN            6
(the fan pin i'd like to use for a secondary fan)?

Or would double definitions cause issues?

Then in planner.cpp I see:

#if FAN_PIN > -1
    if (FanSpeed != 0){
      analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
    }
#endif
  }
  if((DISABLE_X) && (x_active == 0)) disable_x();
  if((DISABLE_Y) && (y_active == 0)) disable_y();
  if((DISABLE_Z) && (z_active == 0)) disable_z();
  if((DISABLE_E) && (e_active == 0)) { 
    disable_e0();
    disable_e1();
    disable_e2(); 
  }
#if FAN_PIN > -1
  if((FanSpeed == 0) && (fan_speed ==0)) {
    analogWrite(FAN_PIN, 0);
  }

  if (FanSpeed != 0 && tail_fan_speed !=0) { 
    analogWrite(FAN_PIN,tail_fan_speed);
  }
#endif

Does that mean I don't need to add anything else?

Thanks for any help.
Re: Two slic3r controlled fans
April 24, 2015 08:02PM
If you want an always on fan, you don't have to modify planner.cpp.
In pins.h file you have to define FAN2_PIN. Add the following to pins.h:
#define FAN2_PIN           6
below your motherboard definition (Rambo)
#if MOTHERBOARD == 301
#define KNOWN_BOARD
Do NOT redefine FAN_PIN. Leave it alone.

In Configuration_adv.h file find the following line
#define EXTRUDER_0_AUTO_FAN_PIN -1
and change it to
#define EXTRUDER_0_AUTO_FAN_PIN FAN2_PIN

Now you can set the extruder's temperature which causes the fan to turn on (#define EXTRUDER_AUTO_FAN_TEMPERATURE 50) and speed of the fan (#define EXTRUDER_AUTO_FAN_SPEED 255) (255 means the fan will be running at 100% speed).

Edited 1 time(s). Last edit at 04/24/2015 08:03PM by hakimio.
Re: Two slic3r controlled fans
April 24, 2015 08:08PM
Thanks Hakimio,

Fast response! Unfortunately I don't have
#define EXTRUDER_0_AUTO_FAN_PIN -1
I believe I must have an older version of the firmware. Marlin_15 is what the filename is. I have an Airwolf 3D XL.

Is updating the firmware to a newer one, like 1.0.2, which I believe does have this support, a reasonable idea? Do i have to worry about things in that firmware being different or incompatible with my board?

Sorry, total newb here smiling smiley
Re: Two slic3r controlled fans
April 24, 2015 08:13PM
Did you check Configuration.h or Configuration_adv.h? It's pretty old setting which was there for a really long time. I am pretty sure even 1.0.0 had it.
Re: Two slic3r controlled fans
April 24, 2015 08:21PM
Yep, I have attached the version which was supplied by Airwolf. It looks to be 1.0.0...maybe they hacked out parts that weren't "relevant" ?

I also downloaded 1.0.2 and do abviously see this line etc...

So is upgrading the sensible thing to do?
Attachments:
open | download - MARLIN_XL_15.zip (206.2 KB)
Re: Two slic3r controlled fans
April 24, 2015 08:30PM
Yeah, I guess you'll have to upgrade. Just don't forget to copy printer settings from the old version.
Re: Two slic3r controlled fans
April 24, 2015 08:34PM
Thanks Hakimio, I will try and merge my info from the ofl firmware into the new one.

Just so I know, I shouldn't be worried about therer being new features in the new firmware that would cause damage to the board or printer right?

As long as I get all the printer specific settings copied over, motor steppings, PID values etc. I should be OK right?
Re: Two slic3r controlled fans
April 25, 2015 06:56AM
Yes, it should be ok.
Re: Two slic3r controlled fans
April 27, 2015 02:36PM
As an update, I successfully updated the firmware from the unknown, possibky gimped, possibly pre 1.0 version supplied by Airwolf to the newest 1.0.3 version found on github. I diffed the files and pulled over all the differences such as motor voltages, XYZ inversions, enstop settings etc....though I forgot to pull over the commented out endstops so the first print failed. But after I fixed that everything was fine. I think I may need to adjust the motor stepper values on the X and Y due to some not perfectly straight vertical walls on the 20mm test cube. I read somewhere that someone experienced a similar situation after changing to a different head. Could the difference in weight of the print head cause such a discrepancy?

Thanks for your help Hakimio.
Re: Two slic3r controlled fans
April 27, 2015 05:05PM
Quote
sventizzle
I think I may need to adjust the motor stepper values on the X and Y due to some not perfectly straight vertical walls on the 20mm test cube. I read somewhere that someone experienced a similar situation after changing to a different head.

If you are thinking about changing X or Y axis stepper motor steps/mm, don't. X and Y axis steps/mm have to be set to the values you get from Prusa calculator or your printer's manufacturer sets for you. That's not something you can calibrate.

Quote

Could the difference in weight of the print head cause such a discrepancy?

I don't think so. I would suggest to simply calibrate your extruder stepper motor steps/mm and extrusion multiplier in Slic3r.

Quote
sventizzle
Thanks for your help Hakimio.
You are welcome smiling smiley
Sorry, only registered users may post in this forum.

Click here to login