Welcome! Log In Create A New Profile

Advanced

RUMBA FAN1 control

Posted by 3machine 
RUMBA FAN1 control
December 23, 2013 06:59AM
Hello,
I'm using Marlin firmware
I command FAN0 with M106/ M107
How can I control FAN1 (on pin 8)?
I added this in pins .H :


 /****************************************************************************************
* RUMBA pin assignment
*
****************************************************************************************/
#if MOTHERBOARD == 80
#define KNOWN_BOARD 1

#ifndef __AVR_ATmega2560__
 #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif

#define X_STEP_PIN         17
#define X_DIR_PIN          16
#define X_ENABLE_PIN       48
#define X_MIN_PIN          37
#define X_MAX_PIN          36

#define Y_STEP_PIN         54
#define Y_DIR_PIN          47
#define Y_ENABLE_PIN       55
#define Y_MIN_PIN          35
#define Y_MAX_PIN          34

#define Z_STEP_PIN         57
#define Z_DIR_PIN          56
#define Z_ENABLE_PIN       62
#define Z_MIN_PIN          33
#define Z_MAX_PIN          32

//to use Z_DUAL_STEPPER_DRIVER in Marlin
#define Z2_STEP_PIN        26
#define Z2_DIR_PIN         25
#define Z2_ENABLE_PIN      27
#define E0_STEP_PIN        23
#define E0_DIR_PIN         22
#define E0_ENABLE_PIN      24

//#define E1_STEP_PIN        26
//#define E1_DIR_PIN         25
//#define E1_ENABLE_PIN      27

#define E2_STEP_PIN        29
#define E2_DIR_PIN         28
#define E2_ENABLE_PIN      39

#define LED_PIN            13

#define FAN_PIN            7
//additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
#define FAN1_PIN           8
#define PS_ON_PIN          45
#define KILL_PIN           46

Any idea?
mrc
Re: RUMBA FAN1 control
December 24, 2013 06:59AM
Same question here, plus i want to use the third Extruder Connections for the light....
Re: RUMBA FAN1 control
December 24, 2013 08:09AM
Just use m42

eg "m42 p8 s255" should turn your fan1 full on. no need to add it to pins, unless your planning on writing your on gcode command

Same with the lights
#define HEATER_2_PIN 6 // EXTRUDER 3

so eg "m42 p6 s255" Just remember its 12v and about 6amp max for what ever lighting your using

s0 for off, and other s numbers for speeds/brightnesses as applicable
mrc
Re: RUMBA FAN1 control
December 24, 2013 09:55AM
Thank you, you really helped me out here.
Re: RUMBA FAN1 control
December 24, 2013 12:19PM
Thank you sooo much Dust smiling smiley
Re: RUMBA FAN1 control
December 31, 2013 07:40AM
Thanks Dust. This was helpful.
Re: RUMBA FAN1 control
February 14, 2014 01:03PM
And is there a way to set a default speed for Fan1 in firmware?

If not I can only think in adding a line on an auto0.g

Thanks
Re: RUMBA FAN1 control
February 24, 2015 01:03PM
Quote
Dust
Just use m42

eg "m42 p8 s255" should turn your fan1 full on. ...

Just a short note: If you use this code in Slic3r in the printer settings as a job start and end code, be sure to use capital letters like "M42 P8 S255". Marlin seems to ignore non-capital characters in the gcode file. Pronterface seems to translate it to capitals, but if you write directly to an SD card, the command will be ignored otherwise.

Otherwise of course a very useful hint! Thanks!
Sorry, only registered users may post in this forum.

Click here to login