메이킹자료실

메이킹자료실

Marlin Firmware 기본설명

페이지 정보

작성자 호박공장메이커스페이스
작성일19-02-04 00:30 조회251회 댓글0건

본문

 




Marlin firmware user guide for beginners


Starting with Marlin Firmwaresettings-265131_1280

If you built your own 3D printer or if you want to optimize its performance, you will have to put your hands in the firmware. This step can seem very tricky at first glance and put people off from doing it. In this post I will try to explain the basic steps required to run a 3D printer. To show you how simple it can be, we will modify only one file and we will only change configuration options and numbers.

 

First question: What is firmware?

Firmware is a program which resides on the printer’s motherboard. The firmware is the link between software and hardware, it interprets commands from the G code file and controls the motion accordingly. The firmware configuration is unique to your printer. It knows the properties of the 3D printer, like the dimensions or heating settings. It plays a major role in the quality of the print.

Get the tools:

Motherboard

In this example we will use one of the most common motherboards in the RepRap DIY 3D printer world. That is the Arduino Mega 2560 and the RAMPS 1.4 Shield that goes over it. Marlin firmware is compatible with a lot of motherboards and the following explanations apply with a little variation.

http://arduino.cc/en/Main/arduinoBoardMega2560#.UyumXoXDIlo

http://reprap.org/wiki/RAMPS_1.4

Firmware

Get the Marlin firmware: and click on the Download Zip button. Unzip the folder on your computer.

Arduino IDE

You will need a software to communicate with the board of your 3D printer to install the firmware. This is the Arduino IDE. It is an integrated development environment to program for the Arduino microcontroller. It is standard in many projects such as 3D printers.

Choose the version specific to your operating system to download.

Install Arduino IDE and start the application.

Select your hardware:

You will have to select the Arduino board that you use. Tools menu / Board / Arduino Mega 2560

Arduino board choice

First programming rule: comments

Sometimes we need help and comments to understand the intent of the programmer, but we don’t want the computer to get confused by these human comments so we use separators. In Arduino IDE the separator between computer language and comments is a double slash //, it works for every line. The compiler will not look after this separator. This is the only programming rule that we need to understand to configure the firmware properly. Sometimes we will activate some options by removing the comments and some other times we will comment-out options to deactivate them. Not to say that you might find useful information in the comments close to the parameter you need to edit.

Ramps 1.4 option

Before the attacking the configuration, if you use a RAMPS 1.4 or 1.3, you have first to edit one line in the pins.h file.

Search for the following text : “#define RAMPS_V_1_3” and remove the comments character “//” at the beginning of the line to activate it.

Save the file.

Configuration

Open the file Configuration.h in the Marlin folder.

 

General Settings

Set the communication speed:

Using the Arduino IDE to edit the configuration.h file, search for #define BAUDRATE (ctrl+F)

Set the communication speed in baud to:

 

#define BAUDRATE 250000

 

You can keep the other speed in comments, just remember this: //#define BAUDRATE 115200

This defines the communication speed between the electronic board and the computer. There are two speeds commonly used by 3D printing software, the 250000 and 115200 baud rate. If one doesn’t work with your hardware or software, try the other one.

Select the motherboard

Above the line: #define MOTHERBOARD you will see a list of different motherboards. You just have to find your configuration among the list and use the appropriate number. For example a RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed) will be configured:

 

#define MOTHERBOARD 33

 

*It doesn’t matter if you don’t use a fan or heat bed for now.

 

Defines the number of extruders

If you use more than one extruders you can write it there. However we will not go into details about multiple extruders in this post.

 

#define EXTRUDERS 1

 

Thermal Settings

Temperature sensor choice

Among the list (in configuration.h), choose the thermistor number that you use for each of the hot ends and for the heat bed. If you pick the wrong number, you may have an inaccurate temperature reading but you can still do temperature control and be able to print correctly.

 

#define TEMP_SENSOR_0 1

#define TEMP_SENSOR_1 0

#define TEMP_SENSOR_2 0

#define TEMP_SENSOR_BED 1

 

TEMP_SENSOR_0 is used by the first hot end and TEMP_SENSOR_BED is connected to the heat bed. If you don’t use a sensor, use 0 to disable it.

 

Minimum temperature

Use a minimum temperature different than 0 to check if the thermistor is working. This security will prevent the controller from heating the hot end at max power indefinitely. This is important. It should already be set by default

 

#define HEATER_0_MINTEMP 5

#define HEATER_1_MINTEMP 5

#define HEATER_2_MINTEMP 5

#define BED_MINTEMP 5

*units are in °Celcius

Maximum temperature

Depending on your hardware material your hot end will have a specific maximum temperature resistance. This security will prevent the temperature from going over it. For example a J-Head extruder may use a PTFE tube to guide the filament in the hot zone which can be damaged over 240°C. Notice the controller can overshoot the target temperature by a couple of °C, it is better to keep a security margin here.

 

#define HEATER_0_MAXTEMP 230

#define HEATER_1_MAXTEMP 230

#define HEATER_2_MAXTEMP 230

#define BED_MAXTEMP 120

PID temperature controller.

This is an advanced option which needs to be tuned later. For now you can use the default options.

Prevent dangerous extrusion:

These settings are set by default.

For a security reason you may want to prevent the extrusion if the temperature of the hot end is under the melting point of the material. You don’t want to push the extruder over solid material and risk breaking it.

 

#define PREVENT_DANGEROUS_EXTRUDE

 

*Note that you can override this protection by sending a M302 command with the host software.

If there is a mistake in the code like a dot position for example, you would want to prevent a very long extrusion command.

 

#define PREVENT_LENGTHY_EXTRUDE

 

Here you can set the values for the minimum temperature:

 

#define EXTRUDE_MINTEMP 170

 

Mechanical settings

End Stops

End stops are switches that trigger before an axis reaches its limit. In other words: It will prevent the printer from trying to move out of its own frame. End stops are also used by the printer as a reference position. It will move each axis in a specific direction until it reaches an end stop, this is the home of the printer.

Pull-ups resistances

It is a good practice to use a pull-up or pull-down circuit for a basic switch. To keep it simple the pull-ups resistance are needed if you directly connect a mechanical endswitch between the signal and ground pins.

Fortunately there is already a pull-up resistor integrated in Arduino that can be activated by the software.

http://en.wikipedia.org/wiki/Pull-up_resistor

http://arduino.cc/en/Tutorial/DigitalPins#.UyusMYXDIlp

#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pull-up resistors

 

The Marlin firmware allows one to configure each limit switch individually. You can use multiple end stop types on the same printer.

 

#ifndef ENDSTOPPULLUPS

  #define ENDSTOPPULLUP_XMAX

   #define ENDSTOPPULLUP_YMAX

//  #define ENDSTOPPULLUP_ZMAX

   #define ENDSTOPPULLUP_XMIN

   #define ENDSTOPPULLUP_YMIN

 //  #define ENDSTOPPULLUP_ZMIN

#endif

Invert endswitch logic

Some limit switches are normally closed (NC) and turn off when triggered and some are normally open (NO) and turn on when triggered. Ideally the limit switches would be normally on and turn current off when triggered. The printer would interpret the same signal if the end stop is hit as if the end stop is broken or disconnected.

 

NO = true

NC = false

 

const bool X_MIN_ENDSTOP_INVERTING = false;

const bool Y_MIN_ENDSTOP_INVERTING = false;

const bool Z_MIN_ENDSTOP_INVERTING = false;

const bool X_MAX_ENDSTOP_INVERTING = false;

const bool Y_MAX_ENDSTOP_INVERTING = false;

const bool Z_MAX_ENDSTOP_INVERTING = false;

Use three or six end stops?

Under normal circumstance the printer would always know its position according to the home reference position and never move out of its maximum envelope. In this case three endstops would be enough. While running it is possible the 3D printer loses its position because of a collision or skipped steps. In this case the printer can eventually move out of its normal envelope and cause damage. Using end stops at each end of each axis would prevent such situations.

Uncomment the following lines to disable all max or all min end stops.

 

//#define DISABLE_MAX_ENDSTOPS

//#define DISABLE_MIN_ENDSTOPS

Invert stepper motor direction

There is only way to know if the stepper motor direction is correct and it is to try it. I would wait until the configuration is completed, compiled and sent to the controller before you try. You can come back here after.

  1. Position the printer axis at the center of each axis.

  2. Keep your finger close to the stop button.

  3. Send a command to move the X axis a little amount like +1 or +10 mm

  4. If the printer moves in the other direction, you will have to reverse the axis direction.

  5. Repeat for each X Y Z axis

To inspect the extruder you would need to heat the hot end to the extrusion temperature, otherwise you can temporarily disable the EXTRUDE_MINTEMP protection. Be sure to perform the test without the filament loaded. Send extrusion command of 10 mm and check the motor rotation direction.

You can invert the stepper motor direction if it was wired the wrong way. It doesn’t make a difference if you invert the stepper motor wiring or if you invert it in the code. *Remember to power off the printer before unplugging or replugging the stepper motors.

 

#define INVERT_X_DIR false

#define INVERT_Y_DIR true

#define INVERT_Z_DIR true

#define INVERT_E0_DIR true

#define INVERT_E1_DIR true

#define INVERT_E2_DIR false

Set home direction

Here we set the home direction when the home button is pressed. It tells the printer which direction it should go to reach the end stop and get its reference position.

 

#define X_HOME_DIR -1

#define Y_HOME_DIR -1

#define Z_HOME_DIR 1

 

The Z axis is the one which will get the printing surface very close to the nozzle. It needs to be very precise and very quick to trigger otherwise there will be a collision between the nozzle and the surface. I prefer to send the print surface to home in the max direction and come back closer when the printer knows where to stop.

Allow the printer to go beyond the end stops limits

If you use optical end stops for instance you can position the end stops at the center of the moving area. You can tell the printer to move over the end stop signal. I never use it. If you placed end stops at the end of each axis, then keep these options set to true.

 

Don’t go over the minimum limit:

 

#define min_software_endstops true

 

Don’t go beyond the maximum limit

 

#define max_software_endstops true

Printer area

Here we can tell the firmware what the limits are of the travel zones. The travel distance is not calibrated yet and the practical distance will be different than the calculated distance. For now it is better to reduce the travel distance a bit and come back later when it is calibrated.

 

#define X_MAX_POS 190

#define X_MIN_POS 0

#define Y_MAX_POS 190

#define Y_MIN_POS 0

#define Z_MAX_POS 190

#define Z_MIN_POS 0

 

Movement settings

Define the number of axis

It is the total number of axis (3) plus the number of extruders (1).

 

#define NUM_AXIS 4

 

Homing feed rate

This is the moving speed of the axis when homing in [mm/min]. Oftentimes in Marlin, speed or acceleration are expressed in [mm/s] or [mm/s2] but the feed is expressed in [mm/min].

 

#define HOMING_FEEDRATE {50*60, 50*60, 4*60}

Axis steps per unit

The stepper motor receives step by step moving command from the controller. The controller needs to know the steps/mm ratio to send the appropriate steps to reach the required distance. How many steps are needed to move an axis by 1 mm?

 

Belts and pulley (usually xy axis):

steps_per_mm = (motor_steps_per_rev * driver_microstep) /
(belt_pitch * pulley_number_of_teeth)

lead screw (z axis)
steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch

 

Direct drive extruder:

e_steps_per_mm = (motor_steps_per_rev * driver_microstep) /
(hob_effective_diameter * pi)

 See the example of bowden extruder

Extruder with gear reduction:

e_steps_per_mm = (motor_steps_per_rev * driver_microstep) *
(big_gear_teeth / small_gear_teeth) / (hob_effective_diameter * pi)

DEFAULT_AXIS_STEPS_PER_UNIT   {X,Y,Z,E1}

#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,200.0*8/3,760}

 

Send the firmware to the 3D Printer

In Arduino IDE, save the modification done to Configuration.h

Verify the code

If everything is fine, Arduino should say “Done compiling” otherwise you will get one or more error messages. If this happens, there is usually a mention about the line of the error. Check your code for a comments error //, dots or other special characters that may have been mistyped.

Once it is compiled properly you can connect the Arduino board to the computer with the USB cable.

Select the proper port, Tools menu / Serial Port / <port number>

Upload the compiled code to the Arduino

Now your printer is ready to move. It’s alive!!!

Just one more thing. You need to try the stepper motor direction as mentioned above. You will need to use a host software connected to the 3D printer. The instructions to use this software will be explained in another post, for now I will stick to the basic guidelines. You can find more info on Pronterface here: http://reprap.org/wiki/Pronterface

You can also use Repetier which has an awesome G code viewer: http://www.repetier.com/documentation/repetier-host/gcode-editor/

To test the motor direction, connect the printer to the computer with the USB cable.

  1. Position the printer axis manually at the center of each axis.

  2. Power up the printer

  3. Open a host software like Pronterface or Repetier

  4. Click to connect the host to the printer

  5. Keep your finger close to the stop button of the motherboard (just in case).

  6. Send a command to move X axis a little amount like +1 or +10 mm

  7. If the printer moves in the other direction, you will have to reverse the axis direction.

  8. Repeat for each X Y Z axis

To inspect the extruder you will need to heat the hot end to the extrusion temperature, otherwise you can disable the protection by sending the M302 command. Be sure to perform the test without the filament loaded. Send the extrusion command of 10 mm and check the motor rotation direction.

 

You can invert the stepper motor direction if it was wired the wrong way, it doesn’t make a difference if you invert the stepper motor wiring or if you invert it in the code. *Remember to power off the printer before unplugging or replugging the stepper motors.

 

#define INVERT_X_DIR false

#define INVERT_Y_DIR true

#define INVERT_Z_DIR true

#define INVERT_E0_DIR true

#define INVERT_E1_DIR true

#define INVERT_E2_DIR false

말린 펌웨어로 시작하기 

설정 -265131_1280

자신의 3D 프린터를 제작했거나 성능을 최적화하려면 펌웨어에 손을 넣어 야합니다. 이 단계는 언뜻보기에는 매우 까다로워 보이고 사람들은 그것을하지 못하게 할 수 있습니다. 이 포스트에서는 3D 프린터를 실행하는 데 필요한 기본 단계를 설명하려고합니다. 얼마나 간단한 지 보여주기 위해 하나의 파일 만 수정하고 구성 옵션과 번호 만 변경합니다.

 

첫 번째 질문 : 펌웨어 란 무엇입니까?

펌웨어는 프린터의 마더 보드에있는 프로그램입니다. 펌웨어는 소프트웨어와 하드웨어 간의 링크이며, G 코드 파일의 명령을 해석하고 이에 따라 동작을 제어합니다. 펌웨어 구성은 프린터에 고유합니다. 치수 또는 가열 설정과 같은 3D 프린터의 속성을 알고 있습니다. 인쇄 품질에 중요한 역할을합니다.

도구 가져 오기 :

마더 보드

이 예에서는 RepRap DIY 3D 프린터 세계에서 가장 일반적인 마더 보드 중 하나를 사용합니다. 그것이 Arduino Mega 2560과 RAMPS 1.4 Shield입니다. 말린 펌웨어는 많은 마더 보드와 호환되며 다음 설명은 약간의 변형으로 적용됩니다.

http://arduino.cc/en/Main/arduinoBoardMega2560#.UyumXoXDIlo

http://reprap.org/wiki/RAMPS_1.4

펌웨어

말린 펌웨어 가져 오기 : 다운로드 우편 번호 버튼을 클릭하십시오 컴퓨터의 폴더 압축을 풉니 다.

Arduino IDE

펌웨어를 설치하려면 3D 프린터 보드와 통신하는 소프트웨어가 필요합니다. 이것은 Arduino IDE 입니다. Arduino 마이크로 컨트롤러를 프로그래밍 할 수있는 통합 개발 환경입니다. 3D 프린터와 같은 많은 프로젝트에서 표준입니다.

다운로드 할 운영 체제와 관련된 버전을 선택하십시오 .

Arduino IDE를 설치하고 응용 프로그램을 시작하십시오.

하드웨어 선택 :

당신이 사용하는 Arduino 보드를 선택해야합니다. 도구 메뉴 / 보드 / Arduino 메가 2560

Arduino 보드 선택

첫 번째 프로그래밍 규칙 : 주석

때로는 프로그래머의 의도를 이해하기 위해 도움과 의견이 필요하지만, 우리는 분리 기호를 사용하기 때문에 이러한 인간의 설명에 의해 컴퓨터가 혼란스러워지는 것을 원하지 않습니다. Arduino IDE에서 컴퓨터 언어와 주석 사이의 구분 기호는 이중 슬래시 //로 모든 행에 적용됩니다. 컴파일러는이 구분 기호를 돌 보지 않습니다. 이것은 펌웨어를 올바르게 구성하기 위해 이해해야하는 유일한 프로그래밍 규칙입니다. 때로는 댓글을 제거하고 일부 옵션을 활성화하여 비활성화 할 옵션을 주석 처리합니다. 편집해야하는 매개 변수와 가까운 주석에 유용한 정보를 찾을 수는 없습니다.

램프 1.4 옵션

구성을 공격하기 전에 RAMPS 1.4 또는 1.3을 사용하는 경우 먼저 pins.h 파일에서 한 행을 편집해야합니다.

다음 텍스트를 검색하십시오 : "#define RAMPS_V_1_3"을 입력하고 줄의 시작 부분에 주석 문자 "//"를 제거하여 활성화하십시오.

파일을 저장하십시오.

구성

Marlin 폴더에서 Configuration.h 파일을 엽니 다.

 

일반 설정

통신 속도 설정 :

Arduino IDE를 사용하여 configuration.h 파일을 편집하려면 #define BAUDRATE (ctrl + F)를 검색하십시오.

통신 속도를 전송 속도로 설정하십시오.

 

#define BAUDRATE 250000

 

다른 속도를 주석으로 유지하면됩니다. // #define BAUDRATE 115200

전자 보드와 컴퓨터 간의 통신 속도를 정의합니다. 3D 인쇄 소프트웨어에서 일반적으로 사용하는 속도는 250000 및 115200 전송 속도입니다. 하드웨어 또는 소프트웨어에서 작동하지 않는 경우 다른 하나를 사용해보십시오.

마더 보드 선택

#define MOTHERBOARD 줄 위에 다른 마더 보드 목록이 표시됩니다. 목록에서 구성을 찾고 적절한 번호를 사용해야합니다. 예를 들어 RAMPS 1.3 / 1.4 (전원 출력 : 압출기, 팬, 베드)가 구성됩니다.

 

# 마더 보드 33 정의

 

* 지금 팬이나 열 침대를 사용하지 않는다면 중요하지 않습니다.

 

압출기의 수를 정의합니다.

하나 이상의 압출기를 사용한다면 거기에 쓸 수 있습니다. 그러나이 포스트의 여러 압출기에 대한 세부 사항은 다루지 않을 것입니다.

 

# 정의 EXTRUDERS 1

 

온도 설정

온도 센서 선택

목록 (configuration.h) 중 핫 엔드 및 열 베드 각각에 사용하는 서미스터 번호를 선택하십시오. 잘못된 번호를 선택하면 온도 판독 값이 정확하지 않을 수 있지만 온도 제어를 제대로 수행하고 올바르게 인쇄 할 수 있습니다.

 

#define TEMP_SENSOR_0 1

#define TEMP_SENSOR_1 0

#define TEMP_SENSOR_2 0

#define TEMP_SENSOR_BED 1

 

TEMP_SENSOR_0은 첫 번째 핫 엔드에서 사용되고 TEMP_SENSOR_BED는 히트 베드에 연결됩니다. 센서를 사용하지 않으려면 0을 사용하여 센서를 비활성화하십시오.

 

최소 온도

서미스터가 작동하는지 확인하려면 0과 다른 최소 온도를 사용하십시오. 이 보안 기능은 컨트롤러가 최대 전력으로 핫 엔드를 무기한으로 가열하는 것을 방지합니다. 이것은 중요합니다. 이미 기본적으로 설정되어 있어야합니다.

 

#define HEATER_0_MINTEMP 5 정의

#define HEATER_1_MINTEMP 5

#define HEATER_2_MINTEMP 5

#define BED_MINTEMP 5

* 단위는 섭씨

최고 온도

하드웨어 재질에 따라 핫 엔드의 최대 온도 저항이 정해집니다. 이 보안 기능으로 인해 온도가 올라가지 않습니다. 예를 들어, J-Head 압출기는 PTFE 튜브를 사용하여 고온 영역에서 필라멘트를 유도 할 수 있으며 240 ° C 이상의 온도에서 손상 될 수 있습니다. 컨트롤러가 목표 온도를 몇 ℃ 정도 오버 슛 할 수 있음을 알리십시오. 여기서 보안 마진을 유지하는 것이 좋습니다.

 

#define HEATER_0_MAXTEMP 230

#define HEATER_1_MAXTEMP 230

#define HEATER_2_MAXTEMP 230

#define BED_MAXTEMP 120

PID 온도 컨트롤러.

이것은 나중에 튜닝해야 할 고급 옵션입니다. 지금은 기본 옵션을 사용할 수 있습니다.

위험한 압출 방지 :

이 설정은 기본적으로 설정됩니다.

보안상의 이유로 핫 엔드의 온도가 재료의 녹는 점보다 낮 으면 압출을 방지 할 수 있습니다. 압출기를 단단한 재료 위에 밀기 만하면 압출기가 파손될 위험이 있습니다.

 

#define PREVENT_DANGEROUS_EXTRUDE

 

* 호스트 소프트웨어와 함께 M302 명령을 보내면이 보호 기능을 무시할 수 있습니다.

예를 들어 점 위치와 같은 코드에 실수가 있으면 매우 긴 돌출 명령을 방지해야합니다.

 

#define PREVENT_LENGTHY_EXTRUDE

 

최소 온도 값을 설정할 수 있습니다.

 

#define EXTRUDE_MINTEMP 170

 

기계 설정

끝내기

종점은 축이 한계에 도달하기 전에 트리거하는 스위치입니다. 다시 말해, 프린터가 자체 프레임에서 벗어나지 못하게합니다. 엔드 스톱은 프린터가 기준 위치로 사용하기도합니다. 종점에 도달 할 때까지 각 축을 특정 방향으로 이동합니다. 이것은 프린터의 집입니다.

풀업 저항

기본 스위치에는 풀업 또는 풀다운 회로를 사용하는 것이 좋습니다. 신호 핀과 접지 핀 사이에 기계식 엔드 스위치를 직접 연결하는 경우 풀업 저항이 필요합니다.

다행스럽게도 이미 Arduino에 통합 된 풀업 저항이 소프트웨어에 의해 활성화 될 수 있습니다.

http://en.wikipedia.org/wiki/Pull-up_resistor

http://arduino.cc/en/Tutorial/DigitalPins#.UyusMYXDIlp

#define ENDSTOPPULLUPS // 엔드 라인 ( endstop ) 풀업 저항을 사용하지 않으려면 이것을 주석 처리 (라인의 시작 부분에서 // 사용)

 

Marlin 펌웨어를 사용하면 각 리미트 스위치를 개별적으로 구성 할 수 있습니다. 동일한 프린터에서 여러 종단점 유형을 사용할 수 있습니다.

 

#ifndef ENDSTOPPULLUPS

  #define ENDSTOPPULLUP_XMAX

   #define ENDSTOPPULLUP_YMAX

// #define ENDSTOPPULLUP_ZMAX

   #define ENDSTOPPULLUP_XMIN

   #define ENDSTOPPULLUP_YMIN

 // #define ENDSTOPPULLUP_ZMIN

#endif

엔드 스위치 로직 반전

일부 리미트 스위치는 일반적으로 닫히고 (NC) 트리거 될 때 꺼지며 일부는 정상적으로 열리 며 (NO) 트리거 될 때 켜집니다. 이상적으로 리미트 스위치는 정상적으로 켜지고 트리거 될 때 전류를 꺼야합니다. 엔드 스톱이 파손되었거나 연결이 끊어진 것처럼 엔드 스톱에 부딪히면 프린터는 동일한 신호를 해석합니다.

 

아니오 = 참

NC = 거짓

 

const bool X_MIN_ENDSTOP_INVERTING = false;

const bool Y_MIN_ENDSTOP_INVERTING = false;

const bool Z_MIN_ENDSTOP_INVERTING = false;

const bool X_MAX_ENDSTOP_INVERTING = false;

const bool Y_MAX_ENDSTOP_INVERTING = false;

const bool Z_MAX_ENDSTOP_INVERTING = false;

3 ~ 6 개의 엔드 스톱을 사용합니까?

정상적인 상황에서 프린터는 가정 기준 위치에 따라 항상 위치를 알고 최대 봉투에서 벗어나지 않습니다. 이 경우 3 개의 끝단 멈춤으로 충분합니다. 3D 프린터가 실행 중일 때 충돌 또는 건너 뛰기 단계로 인해 위치가 손실 될 수 있습니다. 이 경우 프린터가 결국 정상적인 봉투에서 벗어나 손상 될 수 있습니다. 각 축의 각 끝에서 종단 정지를 사용하면 이러한 상황을 방지 할 수 있습니다.

모든 최대 또는 모든 최소 종료 점을 사용하지 않으려면 다음 행의 주석 처리를 제거하십시오.

 

// # DISABLE_MAX_ENDSTOPS 정의

// # DISABLE_MIN_ENDSTOPS 정의

스테퍼 모터 방향 반전

스테퍼 모터 방향이 올바른지와 그것을 시도하는 것인지 알 수있는 유일한 방법이 있습니다. 구성이 완료 될 때까지 기다렸다가 컴파일하고 컨트롤러에 보냈습니다. 후에 여기 올 수있어.

  1. 프린터 축을 각 축의 중심에 놓습니다.

  2. 손가락을 멈춤 버튼에 가깝게 유지하십시오.

  3. X 축을 +1 또는 +10 mm와 같이 약간 움직이는 명령을 보냅니다.

  4. 프린터가 다른 방향으로 움직이면 축 방향을 반대로해야합니다.

  5. 각 XYZ 축에 대해 반복하십시오.

압출기를 검사하려면 핫 엔드를 압출 온도까지 가열해야합니다. 그렇지 않으면 일시적으로 EXTRUDE_MINTEMP 보호를 비활성화 할 수 있습니다. 필라멘트를 넣지 않은 상태에서 테스트를 수행하십시오. 압출 명령을 10mm 보내고 모터 회전 방향을 확인하십시오.

잘못된 방향으로 배선 된 경우 스테퍼 모터 방향을 반전시킬 수 있습니다. 스테퍼 모터 배선을 거꾸로 만들거나 코드에서 뒤집 으면 차이가 없습니다. * 스테퍼 모터를 뽑거나 다시 끼우기 전에 프린터의 전원을 꺼야합니다.

 

#define INVERT_X_DIR false

#define INVERT_Y_DIR true

#define INVERT_Z_DIR true

#define INVERT_E0_DIR true

#define INVERT_E1_DIR true

#define INVERT_E2_DIR false

가정 방향 설정

홈 버튼을 누르면 홈 방향이 설정됩니다. 프린터는 종착역에 도달하여 기준 위치를 가져야하는 방향을 프린터에 알려줍니다.

 

#define X_HOME_DIR -1

#define Y_HOME_DIR -1

#define Z_HOME_DIR 1

 

Z 축은 인쇄면을 노즐에 매우 가깝게 배치합니다. 노즐과 표면 사이에 충돌이있을 경우 매우 정확하고 신속하게 트리거해야합니다. 나는 인쇄면을 최대 방향으로 집으로 보내고 프린터가 멈추는 곳을 알 때 가까이 다가서는 것을 선호합니다.

프린터가 엔드 스톱 한계를 초과하도록 허용합니다.

예를 들어 광 엔드 스톱을 사용하는 경우 이동 영역의 중심에 엔드 스톱을 배치 할 수 있습니다. 프린터가 종료 스톱 신호로 이동하도록 지시 할 수 있습니다. 나는 결코 그것을 사용하지 않는다. 각 축의 끝에서 끝단 정지를 배치 한 경우이 옵션을 true로 설정하십시오.

 

최소 한도를 초과하지 마십시오.

 

#define min_software_endstops true

 

최대 한도를 초과하지 마십시오.

 

#define max_software_endstops true

프린터 영역

여기에서 우리는 여행 지역의 한계를 펌웨어에 알릴 수 있습니다. 이동 거리는 아직 보정되지 않았으며 실제 거리는 계산 된 거리와 다를 수 있습니다. 지금은 여행 거리를 조금 줄이고 나중에 교정 할 때 다시 오는 것이 좋습니다.

 

#define X_MAX_POS 190

#define X_MIN_POS 0

#define Y_MAX_POS 190

#define Y_MIN_POS 0

#define Z_MAX_POS 190

#define Z_MIN_POS 0

 

동작 설정

축의 수를 정의하십시오.

총 축 수 (3) + 압출기 수 (1)입니다.

 

#define NUM_AXIS 4

 

원점 이송 속도

원점 복귀시 축의 이동 속도 [mm / min]입니다. 멀린에서는 종종 속도 또는 가속도가 [mm / s] 또는 [mm / s2]로 표시되지만 피드는 [mm / min]으로 표시됩니다.

 

# 정의 HOMING_FEEDRATE {50 * 60, 50 * 60, 4 * 60}

단위당 축 단계

스테퍼 모터는 컨트롤러에서 단계적으로 명령을 이동합니다. 컨트롤러는 필요한 거리에 도달하기위한 적절한 단계를 보내기 위해 steps / mm 비율을 알아야합니다. 축을 1mm만큼 이동하려면 몇 단계가 필요합니까?

 

벨트 및 풀리 (보통 xy 축) :

steps_per_mm = (motor_steps_per_rev * driver_microstep) / 
(belt_pitch * pulley_number_of_teeth)

리드 스크류 (z 축) 
steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch

 

직접 구동 압출기 :

e_steps_per_mm = (motor_steps_per_rev * driver_microstep) / 
(hob_effective_diameter * pi)

 보우 덴 압출기의 예 참조

감속기가있는 압출기 :

e_steps_per_mm = (motor_steps_per_rev * driver_microstep) * 
(big_gear_teeth / small_gear_teeth) / (hob_effective_diameter * pi)

DEFAULT_AXIS_STEPS_PER_UNIT {X, Y, Z, E1}

#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,200.0 * 8 / 3,760}

 

3D 프린터로 펌웨어 보내기

Arduino IDE에서 Configuration.h에 수행 된 수정 내용을 저장하십시오.

코드 확인

모든 것이 정상이라면 Arduino는 "Done compiling"이라고 말해야합니다. 그렇지 않으면 하나 이상의 오류 메시지가 나타납니다. 이 경우 오류의 행에 대한 언급이 있습니다. 주석 오류, 도트 또는 잘못 입력 된 특수 문자를 코드에서 확인하십시오.

제대로 컴파일되면 Arduino 보드를 USB 케이블로 컴퓨터에 연결할 수 있습니다.

적절한 포트, 도구 메뉴 / 직렬 포트 / <포트 번호>

컴파일 된 코드를 Arduino에 업로드하십시오.

이제 프린터를 이동할 준비가되었습니다. 살아있어!!!

한 가지 더. 위에서 언급 한 것처럼 스테퍼 모터 방향을 시도해야합니다. 3D 프린터에 연결된 호스트 소프트웨어를 사용해야합니다. 이 소프트웨어를 사용하는 방법에 대한 설명은 다른 게시물에서 할 수 있습니다. 이제 기본 지침을 따르 겠습니다. Pronterface에 대한 자세한 정보는 http://reprap.org/wiki/Pronterface에서 확인할 수 있습니다.

또한 멋진 G 코드 뷰어가있는 Repetier를 사용할 수도 있습니다. http://www.repetier.com/documentation/repetier-host/gcode-editor/

모터 방향을 테스트하려면 USB 케이블을 사용하여 프린터를 컴퓨터에 연결하십시오.

  1. 프린터 축을 각 축의 중심에 수동으로 배치하십시오.

  2. 프린터 전원 켜기

  3. Pronterface 또는 Repetier와 같은 호스트 소프트웨어 열기

  4. 호스트를 프린터에 연결하려면 클릭하십시오.

  5. 손가락을 마더 보드의 중지 버튼에 가깝게 유지합니다 (경우에 따라).

  6. X 축을 +1 또는 +10 mm와 같이 약간 움직이는 명령을 보냅니다.

  7. 프린터가 다른 방향으로 움직이면 축 방향을 반대로해야합니다.

  8. 각 XYZ 축에 대해 반복하십시오.

압출기를 검사하려면 핫 엔드를 압출 온도까지 가열해야합니다. 그렇지 않으면 M302 명령을 전송하여 보호 기능을 해제 할 수 있습니다. 필라멘트를 넣지 않은 상태에서 테스트를 수행하십시오. 압출 명령을 10mm 보내고 모터 회전 방향을 확인하십시오.

 

스티어링 모터 방향을 반대로 할 수 있습니다. 잘못된 방향으로 배선 한 경우 스테핑 모터 배선을 반대로 전환하거나 코드에서 뒤집 으면 차이가 없습니다. * 스테퍼 모터를 뽑거나 다시 끼우기 전에 프린터의 전원을 꺼야합니다.

 

#define INVERT_X_DIR false

#define INVERT_Y_DIR true

#define INVERT_Z_DIR true

#define INVERT_E0_DIR true

#define INVERT_E1_DIR true

#define INVERT_E2_DIR false

댓글목록

등록된 댓글이 없습니다.