Prusa MINI Firmware overview
pins_ULTIMAIN_2.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  * Ultiboard v2.0 pin assignments
26  */
27 
28 /**
29  * Rev B 2 JAN 2017
30  *
31  * Added pin definitions for:
32  * M3, M4 & M5 spindle control commands
33  * case light
34  */
35 
36 #ifndef __AVR_ATmega2560__
37  #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
38 #endif
39 
40 #define BOARD_INFO_NAME "Ultimaker 2.x"
41 #define DEFAULT_MACHINE_NAME "Ultimaker"
42 #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
43 
44 //
45 // Limit Switches
46 //
47 #define X_STOP_PIN 22
48 #define Y_STOP_PIN 26
49 #define Z_STOP_PIN 29
50 
51 //
52 // Steppers
53 //
54 #define X_STEP_PIN 25
55 #define X_DIR_PIN 23
56 #define X_ENABLE_PIN 27
57 
58 #define Y_STEP_PIN 32
59 #define Y_DIR_PIN 33
60 #define Y_ENABLE_PIN 31
61 
62 #define Z_STEP_PIN 35
63 #define Z_DIR_PIN 36
64 #define Z_ENABLE_PIN 34
65 
66 #define E0_STEP_PIN 42
67 #define E0_DIR_PIN 43
68 #define E0_ENABLE_PIN 37
69 
70 #define E1_STEP_PIN 49
71 #define E1_DIR_PIN 47
72 #define E1_ENABLE_PIN 48
73 
74 #define MOTOR_CURRENT_PWM_XY_PIN 44
75 #define MOTOR_CURRENT_PWM_Z_PIN 45
76 #define MOTOR_CURRENT_PWM_E_PIN 46
77 // Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
78 #ifndef MOTOR_CURRENT_PWM_RANGE
79  #define MOTOR_CURRENT_PWM_RANGE 2000
80 #endif
81 #define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
82 
83 //
84 // Temperature Sensors
85 //
86 #define TEMP_0_PIN 8 // Analog Input
87 #define TEMP_1_PIN 9 // Analog Input
88 #define TEMP_BED_PIN 10 // Analog Input
89 
90 //
91 // Heaters / Fans
92 //
93 #define HEATER_0_PIN 2
94 #define HEATER_1_PIN 3
95 #define HEATER_BED_PIN 4
96 
97 #ifndef FAN_PIN
98  #define FAN_PIN 7
99 #endif
100 
101 #define ORIG_E0_AUTO_FAN_PIN 77
102 
103 //
104 // Misc. Functions
105 //
106 #define SDSS 53
107 #define SD_DETECT_PIN 39
108 #define LED_PIN 8
109 #define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered
110 #define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
111 
112 //
113 // LCD / Controller
114 //
115 #define BEEPER_PIN 18
116 
117 #define LCD_PINS_RS 20
118 #define LCD_PINS_ENABLE 15
119 #define LCD_PINS_D4 14
120 #define LCD_PINS_D5 21
121 #define LCD_PINS_D6 5
122 #define LCD_PINS_D7 6
123 
124 // Buttons are directly attached
125 #define BTN_EN1 40
126 #define BTN_EN2 41
127 #define BTN_ENC 19
128 
129 //
130 // M3/M4/M5 - Spindle/Laser Control
131 //
132 #if HAS_CUTTER // use the LED_PIN for spindle speed control or case light
133  #undef LED_PIN
134  #define SPINDLE_DIR_PIN 16
135  #define SPINDLE_LASER_ENA_PIN 17 // Pullup!
136  #define SPINDLE_LASER_PWM_PIN 8 // Hardware PWM
137 #else
138  #undef LED_PIN
139  #define CASE_LIGHT_PIN 8
140 #endif