Welcome! Log In Create A New Profile

Advanced

Been up against a wall with Marlin extruding

Posted by alnmike 
Been up against a wall with Marlin extruding
February 18, 2012 12:33AM
Hey everyone. Finally got my prusa printing, it just needs to be calibrated now.

Ive got Arduino 0022 with Marlin firmware, going to post the config below. Im using RAMPS 1.3 with opto endstops.

My problem is no matter what I change the steps_per_mm setting, every time I try to extrude 30mm, I end up getting 18-22.

DEFAULT_AXIS_STEPS_PER_UNIT {63.4149, 63.4149, 933.3333, 2224}

Ive changed it everywhere from 700 to 3200, no change, right now its 933.3333. So I ask people who know coding heh.
If I screwed up somewhere else please let me know.
My X and Y axis are pretty spot on, need to fine tune the Z axis, but right now the extruder is holding me up pretty good.

--------------------------------------------------

#ifndef __CONFIGURATION_H
#define __CONFIGURATION_H

// This configurtion file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration

//User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to THIS file by the user have been successfully uploaded into firmware.
#define STRING_VERSION_CONFIG_H "2012-02-08j" //Personal revision number for changes to THIS file.
#define STRING_CONFIG_H_AUTHOR "username" //Who made the changes.

// This determines the communication speed of the printer
//#define BAUDRATE 250000
#define BAUDRATE 115200

//// The following define selects which electronics board you have. Please choose the one that matches your setup
// MEGA/RAMPS up to 1.2 = 3,
// RAMPS 1.3 = 33
// Gen6 = 5,
// Sanguinololu 1.2 and above = 62
// Ultimaker = 7,
// Teensylu = 8,
// Gen3+ =9
#define MOTHERBOARD 33

//===========================================================================
//=============================Thermal Settings ============================
//===========================================================================

//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor
// 2 is 200k thermistor
// 3 is mendel-parts thermistor
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is ParCan supplied 104GT-2 100K
// 6 is EPCOS 100k
// 7 is 100k Honeywell thermistor 135-104LAG-J01

#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

// Actual temperature must be close to target for this long before M109 returns success
#define TEMP_RESIDENCY_TIME 1 // (seconds)
#define TEMP_HYSTERESIS 3 // (C°) range of +/- temperatures considered "close" to the target one

// The minimal temperature defines the temperature below which the heater will not be enabled It is used
// to check that the wiring to the thermistor is not broken.
// Otherwise this would lead to the heater being powered on all the time.
#define HEATER_0_MINTEMP 5
#define HEATER_1_MINTEMP 5
#define HEATER_2_MINTEMP 5
#define BED_MINTEMP 5

// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
#define HEATER_0_MAXTEMP 275
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define BED_MAXTEMP 150

// PID settings:
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PID_MAX 255 // limits current to nozzle; 255=full current
#ifdef PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
#define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
#define K1 0.95 //smoothing factor withing the PID
#define PID_dT 0.128 //sampling period of the PID

// If you are using a preconfigured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
#define DEFAULT_Kp 22.2
#define DEFAULT_Ki (1.25*PID_dT)
#define DEFAULT_Kd (99/PID_dT)

// Makergear
// #define DEFAULT_Kp 7.0
// #define DEFAULT_Ki 0.1
// #define DEFAULT_Kd 12

// Mendel Parts V9 on 12V
// #define DEFAULT_Kp 63.0
// #define DEFAULT_Ki (2.25*PID_dT)
// #define DEFAULT_Kd (440/PID_dT)
#endif // PIDTEMP

//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
//can be software-disabled for whatever purposes by
#define PREVENT_DANGEROUS_EXTRUDE
#define EXTRUDE_MINTEMP 170
#define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.

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

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

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

// 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 false, for Orca set to false
#define INVERT_Z_DIR true // for Mendel set to true, 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 zero.
#define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
#define X_MAX_LENGTH 205
#define Y_MAX_LENGTH 205
#define Z_MAX_LENGTH 200

//// 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 {63.4149, 63.4149, 933.3333, 2224} //{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 {900, 900, 80, 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 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // 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)

//===========================================================================
//=============================Additional Features===========================
//===========================================================================

// EEPROM
// the microcontroller can store settings in the EEPROM, e.g. max velocity...
// M500 - stores paramters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable eeprom support
//#define EEPROM_SETTINGS
//to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
// please keep turned on if you can.
//#define EEPROM_CHITCHAT

//LCD and SD support
//#define ULTRA_LCD //general lcd support, also 16x2
#define SDSUPPORT // Enable SD Card Support in Hardware Console

//#define ULTIPANEL
#ifdef ULTIPANEL
//#define NEWPANEL //enable this if you have a click-encoder panel
#define SDSUPPORT
#define ULTRA_LCD
#define LCD_WIDTH 20
#define LCD_HEIGHT 4
#else //no panel but just lcd
#ifdef ULTRA_LCD
#define LCD_WIDTH 16
#define LCD_HEIGHT 2
#endif
#endif

// M240 Triggers a camera by emulating a Canon RC-1 Remote
// Data from: [www.doc-diy.net]
// #define PHOTOGRAPH_PIN 23

#include "Configuration_adv.h"
#include "thermistortables.h"

#endif //__CONFIGURATION_H
Re: Been up against a wall with Marlin extruding
February 18, 2012 12:54PM
The parameters are in order of X, Y, Z, E. If I read your post correctly you are changing Z not E. What do you get returned from an M503 command (show current settings)? I believe you currently have the steps per unit for the extruder at 2224. You can try varying the parameters with an M92 command - M92 E650 would match my settings for extruder. Once you have dialed it in, use M500 to store those settings in EEPROM.

Look at the main file in the Marlin package for all the G and M codes that Marlin understands.
Re: Been up against a wall with Marlin extruding
February 18, 2012 07:36PM
Hah, I dont know how to initiate a M503 or any other command. My experience goes far enough to press buttons in pronterface.
Would I have to open the gcode file to input the M commands?

I changed the XY and Z values as well as the extruder values. I kept in mind it was in xyze format, but theres a real possibility I got stuff backwards.
Re: Been up against a wall with Marlin extruding
February 18, 2012 08:10PM
Ran through everything again.

Heres my current settings:
#define DEFAULT_AXIS_STEPS_PER_UNIT {64.7091, 64.1202, 2305.6769, 3579.3991}

With the settings I posted earlier, I did another calibration of all motors. XYZ is spot on now, within about 1%.
I got a measurement of 18.64 out of a requested 30mm, so I did 2224/18.64*30= 3579.3991. I then measured the 3579 value, and out of 30mm, I get 16.70mm. My next step would be to go up to 6430, but this has been the loop im in, If I go back to 700, im still at like 18mm lol.

Also tried setting slic3r to 2.5mm dia or 3.5 dia to try and bypass the extruder problem. 3.5 gets a little more plastic extruded. Also the extrusion multiplier set at 1.5 doesnt seem any different than 1.

Edited 1 time(s). Last edit at 02/18/2012 09:04PM by alnmike.
Re: Been up against a wall with Marlin extruding
February 18, 2012 10:42PM
In Pronterface, below the dialog window to the right side there is an input box and a Send button. Assuming you've connected to the printer and saw legible text (even if it's meaningless to you right now) show up in that dialog window, just type (I think capitalization is needed) M503 and hit the Send button. More text should appear, mostly lines that start with echo: and then show you the M-codes you can adjust without recompiling and their current values. For example, you might see M203 X800.00 Y800.00 Z2.50 E45.00 telling you those max feedrates. If you only want to change the E value, in the input box type M203 E20 and hit the Send button, to slow down the max extruder feedrate.

If your g-code tells the firmware to extrude above the max rate, you only get the max rate. Try adjusting the parameters real time instead of recompiling the firmware, and once you have them dialed in, send an M500 to store them in EEPROM. FWIW, my steps per unit for E using a Greg's Wades extruder and a bolt I hobbed myself poorly, is only 650.

Trust me, you REALLY want to get this right in the firmware instead of compensating with Slic3r, Skeinforge, Repsnapper or other software, because otherwise you will be constantly chasing other problems.
Re: Been up against a wall with Marlin extruding
February 18, 2012 11:54PM
First, I want to thank you for your help so far and in the future heh.

Ok, here is the text in pronterface:

Connecting...
start
Printer is now online.
echo:Marlin: 1.0.0 RC1
echo:Configuration.h: 2012-02-08j | Author: username
echo:Free Memory:4899 PlannerBufferBytes:1168
echo:Using Default settings:
echoconfused smileyD init fail
workDir open failed
ok T:22.03 B:0.00 @:0
>>>M503
SENDING:M503
>>>M503
SENDING:M503
Disconnected.


I sent M503 and waited 2 minutes, then tried again and disconnected. In between attempts I moves the X axis just to see if it was frozen, everything was fine. Im not worried about the SD fail, its not hooked up.

Another question is should I mess around with the feedrate, when its the total feed length that refuses to be corrected?
Im pretty sure my math was right, I just cant seem to find a reason that the steps per mm setting isnt taking for the extruder. Its fine for the other motors, altering the value alters the real movements.

I want to clarify, I am familiar with code, just not coding smiling smiley
I can read what should be the setting for what, especially with how well commented Marlin firmware is, the advanced settings are a bit beyond me, but thats for the future.

Im only messing around with Slic3r settings to hopefully give me an idea of what im screwing up with the firmware.
Im 95% sure that I have a .5mm nozzle size, I got it months ago and dont have a way to check it now, even though that wouldnt have a bearing on the firmware issues.
Re: Been up against a wall with Marlin extruding
February 19, 2012 03:37PM
I went back unthread and re-looked at your configuration.h file and realized its different than mine. I am using marlin 1.0.0 beta 1 where you have RC1. Try this. Change the version string to today's date andouille in your name for username at the top of the file, and then set your E to 650. Recompile and re-upload to the Arduino again. After it uploads, go pack into Pronterface and connect to the printer. Does your name and today's date show up in the dialog window? If not, unplug power and the USB from the Arduino and reapply them, then reconnect via Pronterface. If you still don't see your name, then we will know it's in the upload that things are failing.
Re: Been up against a wall with Marlin extruding
February 19, 2012 07:13PM
Hmm, wish it wasn't connecting :/ That would be easier to solve.

Connecting...
start
Printer is now online.
echo:Marlin: 1.0.0 RC1
echo:Configuration.h: 2-19-12 | Author: Mike
echo:Free Memory:4899 PlannerBufferBytes:1168
echo:Using Default settings:
echoconfused smileyD init fail
workDir open failed
ok T:23.16 B:0.00 @:0
Disconnected.


Do you think changing to a beta of Marlin would be the ticket?

Edited 1 time(s). Last edit at 02/19/2012 07:14PM by alnmike.
Re: Been up against a wall with Marlin extruding
February 19, 2012 08:30PM
That would be one thing, another would be to hook up your wires from the extruder to another spot on the RAMPS board to see isolate the stepper driver, motor, and wiring. Are all four of your stepper motors the same?
Re: Been up against a wall with Marlin extruding
February 21, 2012 03:26PM
All 5 of my motors are Nema 17's. I could switch the wires for the x-axis and extruder or something, I dont feel comfortable touching wires to parts of my board.
Re: Been up against a wall with Marlin extruding
March 04, 2012 08:04PM
Mike,
Have you made any progress in diagnosing the problem?
Re: Been up against a wall with Marlin extruding
March 05, 2012 09:30PM
Changing the firmware settings continues to have little effect on extruder, still changes the other axis's though, no idea...
New symptom that might be related. If I tell pronterface to extrude 30mm at 15mm/min it will extrude for exactly 1 minute then stop, its supposed to extrude for 2 minutes. It also extrudes about 18-22mm worth of input lol. Somethings fishy there and im pretty sure its related to my original problem.

But, ive got an update of a video and some photos.
Heres my short video taken just now: [youtu.be]

Ive uploaded some photos, the best print so far is the stone village house that took about 5 hours to print. After that, the kapton tape has been oozing ever since, creating black streaks and chunks in the prints. Ive since removed the insulating blanket to make the problem less severe. I must have gotten a cheap batch of kapton from amazon because its definately not supposed to melt at these temps.

Heres the pictures of what ive been up to:
[photobucket.com]
Re: Been up against a wall with Marlin extruding
March 05, 2012 09:45PM
Sounds to me that your hotend can not keep up with the speed you are trying to extrude and then the pinch wheel (hobbed bolt) slips. The reason I say this is because you probably have 18-22mm's of molten filament when you start to extrude and it all comes out. Then the filament slips when the unmelted filament reaches the tip.

What type of hotend do you have?
PLA or ABS?
What temperature?

What type of extruder?
Do you have springs on the Idler?
Do you have the Idler applying a lot of pressure on the filament?

Edited 1 time(s). Last edit at 03/05/2012 09:53PM by Sublime.


FFF Settings Calculator Gcode post processors Geometric Object Deposition Tool Blog
Tantillus.org Mini Printable Lathe How NOT to install a Pololu driver
Re: Been up against a wall with Marlin extruding
March 05, 2012 10:57PM
Just watched the video and I see you are using PLA and the hotend is either a makergear or homemade. I also notice it is really long and most likely the hot zone is too long. I would add a fan blowing across the upper part of the hotend. You should be able to touch the coldzone of the hotend without being burnt. You want it to be below 60c at the top and it should only go above 60c in the last 10-20mm before the heater.

Edited 1 time(s). Last edit at 03/05/2012 10:57PM by Sublime.


FFF Settings Calculator Gcode post processors Geometric Object Deposition Tool Blog
Tantillus.org Mini Printable Lathe How NOT to install a Pololu driver
Sorry, only registered users may post in this forum.

Click here to login