[In 3D] Hướng dẫn cài đặt thông số Firmware Marlin máy in 3D

Marlin là một trong những Firmwarre phổ biến nhất có thể dùng để chạy máy In 3D, máy cắt laze, CNC… đồng thời độ tương thích cao với các mạch điều khiển như Arduino (Mega 2560) hoặc các mạch phát triển mở rộng lên của nó…
Arduino 1.8.9 Source | Mediafire
Firmware  Marlin Source |  Mediafire
Repetier-host Source | Mediafire
{getToc} $title={Table of Contents}

Sau khi cài đủ Arduino, Repetier và Firmware Marlin rồi thì cùng vọc thôi.
Giải nén và mở firmware Marlin.ino theo đường dẫn
Chọn tab Configuration.h để bắt đầu chỉnh sửa



Baudrate

Cài đặt tốc độ truyền dữ liệu giữa mạch điều khiển (Mega2560) và máy tính khi kết nối bằng USB
#define BAUDRATE 250000{codeBox}

Board mở rộng

Cài đặt loại board mở rộng sử dụng Ramp1.3; Ramps 1.4
Board mở rộng tốt nhất <link>
Hướng dẫn kết nốt board<link>
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
 #define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif
{codeBox}

Số đầu phun và đường kính nhựa in

Đường kính nhựa in – mặc định là 3.0mm nhưng nhựa phổ biến trên thị trường sẽ là 1.75mm
Hướng dẫn setup 2 đầu phun trở lên <link>
// This defines the number of extruders
// :[1, 2, 3, 4, 5, 6]
#define EXTRUDERS 1
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
{codeBox}

Cảm biến nhiệt độ - Thermal

Cảm biến được dùng phổ biến là cảm biến điện trở 100k
//    1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#define TEMP_SENSOR_BED 1
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0
{codeBox}
Cài đặt nhiệt độ MIN và MAX để bảo vệ máy cũng như cảm biến nhiệt
// Below this temperature the heater will be switched off
// because it probably indicates a broken thermistor wire.
#define HEATER_0_MINTEMP   5
#define HEATER_1_MINTEMP   5
#define HEATER_2_MINTEMP   5
#define HEATER_3_MINTEMP   5
#define HEATER_4_MINTEMP   5
#define HEATER_5_MINTEMP   5
#define BED_MINTEMP        5
// Above this temperature the heater will be switched off.
// This can protect components from overheating, but NOT from shorts and failures.
// (Use MINTEMP for thermistor short/failure protection.)
#define HEATER_0_MAXTEMP 275
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
#define HEATER_4_MAXTEMP 275
#define HEATER_5_MAXTEMP 275
#define BED_MAXTEMP      150
{codeBox}

Cảm biến tiệm cận - Endstop

Dưới đây là setup cho cảm biến cơ gắn ở các vị trí gốc 0 của 3 trục, khi chạm vào cảm biến máy sẽ dừng. Không gắn cảm biến tại vị trí MAX.
Các loại cảm biến phù hợp <link>
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.>
{codeBox}

Module điều khiển động cơ bước - Stepper Drivers

Module mặc định sẽ là A4988, tùy theo Module đang sử dụng mà thay đổi cho phù hợp
//
#define X_DRIVER_TYPE  A4988
#define Y_DRIVER_TYPE  A4988
#define Z_DRIVER_TYPE  A4988
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988
{codeBox}

Movement Settings

Cài đặt số bước của động cơ bước (steps/mm), và tốc độ (mm/s)
Tham khảo cách tính bước cho máy in Động cơ bước và cách tính bước
/** Số bước mặc định trên milimet
* Default Axis Steps Per Unit (steps/mm)
* Override with M92
*                                      X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 400, 95 }
/** Tốc độ lớn nhất mặc định
* Default Max Feed Rate (mm/s)
* Override with M203
*                                      X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
/** Gia tốc lớn nhất mặc định
* Default Max Acceleration (change/s) change = mm/s
* (Maximum start speed for accelerated moves)
* Override with M201
*                                      X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
//#define LIMITED_MAX_ACCEL_EDITING     // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
 #define MAX_ACCEL_EDIT_VALUES       { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
#endif
/** Gia tốc mặc định
* Default Acceleration (change/s) change = mm/s
* Override with M204
*
*   M204 P    Acceleration
*   M204 R    Retract Acceleration
*   M204 T    Travel Acceleration
*/
#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION  3000    // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION   3000    // X, Y, Z acceleration for travel (non printing) moves
{codeBox}

Đảo chiều động cơ - Đảo chiều trục

Khi lắp ngược chiều động cơ hoặc ngược vị trí Endstop
// @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
#define INVERT_E0_DIR false
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false
#define INVERT_E5_DIR false
#define INVERT_E6_DIR false
#define INVERT_E7_DIR false
{codeBox}

Cài đặt Home

Khi đầu phun di chuyển về Home sẽ tại gốc 0 hay tại vị trí max chiều dài của các trục
// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
{codeBox}

Kích thước các chiều máy in

// @section machine
// The size of the print bed
#define X_BED_SIZE 200 // Kích thước tối đa trục X
#define Y_BED_SIZE 200 // Kích thước tối đa trục Y
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200 // Kích thước tối đa trục Z
{codeBox}

Nhiệt độ chuẩn bị trước khi in - Preheat

Trước khi in cần làm nóng Bàn nhiệt và Đầu phun trước để không mất thời gian chờ khi bấm Print
// @section temperature
// Preheat Constants
#define PREHEAT_1_LABEL       "PLA"
#define PREHEAT_1_TEMP_HOTEND 185
#define PREHEAT_1_TEMP_BED     50
#define PREHEAT_1_FAN_SPEED     0 // Value from 0 to 255
#define PREHEAT_2_LABEL       "ABS"
#define PREHEAT_2_TEMP_HOTEND 240
#define PREHEAT_2_TEMP_BED    110
#define PREHEAT_2_FAN_SPEED     0 // Value from 0 to 255
{codeBox}

Cài đặt LCD mở rộng

LCD phù hợp cho máy in <link>
// @section lcd
/** Cài đặt ngôn ngữ hiển thị (Có hỗ trợ tiếng Việt)
* LCD LANGUAGE
*
*   en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, it, jp_kana,
*   ko_KR, nl, pl, pt, pt_br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test
*/
#define LCD_LANGUAGE en
/** Cài đặt loại màn hình đang sử dụng
* LCD Character Set
*
*
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
/** Tùy chọn hỗ trợ thẻ SD
* SD CARD
*
* SD Card support is disabled by default. If your controller has an SD slot,
* you must uncomment the following option or it won't work.
*
*/
#define SDSUPPORT
// Tùy chọn hỗ trợ Loa
// SPEAKER/BUZZER
// If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency.
//
#define SPEAKER
{codeBox}
Lựa chọn Base PCB của màn LCD đang sử dụng

Lưu Code

Lưu lại và chuẩn bị mạch để Upload thôi.{alertSuccess}


Xem thêm:
Động cơ bước và cách tính bước
- Hướng dẫn nạp Firmware Marlin lên mạch điều khiển Arduino Mega2560 <link>
Cách sửa lỗi Thermal Runaway và Heating failed
Hướng dẫn chỉnh sửa file 3D (.stl)
Hướng dẫn Cài đặt thông số cơ bản in 3D

______________________________

Các bạn có thắc mắc, cần tư vấn thêm thì có thể liên hệ mình qua các thông tin sau:

NGUYEN VAN CUONG
2711091095
Ngân hàng VP Bank

1 Comments

  1. in uv
    in uv phẳng
    in uv cuộn
    Liên hệ với chúng tôi để được báo giá in uv:
    🌐 Website: inuvdp.com
    🔗 Fanpage: facebook.com/inuvdp
    🔗 Group: facebook.com/groups/quangcaovanoithat
    🏠 Địa chỉ VP: 234/6 Tô Ngọc Vân, P. Linh Đông, TP. Thủ Đức, TP. Hồ Chí Minh
    ☎️ SĐT: 0947.85.0022

    ReplyDelete
Previous Post Next Post

Contact Form