본문 바로가기

3D 프린팅/Poject NBS21ME LCD 3D Printer 만들기

아두이노 Uno 와 CNC 쉴드의 핀 배열 참조

 

to be more exact... cpu_map.h header file..

Code: [Select]

  // 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 

https://github.com/grbl/grbl

 

GitHub - grbl/grbl: An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C t

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino - GitHub - grbl/grbl: An open source, embedded, high p...

github.com

grbl-master.zip
0.20MB

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:

 

출처 : https://blog.protoneer.co.nz/grbl-arduino-g-code-processor-pin-layout/

728x90
반응형