Prusa MINI Firmware overview
pins_3DRAG.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4  *
5  * Based on Sprinter and grbl.
6  * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 /**
25  * 3DRAG (and K8200 / K8400) Arduino Mega with RAMPS v1.4 pin assignments
26  */
27 
28 #ifndef BOARD_INFO_NAME
29  #define BOARD_INFO_NAME "3Drag"
30 #endif
31 
32 #ifndef DEFAULT_MACHINE_NAME
33  #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
34 #endif
35 
36 #ifndef DEFAULT_SOURCE_CODE_URL
37  #define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
38 #endif
39 
40 //
41 // Heaters / Fans
42 //
43 #define RAMPS_D8_PIN 9
44 #define RAMPS_D9_PIN 8
45 #define MOSFET_D_PIN 12
46 
47 #define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header
48 
49 #include "pins_RAMPS.h"
50 
51 //
52 // Limit Switches
53 //
54 #undef Z_MAX_PIN
55 
56 //
57 // Steppers
58 //
59 #undef Z_ENABLE_PIN
60 #define Z_ENABLE_PIN 63
61 
62 //
63 // Heaters / Fans
64 //
65 #define HEATER_2_PIN 6
66 
67 //
68 // Misc. Functions
69 //
70 #undef SDSS
71 #define SDSS 25
72 
73 #undef SD_DETECT_PIN
74 #define SD_DETECT_PIN 53
75 
76 //
77 // LCD / Controller
78 //
79 #if BOTH(ULTRA_LCD, NEWPANEL)
80  #undef BEEPER_PIN
81 
82  #undef LCD_PINS_RS
83  #undef LCD_PINS_ENABLE
84  #undef LCD_PINS_D4
85  #undef LCD_PINS_D5
86  #undef LCD_PINS_D6
87  #undef LCD_PINS_D7
88  #define LCD_PINS_RS 27
89  #define LCD_PINS_ENABLE 29
90  #define LCD_PINS_D4 37
91  #define LCD_PINS_D5 35
92  #define LCD_PINS_D6 33
93  #define LCD_PINS_D7 31
94 
95  // Buttons
96  #undef BTN_EN1
97  #undef BTN_EN2
98  #undef BTN_ENC
99  #define BTN_EN1 16
100  #define BTN_EN2 17
101  #define BTN_ENC 23
102 
103 #else
104 
105  #define BEEPER_PIN 33
106 
107 #endif // HAS_SPI_LCD && NEWPANEL
108 
109 /**
110  * M3/M4/M5 - Spindle/Laser Control
111  *
112  * If you want to control the speed of your spindle then you'll have
113  * have to sacrifce the Extruder and pull some signals off the Z stepper
114  * driver socket.
115  *
116  * The following assumes:
117  * - the Z stepper driver socket is empty
118  * - the extruder driver socket has a driver board plugged into it
119  * - the Z stepper wires are attached the the extruder connector
120  *
121  * If you want to keep the extruder AND don't have a LCD display then
122  * you can still control the power on/off and spindle direction.
123  *
124  * Where to get spindle signals
125  *
126  * stepper signal socket name socket name
127  * -------
128  * SPINDLE_LASER_ENA_PIN /ENABLE O| |O VMOT
129  * MS1 O| |O GND
130  * MS2 O| |O 2B
131  * MS3 O| |O 2A
132  * /RESET O| |O 1A
133  * /SLEEP O| |O 1B
134  * SPINDLE_LASER_PWM_PIN STEP O| |O VDD
135  * SPINDLE_DIR_PIN DIR O| |O GND
136  * -------
137  *
138  * Note: Socket names vary from vendor to vendor
139  */
140 #undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are not good with 3DRAG
141 #undef SPINDLE_LASER_ENA_PIN
142 #undef SPINDLE_DIR_PIN
143 
144 #if HAS_CUTTER
145  #if !EXTRUDERS
146  #undef E0_DIR_PIN
147  #undef E0_ENABLE_PIN
148  #undef E0_STEP_PIN
149  #undef Z_DIR_PIN
150  #undef Z_ENABLE_PIN
151  #undef Z_STEP_PIN
152  #define Z_DIR_PIN 28
153  #define Z_ENABLE_PIN 24
154  #define Z_STEP_PIN 26
155  #define SPINDLE_LASER_PWM_PIN 46 // Hardware PWM
156  #define SPINDLE_LASER_ENA_PIN 62 // Pullup!
157  #define SPINDLE_DIR_PIN 48
158  #elif !BOTH(ULTRA_LCD, NEWPANEL) // use expansion header if no LCD in use
159  #define SPINDLE_LASER_ENA_PIN 16 // Pullup or pulldown!
160  #define SPINDLE_DIR_PIN 17
161  #endif
162 #endif
pins_RAMPS.h