Welcome! Log In Create A New Profile

Advanced

Assigning Pin D9

Posted by lol999 
Assigning Pin D9
May 13, 2021 12:50PM
Hi, new to forum and to Marlin so please be patient with me :-)
I am looking at a Marlin board to close a relay whilst running a cnc with a plasma cutter attached.
From my reading on the internet pin D9 (fan) seems to be the one people use for this sort of thing and use Grbl command M106/M107 to switch things on and off.

Where I'm falling down in my head with this sort of thing is this:

Exactly how do we assign pin D9 for such a task in Marlin?

How does say Lightburn know that the command M106 means to make pin D9 live?

Sorry for the noob questions, Laurence
Re: Assigning Pin D9
May 13, 2021 06:05PM
M106 is defined as enabling the fan. So whatever pin is defined as FAN_PIN in Marlin will be controlled by M106. By default on a RAMPS FAN_PIN is already defined as D9 (src/pins/ramps/pins_RAMPS.h) so there's nothing you need to do if that's the board you're using.
Re: Assigning Pin D9
May 14, 2021 02:41AM
Hi, and thanks for the reply. The board I am looking at would be something like the SKR V1.3, the demands of a plasma cutter in terms of processing power and rendering are minimal compared to say a laser.
3D Board

This appears to have a fan port so assigning in Marlin would be a matter of finding the SKR section in src/pins?

Thanks in advance, laurence
Re: Assigning Pin D9
May 14, 2021 01:29PM
Pretty much all boards supported by Marlin already have FAN_PIN configured appropriately. You just need to hook up whatever you need to the appropriate fan port on the motherboard and use M106 to control it. On the SKR 1.3 the defined fan pin is P2_03 (src/pins/lpc1768/pins_BTT_SKR_common.h line 92).
Re: Assigning Pin D9
May 14, 2021 03:27PM
many thanks!
Sorry, only registered users may post in this forum.

Click here to login