From 328fc21e0b4c282abebda94528161ee327bfe242 Mon Sep 17 00:00:00 2001 From: Nikolay Khabarov <2xl@mail.ru> Date: Sun, 9 Jul 2017 05:08:44 +0300 Subject: [PATCH] change pins --- README.md | 34 +++++++++++++++++++++++++++++++++- cnc/config.py | 30 +++++++++++++++--------------- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c6fba3b..02a6c13 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,39 @@ properties, limitations and pin names for hardware control. Raspberry Pi implementation should be connected to A4988, DRV8825 or any other stepper motor drivers with DIR and STEP pin inputs. Default config is created for Raspberry Pi 2-3 and this wiring diagram: -![](https://cloud.githubusercontent.com/assets/8740775/26024664/bc13d5a6-37de-11e7-98ed-9391109fcfd0.jpg) + + TODO TODO TODO +gpio21 - x step +gpio20 - x dir +gpio26 - enable +gpio16 - y step +gpio19 - y dir +gpio13 - z dir +gpio12 - z step +gpio6 - e1 step +gpio5 - e1 dir +gpio7 - e0 dir +gpio8 - e0 step +gpio11 - z max +gpio25 - z min +gpio9 - y max +gpio10 - y min +gpio24 - x max +gpio23 - x min +gpio22 - heat bed +gpio27 - heater 2(or fan) +gpio18 - heater 1 +gpio17 - not connected +gpio15 - not connected +gpio4 - not connected +gpio14 - not connected +gpio3 - i2c scl for ads1115 +gpio2 - i2c sda for ads1115 +ads1115 ch0 - heater 2(or not connected) +ads1115 ch1 - bed +ads1115 ch2 - heater 1 +ads1115 ch3 - not connected + So having Raspberry Pi connected this way, there is no need to configure pin map for project. diff --git a/cnc/config.py b/cnc/config.py index 147f27f..3c205ac 100644 --- a/cnc/config.py +++ b/cnc/config.py @@ -54,26 +54,26 @@ BED_PID = {"P": 5.06820175723, # Enable pin for all steppers, low level is enabled. STEPPERS_ENABLE_PIN = 26 -STEPPER_STEP_PIN_X = 16 -STEPPER_STEP_PIN_Y = 20 -STEPPER_STEP_PIN_Z = 21 -STEPPER_STEP_PIN_E = 25 +STEPPER_STEP_PIN_X = 21 +STEPPER_STEP_PIN_Y = 16 +STEPPER_STEP_PIN_Z = 12 +STEPPER_STEP_PIN_E = 8 -STEPPER_DIR_PIN_X = 13 +STEPPER_DIR_PIN_X = 20 STEPPER_DIR_PIN_Y = 19 -STEPPER_DIR_PIN_Z = 26 -STEPPER_DIR_PIN_E = 8 +STEPPER_DIR_PIN_Z = 13 +STEPPER_DIR_PIN_E = 7 -SPINDLE_PWM_PIN = 7 -FAN_PIN = 10 -EXTRUDER_HEATER_PIN = 9 -BED_HEATER_PIN = 11 -EXTRUDER_TEMPERATURE_SENSOR_CHANNEL = 0 +SPINDLE_PWM_PIN = 4 +FAN_PIN = 27 +EXTRUDER_HEATER_PIN = 18 +BED_HEATER_PIN = 22 +EXTRUDER_TEMPERATURE_SENSOR_CHANNEL = 2 BED_TEMPERATURE_SENSOR_CHANNEL = 1 -ENDSTOP_PIN_X = 12 -ENDSTOP_PIN_Y = 6 -ENDSTOP_PIN_Z = 5 +ENDSTOP_PIN_X = 23 +ENDSTOP_PIN_Y = 10 +ENDSTOP_PIN_Z = 25 # ----------------------------------------------------------------------------- # Behavior config