Marlin not wanting to print "fast". What to do?

548 views
Skip to first unread message

Eric Pavey

unread,
Feb 20, 2016, 7:36:07 PM2/20/16
to 3D Printer Tips, Tricks and Reviews
I have a custom built "c-bot":  Mainboard is a Rumba with DRV8825's, and the firmware is Marlin, slice with Simplify3D, print from my SD.

I've had big fat volcano nozzles strapped to it for the past year, which has kept my print speeds under 60mm/sec.
I recently put in a .4mm nozzle to see how the machine would do at a 'higher resolution' & 'faster speeds'  : I did some 2cm calibration cubes at 90mm\sec that did fine, and when I pushed it up to 120 mm\sec, there was all sorts of stuttering going on with the brim, so I killed the print.  Which is weird, because my Replicator1 with Sailfish does just fine at 120mm\sec (I realize I'm comparing apples and oranges).  So I decided to just go with the 90mm\sec for the time being since multiple calibration cubes at that speed did fine.

Started printing out all the parts for a quad-copter frame @200 micron (filling my 12x12" build plate, quite a bit of data per layer), first couple solid layers were printing out just fine.  Came back an hour later, and everything had shifted right about 1/8".

I do a lot of printing on this machine, and haven't had any sort of shifting like this before, so I'm wondering if it has to do with the speed?  Is something not "keeping up" with the gcode, and it's dropping data?
I'm going to drop it back to 60mm\sec and try the print again.

But regardless, how can I get this thing to print faster? I did the Rumba\Marlin combo just a "safe" intro to building my new printer, and would love to keep that for the time being.  But I'm welcome to other hardware\firmware options as well (do have a spare Due laying around).
thanks!

Eric Pavey

unread,
Feb 20, 2016, 9:51:06 PM2/20/16
to 3D Printer Tips, Tricks and Reviews
Note:  My 60mm\sec print has no shifting present now.  So it definitely seems 'speed' related.

3duser

unread,
Feb 20, 2016, 11:57:24 PM2/20/16
to 3D Printer Tips, Tricks and Reviews
Most probably is just mechanical.

Ryan Carlyle

unread,
Feb 21, 2016, 12:05:48 AM2/21/16
to 3D Printer Tips, Tricks and Reviews
Are you using 1/32, by chance? Dropping that to 1/16 might help slightly. Likewise bigger drive pulleys. 

Aside from Dan being Dan, there's a good reason so many people around here prefer Sailfish to Marlin. Or Repetier to Marlin... or RepRapFirmware to Marlin... really, anything but Marlin. It's arguably anti-optimized. Erik van der Zalm very deliberately chose legible, accessible code over speed/performance. Which made Marlin popular, but directly contributed to the next issue:  the community has continuously piled more and more feature bloat and abandoned cruft code into it for years. It's often simply overloaded. Sailfish and Repetier can also get overloaded, but at much higher speeds. 

Marlin is fine for low-speed bots like i3's, but you can't push it too hard. So that very well may be your problem. Switching your existing Rumba to Repetier is a really good troubleshooting step to see if it's a Marlin issue. 

Some other things to try within Marlin...
  • Slow down perimeters, brims, etc but keep infill fast 
  • Either decimate your model or use a slicer that auto-decimates like Slic3r, not a slicer that faithfully reproduces the model contours like S3D. Or run the S3D output through the Smoothie gcode post-processor that strips out small moves. This will reduce the segment processing rate on complex geometry.
  • Disable all fancy UI effects such as GLCD animations
  • Print from SD, or reduce your baud rate if you're printing over USB
  • Disable any kind of auto-leveling function, the rotation transform algorithms in Marlin and Repetier are poorly optimized and do a bunch of unnecessary math

Eric Pavey

unread,
Feb 21, 2016, 1:42:55 AM2/21/16
to 3D Printer Tips, Tricks and Reviews
Thanks Ryan:  I'm thinking Repetier is my first path of least resistance, just get Marlin out of there.  Sounds like a Sunday project...

Note, I have no auto-leveling, print over SD (but watch it via Octoprint sometimes), and while I have an LCD, it's pretty bare bones, nothing fancy going on there.

When you say "run the S3D output through the Smoothie gcode post-processor "  : do you have a link for that?  I did track this down: http://mikk36.eu/SimplifyS3D/   
I've not heard of it (not dealing with Smoothie myself).  

I agree, I've had complaints directly with S3D over their "print everything in the 3d model, even if it's smaller than a single segment".  Meaning, scaling your model down is pointless (or trying to print something super high-res from z-brush) since making it small will give crappy results unless you then post-decimate it.... Don't get me started with that... ;)

adam paul

unread,
Feb 21, 2016, 11:56:44 AM2/21/16
to 3D Printer Tips, Tricks and Reviews
That is one of the major reasons I used sailfish for my triple-c. I have seen it I g+a few times and in the delta group it's commonplace. Trouble with marlin+lcd. I thought I remember you having an azteeg x3, it will run sailfish.

Dushyant Ahuja

unread,
Feb 21, 2016, 12:04:18 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Is there any sailfish port for the ramps. Have been hearing great things, but currently have a Ramos board and don't want to upgrade right now. Maybe later ...

On Sun, Feb 21, 2016 at 11:56 AM adam paul <adam...@gmail.com> wrote:
That is one of the major reasons I used sailfish for my triple-c.  I have seen it I g+a few times and in the delta group it's commonplace.  Trouble with marlin+lcd.  I thought I remember you having an azteeg x3, it will run sailfish.

--
You received this message because you are subscribed to the Google Groups "3D Printer Tips, Tricks and Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricks...@googlegroups.com.
To post to this group, send email to 3dprintertips...@googlegroups.com.

Nate Rogers

unread,
Feb 21, 2016, 12:27:07 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Hey Guys,
My 2 cents.
I run marlin, and have seen the issue. It comes down to how fast the gcode can be buffered and converted. There are 3 solutions i can offer.

1) Print from an SD card. This will eliminate the serial to usb protocol.
2) Reduce the Mesh size. The finer the mesh, the more specific the code is for micro adjustments.
3) As mentioned, the 1/32 microstepping is doubling the Gcodes per x and y axis. Reducing them to 1/16 will do the trick. This requires cutting your steps/mm in half in firmware.

Hope it helps.
Nate

Eric Pavey

unread,
Feb 21, 2016, 12:31:22 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Thanks all:  
To answer your earlier question Ryan, I am running 1/32 microsteppng.  Lowering that shouldn't be an issue.
Adam:  Nope, it's a Rumba.
Nate: 1 : yep 2 : looking at gcode post-processors now 3 : will also look into that. 

And if none of that does the trick I may go the Repetier route next and see what happens...

Ryan Carlyle

unread,
Feb 21, 2016, 12:31:23 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
No Sailfish on RAMPS. The RAMPS pin assignments are all screwed up so you can't use the proper hardware PWM pins on the Atmega for heater control. Marlin and Repetier use software PWM, which allows much more flexible pinout selection, but is significantly more dangerous in the event of a firmware lockup. This is exceptionally hazardous when you don't have a working watchdog reset timer enabled (which is the case for most Marlin builds). If the firmware freezes while the heater is on, it will stick on at 100% power, and possibly burn your house down. If you're ALSO dumb enough to run >16v on a 12v heater cartridge, you'll melt your aluminum hot block, and probably burn your house down. 

And, honestly, RAMPS is mediocre at best, there are so many better board options out there now. 


On Sunday, February 21, 2016 at 11:04:18 AM UTC-6, Dushyant Ahuja wrote:
Is there any sailfish port for the ramps. Have been hearing great things, but currently have a Ramos board and don't want to upgrade right now. Maybe later ...

On Sun, Feb 21, 2016 at 11:56 AM adam paul <adam...@gmail.com> wrote:
That is one of the major reasons I used sailfish for my triple-c.  I have seen it I g+a few times and in the delta group it's commonplace.  Trouble with marlin+lcd.  I thought I remember you having an azteeg x3, it will run sailfish.

--
You received this message because you are subscribed to the Google Groups "3D Printer Tips, Tricks and Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricksreviews+unsub...@googlegroups.com.

Dushyant Ahuja

unread,
Feb 21, 2016, 1:35:27 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Thanks Ryan,

I've spent as much as I want to on this printer right now. But for future reference, which board would you recommend.

Regards
Dushyant Ahuja
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricks...@googlegroups.com.
To post to this group, send email to 3dprintertips...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "3D Printer Tips, Tricks and Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricks...@googlegroups.com.

Ryan Carlyle

unread,
Feb 21, 2016, 1:41:17 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Various good options:
Sailfish on Mightyboard, Azteeg x3, or Cloneboard Mini. 
Repetier or RRF on Due/RADDS.
RRF on Duet.


On Sunday, February 21, 2016 at 12:35:27 PM UTC-6, Dushyant Ahuja wrote:
Thanks Ryan,

I've spent as much as I want to on this printer right now. But for future reference, which board would you recommend.

Regards
Dushyant Ahuja
On Sun, Feb 21, 2016 at 12:31 PM Ryan Carlyle <temp...@gmail.com> wrote:
No Sailfish on RAMPS. The RAMPS pin assignments are all screwed up so you can't use the proper hardware PWM pins on the Atmega for heater control. Marlin and Repetier use software PWM, which allows much more flexible pinout selection, but is significantly more dangerous in the event of a firmware lockup. This is exceptionally hazardous when you don't have a working watchdog reset timer enabled (which is the case for most Marlin builds). If the firmware freezes while the heater is on, it will stick on at 100% power, and possibly burn your house down. If you're ALSO dumb enough to run >16v on a 12v heater cartridge, you'll melt your aluminum hot block, and probably burn your house down. 

And, honestly, RAMPS is mediocre at best, there are so many better board options out there now. 


On Sunday, February 21, 2016 at 11:04:18 AM UTC-6, Dushyant Ahuja wrote:
Is there any sailfish port for the ramps. Have been hearing great things, but currently have a Ramos board and don't want to upgrade right now. Maybe later ...

On Sun, Feb 21, 2016 at 11:56 AM adam paul <adam...@gmail.com> wrote:
That is one of the major reasons I used sailfish for my triple-c.  I have seen it I g+a few times and in the delta group it's commonplace.  Trouble with marlin+lcd.  I thought I remember you having an azteeg x3, it will run sailfish.

--
You received this message because you are subscribed to the Google Groups "3D Printer Tips, Tricks and Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricksreviews+unsub...@googlegroups.com.
To post to this group, send email to 3dprintertips...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "3D Printer Tips, Tricks and Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricksreviews+unsub...@googlegroups.com.

Eric Pavey

unread,
Feb 21, 2016, 2:02:46 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Looks like I will be approaching a new 'good option' by necessity very soon.

Pulled out the drivers to change the rumba dip-swtiches to 1/16 : I've swapped them several times in the past.
Turn machine on to upload new firmware options and "very bad sounds".  Quickly turn it off.
Long story short, I plugged one of the drivers in one pin off... even after double-checking my work.  Haven't even started drinking yet.

Board turns on now, but the USB is dead, and I've cooked that one driver:  Setting all the dips back to 1/32 now has super-sketchy movement.

People, keep me away from children, pointy objects, and open manholes... sometimes I wonder how I dress myself successfully in the morning without getting stuck in the corner...


Ryan Carlyle

unread,
Feb 21, 2016, 3:35:14 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Uh oh... I think you just connected VMot to VDD... so hooking 12/24v up to the 5v rail... 

Dan Newman

unread,
Feb 21, 2016, 5:08:36 PM2/21/16
to 3dprintertips...@googlegroups.com
On 21/02/2016 11:02 AM, Eric Pavey wrote:
> Looks like I will be approaching a new 'good option' by necessity very soon.
>
> Pulled out the drivers to change the rumba dip-swtiches to 1/16 : I've
> swapped them several times in the past.
> Turn machine on to upload new firmware options and "very bad sounds".
> Quickly turn it off.
> Long story short, I plugged one of the drivers in one pin off... even after
> double-checking my work. Haven't even started drinking yet.

With a RAMPS you really should consider using a Rugged Mega board,

http://www.rugged-circuits.com/mega-tech

They put input protection on most everything. Problem is, most manufacturers
using RAMPS are playing the race-to-the-bottom game and want the cheapest
electronics: cheap Arduino mega board made in China and cheap electronics
made in China. So given the choice between a suspect $15 Arduino Mega clone
and a quality Arduino Mega board, they will go with the $15 board. Thus,
springing for a $99 Rugged Mega is out of the question.

Dan

(The folks using Repetier on Arduino Due are constantly having issues with
bad ADC on the cheap Chinese Due clones.)

Eric Pavey

unread,
Feb 21, 2016, 6:24:48 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
I've been spending the whole afternoon researching board\firmware combos.  Man, this isn't easy.  
If I'm going to stay 8-bit, then it seems like the Azteeg x3 with Sailfish (or Repetier) is the way to go.  Does everything I want.

But, I feel like I want to go 32 bit since I'm forced to get all new electronics anyway. But there isn't so much a clear decision there though.
  • Duet:  I dislike the built-in stepper drivers.  I've had them fail in the past, and don't like the idea of having to replace and entire board.
  • I have a spare Due, so RADDS (Repetier \ RepRap FF) seems like a good place to start, but I can't find anyone in the US that sells it (just to keep the price down).
  • Then there's smoothie:  Seems like there is a lot of mixed feelings about it on the forums for printers?  I get a positive vibe off it, and could go smoothieboard 5x (with integrated drivers, which I dislike) / azteeg x5 (has swappable drivers, but only 4 of them).
Opinions welcome

Chris P

unread,
Feb 21, 2016, 7:05:03 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
  • Duet:  I dislike the built-in stepper drivers.  I've had them fail in the past, and don't like the idea of having to replace and entire board.

I have never had a stepper driver itself fail without user error contributing.  Onboard drivers + digital trim pots means you never need to touch the actual PCB which drastically reduces the possibility of killing one through accidental contact.

The other benefit is a larger PCB will allow the drivers to dissipate heat more effectively so you can run higher current without overheating the chips. 

Eric Pavey

unread,
Feb 21, 2016, 7:10:51 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
These were the 'botsteps' on my Replicator 1 (which is still chggin' along just fine). When I picked it up 4 year ago, a couple failed within the first year.  Makerbot shipped me new ones free of charge, but this was back when I was hands off with this stuff (and based on today, probably should still be), so there was really no user error there ;) 
Anyway, the fact they failed at all has freaked me out ever since.  Now they only break when I plug them in wrong... :(

Ryan Carlyle

unread,
Feb 21, 2016, 7:13:41 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Most causes of driver failures don't happen if you get a board with them integrated:
  • Better heatsinking through the mainboard PCB means less thermal load
  • Digipot-style current control means no poking live electronics with screwdrivers
  • No sockets means fewer failure modes due to loose pins or plugging them in wrong
It's extremely uncommon to blow a driver on a Duet or Smoothieboard. You basically have to unplug the motor while it's running. 

Makerfarm is/was selling RADDS, but I can't find their store page now? Should be here: http://www.makerfarm.com/index.php/printer-electronics/radds.html

Eric Pavey

unread,
Feb 21, 2016, 7:22:40 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
Good info, I've never thought of it that way.  Ok, sounds like it's a good thing, not a bad thing, my mind can be changed ;)

I've emailed Makerfarm for RADDS as well, I remember it being there in the past also.

Ryan Carlyle

unread,
Feb 21, 2016, 10:58:18 PM2/21/16
to 3D Printer Tips, Tricks and Reviews
It's a good thing as long as the onboard drivers are actually good drivers... DO NOT buy a board with onboard 8825s!

Carl Feniak

unread,
Feb 22, 2016, 12:52:54 AM2/22/16
to 3D Printer Tips, Tricks and Reviews
Why not?  I have an Azteeg X5 but haven't used it yet.

Edward Simpson

unread,
Feb 22, 2016, 1:43:56 AM2/22/16
to 3D Printer Tips, Tricks and Reviews
Mainly because DRV8825s are prone to all kinds of weird harmonic resonance effects - basically their advanced modes are "touchy" - I'd recommend doing some research on the forums before attempting to mess with them.

Eric Pavey

unread,
Feb 22, 2016, 1:55:51 AM2/22/16
to 3D Printer Tips, Tricks and Reviews
On a side note I've been using DRV8825's up until now on my Rumba... haven't had any issues (or I'm not smart enough to recognize them).  In fact I had to switch from the A4988's to them due to their higher amperage, that seemed to resolve an issue I was having lifting my 12"x12" bed.  The do occasionally emit a annoying whine, but it really isn't that often, and I only hear it up close.  Just my experience.

Eric Pavey

unread,
Feb 22, 2016, 12:42:20 PM2/22/16
to 3D Printer Tips, Tricks and Reviews
Hey, I meant to ask as well:  What is a good alternative to the 8825's then?  I need something with at least its amperage.  I figured I'd just swap the drivres I have left in the rumba into my next purchase (+ a new one...), but may as well upgrade to something 'better' if there is a popular 'better' out there.  
And as ever, thanks for all the feedback everyone.

Ryan Carlyle

unread,
Feb 22, 2016, 1:09:33 PM2/22/16
to 3D Printer Tips, Tricks and Reviews
8825s don't like 24v PSUs and high-inductance motors. Specifically, the blanking time is too long and they let current overshoot the target during low-current microsteps. In mixed decay mode, they produce big ripples in prints at low speeds, and in fast decay mode, they make annoying hissing noises. But 24v and low-inductance motors are what you need to use if you want high speeds. So basically 8825s aren't good for high-performance printers. If you put an 8825 in a random drivetrain, it's maybe 50/50 whether they cause problems or not. 

You can see this for yourself with my stepper/driver simulator: https://github.com/rcarlyle/StepperSim

A much better option for higher currents is the THB6128 chip. It's rated for 2.2A and uses a top-mounted heatsink rather than the PCB mount, so it's much more favorable for socketed drivers than 4988s or 8825s. Panucatt sells them as the SD6128 driver. In Europe you can buy them as the RAPS128 driver. Panucatt has switched the Azteeg x5 v2 over to the THB6128 because the previous 8825s caused problems for so many people. 

Steven Butterfield

unread,
Feb 22, 2016, 3:32:53 PM2/22/16
to 3D Printer Tips, Tricks and Reviews
Eric,
I got a fortune cookie a while back that I put up at my desk. It says "experience is the name everyone gives to there mistakes". Don't beat yourself up to much. It's not like you burnt your house down.... wait, you didn't burn your house down did you? :) just chalk it up as a learning experience and move on.

Eric Pavey

unread,
Feb 22, 2016, 4:31:52 PM2/22/16
to 3D Printer Tips, Tricks and Reviews
On Monday, February 22, 2016 at 12:32:53 PM UTC-8, Steven Butterfield wrote:
Eric,
I got a fortune cookie a while back that I put up at my desk. It says "experience is the name everyone gives to there mistakes". Don't beat yourself up to much. It's not like you burnt your house down.... wait, you didn't burn your house down did you? :) just chalk it up as a learning experience and move on.

Lol, indeed, thanks.  House\family intact, so all is well.  And hopefully soon I'll have a better performing printer as well ;)
Thanks for the driver info Ryan, I"ll definitely look into those.  

I think I'm going to got with a RADDS\Due combo with Repeteir: I already have the Due, like the 32-bit, and found a place here in the US that will have them back in stock tues, and looks like they should accept those newfangled drivers you're talking  about Ryan.

Ryan Carlyle

unread,
Feb 22, 2016, 5:06:41 PM2/22/16
to 3D Printer Tips, Tricks and Reviews
I've used both RAPS128 and SD6128 drivers in my Due/RADDS. Works fine. Only hitch is that the RAPS128 has an inverted enable, so you need to reverse that in firmware if you want to use them. The SD6128 is normal Pololu-style for enable. 

Eric Pavey

unread,
Feb 23, 2016, 1:49:00 AM2/23/16
to 3D Printer Tips, Tricks and Reviews
Good info, thanks again Ryan.

Eric Pavey

unread,
Mar 7, 2016, 12:39:54 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
As a followup, I've swapped everything out to RADDS/Reptier & have it up and running.  Fully blogged the whole process if anyone is interested:

Ryan Carlyle

unread,
Mar 7, 2016, 2:11:29 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
Good write-up!

Did you test the watchdog with M281? I highly recommend doing that and seeing if the board resets, since getting the watchdog running on the Due is a bit tricky.

Eric Pavey

unread,
Mar 7, 2016, 4:39:00 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
Thanks!
I didn't test the watchdog yet because... honestly I didn't know how (or what to look for). But now I do, and will ;)  
The info on the watchdog' stuff is pretty scattered, I wouldn't even know about it\what it does if it wasn't for places like this.

Ryan Carlyle

unread,
Mar 7, 2016, 7:41:46 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
Yeah... To this day most Marlin forks have the watchdog explicitly turned off, which is insanely unsafe in firmware that uses software PWM for heater control. (There was an old Arduino IDE version that didn't like the AVR watchdog, but that got fixed ages ago.)

Dushyant Ahuja

unread,
Mar 7, 2016, 9:46:11 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
Hi Ryan,

I couldn't find any reference to M281 in the Marlin code. How can I test the watchdog?
More specifically, I would like to know if there is a way I can reset the arduino through a software command after it gets stuck in a thermal runaway loop.

Regards,
Dushyant Ahuja

On Mon, Mar 7, 2016 at 7:41 PM Ryan Carlyle <temp...@gmail.com> wrote:
Yeah... To this day most Marlin forks have the watchdog explicitly turned off, which is insanely unsafe in firmware that uses software PWM for heater control. (There was an old Arduino IDE version that didn't like the AVR watchdog, but that got fixed ages ago.)

--
You received this message because you are subscribed to the Google Groups "3D Printer Tips, Tricks and Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3dprintertipstricks...@googlegroups.com.

Dan Newman

unread,
Mar 7, 2016, 10:35:50 PM3/7/16
to 3dprintertips...@googlegroups.com
On 07/03/2016 6:45 PM, Dushyant Ahuja wrote:
> Hi Ryan,
>
> I couldn't find any reference to M281 in the Marlin code. How can I test
> the watchdog?

The post Ryan was responding to was Repetier on Due, not Marlin. (That said,
I don't see Repetier supporting M281 on any platform.)

> More specifically, I would like to know if there is a way I can reset the
> arduino through a software command

By definition you cannot. If the processor is wedged up, then for many/most
definitions of wedged up, it won't be responding to any commands as the software
is, well, wedged up. That's the point behind the hardware watchdog: you enable
it with a timeout (e.g., 4 or 8 seconds is common on an AVR). Then your software
MUST reset it every N seconds before the timeout expires. If your software doesn't
reset it in time, then the watch dog fires and forces a reset of the processor.
Wedged software won't reset it and so it fires resetting the processor.

If, instead, you are asking how to enable the watch dog timer, then that's really
out of scope for this forum and you should read the data sheets for the processor
in order to learn how to enable the watch dog timer. (And if you're using an
Arduino Due, know that the Arduino folks have changed across several releases of
their Arduino API how you must enable the WDT. One of the reasons to simply
avoid the Arduino environment in the first place: the lack of stability.)

Dan

Eric Pavey

unread,
Mar 7, 2016, 10:58:54 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
Watchdog is enabled, and working, so thanks for that tip Ryan.

Which brings up my next super-doob question:  What exactly is the watchdog doing?  I've done a ton of searching, and all the posts and documentation I've found are based around the idea you actually know what it's doing, so don't answer that fundamental question.  I'm guessing this varies per firmware of course, but even a general overview would be beneficial.

Eric Pavey

unread,
Mar 7, 2016, 11:04:53 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
And somehow I missed your above post Dan, that gives a nice explanation.

Ryan Carlyle

unread,
Mar 7, 2016, 11:05:44 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
On Monday, March 7, 2016 at 9:35:50 PM UTC-6, Dan Newman wrote:

The post Ryan was responding to was Repetier on Due, not Marlin.  (That said,
I don't see Repetier supporting M281 on any platform.)

It's in the list of supported mcodes and I have used it successfully on Repetier for Due. 

I don't think there is a way to test it in Marlin. Shouldn't be hard to add though, Repetier's test seems to just write a message to the LCD and enter a while(1) loop.

For enabling it... on Atmega AVR boards with both Marlin and Repetier, you should just need to enable watchdog in the config files. 
  • Make sure it says #define FEATURE_WATCHDOG 1 (and not 0 or false) in Repetier's configuration.h
  • Uncomment //#define USE_WATCHDOG in Marlin's configuration_adv.h 
Use of the watchdog is highly recommended and it is enabled in the main repositories for both firmwares, but many configurator tools still output config files with it disabled. That's bad. YOU MUST CHECK THAT IT IS ON. 

Enabling it on the Due requires going into the "additional Arduino files" folder in the repository, and adding a new board type to the Arduino IDE to get it to compile the watchdog in. Kind of a pain the first time you do it. 

Ryan Carlyle

unread,
Mar 7, 2016, 11:11:29 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
On Monday, March 7, 2016 at 9:58:54 PM UTC-6, Eric Pavey wrote:
Watchdog is enabled, and working, so thanks for that tip Ryan.

Which brings up my next super-doob question:  What exactly is the watchdog doing

Hah, good question. It's a hardware deadman switch built into the processor. The watchdog has a countdown timer (adjustable but usually a few seconds long) that must be reset by the firmware over and over forever. If the timer ever reaches zero, the watchdog will hard-reset the processor. Specifically for 3d printers, we want to ONLY reset the watchdog timer when the heater powers are managed. That way, if the firmware falls into an infinite loop during a bad SD read or whatever and stops paying attention to the heaters, the watchdog will reset everything. That will then turn the heaters off, unless something else is wrong too. 

Eric Pavey

unread,
Mar 7, 2016, 11:22:48 PM3/7/16
to 3D Printer Tips, Tricks and Reviews
Great, between you and Dan I think I got it figured out.  Thanks again for all the help, blog has been updated with relevant info ;)

Dan Newman

unread,
Mar 7, 2016, 11:36:51 PM3/7/16
to 3dprintertips...@googlegroups.com
On 07/03/2016 7:58 PM, Eric Pavey wrote:
> Watchdog is enabled, and working, so thanks for that tip Ryan.
>
> Which brings up my next super-doob question: What exactly is the watchdog
> *doing*? I've done a ton of searching, and all the posts and documentation
> I've found are based around the idea you *actually know what it's doing*,
> so don't answer that fundamental question. I'm guessing this varies per
> firmware of course, but even a general overview would be beneficial.

watch dog is just a hardware timer. It starts, for example, a 4 second countdown.
If you don't reset the timer before the 4 seconds elapse, then the hardware in
the processor causes it to reset (i.e., reboot). So, healthy firmware makes
damn sure to reset it more frequently than every 4 seconds. If the firmware locks
up or is otherwise having unexpected problems, it cannot reset it and so the
countdown completes and the processor is rebooted.

To be useful, the electronics and firmware should be well designed: the electronics
should be default assert a powered off state for heaters. And the firmware on booting
should also turn all heaters off. Likewise for motors.

Dan

Ryan Carlyle

unread,
Mar 8, 2016, 12:08:50 PM3/8/16
to 3D Printer Tips, Tricks and Reviews


On Monday, March 7, 2016 at 10:36:51 PM UTC-6, Dan Newman wrote:

To be useful, the electronics and firmware should be well designed: the electronics
should be default assert a powered off state for heaters.  And the firmware on booting
should also turn all heaters off.   Likewise for motors.

Dan


This is something that bugs me about RAPS128 drivers (enable is inverted) and FD-RAMPSv1 (FET is inverted) -- the standard reset sequence actually turns stuff on while the firmware loads. Not good behavior. 

Dan Newman

unread,
Mar 8, 2016, 12:16:16 PM3/8/16
to 3dprintertips...@googlegroups.com
And when installing/updating firmware they typically enable as well. Yes,
it is annoying. I prefer Panucatt's take on that driver.

Dan

Eric Pavey

unread,
Mar 9, 2016, 12:38:39 AM3/9/16
to 3D Printer Tips, Tricks and Reviews
I picked up the SD6128's from Panucatt since they didn't have to be inverted:  I actually didn't know why that was a good thing, but it seemed odd at the time one would need to.  Looks like I made the right choice ;)  

Ryan Carlyle

unread,
Mar 9, 2016, 12:23:44 PM3/9/16
to 3D Printer Tips, Tricks and Reviews
Other benefit to non-inverted enable: you can socket SD6128s into Mightyboards and use digipots to set current, using the adapter I designed: https://oshpark.com/shared_projects/0jqJEimG  Stock printers don't really benefit, but if you want more than 0.8A stepper current from a Mightyboard, it's a really nice solution. 

3duser

unread,
Mar 10, 2016, 12:56:52 AM3/10/16
to 3D Printer Tips, Tricks and Reviews
Here is my configuration_adv.h    Is it using watchdog?...

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG

#ifdef USE_WATCHDOG
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
// The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
//#define WATCHDOG_RESET_MANUAL
#endif

Dan Newman

unread,
Mar 10, 2016, 1:01:34 AM3/10/16
to 3dprintertips...@googlegroups.com
On 09/03/2016 9:56 PM, 3duser wrote:
> Here is my configuration_adv.h Is it using watchdog?...

No. You need to uncomment the line "USE_WATCHDOG" so that it reads

#define USE_WATCHDOG

(No leading "//".)

Eric Pavey

unread,
Mar 10, 2016, 1:36:42 AM3/10/16
to 3D Printer Tips, Tricks and Reviews
On Wednesday, March 9, 2016 at 9:23:44 AM UTC-8, Ryan Carlyle wrote:
Other benefit to non-inverted enable: you can socket SD6128s into Mightyboards and use digipots to set current, using the adapter I designed: https://oshpark.com/shared_projects/0jqJEimG  Stock printers don't really benefit, but if you want more than 0.8A stepper current from a Mightyboard, it's a really nice solution. 


I've seen that before, pretty dang cool.  Which raises the question:  Why would you want to crank it up?  Since I can go 120mm\sec already with Sailfish on my rep1, what would be the advantage of replacing the existing drivers?  I wouldn't mind doing some upgrades to that now 4 year old machine (which is still running like a champ), but I'd like to understand the benefits.

Brandon Pomeroy

unread,
Mar 10, 2016, 4:37:25 AM3/10/16
to 3D Printer Tips, Tricks and Reviews
Ryan can correct me if I'm wrong, but I believe that adapter is mainly for using larger motors (if you're building something with a heavier than usual Z axis, for example). Swapping the drivers and not the motors shouldn't provide much benefit.

Jetguy

unread,
Mar 10, 2016, 8:09:27 AM3/10/16
to 3D Printer Tips, Tricks and Reviews
While there is a tiny bit of truth to that statement, I wouldn't say there is no benefit.

The A4988 and A4982 are decent stepper drivers with decent performance. They are well tuned and matched to the typical ~6 Ohm MakerBot spec 0.84A motor (sorry I don't know the inductance off the top of my head).
I do really like the performance of SD6128s and they can be a tad quieter which should mean the waveform and current control is a tighter spec across the range.
Recently (due to the Raise 3D N2 using them) I finally bit the bullet and used TMC2100s. 

As such, I just (as of yesterday) ordered 27 (not sure why it kept choosing 27 on the website) 2oz copper version of the boards from OSH Park. They won't even go to production for a few days, but figured I might as well get good 2 oz versions for running higher currents.

Here's the reason I ordered so many:
#1 I have a pile of repaired Mightyboard rev E where all the drivers were blown when the regulator went. We replaced everything but the digits because that tiny 6 pin SMT IC is so tiny and bored down in the space of the stepper sockets surrounded by other components. Because the steppers were blown and replacements from Wanhao and Flash Forge are well over $10 each ($50-$60 for 5 steppers) and you still had to either reverse the headers making them upside down and impossible to adjust in the socket- these boards make HUGE sense. You can buy cheap A4988s 5 for $10 on Amazon Prime.
#2 just being able to try alternate performance drivers.
#3 using the mighty boards for other custom projects.

Dan Newman

unread,
Mar 10, 2016, 12:17:23 PM3/10/16
to 3dprintertips...@googlegroups.com
> As such, I just (as of yesterday) ordered 27 (not sure why it kept choosing
> 27 on the website) 2oz copper version of the boards from OSH Park.

With Oshpark you have to order in multiples of 3. (In part, because of people like
me who would have BatchPCB.com -- their predecessor -- do a single 1 inch x 1 inch
board. Cool thing was that the BatchPCB.com folks would often shotgun the panel
with many of those little PCBs and I'd order 1 and get back 5, 8, 12, or some
number significantly larger than 1.)

Dan

P.S. BatchPCB was started by Sparkfun who then sold the business to OshPark after
a few years.


Ryan Carlyle

unread,
Mar 10, 2016, 2:35:29 PM3/10/16
to 3D Printer Tips, Tricks and Reviews
Jetguy, do I understand correctly that you're you wanting to use Pololu a4988s with the adapter PCB? The hard-wired microstepping level will be off, since the 4988 uses a different microstep select table from the 8825 and the 6128. (It gives 1/16 with the 8825 and 6128.) I would imagine you can come up with a fairly easy solution with solder blobs or whatever -- I just haven't checked what you would have to do. I also haven't checked the TMC2100 socket against it yet. 

My original plan was to verify the hard-wired 1/16 microstepping version worked ok and then make another version with jumpers to select microstepping. Wouldn't be hard at all, I just haven't had a good opportunity to do it. 

Ryan Carlyle

unread,
Mar 10, 2016, 2:41:02 PM3/10/16
to 3D Printer Tips, Tricks and Reviews
On Thursday, March 10, 2016 at 3:37:25 AM UTC-6, Brandon Pomeroy wrote:
Ryan can correct me if I'm wrong, but I believe that adapter is mainly for using larger motors (if you're building something with a heavier than usual Z axis, for example). Swapping the drivers and not the motors shouldn't provide much benefit.


Correct, the MAIN reason is to support larger motors like the Kysan 1124090s that a lot of people use. This is a convenient way to run a motor at more than ~0.8A WITH digipot control. The previous higher-current option, flipping a normal Pololu upside-down, is workable but not as clean.

The secondary reason is that the 6128 has a better current control algorithm than the 4988. It has less current ripple (ie marginally less motor heat and PSU load) and tracks the target current better at certain speeds (depending on which mode the 4988 is in). Really doesn't make a big performance difference though. 

Jetguy

unread,
Mar 10, 2016, 2:41:25 PM3/10/16
to 3D Printer Tips, Tricks and Reviews
I knew that but thanks for checking and sharing with everyone else.

I hard set my stuff on the drivers rather than relying on the pins in most of these mods.
My point was, I find this an extremely useful board, even with limitations to use standard drivers in these flipped boards.
Thanks for making it happen!!

Ryan Carlyle

unread,
Mar 10, 2016, 2:47:58 PM3/10/16
to 3D Printer Tips, Tricks and Reviews
It was a good excuse to learn how to use Eagle :-)

Incidentally, I have a dozen of the adapter PCBs and headers in a pile that I was planning to mail to you and James, but they seem to have disappeared while I was packing to move... hmmm....
Reply all
Reply to author
Forward
0 new messages