Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all 12089 articles
Browse latest View live

Re: Fan etc on external i2c-controller

$
0
0
not really, I mostly copied the guts of what adafruit servo driver does...

Perhaps EXPERIMENTAL_I2CBUS is not functional...

If I get a chance ill see if I can have a play on real hardware

Re: Fan etc on external i2c-controller

$
0
0
ok.. ive set up a test environment

made a simple sketch, this works fine

#include

// PCA9685 I2C address is 0x40(64)
#define Addr 0x40

int mode = 0;
void setup()
{
  // Initialise I2C communication as MASTER
  Wire.begin();

  // Start I2C Transmission
  Wire.beginTransmission(Addr);
  // Select MODE1 register
  Wire.write(0x00);
  // Response to LED all-call I2C address
  Wire.write(0x01);
  // Stop I2C Transmission
  Wire.endTransmission();
  delay(5);

// Start I2C Transmission
    Wire.beginTransmission(Addr);
    // Select ALL_LED_ON_L register
    Wire.write(0x06);
    // ALL_LED_ON lower byte
    Wire.write(0x00);
    // Stop I2C Transmission
    Wire.endTransmission();
    
    // Start I2C Transmission
    Wire.beginTransmission(Addr);
    // Select ALL_LED_ON_H register
    Wire.write(0x07);
    // ALL_LED_ON higher byte
    Wire.write(0x00);
    
    // Stop I2C Transmission
    Wire.endTransmission();
    
    
    // Start I2C Transmission
    Wire.beginTransmission(Addr);
    // Select ALL_LED_OFF_L register
    Wire.write(0x08);
    // ALL_LED_OFF lower byte
    Wire.write(0xFF);
    
    // Stop I2C Transmission
    Wire.endTransmission();
    
    // Start I2C Transmission
    Wire.beginTransmission(Addr);
    // Select ALL_LED_OFF_H register
    Wire.write(0x09);
    // ALL_LED_OFF higher byte
    Wire.write(0x0F);
    // Stop I2C Transmission
    Wire.endTransmission();
}

void loop()
{
 
}


the exact same thing using gcode, also works.
M260 A64
M260 B0
M260 B1
M260 S1

M260 A64
M260 B6
M260 B0
M260 S1

M260 A64
M260 B7
M260 B0
M260 S1

M260 A64
M260 B8
M260 B255
M260 S1

M260 A64
M260 B9
M260 B15
M260 S1

Using G0 vs G1 when testing movements

$
0
0
Sorry I tried to search this topic but didn’t find anything.

I use a command G0 x150 y150 z0 to check / calibrate z offset.

I just saw the same command but using G1 x150 y150 z0 ..

Why/when would you use G1 vs G0?

Re: Using G0 vs G1 when testing movements

$
0
0
Its legacy from GRBL,

G0 : Rapid Move
G1 : Linear Move

but in reprap G0 and G1 are identical

Re: Fan etc on external i2c-controller

$
0
0
WORKS!!!
Thank you very much!!

But at the moment I don't understand it completely...

Iam working with this datasheet

Example:
M260 A64 ;i2c-address in decimal
M260 B9 ;choose "LED0_OFF_H" in the Register definitions (chapter 7.3 / page 10)
M260 B15 ; what does this mean? Something in Table 7 / page 21??
M260 S1; send to bus

Perhapse you can show me what I would have to change in the whole code if I want to switch it off?
And what do I have to change to choose another channel? Like LED1 ?

THANKS A LOT!

Compiler Errors please help

$
0
0
I'm attempting to install Marlin on a CTC Dual fitted with a MKS Gen L board but I'm in trouble.

The printer has 5 stepper motors one each for the two extruders plus one for each axis.

The compiler is returning :-

SanityCheck.h:1607:1: error: static assertion failed: DEFAULT_MAX_FEEDRATE has too many elements
and
SanityCheck.h:1606:1: error: static assertion failed: DEFAULT_AXIS_STEPS_PER_UNIT has too many elements

Now both have five elements one for each stepper so the number of elements is in fact correct.

Any help would be much appreciated.

Thanks All. Aamcle

Re: Compiler Errors please help

$
0
0
When Adding a dual extuder you will need to add the Steps as shown in this sample of my Dual Extruder Configuration

// X, Y, Z, E0, E1 [E2[, E3[, E4]]]]
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 94.4962144, 94.4962144 }

// X, Y, Z, E0, E1 [E2[, E3[, E4]]]]
#define DEFAULT_MAX_FEEDRATE { 200, 200, 5, 25, 25 }

// X, Y, Z, E0, E1 [E2[, E3[, E4]]]]
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 3000, 3000 }

I found a version of Marlin 1.1.5 already setup for Dual Extruder and simply added my settings to the configuration files.

One for BOARD_MKS_13

Could not find a Way to do it using my mother board It is Extruder, Fan, Bed should be Extruder, Extruder, Fan, Bed

BOARD_RAMPS_13_EFB

I believe it was Originally setup for a Dual Extruder CR 10

Like in this Older version of Marlin documentation here, Will post when I remember Where I found the Dual Extruder Firmware.
[www.instructables.com]

And Here
[reprap.org]

Re: Compiler Errors please help

$
0
0
Thats what I did, 5 elements one for each of the steppers.

If I comment out :- //#define DISTINCT_E_FACTORS

It should use the same value for both of the extruders, I'll try it in the morning.


Thanks. Aamcle

Re: Using G0 vs G1 when testing movements

$
0
0
Quote
Dust
Its legacy from GRBL,

G0 : Rapid Move
G1 : Linear Move

but in reprap G0 and G1 are identical

Not just GRBL, but CNC machines in general, see [ws680.nist.gov]. GCode was invented for CNC machines, then when 3D printers came along they adopted GCode too.

Re: Fan etc on external i2c-controller

$
0
0
This is initialization, only needs to be done once

M260 A64
M260 B0
M260 B1
M260 S1

this turns on the led0 and sets the PWM 0/4095 (0 On/4095 Off, this is reverse of what is expected, but works)
M260 A64
M260 B6  ;LED_0_ON_L register address see registers 6 - 69 . Each Led has 4 registers a ON_L, ON_H, OFF_L and OFF_H
M260 B0
M260 S1

M260 A64
M260 B7 ;LED_0_ON_H  
M260 B0
M260 S1

M260 A64
M260 B8 ;LED_0_OFF_L
M260 B255
M260 S1

M260 A64
M260 B9 ;LED_0_OFF_H
M260 B15
M260 S1

so to turn it off you would send
M260 A64
M260 B6  ;LED_0_ON_L register address see registers 6 - 69 . Each Led has 4 registers a ON_L, ON_H, OFF_L and OFF_H
M260 B255
M260 S1

M260 A64
M260 B7 ;LED_0_ON_H  
M260 B15
M260 S1

M260 A64
M260 B8 ;LED_0_OFF_L
M260 B0
M260 S1

M260 A64
M260 B9 ;LED_0_OFF_H
M260 B0
M260 S1

and to turn on say led13

M260 A64
M260 B58  ;LED_13_ON_L  (led * 4 +6, led is in range  at 0..15) So we want led 13, 13*4+6 = 58
M260 B0
M260 S1

M260 A64
M260 B59 ;LED_13_ON_H (+1 from  LED_13_ON_L)
M260 B0
M260 S1

M260 A64
M260 B60 ;LED_13_OFF_L (+2 from  LED_13_ON_L)
M260 B255
M260 S1

M260 A64
M260 B61 ;LED_13_OFF_H (+3 from  LED_13_ON_L)
M260 B15
M260 S1

Each led takes two values On time and Off time, these can have values from 0..4095
If you have ever looked at how computers store numbers you know that a 8 bit number can only be 0..255, so to store 0..4096 you need two bytes, one is called L for low byte and the other H for high byte.

Calculating L and H values

Say you want to set 75% on,25%off (always has to add up to 100 %)
4095 * 0.75 = 3071, off value (remember its reversed, must be a whole number)
4095 - 3071 = 1024, on value

Easiest way to split into L and H is to convert it to Hexadecimal
3071 = BFF hex, you split this into two B and FF. B is the High value and FF is the Low value, then just convert it back to decimal, B = 11 and FF is 255
So you end up with H11 and L255
1024 = 400 hex so you end up with H4 and L0

full on is 4095 = FFFhex, F is high, FF is low, F = 15 and FF = 255, so you end up with Low = 255, High = 15

G91G0X1

$
0
0
bugfix-2.0.x
Im new to Marlin and try to run a CNC mill with my RepRap.
Why is single line command G91G0X1 not running?

G28 Auto Home Not Raising Z Axis

$
0
0
Hello Everyone,
I am using Marlin version 1.8.7 and I am trying to get the G28 command to raise the nozzle before moving but unfortunately it's not and it's scraping against my bed when homing.

Here's the configuration.h section for my Auto Leveling. I've tried to adjust the variables #define Z_RAISE_BEFORE_HOMING 10 and #define Z_RAISE_BETWEEN_PROBINGS 10 with no success. Does anyone have any suggestions?

//******************************|||||||||||||||||****************************
//============================= Bed Auto Leveling ===========================

#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)

#ifdef ENABLE_AUTO_BED_LEVELING

  // these are the positions on the bed to do the probing
  #define LEFT_PROBE_BED_POSITION 15
//  #define RIGHT_PROBE_BED_POSITION 125
  #define RIGHT_PROBE_BED_POSITION 153
  #define BACK_PROBE_BED_POSITION 150
  #define FRONT_PROBE_BED_POSITION 20

  // these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
//  #define X_PROBE_OFFSET_FROM_EXTRUDER -34
#define X_PROBE_OFFSET_FROM_EXTRUDER 84 //X
  #define Y_PROBE_OFFSET_FROM_EXTRUDER 100 //Y
//  #define Z_PROBE_OFFSET_FROM_EXTRUDER -19.2
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 //Z

  #define Z_RAISE_BEFORE_HOMING 10       // (in mm) Raise Z before homing (G28) for Probe Clearance.
                                        // Be sure you have this distance over your Z_MAX_POS in case

  #define XY_TRAVEL_SPEED 8000         // X and Y axis travel speed between probes, in mm/min

  #define Z_RAISE_BEFORE_PROBING 20    //How much the extruder will be raised before traveling to the first probing point.
  #define Z_RAISE_BETWEEN_PROBINGS 10  //How much the extruder will be raised when traveling from between next probing points


  //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
  //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
  // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.

  #define PROBE_SERVO_DEACTIVATION_DELAY 300


//If you have enabled the Bed Auto Levelling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!

  #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
                          // When defined, it will:
                          // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
                          // - If stepper drivers timeout, it will need X and Y homing again before Z homing
                          // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
                          // - Block Z homing only when the probe is outside bed area.

  #ifdef Z_SAFE_HOMING

    #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
    #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)

  #endif

  // with accurate bed leveling, the bed is sampled in a ACCURATE_BED_LEVELING_POINTSxACCURATE_BED_LEVELING_POINTS grid and least squares solution is calculated
  // Note: this feature occupies 10'206 byte
  #define ACCURATE_BED_LEVELING

  #ifdef ACCURATE_BED_LEVELING
     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
    #define ACCURATE_BED_LEVELING_POINTS 2
  #endif

#endif


// The position of the homing switches
//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)

//Manual homing switch locations:
// For deltabots this means top and center of the cartesian print volume.
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.

//// 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   {80,80,1600,80.22}  // default steps per unit for Ultimaker
#define DEFAULT_MAX_FEEDRATE          {500, 500,   2.5, 250}    // (mm/sec)
#define DEFAULT_MAX_ACCELERATION      {1500,1500,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 retracts

// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
// #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis

// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK                20.0    // (mm/sec)
#define DEFAULT_ZJERK                 0.4     // (mm/sec)
#define DEFAULT_EJERK                 5.0    // (mm/sec)

Re: G28 Auto Home Not Raising Z Axis

$
0
0
My suggestion is to ask in the correct sub forum.

Re: Compiler Errors please help

$
0
0
It's working or at least compiling. The error was the distinct e factors.

Thanks aamcle

Re: G28 Auto Home Not Raising Z Axis

$
0
0
Your Marlin configuration seems correct. Not sure why it is not allowing the 10mm clearance when homing.

What version of Marlin are you using? It appears to be a older version.

The newer versions of marlin use
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points

Z steppers in series on E1, now they move seperately

$
0
0
Hi Everyone,
Alan from London been into 3d printing about 6 months now, built my anet a8 updated noe to bowden hotend and 2 mosfets
and updated the Y carriage.
But there my bubble went bang, now my Z motors move up and down one after the other.I,ve tried different drivers but without
any change, tried reflashing firmware, checking the cables but to no avail. What am I missing that would make my world all
shiny and glittery once again.

Any help appreciated. Alan

Re: Z steppers in series on E1, now they move seperately

$
0
0
Let's Start with What Version of Marlin are you using?

Can you upload your Configuration.h, Configuration_Adv.h file to a online Storage Like Google drive and post a link so we can examine.

Quote
Alan_J
My anet a8 updated now to bowden hot-end and 2 mosfets and updated the Y carriage.
Now my Z motors move up and down one after the other.
Any help appreciated. Alan

Updated 2 Mosfets? Can you please give more details on this upgrade.

Re: Z steppers in series on E1, now they move seperately

$
0
0
Thank you for responding Clif,

Sorry for lack of details Marlin 1.1.9 link to the 2 config files is below.

Thank you again.


Re: Z steppers in series on E1, now they move seperately

Adding a drill to a 3D Printer

$
0
0
Hello,

I have a dual extruder 3D printer and I aim to remove the 2nd extruder and mount a spindle to it. The goal is to have the capability to pause the printer mid print, and do some subtractive manufacturing process, and then resume the print and repeat. I am wondering what changes to the software need to be made to accomplish this task. or if this can be done by the slicer
Viewing all 12089 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>