Marlin firmware configuration?
Posted: Wed Sep 04, 2013 6:40 pm
Hello everyone. I've been a long-time creeper following through this and many other forums and resources, but I am having an issue that I can't quite solve.
I have a nice, fully functioning single extruder Ord Bot Hadron that prints perfectly, but I am building a second dual extruder Ord Bot Hadron.
I bought the mechanical kit with steppers online and also got a SainSmart Arduino Mega 2560 r3, RAMPS 1.4, and LCD interface (http://www.sainsmart.com/starter-kit/3d-printer-parts/mega2560-smart-lcd-2004-controller-a4988-ramps-1-4-3d-printer-kit-for-reprap.html).
I have everything installed and wired, but I am having issues with the firmware. I have also adjusted the drivers to .4 volts on the pots.
I have done a lot of arduino projects with some fairly advanced features, so I am not new to the microcontroller scene, but I am subject to making mistakes and human error.
When I load this test code into the arduino (with everything attached) It runs fine. All axis's move at the right sequence and no stutter.
All seems well.
The problem is when I load any Marlin firmware.
When I do, I am sure to modify the config.h to reflect 34 (RAMPS 1.4 with dual extruders) for the motherboard type and I set the number of extruders to 2.
Everything seems to compile and load just fine, but when I try to slew any axis it stutters and makes noise as if the steppers were miswired.
I checked my pins.h under the 33 / 34 RAMPS 1.4 section to make sure the pin numbers match those in the test code listed above.
I had purchased my other Ord Bot from Punchtec.com, so I thought I would also try their firmware (modified as listed above) to match my new printer.
http://www.punchtec.com/downloads/software/Marlin_v103.zip
The LCD interface works well (stepping through menus, etc), but again, when I try to manually move any axis, the respective stepper(s) stutter.
I'm using Repetier-Host to interface with the printer, which seems to communicate just fine, but I still have the issues with the movement.
Additionally, when I try to manually turn on the extruder heaters and/or the heated bed, it acts like it turned them on, but there is no voltage going to them. Incidentally, the thermistors seem to read properly in the software and on the LCD.
I was thinking that I may have an issue with the arduino or the RAMPS, but since the test code moves everything just fine, I am more inclined to believe I have not configured the firmware properly.
Any thoughts?
I have a nice, fully functioning single extruder Ord Bot Hadron that prints perfectly, but I am building a second dual extruder Ord Bot Hadron.
I bought the mechanical kit with steppers online and also got a SainSmart Arduino Mega 2560 r3, RAMPS 1.4, and LCD interface (http://www.sainsmart.com/starter-kit/3d-printer-parts/mega2560-smart-lcd-2004-controller-a4988-ramps-1-4-3d-printer-kit-for-reprap.html).
I have everything installed and wired, but I am having issues with the firmware. I have also adjusted the drivers to .4 volts on the pots.
I have done a lot of arduino projects with some fairly advanced features, so I am not new to the microcontroller scene, but I am subject to making mistakes and human error.
When I load this test code into the arduino (with everything attached) It runs fine. All axis's move at the right sequence and no stutter.
- Code: Select all
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#define Z_STEP_PIN 46
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
void setup() {
pinMode(X_STEP_PIN, OUTPUT);
pinMode(X_DIR_PIN, OUTPUT);
pinMode(X_ENABLE_PIN, OUTPUT);
pinMode(Y_STEP_PIN, OUTPUT);
pinMode(Y_DIR_PIN, OUTPUT);
pinMode(Y_ENABLE_PIN, OUTPUT);
pinMode(Z_STEP_PIN, OUTPUT);
pinMode(Z_DIR_PIN, OUTPUT);
pinMode(Z_ENABLE_PIN, OUTPUT);
pinMode(E0_STEP_PIN, OUTPUT);
pinMode(E0_DIR_PIN, OUTPUT);
pinMode(E0_ENABLE_PIN, OUTPUT);
pinMode(E1_STEP_PIN, OUTPUT);
pinMode(E1_DIR_PIN, OUTPUT);
pinMode(E1_ENABLE_PIN, OUTPUT);
}
void step(int stepperPin, int steps, int dirPin, boolean dir){
digitalWrite(dirPin,dir);
delay(50);
for(int i=0;i<steps;i++){
digitalWrite(stepperPin, HIGH);
delayMicroseconds(800);
digitalWrite(stepperPin, LOW);
delayMicroseconds(800);
}
}
void loop()
{
digitalWrite(X_ENABLE_PIN, LOW );
digitalWrite(Y_ENABLE_PIN, LOW );
digitalWrite(Z_ENABLE_PIN, LOW );
digitalWrite(E0_ENABLE_PIN, LOW );
digitalWrite(E1_ENABLE_PIN, LOW );
step(X_STEP_PIN, 200, X_DIR_PIN, true);
step(Y_STEP_PIN, 200, Y_DIR_PIN, true);
step(Z_STEP_PIN, 200, Z_DIR_PIN, true);
step(E0_STEP_PIN, 200, E0_DIR_PIN, true);
step(E1_STEP_PIN, 200, E1_DIR_PIN, true);
delay(200);
step(X_STEP_PIN, 200, X_DIR_PIN, false);
step(Y_STEP_PIN, 200, Y_DIR_PIN, false);
step(Z_STEP_PIN, 200, Z_DIR_PIN, false);
step(E0_STEP_PIN, 200, E0_DIR_PIN, false);
step(E1_STEP_PIN, 200, E1_DIR_PIN, false);
delay(200);
}
All seems well.
The problem is when I load any Marlin firmware.
When I do, I am sure to modify the config.h to reflect 34 (RAMPS 1.4 with dual extruders) for the motherboard type and I set the number of extruders to 2.
Everything seems to compile and load just fine, but when I try to slew any axis it stutters and makes noise as if the steppers were miswired.
I checked my pins.h under the 33 / 34 RAMPS 1.4 section to make sure the pin numbers match those in the test code listed above.
I had purchased my other Ord Bot from Punchtec.com, so I thought I would also try their firmware (modified as listed above) to match my new printer.
http://www.punchtec.com/downloads/software/Marlin_v103.zip
The LCD interface works well (stepping through menus, etc), but again, when I try to manually move any axis, the respective stepper(s) stutter.
I'm using Repetier-Host to interface with the printer, which seems to communicate just fine, but I still have the issues with the movement.
Additionally, when I try to manually turn on the extruder heaters and/or the heated bed, it acts like it turned them on, but there is no voltage going to them. Incidentally, the thermistors seem to read properly in the software and on the LCD.
I was thinking that I may have an issue with the arduino or the RAMPS, but since the test code moves everything just fine, I am more inclined to believe I have not configured the firmware properly.
Any thoughts?