| 1 |
ron |
1 |
/**
|
|
|
2 |
* Marlin 3D Printer Firmware
|
|
|
3 |
* Copyright (C) 2016 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 |
|
|
|
23 |
/**
|
|
|
24 |
* 3DRAG (and K8200 / K8400) Arduino Mega with RAMPS v1.4 pin assignments
|
|
|
25 |
*/
|
|
|
26 |
|
|
|
27 |
#ifndef BOARD_NAME
|
|
|
28 |
#define BOARD_NAME "3Drag"
|
|
|
29 |
#endif
|
|
|
30 |
|
|
|
31 |
#ifndef DEFAULT_MACHINE_NAME
|
|
|
32 |
#define DEFAULT_MACHINE_NAME "3Drag"
|
|
|
33 |
#endif
|
|
|
34 |
|
|
|
35 |
#ifndef DEFAULT_SOURCE_CODE_URL
|
|
|
36 |
#define DEFAULT_SOURCE_CODE_URL "http://3dprint.elettronicain.it/"
|
|
|
37 |
#endif
|
|
|
38 |
|
|
|
39 |
//
|
|
|
40 |
// Heaters / Fans
|
|
|
41 |
//
|
|
|
42 |
#define RAMPS_D8_PIN 9
|
|
|
43 |
#define RAMPS_D9_PIN 8
|
|
|
44 |
#define MOSFET_D_PIN 12
|
|
|
45 |
|
|
|
46 |
#define CASE_LIGHT_PIN -1 // MUST BE HARDWARE PWM but one is not available on expansion header
|
|
|
47 |
|
|
|
48 |
#include "pins_RAMPS.h"
|
|
|
49 |
|
|
|
50 |
//
|
|
|
51 |
// Limit Switches
|
|
|
52 |
//
|
|
|
53 |
#undef Z_MAX_PIN
|
|
|
54 |
#define Z_MAX_PIN -1
|
|
|
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 ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
|
|
|
80 |
#undef BEEPER_PIN
|
|
|
81 |
#define BEEPER_PIN -1
|
|
|
82 |
|
|
|
83 |
#undef LCD_PINS_RS
|
|
|
84 |
#undef LCD_PINS_ENABLE
|
|
|
85 |
#undef LCD_PINS_D4
|
|
|
86 |
#undef LCD_PINS_D5
|
|
|
87 |
#undef LCD_PINS_D6
|
|
|
88 |
#undef LCD_PINS_D7
|
|
|
89 |
#define LCD_PINS_RS 27
|
|
|
90 |
#define LCD_PINS_ENABLE 29
|
|
|
91 |
#define LCD_PINS_D4 37
|
|
|
92 |
#define LCD_PINS_D5 35
|
|
|
93 |
#define LCD_PINS_D6 33
|
|
|
94 |
#define LCD_PINS_D7 31
|
|
|
95 |
|
|
|
96 |
// Buttons
|
|
|
97 |
#undef BTN_EN1
|
|
|
98 |
#undef BTN_EN2
|
|
|
99 |
#undef BTN_ENC
|
|
|
100 |
#define BTN_EN1 16
|
|
|
101 |
#define BTN_EN2 17
|
|
|
102 |
#define BTN_ENC 23
|
|
|
103 |
|
|
|
104 |
#else
|
|
|
105 |
|
|
|
106 |
#define BEEPER_PIN 33
|
|
|
107 |
|
|
|
108 |
#endif // ULTRA_LCD && NEWPANEL
|
|
|
109 |
|
|
|
110 |
/**
|
|
|
111 |
* M3/M4/M5 - Spindle/Laser Control
|
|
|
112 |
*
|
|
|
113 |
* If you want to control the speed of your spindle then you'll have
|
|
|
114 |
* have to sacrifce the Extruder and pull some signals off the Z stepper
|
|
|
115 |
* driver socket.
|
|
|
116 |
*
|
|
|
117 |
* The following assumes:
|
|
|
118 |
* - the Z stepper driver socket is empty
|
|
|
119 |
* - the extruder driver socket has a driver board plugged into it
|
|
|
120 |
* - the Z stepper wires are attached the the extruder connector
|
|
|
121 |
*
|
|
|
122 |
* If you want to keep the extruder AND don't have a LCD display then
|
|
|
123 |
* you can still control the power on/off and spindle direction.
|
|
|
124 |
*
|
|
|
125 |
* Where to get spindle signals
|
|
|
126 |
*
|
|
|
127 |
* stepper signal socket name socket name
|
|
|
128 |
* -------
|
|
|
129 |
* SPINDLE_LASER_ENABLE_PIN /ENABLE O| |O VMOT
|
|
|
130 |
* MS1 O| |O GND
|
|
|
131 |
* MS2 O| |O 2B
|
|
|
132 |
* MS3 O| |O 2A
|
|
|
133 |
* /RESET O| |O 1A
|
|
|
134 |
* /SLEEP O| |O 1B
|
|
|
135 |
* SPINDLE_LASER_PWM_PIN STEP O| |O VDD
|
|
|
136 |
* SPINDLE_DIR_PIN DIR O| |O GND
|
|
|
137 |
* -------
|
|
|
138 |
*
|
|
|
139 |
* Note: Socket names vary from vendor to vendor
|
|
|
140 |
*/
|
|
|
141 |
#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are not good with 3DRAG
|
|
|
142 |
#undef SPINDLE_LASER_ENABLE_PIN
|
|
|
143 |
#undef SPINDLE_DIR_PIN
|
|
|
144 |
|
|
|
145 |
#if ENABLED(SPINDLE_LASER_ENABLE)
|
|
|
146 |
#if !EXTRUDERS
|
|
|
147 |
#undef E0_DIR_PIN
|
|
|
148 |
#undef E0_ENABLE_PIN
|
|
|
149 |
#undef E0_STEP_PIN
|
|
|
150 |
#undef Z_DIR_PIN
|
|
|
151 |
#undef Z_ENABLE_PIN
|
|
|
152 |
#undef Z_STEP_PIN
|
|
|
153 |
#define Z_DIR_PIN 28
|
|
|
154 |
#define Z_ENABLE_PIN 24
|
|
|
155 |
#define Z_STEP_PIN 26
|
|
|
156 |
#define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM
|
|
|
157 |
#define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup!
|
|
|
158 |
#define SPINDLE_DIR_PIN 48
|
|
|
159 |
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use
|
|
|
160 |
#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown!
|
|
|
161 |
#define SPINDLE_DIR_PIN 17
|
|
|
162 |
#endif
|
|
|
163 |
#endif
|