to be more exact... cpu_map.h header file..
// Define step pulse output pins. NOTE: All step bit pins must be on the same port.
#define STEP_DDR DDRD
#define STEP_PORT PORTD
#define X_STEP_BIT 2 // Uno Digital Pin 2
#define Y_STEP_BIT 3 // Uno Digital Pin 3
#define Z_STEP_BIT 4 // Uno Digital Pin 4
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits
// Define step direction output pins. NOTE: All direction pins must be on the same port.
#define DIRECTION_DDR DDRD
#define DIRECTION_PORT PORTD
#define X_DIRECTION_BIT 5 // Uno Digital Pin 5
#define Y_DIRECTION_BIT 6 // Uno Digital Pin 6
#define Z_DIRECTION_BIT 7 // Uno Digital Pin 7
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits
// Define stepper driver enable/disable output pin.
#define STEPPERS_DISABLE_DDR DDRB
#define STEPPERS_DISABLE_PORT PORTB
#define STEPPERS_DISABLE_BIT 0 // Uno Digital Pin 8
#define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT)
아두이노 Uno 와 CNC 쉴드의 핀 배열 참조
Firmware
Grbl (Arduino G-Code Processor) – Pin Layout
Grbl is an opensource software that turns your Arduino development board into a full blown G-Code interpreter.
Below the layout of the pins on the Arduino board. Each Stepper Motor Driver needs to be connected to the following pins:
- Stepper Driver Enable/Disable – Pin 8
- Direction – Pin 5-7 depending on the Axis(X,Y,Z)
- Stepping Pulse – Pin 2-4 depending on the Axis(X,Y,Z)
Limit Switches prevent the machine for over extending each axis and are connected to Pins 9-11.
Grbl also allows for Spindle control with Pins 12 and 13 and coolant control with Pin A3.
UPDATE!!! We have given back to the GRBL project and developed a ARDUINO CNC SHIELD that is 100% GRBL compatible.(Click here for more details)
If you are interested in making your own CNC machines we recommend you have a look at the following books:
- Build Your Own CNC Machine – By James Floyd Kelly and P. Hood-Daniel
- CNC Machining Handbook: Building, Programming, and Implementation – By Alan Overby
출처 : https://blog.protoneer.co.nz/grbl-arduino-g-code-processor-pin-layout/
'3D 프린팅 > Poject NBS21ME LCD 3D Printer 만들기' 카테고리의 다른 글
LCD 3D 프린터 설계 20211225 (0) | 2021.12.26 |
---|---|
프린터 부품 실제도 캐드 입력 (0) | 2021.12.25 |
MKS Gen L Ver1.0 3D 프린팅 보드 설계도 (0) | 2021.12.19 |
스태퍼모터 Data Sheet 17HS4401N-Longs motor사 제작 (0) | 2021.12.19 |
UV curing LCD 비율 셋팅 ? (0) | 2021.12.16 |