Welcome! Log In Create A New Profile

Advanced

Which pins can I use for an extruder fan on RAMPS 1.4?

Posted by quillford 
Which pins can I use for an extruder fan on RAMPS 1.4?
August 09, 2015 02:22PM
I want to have the fan on my e3d only turn when it is above a certain temp. Which pins could I use?

Edited 1 time(s). Last edit at 08/09/2015 02:23PM by quillford.
Re: Which pins can I use for an extruder fan on RAMPS 1.4?
August 10, 2015 03:15AM
I am a beginner with 3D, but my understanding is that if you are needing pwm for the fan, then you would use the servo pins, as these are connected to pwm pins on the Arduino.

If you just need on / 0ff then you could use Aux 1. I am using the D57 pin on Aux1 to control an LED light when print is running, and turns off when print is completed.

If you are using Marlin, you would need something like this in the setup() :
	pinMode(58, OUTPUT);
	digitalWrite(58, LOW); // set the Aux pin used by LED to LOW = off

and then in your gcode file :
M42 P58 S0 ; turn the pin LOW ; = off
M42 P58 S255 ; turn the pin HIGH ; = on

Important - there is a current limit per pin ( I think around 20mA ) which is enough for a single LED. If you want to power more than that, connect the pin to an NPN transistor. You can run a 2N3904 NPN up to about 200mA ( although I personally would not go above 100mA ) and if you need more than that, connect the NPN to a relay ( use a flyback diode or you kill the Arduino ) or a logic level Mosfet ( activate with 5v low mA, control up to 40A ).

ps : if you are wanting to control the extruder cooling fan, please reconsider if it is a good idea ( as opposed to having the fan on all the time ).

Scenario : your system works great. What happens at the end of the print ?
gcode is finished, and your fan shuts down ? but the hot end is still hot and starts affecting the filament that is higher up in the extruder.

You would need to connect in such a way that the fan is, by default, always ON.

So when you turn on the power to the printer, then fan must come on.
Use the ramps pins to turn the fan off.
Use gcode or marlin to turn on / off during print when needed.
at the end of the print, the fan returns to its default On state.

Edited 1 time(s). Last edit at 08/10/2015 03:20AM by DaveOB.
Re: Which pins can I use for an extruder fan on RAMPS 1.4?
August 10, 2015 03:58AM
When you want to turn the fan on at a certain temperature, I found a simple and elegant module, without dealing with the Ramps/marlin config at all:

[www.ebay.de]

-Olaf
Re: Which pins can I use for an extruder fan on RAMPS 1.4?
August 11, 2015 04:27PM
I used a fan extender / adapter and ran 12V to the board from RAMPS. I then configured the advanced code in Marlin to use Pin 4 or 5 (can't remember which). The other pin I would like to use with dual fans over my motor drivers, but I am not quite there yet.
Sorry, only registered users may post in this forum.

Click here to login