Welcome! Log In Create A New Profile

Advanced

Прошивка RAMPS 1.4

Posted by Iron 
Прошивка RAMPS 1.4
March 05, 2013 02:42PM
При подключении электроники столкнулся с проблемой: не могу понять как правильно прошить контроллер и установить дрова.
Прошивку (Marlin) отредактировал насколько смог, залил на ардуину, но в диспетчере устройств контроллер определяется как "Сопроцессор" и не хочет принимать никакие дрова. Как это победить?
Re: Прошивка RAMPS 1.4
March 06, 2013 03:14AM
Iron, какую Arduino спользуете? Драйвера для USB-UART установлены?
Re: Прошивка RAMPS 1.4
March 06, 2013 03:21AM
Стоит Arduino Mega 1280. Насчет usb-uart что то не припоминаю что устаналивал. Как проверить/установить?
Re: Прошивка RAMPS 1.4
March 06, 2013 05:04AM
Вот здесь в разделе 3 | Install the USB drivers описано как установить драйвера.

С помощью какой программы вы пытаетесь проверить работоспособность Arduino+RAMPS? Pronterface?
Re: Прошивка RAMPS 1.4
March 06, 2013 05:35AM
Работоспособность проверял только тестовой прошивкой - светодиод мигает)) Дальше пока не ушел из-за отсутствия драйверов. Вечером установлю дрова на usb, попробую запустить.
Re: Прошивка RAMPS 1.4
March 06, 2013 05:46AM
Дело в том, что если удалось прошить Arduino, значит с драйвером, скорее всего, проблем нет.
Попробуйте подключиться к marlin используя Pronterface, только сначала проверьте с каким baudrate сконфигурирован Marlin (скорее всего это 250000 или 115200).
Re: Прошивка RAMPS 1.4
March 06, 2013 12:13PM
Проверил скорость, оказалось 250000. А вот что мне написал Printrun:

Connecting...
start
Printer is now online.
echo: External Reset
Marlin 1.0.0
echo: Last Updated: Mar 6 2013 00:12:05 | Author: (none, default config)
Compiled: Mar 6 2013
echo: Free Memory: 5523 PlannerBufferBytes: 1232
Error:0
: Extruder switched off. MAXTEMP triggered !
Errortongue sticking out smileyrinter stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)
Re: Прошивка RAMPS 1.4
March 06, 2013 01:08PM
Подключил термопару и нагреватель экструдера, теперь вот такую ошибку выдает:
Error:0
: Extruder switched off. MINTEMP triggered !
Errortongue sticking out smileyrinter stopped deu to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)

Подозреваю, что что-то не так в самой прошивке. Попробую поковыряться еще
VDX
Re: Прошивка RAMPS 1.4
March 06, 2013 02:54PM
... your temptable didn't fit or the temperature sensor gives wrong temp-rreadings ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Прошивка RAMPS 1.4
March 06, 2013 03:12PM
Проблема в термисторе на экструдере. Точнее не в термисторе, а в термопаре, которая вместо него стоит. Прошивка не умеет с ней работать. Вот такая штука:

С обратной стороны 2 провода на мультиметр идут.
Re: Прошивка RAMPS 1.4
March 06, 2013 03:17PM
Подключил девайс к Pronterface, но возникла другая проблема - движки работают только в одну сторону. Попробовал инвертировать одну ось, так движок вообще не стал никуда двигаться. Может я чего не так подключил?

На принтере стоят вот эти движки:
PrimoPal PHB42S

Edited 1 time(s). Last edit at 03/06/2013 03:29PM by Iron.
VDX
Re: Прошивка RAMPS 1.4
March 06, 2013 03:34PM
... wen your endstops are 'active' then the axis runs only in one direction!

Check for correct wiring and polarity or deactivate them in the firmware ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Прошивка RAMPS 1.4
March 06, 2013 03:45PM
У меня 3 эндстопа стоят. в прошивке записаны так:

// corse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
// fine Enstop settings: Individual Pullups. will be ignord if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
#endif

Как их прописать правильно? А то у меня довольно туго с программированием((

Схематически концевики установлены вот так:


VDX
Re: Прошивка RAMPS 1.4
March 06, 2013 04:02PM
... it's not about the endstops, search for something like:

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
#define DISABLE_MAX_ENDSTOPS

... setting of "*_INVERTING = true;" will invert the endstop polarity.

... adding: "#define DISABLE_MIN_ENDSTOPS" could be enough to disable them completely ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Прошивка RAMPS 1.4
March 07, 2013 02:15AM
Попробуйте выполнить команду M119, она должна распечатать текущее состояние концевиков. Соответственно с помощью переменных типа *_INVERTING нужно добиться того, что бы при замкнутых концевиках команда M119 выводила состояние "triggered".
Re: Прошивка RAMPS 1.4
March 07, 2013 03:50PM
Прописал в прошивке инверсию Y оси и отключил максимальные концевики (если я правильно понял то что я сделал %)):

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

М119 пишет:

SENDING:M119
x_min:L y_min:H z_min:L

Включение/выключение инверсии меняет H на L. Это что значит?

Теперь, при данных настройках, если сдвинуть каретку по оси Х вправо, то можно ее вернуть в исходное положение. Однако сразу влево каретка ехать не хочет.

И еще такой вопрос, концевики при срабатывании должны разъединять контакт или соединять?
VDX
Re: Прошивка RAMPS 1.4
March 07, 2013 04:12PM
... with pullups and mechanical switches the endstop polarity is:
H = +5V => swith is open
L = 0V => switch is closed


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Прошивка RAMPS 1.4
March 07, 2013 04:28PM
то есть в рабочем положении концевики должны быть всегда открыты?
VDX
Re: Прошивка RAMPS 1.4
March 07, 2013 04:59PM
... this is defined by the polarity settings, can be either active-L or active-H.

With switches it's mostly set to 'open' (or H) when triggering the end-stop ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Прошивка RAMPS 1.4
March 07, 2013 05:55PM
Поковырялся я в прошивке и понял что знаний у меня явно недостаточно =( Никак не могу победить систему.

Выкладываю настройки механики из прошивки. Подскажите что прописано не так? Оси х и у движутся только в одну сторону, z движется ввниз и обратно вверх до исходной позиции (причем движение инвертировано). На срабатывание концевиков контроллер не реагирует и продолжает крутить движки.

//===========================================================================
//=============================Mechanical Settings===========================
//===========================================================================

// Uncomment the following line to enable CoreXY kinematics
// #define COREXY

// corse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
// fine Enstop settings: Individual Pullups. will be ignord if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
//#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders

// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false // For all extruders

#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing
#define X_MAX_POS 205
#define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0
#define Z_MAX_POS 100
#define Z_MIN_POS 0

#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)

// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
#define X_HOME_POS 0
#define Y_HOME_POS 0
#define Z_HOME_POS 0

//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)

// default settings

#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200*8/3,760*1.1} // default steps per unit for ultimaker
#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.

#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1500 // X, Y, Z and E max acceleration in mm/s^2 for r retracts

//
#define DEFAULT_XYJERK 20.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 5.0 // (mm/sec)
VDX
Re: Прошивка RAMPS 1.4
March 08, 2013 02:53AM
... can only guess, as I don't have your setup ...

Iron Wrote:
-------------------------------------------------------
> // corse Endstop Settings
> #define ENDSTOPPULLUPS // Comment this out
> (using // at the start of the line) to disable the
> endstop pullup resistors
>
> #ifdef ENDSTOPPULLUPS
> //#define ENDSTOPPULLUP_XMAX
> #define ENDSTOPPULLUP_YMAX
... ist it really YMAX?
You have disabled testing for MAX-endstops with "#define DISABLE_MAX_ENDSTOPS"

> //#define ENDSTOPPULLUP_ZMAX
> #define ENDSTOPPULLUP_XMIN
> //#define ENDSTOPPULLUP_YMIN
... uncomment this for YMIN-switch

> #define ENDSTOPPULLUP_ZMIN
... is it really Z_MIN?

> #endif


... check if your endstops change polarity if triggered

> // The pullups are needed if you directly connect
> a mechanical endswitch between the signal and
> ground pins.
> const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
... set this to "false" to invert the H/L-polarity

> const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
... set this to "false" to invert the H/L-polarity

> const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
> #define DISABLE_MAX_ENDSTOPS
... here you've disabled testing for MAX-switches


> #define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
> #define INVERT_Y_DIR false // for Mendel set totrue, for Orca set to false
> #define INVERT_Z_DIR false // for Mendel set to false, for Orca set to true
... set this to "true" for inverting the direction of Z ... rewire or redefine then the switch accordingly


> // ENDSTOP SETTINGS:
> // Sets direction of endstops when homing; 1=MAX, -1=MIN
> #define X_HOME_DIR -1
> #define Y_HOME_DIR -1
> #define Z_HOME_DIR -1
... check here, which setting is correct when changing the Z_DIR


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Прошивка RAMPS 1.4
March 08, 2013 03:34AM
Iron, в выводе команды M119 - x_min:L y_min:H z_min:L, буквы L и H говорят о логическом состоянии концевика - открыт/сработал . В последней версии Marlin вывод этой команды более нагляден, т.к. L/H там заменены на open/triggered.

Проще всего разобраться с концевиками так: поставьте каретку в такое положение, что бы она не замыкала ни один концевик, выполните команду M119, вывод должен быть x_min:L y_min:L z_min:L, т.к. все концевики открыты. Если вывод не такой, а какие-то концевики в состоянии H - поменяйте у них значение _INVERTING на противоположное.

Потом переместите каретку что бы она замкнула концевик x, и снова выполните M119, вывод должен быть: x_min:H y_min:L z_min:L. То же самое сделайте для осей Y и Z.

После этого, выполните команду G28 (home all axit) - каретка должна переместится до замыкания всех концевиков и остановиться.
Re: Прошивка RAMPS 1.4
March 08, 2013 06:17AM
Сделал. Оси X и Z нормально работают, а вот Y ни в какую не хочет на эндстоп реагировать. Конфигурация вот такая:

// corse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
// fine Enstop settings: Individual Pullups. will be ignord if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops.
#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders

// Disables axis when it's not being used.
#define DISABLE_X true
#define DISABLE_Y true
#define DISABLE_Z true
#define DISABLE_E false // For all extruders

#define INVERT_X_DIR false // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E2_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing
#define X_MAX_POS 150
#define X_MIN_POS 0
#define Y_MAX_POS 150
#define Y_MIN_POS 0
#define Z_MAX_POS 100
#define Z_MIN_POS 0

#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)

// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
#define X_HOME_POS 0
#define Y_HOME_POS 0
#define Z_HOME_POS 0


Что я не так указал?
Re: Прошивка RAMPS 1.4
March 08, 2013 06:19AM
Скорее всего неисправен концевик, или неправильно подключен. Попробуйте замкнуть концевик для Y руками. Или для теста подключить концевик с оси X на Y.
Re: Прошивка RAMPS 1.4
March 08, 2013 06:26AM
Концевик работает. замкнул его, параметр изменился. думаю что-то в прошивке не так

SENDING:M119
x_min:L y_min:L z_min:L
>>>m119
SENDING:M119
x_min:L y_min:H z_min:L

При нажатии Y HOME, ось движется в обратном направлении от концевика.

Edited 1 time(s). Last edit at 03/08/2013 06:29AM by Iron.
Re: Прошивка RAMPS 1.4
March 08, 2013 07:06AM
Исправил направление движения поменяв местами мин и макс (в скобках)

#define Y_MAX_LENGTH (Y_MIN_POS - Y_MAX_POS)

но при срабатывании концевика двигатель по прежнему не останавливается.
Re: Прошивка RAMPS 1.4
March 08, 2013 07:07AM
Это легко решить с помощью инверсии направления вращения мотора для оси Y, поменяйте значение INVERT_Y_DIR на противоположное.
Мин/макс менять не нужно, верните назад smiling smiley

Edited 1 time(s). Last edit at 03/08/2013 07:08AM by alik.
Re: Прошивка RAMPS 1.4
March 08, 2013 07:15AM
Все оси благополучно вернулись в домашнее положение. Но управление осью Y инвертировано. так и должно быть?
Re: Прошивка RAMPS 1.4
March 08, 2013 09:54AM
Что значит инвертировано? Если выполнить команду G1 Y100, каретка должна сместиться по оси Y примерно на середину. Если так и происходит, значит все в порядке.
Re: Прошивка RAMPS 1.4
March 08, 2013 05:02PM
С управлением все нормально, это я затупил слегка))
Выполнил команду g1 y100. Каретка прошла через всю ось до конца и немного подолбилась в край. До середины каретка доходит при команде g1 y50. Если команда указывается в сантиметрах, то тут явно что-то не так...
Sorry, only registered users may post in this forum.

Click here to login