-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extruder working fine with A4988s, not with DRV8825, repetier works, marlin not #975
Comments
I have the same problem! With my logic analizer I have see that Marlin shoot out very little peak for control the driver. Maybe they are too little?? |
@yellobello what is happening exactly? no movement, vibration, skipping steps? I'm using DRV8825 (or DRV8824) on all axes, and it's working as expected. The difference between the drivers, except the obvious micro stepping, are the timings. DRV8824/5 requires, if I remember correctly, 2x longer pulses compared to A49xx drivers. Marcin |
When I heat up my hotend and extrude some filament, all that I get is some sounds from the stepper when trimming the pot, but not a single step(at least not one I noticed) At one very fine potentiometer setting I can see an attempt of the motor to move, but when I turn the pot one degree further it starts just making sound again.... |
Be sure you have a deasant speed setting in configuration.h |
Hi, There is definately something wrong here. I don't know if it's marlin or the steper drivers, but since everything works on repetier, my guess would be marlin. A little deeper guess is that it is somehow connected to the way marlin pulses the steppers. (pulse time width?) Afte playing arround with the speed a little I finally got all of them working, but then another issue emerged, which is VERY strange. Sometimes, mainly after homing or doing a G29, it happens that stepper motors that definately should not move at the moment do move, and this with the steps that are clearly meant for another motor. So the DRV8825s are promoted as plug-in replacements, and for me they are clearly not. As I found out, Marlin has no official way to alter pulse width... but I love to try arround with this in order to be sure that this is not the problem. |
From Pololu's site:
So they are not plug in replacements. You would need to add delays before the digital writes that set the step signal inactive. I can't explain why the wrong motors are stepping though. |
Example: for(unsigned char i=0; i<4;i++) {
if (e_steps[0] != 0) {
WRITE(E0_STEP_PIN, INVERT_E_STEP_PIN);
delayMicroseconds(2);
if (e_steps[0] < 0) {
WRITE(E0_DIR_PIN, INVERT_E0_DIR);
e_steps[0]++;
WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
}
else if (e_steps[0] > 0) {
WRITE(E0_DIR_PIN, !INVERT_E0_DIR);
e_steps[0]--;
WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
}
} This goes only for the extruder E0, so I ASSUME that WRITE(E0_STEP_PIN, INVERT_E_STEP_PIN); gives a HIGH signal while WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN); gives a LOW, right? And I only need this for |
Oh, I just saw that both HIGH and LOW need to be longer, so: for(unsigned char i=0; i if (e_steps[0] != 0) {
WRITE(E0_STEP_PIN, INVERT_E_STEP_PIN);
delayMicroseconds(2);
if (e_steps[0] WRITE(E0_DIR_PIN, INVERT_E0_DIR);
delayMicroseconds(2);
e_steps[0]++;
WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
delayMicroseconds(2);
}
else if (e_steps[0] > 0) {
WRITE(E0_DIR_PIN, !INVERT_E0_DIR);
e_steps[0]--;
WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN);
delayMicroseconds(2);
}
} |
The DIR pin needs to obey the setup time, which is only 650ns. I.e. it has to be set 650ns before the start of the step pulse. You don't need a delay after the falling edge because there is all of the step period between each pulse. Please put triple back quotes around you code snippets to make it readable. |
I didn't respond earlier, as this was, I am pretty sure, already implemented. Unfortunately I can't find it in the code. Martin |
So I guess It won't be a big deal to re-implement :-) thanks!! |
Greetings everyone, |
Indeed, you are a bit at the wrong place in this thread. Any news on the lost variable? Nothinman, you say that you use the TI chips as well, did you also notice some problems, or did you just add the code to be on the safe side, as the datasheet suggests? |
Hi, I can confirm that something is amiss with the DRV8825's and the current firmware, just swapped in new 8825's, X, Y, Z, did manage to move but nothing from the extruder stepper at all. Coil current was set the same as with my 4988's. The whine (even at low current settings) from the DRV8825's was quite bad, I am not sure if this is from the step pulse issue, or inherent to the DRV8825, but it was significant. Any further updates on this issue? |
It has no meaning whatsoever that your problems should be affecting Extruder motor only, so I think your problems should be found elsewhere and probably speed or direction related with E0 drive. |
When I did the swap last night I changed nothing but the steps/mm to be correct with the 1/32 micostepping. Set the coil current the same, then tried to move the axis, all worked except the extruder, even with no filament it wouldn't turn. Tried backing the speed down, speed up, current up, current down, changed direction, the extruder stepper would not step at all. These are the DRV8825's with the revised PCB which has the pull up resistor added to make them active without modiciation. Is it possible you have the first revision PCB? Could there be a difference? |
Note that chips vary from batch to batch. The datasheet will give the worst case pulse width that is guaranteed to work. If the pulses are too short they may work on some chips and not others and may depend on supply voltage and temperature. |
Sounds like the extruder isn't running because you have temperature Aaron |
The extruder was up to temp, that was ok. I swapped out two of the other DRV8825's from the X and Y axis which were running thoes axis ok, and they would not run on the extruder channel. It would vibrate as before but wouldn't move. I changed nothing in the firmware, powered down, swapped the A4988's back in, powered up, and it worked no problems all channels. |
Cold extrudes can be enabled by Gcode command M302, give it a try! |
I also still can't believe the whine that comes out of these things, do you guys who have been running the DRV8825's with no problems have this high pitch whine with them? |
The board probably has the wrong component values for the motor you are using. The chopper frequency should be ultrasonic but it seems yours is in audible range. |
That's unfortunate, even if the extruder channel issue gets worked out I am not sure I can stand the whine. I was hoping it could be a result of the incompatible pulse width. The interesting thing is all the channels appear to whine, but the extruder stepper is a completely different make, slightly higher torque stepper, than the X Y Z axis Japan servo steppers. It would be interesting to see if the DRV8825 has the same behaviour in a different carrier, such as the Azteeg X5 compared to the RAMPS, but that's an expensive experiement... |
I have been looking through the code to try and find if there is somewhere to change the step signal rate to try and see if that is the issue for my particular DRV8825's, as it looks like some are running them without problems. I can confirm with no changes to firmware, nozzle is still hot, just back to back swapping of the A4988's the extruder works no problem, I know nothinman commented about a STEPPER_DELAY define several days ago, any ideas? |
The first thing someone pointed out to me was also that I would do a cold extrude. Which was of course not the case. It seems that the issue is not with all DRV8825s, however I also tried some from GE tech and some from sainsmart, and both had the same issues. Keeping in mind that people are going to use finer microstepping (eric uses 128th microstepping on marlin2 board, I think) in the future and other stepper drivers, this is something that clearly should be adressed. Its good to have the A4988s working well and MOST other drivers too, but since those issues exist, why not look into them? |
Hi! ;-) |
i have a version of marlin https://github.com/jgrjgr/Marlin which i've modified with a longer pulse width and is configurable, plus also hardware pwm capability, this version will also run with the tb6560 drivers as well |
Nice one, jgrjgr! So what I found out is that you made this: void step_wait(){ and call It on every digital write to the step pin, right? Any experience with good values to use? |
Hello, I just mounted a DRV8825 driver onto my RAMPS board and I found no problems with my extruder. I noticed that: - nobody mentioned about the wiring schematics for your new driver DRV8825 to your bipolar motor. example: with the "old" driver ( A4988 ) you have 2 sets of wiring that energize your steppermotor. with the new Pololu driver ( DRV8825 ) you have also 2 sets of wiring. But different than above! Result: old driver wiring setting is not compatible with new one. So verify if your wiring is comform specification connected. Because if your wiring is not properly connected to you hardware. Then it will cause a problem. Make sure: Pot-resistor is turned to a minimal. P.S: I`ve nothing changed in the firmware. Works for me. |
@jgrjgr Your fork is quite frankly a mess, I wanted to test your pulse width modifications but untangling your changes is.. not fun. |
@oysteinkrog the line of interest in stepper.cpp is 243 which is where you set your time between steps. |
@yellobello when i was using the tb6560 drivers i found anything over 10 microseconds was enough to make them behave and from what i remember just having even a delay or 1 microsecond was enough to make a difference as well which went a little bit against the datasheet, as i recall the tb6560's need 30microsecond pulse width, what i also did to another version at one point was to reduce the number of steps marlin cold make during a single interupt down to 1 which also helped with those drivers, i image with the drv8825s the current value will suffice , however it doesn't take much to change it and have a play |
What version of the driver do you have md20a or b? Check the notice here about the A version (http://www.pololu.com/product/2132) |
is this issue still present or did someone find the fix for it? |
AFAIK this has not been fixed, but I can't test it. |
ok, i have marked it a potential bug.... if someone test this let us know |
I have not been able to reproduce it with my setup (ramps 1.4, Chinese 8825 They work fine, but I'm using them in 1/16 mode and at ~60mm/s |
maybe that could be the issue for those who have a problem? |
please open a new issue if this is still present in the current bug fixing branch https://github.com/ErikZalm/Marlin/tree/Marlin-v1-bug-fixing |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi, I did this post on the reprap forum, but after a couple of posts nobody seems to find an answer for this strange behaviour:
http://forums.reprap.org/read.php?13,358655,373531#msg-373531
The thing is that I can´t get DRV8825 driver working with my RAMPS board, but JUST for the EXTRUDER.
XYZ are working fine with the DRVs but not E0. I tried everything, swapping drivers, swapping stepper motors, nothing.
The only thing that helped was switching from Marlin to Repetier, and all of a sudden it worked.
So I asssume It´s Marlin related.... maybe the step width? Where on Marlin can this be set?
Any other ideas why it´s not working?
The text was updated successfully, but these errors were encountered: