Advertisement
Guest User

Untitled

a guest
Oct 14th, 2015
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 25.45 KB | None | 0 0
  1. //固件修改更新QQ群:224981313
  2. //固件配套的3D打印机学习套件购买地址:http://item.taobao.com/item.htm?id=42916612391
  3. //网盘资料:http://yunpan.taobao.com/s/19pI3jQStOL
  4. //视频教程 - v1,v2版机型软件设置,自动调平
  5. //优酷地址:http://www.youku.com/playlist_show/id_23218776.html
  6. //视频教程 - v3版机型组装部分,即初八以后发货的组装视频
  7. //优酷地址:http://www.youku.com/playlist_show/id_23522533.html
  8.  
  9. #ifndef CONFIGURATION_H
  10. #define CONFIGURATION_H
  11.  
  12. //===========================================================================
  13. //==========================MICROMAKE 3D打印机配套固件 ======================
  14. //===========================================================================
  15. #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__
  16. #define STRING_CONFIG_H_AUTHOR "(MICROMAKE KOSSEL)"
  17.  
  18. #define SERIAL_PORT 0
  19.  
  20. //  串口通讯速率
  21. #define BAUDRATE 250000
  22.  
  23. //// 驱动板类型
  24. // 10 = Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
  25. // 11 = Gen7 v1.1, v1.2 = 11
  26. // 12 = Gen7 v1.3
  27. // 13 = Gen7 v1.4
  28. // 2  = Cheaptronic v1.0
  29. // 20 = Sethi 3D_1
  30. // 3  = MEGA/RAMPS up to 1.2 = 3
  31. // 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
  32. // 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
  33. // 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
  34. // 4  = Duemilanove w/ ATMega328P pin assignment
  35. // 5  = Gen6
  36. // 51 = Gen6 deluxe
  37. // 6  = Sanguinololu < 1.2
  38. // 62 = Sanguinololu 1.2 and above
  39. // 63 = Melzi
  40. // 64 = STB V1.1
  41. // 65 = Azteeg X1
  42. // 66 = Melzi with ATmega1284 (MaKr3d version)
  43. // 67 = Azteeg X3
  44. // 68 = Azteeg X3 Pro
  45. // 7  = Ultimaker
  46. // 71 = Ultimaker (Older electronics. Pre 1.5.4. This is rare)
  47. // 72 = Ultimainboard 2.x (Uses TEMP_SENSOR 20)
  48. // 77 = 3Drag Controller
  49. // 8  = Teensylu
  50. // 80 = Rumba
  51. // 81 = Printrboard (AT90USB1286)
  52. // 82 = Brainwave (AT90USB646)
  53. // 83 = SAV Mk-I (AT90USB1286)
  54. // 9  = Gen3+
  55. // 70 = Megatronics
  56. // 701= Megatronics v2.0
  57. // 702= Minitronics v1.0
  58. // 90 = Alpha OMCA board
  59. // 91 = Final OMCA board
  60. // 301= Rambo
  61. // 21 = Elefu Ra Board (v3)
  62.  
  63. #ifndef MOTHERBOARD
  64. #define MOTHERBOARD 33 //此处33为RAMPS 1.4扩展板类型
  65. #endif
  66.  
  67. //液晶屏显示的名字,不支持中文,此处作为新版本的版本号显示
  68. #define CUSTOM_MENDEL_NAME "UM v2.4"
  69.  
  70. // 定义挤出头的数量
  71. #define EXTRUDERS 1
  72.  
  73. //// 电源电压电流
  74. #define POWER_SUPPLY 1
  75.  
  76. //===========================================================================
  77. //====================MICROMAKE 3D打印机 三角洲结构配置======================
  78. //===========================================================================
  79. #define DELTA
  80.  
  81. // //减小这个数值,来缓解卡顿现象,如修改为120进行测试。
  82. #define DELTA_SEGMENTS_PER_SECOND 160
  83.  
  84. // 碳杆长度,从一端球中心到另一端球中心的距离 大小调整此参数
  85. #define DELTA_DIAGONAL_ROD 217.3// mm
  86.  
  87. // 打印头到滑杆水平距离 凹凸调整此参数
  88. #define DELTA_SMOOTH_ROD_OFFSET 151// mm
  89.  
  90. // 效应器球中心和打印头的水平距离
  91. #define DELTA_EFFECTOR_OFFSET 24.0 // mm
  92.  
  93. // 滑车球中心到滑杆水平距离
  94. #define DELTA_CARRIAGE_OFFSET 22.0 // mm
  95.  
  96. // 三角洲半径.(打印头到滑杆水平距离-效应器球中心和打印头的水平距离-滑车球中心到滑杆水平距离)
  97. #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET)
  98.  
  99. // 打印半径
  100. #define DELTA_PRINTABLE_RADIUS 100.0
  101.  
  102. #define SIN_60 0.8660254037844386
  103. #define COS_60 0.5
  104. #define DELTA_TOWER1_X -SIN_60*DELTA_RADIUS
  105. #define DELTA_TOWER1_Y -COS_60*DELTA_RADIUS
  106. #define DELTA_TOWER2_X SIN_60*DELTA_RADIUS
  107. #define DELTA_TOWER2_Y -COS_60*DELTA_RADIUS
  108. #define DELTA_TOWER3_X 0.0
  109. #define DELTA_TOWER3_Y DELTA_RADIUS
  110.  
  111. #define DELTA_DIAGONAL_ROD_2 pow(DELTA_DIAGONAL_ROD,2)
  112.  
  113. //===========================================================================
  114. //========================MICROMAKE 3D打印机 传感器设置======================
  115. //===========================================================================
  116.  
  117. //配置传感器,根据挤出机个数来配置连接传感器数量。如果只有1个挤出机,则只需要开启传感器0接口和热床接口即可。
  118. #define TEMP_SENSOR_0 5 //设置传感器0接口连接的传感器类型编号,类型根据上面说明设置相应的编号
  119. #define TEMP_SENSOR_1 0
  120. #define TEMP_SENSOR_2 0  //设置传感器2接口连接的传感器编号,0表示关闭该端口
  121. #define TEMP_SENSOR_BED 0 //设置热床传感器端口连接的传感器类型。该项如果设置错误将影响加热床温度控制
  122. //添加热床支持只需将#define TEMP_SENSOR_BED 处0设置为5即可
  123.  
  124. //这里用传感器1来做传感器0的冗余。如果两个传感器温度差较大,将停止打印。
  125. //#define TEMP_SENSOR_1_AS_REDUNDANT  //设置传感器1作为冗余传感器。
  126. #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10, //设置温度最大差值
  127.  
  128. // 打印之前通过M109检查当前温度已经接近设置温度,并等待N秒作为缓冲。
  129. #define TEMP_RESIDENCY_TIME 10  // 设置达到设置温度后等待时间,单位秒
  130. #define TEMP_HYSTERESIS 3       //设置离设置温度的浮动范围
  131. #define TEMP_WINDOW     1      
  132.  
  133. //最低温度低于N时,加热头将不会工作。该功能确保温度传感器连接或配置错误时不会烧毁设备。
  134. //检查热敏电阻是否正常。
  135. //如果热门电阻工作不正常,将使加热头电源一直工作。这是非常危险的。
  136.  
  137. #define HEATER_0_MINTEMP 5 //设置加热头0的最小温度,一般设置成室内最低温度比较好。因为开机时应该测量到的是室温。
  138. #define HEATER_1_MINTEMP 5
  139. #define HEATER_2_MINTEMP 5
  140. #define BED_MINTEMP 5
  141.  
  142. //当温度超过最大设置值,加热头会自动关闭。
  143. //该项配置是为了保护你的设备,避免加热温度过高产生以外。但不能防止温度传感器非正常工作的情况。
  144. //你应该使用MINTEMP选项来保证温度传感器短路或损坏时的设备安全。
  145. #define HEATER_0_MAXTEMP 275 //挤出头0 最大保护温度
  146. #define HEATER_1_MAXTEMP 275
  147. #define HEATER_2_MAXTEMP 275
  148. #define BED_MAXTEMP 120 //热床最大保护温度
  149.  
  150. //如果你的热床电流较大,你可以通过设置占空比的方式降低电流,这个值应该是个整数,数字越大,电流越小。
  151. //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4
  152.  
  153. //如果你想用M105命令来显示加热器的功耗,需要设置下面两个参数
  154. //#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
  155. //#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
  156.  
  157. //PID设置
  158. #define PIDTEMP
  159. #define BANG_MAX 255
  160. #define PID_MAX 255
  161. #ifdef PIDTEMP
  162.   #define PID_FUNCTIONAL_RANGE 10
  163.   #define PID_INTEGRAL_DRIVE_MAX 255
  164.   #define K1 0.95
  165.   #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0))
  166.     #define  DEFAULT_Kp 22.2
  167.     #define  DEFAULT_Ki 1.08
  168.     #define  DEFAULT_Kd 114
  169. #endif
  170.  
  171. #define MAX_BED_POWER 255 //通过占空比方式限制热床的最大功率,255表示不限制
  172. #ifdef PIDTEMPBED
  173.     #define  DEFAULT_bedKp 10.00
  174.     #define  DEFAULT_bedKi .023
  175.     #define  DEFAULT_bedKd 305.4
  176. #endif
  177.  
  178. //为了防止加热头未开启时的冷挤出,这里设置当加热头温度未达到N时不允许挤出操作执行。(M302指令可以解除冷挤出限制)
  179. #define PREVENT_DANGEROUS_EXTRUDE
  180. #define PREVENT_LENGTHY_EXTRUDE
  181.  
  182. #define EXTRUDE_MINTEMP 175//设置挤出头运行的最低温度
  183. #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //避免非常长的挤出操作
  184.  
  185. //===========================================================================
  186. //============================= 机械方面设置 ================================
  187. //===========================================================================
  188.  
  189. // #define COREXY //取消前面的注释可以期待用corexy运动系统
  190.  
  191. // 限位开关设置
  192. #define ENDSTOPPULLUPS  //将上面参数用“//”注释掉,将禁用限位开关的上拉电阻。该配置是全局配置,不用该参数可以用下面单独设置是否开启上拉电阻
  193.  
  194. #ifndef ENDSTOPPULLUPS
  195.  //分别对限位开关单独设置上拉电阻。如果ENDSTOPPULLUPS被定义,该配置将被忽略
  196.   // #define ENDSTOPPULLUP_XMAX
  197.   // #define ENDSTOPPULLUP_YMAX
  198.   // #define ENDSTOPPULLUP_ZMAX
  199.   // #define ENDSTOPPULLUP_XMIN
  200.   // #define ENDSTOPPULLUP_YMIN
  201.   // #define ENDSTOPPULLUP_ZMIN
  202. #endif
  203.  
  204. #ifdef ENDSTOPPULLUPS
  205.   #define ENDSTOPPULLUP_XMAX
  206.   #define ENDSTOPPULLUP_YMAX
  207.   #define ENDSTOPPULLUP_ZMAX
  208.   #define ENDSTOPPULLUP_XMIN
  209.   #define ENDSTOPPULLUP_YMIN
  210.   #define ENDSTOPPULLUP_ZMIN
  211. #endif
  212.  
  213. //如果你使用机械式的限位开关,并且接到了信号和GND两个接口,那么上面的上拉配置需要打开
  214. //配置3个轴的限位开关类型的,配置为true,限位开关应该接常开端子。如果你接常闭端子,则将true改为false
  215. //设置为true来颠倒限位开关逻辑值。如果设置为true时,限位开关实际的开/合与检测相反,则将该参数配置为false
  216. const bool X_MIN_ENDSTOP_INVERTING = false;
  217. const bool Y_MIN_ENDSTOP_INVERTING = false;
  218. const bool Z_MIN_ENDSTOP_INVERTING = false;
  219. const bool X_MAX_ENDSTOP_INVERTING = false;
  220. const bool Y_MAX_ENDSTOP_INVERTING = false;
  221. const bool Z_MAX_ENDSTOP_INVERTING = false;
  222. //#define DISABLE_MAX_ENDSTOPS
  223. //#define DISABLE_MIN_ENDSTOPS
  224.  
  225. //为了挡块检查程序的兼容性禁用最大终点挡块
  226. #if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
  227.   #define DISABLE_MAX_ENDSTOPS
  228. #endif
  229.  
  230. //设置步进电机使能引脚的电平。(4988模块保持0即可)
  231. #define X_ENABLE_ON 0
  232. #define Y_ENABLE_ON 0
  233. #define Z_ENABLE_ON 0
  234. #define E_ENABLE_ON 0 // 针对所有挤出机有效
  235.  
  236. //当哪个轴不运动时是否关闭电机。(注意:如果这里打开将会使电机在不使用时被锁止,而导致电机温度急剧上升)
  237. #define DISABLE_X false
  238. #define DISABLE_Y false
  239. #define DISABLE_Z false
  240. #define DISABLE_E false //针对所有挤出机有效
  241.  
  242. //电机运动方向控制。由于电机连线不同,电机的运动方向也不同,但打印机的0点位置在左下角,如果电机的运动方向
  243. //与控制方向不同,则可以将下面参数值true和false对调,也可以将步进电机的4根线反过来插。
  244. #define INVERT_X_DIR true    // (X轴配置)
  245. #define INVERT_Y_DIR true    // (Y轴配置)
  246. #define INVERT_Z_DIR true    // (Z轴配置)
  247. #define INVERT_E0_DIR false   //  (挤出机0配置)
  248. #define INVERT_E1_DIR false   // (挤出机1配置)
  249. #define INVERT_E2_DIR false   // (挤出机2配置)
  250.  
  251. //停止开关设置
  252. //设置回0时,电机的运动方向。1最大限位方向,-1最小限位方向。一般都是设置为-1
  253. #define X_HOME_DIR 1
  254. #define Y_HOME_DIR 1
  255. #define Z_HOME_DIR 1
  256. //软限位开关设置
  257. #define min_software_endstops false //最小值设置,如果设置为true,则移动距离<HOME_POS值
  258. #define max_software_endstops true  //最大值设置,如果设置为true,轴不会移动到坐标大于下面定义的长度。
  259.  
  260. //各轴的软件限位值
  261. #define X_MAX_POS DELTA_PRINTABLE_RADIUS
  262. #define X_MIN_POS -DELTA_PRINTABLE_RADIUS
  263. #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
  264. #define Y_MIN_POS -DELTA_PRINTABLE_RADIUS
  265. #define Z_MAX_POS MANUAL_Z_HOME_POS
  266. #define Z_MIN_POS 0
  267.  
  268. #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
  269. #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
  270. #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
  271. //================= MICROMAKE 3D打印机 自动调平配置 ====================
  272.  
  273. #define ENABLE_AUTO_BED_LEVELING // 是否开启自动调平功能
  274.  
  275. #ifdef ENABLE_AUTO_BED_LEVELING
  276.  
  277.  
  278.   #define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS-50)//此处设置为调平探针移动范围,增大调平范围减少“-50”这个值,减少调平范围增大“-50”这个值
  279.   //如:#define DELTA_PROBABLE_RADIUS (DELTA_PRINTABLE_RADIUS-60)
  280.  
  281.   #define LEFT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
  282.   #define RIGHT_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
  283.   #define BACK_PROBE_BED_POSITION DELTA_PROBABLE_RADIUS
  284.   #define FRONT_PROBE_BED_POSITION -DELTA_PROBABLE_RADIUS
  285.  
  286.   #define X_PROBE_OFFSET_FROM_EXTRUDER 0.0
  287.   #define Y_PROBE_OFFSET_FROM_EXTRUDER 0.0
  288.   #define Z_PROBE_OFFSET_FROM_EXTRUDER 0.5//自动调平设置 过高减小 过低增大
  289.  
  290.   #define Z_RAISE_BEFORE_HOMING 4       // 配置回原点前Z轴升起的高度,该高度要确保在Z轴最大高度范围内。
  291.  
  292.   #define XY_TRAVEL_SPEED 2000         //执行自动调平移动的速度,增大速度增加,减小速度降低
  293.  
  294.   #define Z_RAISE_BEFORE_PROBING 80  ////经过第一个检测点前Z轴抬起的高度,该高度要确保调平传感器可以正常放下。
  295.   #define Z_RAISE_BETWEEN_PROBINGS 5  //经过下一个检测点前Z轴抬起的高度
  296.  
  297.   #define Z_SAFE_HOMING  
  298.   #ifdef Z_SAFE_HOMING
  299.  
  300.     #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)  
  301.     #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)  
  302.  
  303.   #endif
  304.  
  305.  
  306.   #define ACCURATE_BED_LEVELING
  307.   #ifdef ACCURATE_BED_LEVELING
  308.     #define ACCURATE_BED_LEVELING_POINTS 3 //自动调平探头点点数 3为横竖向各点3个点,共9点,改为6就是横竖向各点6个点,共36个点。
  309.     #define ACCURATE_BED_LEVELING_GRID_X ((RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION) / (ACCURATE_BED_LEVELING_POINTS - 1))
  310.     #define ACCURATE_BED_LEVELING_GRID_Y ((BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION) / (ACCURATE_BED_LEVELING_POINTS - 1))
  311.     #define NONLINEAR_BED_LEVELING
  312.   #endif
  313.  
  314. #endif
  315.  
  316. //归位开关设置
  317. #define MANUAL_HOME_POSITIONS  //如果开启该配置,下面 MANUAL_*_HOME_POS配置将生效
  318. #define BED_CENTER_AT_0_0  //如果开启该配置,热床的中心位置在(X=0, Y=0)
  319.  
  320. //手动回零开关的位置:
  321. //对于三角洲结构这意味着笛卡尔打印机的顶部和中心的值。
  322. #define MANUAL_X_HOME_POS 0
  323. #define MANUAL_Y_HOME_POS 0
  324. #define MANUAL_Z_HOME_POS 200//306.6 // Z轴高度设置
  325. //因每台机器安装会有差别,需自行测量,测量方法请查看配套视频教程,设置完后后记得保持修改
  326.  
  327. //轴设置
  328. #define NUM_AXIS 4 //轴的数量,各轴的配置是顺序是X, Y, Z, E
  329. #define HOMING_FEEDRATE {60*60, 60*60, 60*60, 0}  //配置归位时的速度
  330.  
  331. #define XYZ_FULL_STEPS_PER_ROTATION 200 //步进电机每周的步数,即360/步进电机上的角度
  332. //如1.8度,步数应该是360/1.8=200;如果是0.9度电机的话就是 360/0.9=400。27号以前购买的用户请修改为400,27号以后的用户请修改为200。
  333. #define XYZ_MICROSTEPS 16 //步进驱动的细分数
  334. #define XYZ_BELT_PITCH 2 //同步带齿间距
  335. #define XYZ_PULLEY_TEETH 16 //同步轮齿数
  336. #define XYZ_STEPS (XYZ_FULL_STEPS_PER_ROTATION * XYZ_MICROSTEPS / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))
  337. //这是计算公式:步进电机数*步进驱动的细分数/同步带齿间距/同步轮齿数
  338.  
  339. #define DEFAULT_AXIS_STEPS_PER_UNIT   {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 150}   //挤出机挤出量
  340. #define DEFAULT_MAX_FEEDRATE          {200, 200, 200, 200}  
  341. #define DEFAULT_MAX_ACCELERATION      {3000,3000,3000,3000}    
  342.  
  343. //加速度配置,假如打印时失步太大,可以将这个值改小
  344. #define DEFAULT_ACCELERATION          3000    
  345. #define DEFAULT_RETRACT_ACCELERATION  3000  
  346.  
  347. //各轴不需要加速的距离,即无需加速,立即完成的距离(即软件认为他可以在瞬间完成的)
  348. #define DEFAULT_XYJERK                20.0  
  349. #define DEFAULT_ZJERK                 20.0    
  350. #define DEFAULT_EJERK                 20.0  
  351.  
  352. //===========================================================================
  353. //===============================附加功能====================================
  354. //===========================================================================
  355. //以下内容暂未汉化,后续会持续汉化更新,欢迎加入我们的交流QQ群:224981313
  356. //感谢您的支持,也欢迎更多朋友可以持续补充,完善,欢迎散播复制,尊重劳动者,使用发布请注明出处。
  357. // EEPROM
  358. // The microcontroller can store settings in the EEPROM, e.g. max velocity...
  359. // M500 - stores parameters in EEPROM
  360. // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
  361. // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
  362. //define this to enable EEPROM support
  363. //#define EEPROM_SETTINGS
  364. //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
  365. // please keep turned on if you can.
  366. #define EEPROM_CHITCHAT
  367.  
  368. // Preheat Constants
  369. #define PLA_PREHEAT_HOTEND_TEMP 180
  370. #define PLA_PREHEAT_HPB_TEMP 70
  371. #define PLA_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
  372.  
  373. #define ABS_PREHEAT_HOTEND_TEMP 240
  374. #define ABS_PREHEAT_HPB_TEMP 100
  375. #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
  376.  
  377. //LCD and SD support
  378. //#define ULTRA_LCD  //general LCD support, also 16x2
  379. //#define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
  380. //#define SDSUPPORT // Enable SD Card Support in Hardware Console
  381. //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
  382. //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
  383. //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
  384. //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
  385. //#define ULTIPANEL  //the UltiPanel as on Thingiverse
  386. //#define LCD_FEEDBACK_FREQUENCY_HZ 1000    // this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
  387. //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
  388.  
  389. // The MaKr3d Makr-Panel with graphic controller and SD support
  390. // http://reprap.org/wiki/MaKr3d_MaKrPanel
  391. //#define MAKRPANEL
  392.  
  393. // The RepRapDiscount Smart Controller (white PCB)
  394. // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
  395. #define REPRAP_DISCOUNT_SMART_CONTROLLER
  396.  
  397. // The GADGETS3D G3D LCD/SD Controller (blue PCB)
  398. // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
  399. //#define G3D_PANEL
  400.  
  401. // The RepRapDiscount FULL GRAPHIC Smart Controller (quadratic white PCB)
  402. // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
  403. //
  404. // ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
  405. //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  406.  
  407. // The RepRapWorld REPRAPWORLD_KEYPAD v1.1
  408. // http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
  409. //#define REPRAPWORLD_KEYPAD
  410. //#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // how much should be moved when a key is pressed, eg 10.0 means 10mm per click
  411.  
  412. // The Elefu RA Board Control Panel
  413. // http://www.elefu.com/index.php?route=product/product&product_id=53
  414. // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARUDINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
  415. //#define RA_CONTROL_PANEL
  416.  
  417. //automatic expansion
  418. #if defined (MAKRPANEL)
  419.  #define DOGLCD
  420.  #define SDSUPPORT
  421.  #define ULTIPANEL
  422.  #define NEWPANEL
  423.  #define DEFAULT_LCD_CONTRAST 17
  424. #endif
  425.  
  426. #if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  427.  #define DOGLCD
  428.  #define U8GLIB_ST7920
  429.  #define REPRAP_DISCOUNT_SMART_CONTROLLER
  430. #endif
  431.  
  432. #if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  433.  #define ULTIPANEL
  434.  #define NEWPANEL
  435. #endif
  436.  
  437. #if defined(REPRAPWORLD_KEYPAD)
  438.   #define NEWPANEL
  439.   #define ULTIPANEL
  440. #endif
  441. #if defined(RA_CONTROL_PANEL)
  442.  #define ULTIPANEL
  443.  #define NEWPANEL
  444.  #define LCD_I2C_TYPE_PCA8574
  445.  #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
  446. #endif
  447.  
  448. //I2C PANELS
  449.  
  450. //#define LCD_I2C_SAINSMART_YWROBOT
  451. #ifdef LCD_I2C_SAINSMART_YWROBOT
  452.   // This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
  453.   // Make sure it is placed in the Arduino libraries directory.
  454.   #define LCD_I2C_TYPE_PCF8575
  455.   #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
  456.   #define NEWPANEL
  457.   #define ULTIPANEL
  458. #endif
  459.  
  460. // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
  461. //#define LCD_I2C_PANELOLU2
  462. #ifdef LCD_I2C_PANELOLU2
  463.   // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  464.   // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  465.   // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
  466.   // Note: The PANELOLU2 encoder click input can either be directly connected to a pin
  467.   //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
  468.   #define LCD_I2C_TYPE_MCP23017
  469.   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  470.   #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
  471.   #define NEWPANEL
  472.   #define ULTIPANEL
  473.  
  474.   #ifndef ENCODER_PULSES_PER_STEP
  475.     #define ENCODER_PULSES_PER_STEP 4
  476.   #endif
  477.  
  478.   #ifndef ENCODER_STEPS_PER_MENU_ITEM
  479.     #define ENCODER_STEPS_PER_MENU_ITEM 1
  480.   #endif
  481.  
  482.  
  483.   #ifdef LCD_USE_I2C_BUZZER
  484.     #define LCD_FEEDBACK_FREQUENCY_HZ 1000
  485.     #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
  486.   #endif
  487.  
  488. #endif
  489.  
  490. // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
  491. //#define LCD_I2C_VIKI
  492. #ifdef LCD_I2C_VIKI
  493.   // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
  494.   // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
  495.   // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
  496.   //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
  497.   #define LCD_I2C_TYPE_MCP23017
  498.   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
  499.   #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
  500.   #define NEWPANEL
  501.   #define ULTIPANEL
  502. #endif
  503.  
  504. // Shift register panels
  505. // ---------------------
  506. // 2 wire Non-latching LCD SR from:
  507. // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
  508. //#define SR_LCD
  509. #ifdef SR_LCD
  510.    #define SR_LCD_2W_NL    // Non latching 2 wire shift register
  511.    //#define NEWPANEL
  512. #endif
  513.  
  514.  
  515. #ifdef ULTIPANEL
  516. //  #define NEWPANEL  //enable this if you have a click-encoder panel
  517.   #define SDSUPPORT
  518.   #define ULTRA_LCD
  519.   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
  520.     #define LCD_WIDTH 20
  521.     #define LCD_HEIGHT 5
  522.   #else
  523.     #define LCD_WIDTH 20
  524.     #define LCD_HEIGHT 4
  525.   #endif
  526. #else //no panel but just LCD
  527.   #ifdef ULTRA_LCD
  528.   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
  529.     #define LCD_WIDTH 20
  530.     #define LCD_HEIGHT 5
  531.   #else
  532.     #define LCD_WIDTH 16
  533.     #define LCD_HEIGHT 2
  534.   #endif
  535.   #endif
  536. #endif
  537.  
  538. // default LCD contrast for dogm-like LCD displays
  539. #ifdef DOGLCD
  540. # ifndef DEFAULT_LCD_CONTRAST
  541. #  define DEFAULT_LCD_CONTRAST 32
  542. # endif
  543. #endif
  544.  
  545. // Increase the FAN pwm frequency. Removes the PWM noise but increases heating in the FET/Arduino
  546. //#define FAST_PWM_FAN
  547.  
  548. // Temperature status LEDs that display the hotend and bet temperature.
  549. // If all hotends and bed temperature and temperature setpoint are < 54C then the BLUE led is on.
  550. // Otherwise the RED led is on. There is 1C hysteresis.
  551. //#define TEMP_STAT_LEDS
  552.  
  553. // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
  554. // which is not ass annoying as with the hardware PWM. On the other hand, if this frequency
  555. // is too low, you should also increment SOFT_PWM_SCALE.
  556. //#define FAN_SOFT_PWM
  557.  
  558. // Incrementing this by 1 will double the software PWM frequency,
  559. // affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
  560. // However, control resolution will be halved for each increment;
  561. // at zero value, there are 128 effective control positions.
  562. #define SOFT_PWM_SCALE 0
  563.  
  564. // M240  Triggers a camera by emulating a Canon RC-1 Remote
  565. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  566. // #define PHOTOGRAPH_PIN     23
  567.  
  568. // SF send wrong arc g-codes when using Arc Point as fillet procedure
  569. //#define SF_ARC_FIX
  570.  
  571. // Support for the BariCUDA Paste Extruder.
  572. //#define BARICUDA
  573.  
  574. //define BlinkM/CyzRgb Support
  575. //#define BLINKM
  576.  
  577. /*********************************************************************\
  578. * R/C SERVO support
  579. * Sponsored by TrinityLabs, Reworked by codexmas
  580. **********************************************************************/
  581.  
  582. // Number of servos
  583. //
  584. // If you select a configuration below, this will receive a default value and does not need to be set manually
  585. // set it manually if you have more servos than extruders and wish to manually control some
  586. // leaving it undefined or defining as 0 will disable the servo subsystem
  587. // If unsure, leave commented / disabled
  588. //
  589. //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
  590.  
  591. // Servo Endstops
  592. //
  593. // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
  594. // Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500.
  595. //
  596. //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
  597. //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles
  598.  
  599. #include "Configuration_adv.h"
  600. #include "thermistortables.h"
  601.  
  602. #endif //__CONFIGURATION_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement