Duet 2 underruns high loop times stuttering
-
Glad we found the smoking gun.
Doing some googling it would appear that there is shielded ribbon cable available from digikey and mouser, and in certain other hobbies it looks like it's often DIYed with metallic tape.
-
I've thought about doing that, but I know how the PC shielded PCIEX extensions are made -- but I have tried that with similar cheap PCIEX cables -- putting HVAC tape around it and then putting regular insulation so that aluminum tape wouldn't short anything, and it didn't make the cable perform any better. I had purchased some inexpensive similar IDE style extensions which claimed to support PCIE-4X, and PCIE-4X devices would not work with them, 1X would -- Doing the DIY trick of insulting etc, did not help. Getting a cable for 4x the money that was already shielded worked. So I'd have to hunt around for the proper cable that's premade 50 pin and is the right spacing.
-
this can be marked solved -- I don't know how to.
-
You have to convert it into a question and then mark it as solved. I don't know where that's done but the option should be available to you somewhere.
-
Solved!
Hey I don't suppose you could post a short video of the triplicate printing in action?
-
@Phaedrux sure: not sure how long I'll keep it on my dropbox:
https://www.dropbox.com/s/2fjgf55myqh7rrt/2020-04-27 15-39-26.mp4?dl=0
After covid is over I'll release a full build vlog -
@kazolar some hints about 50pin cable
Normally one whole side of that 50pin connector should be ground and in that case fancy pre-made cables would do miracles. For 50pin a scsi cable would be perfect, but they require whole side to be ground. I guess it was too expensive and too unnecesary to use 2 50pin connectors instead of one to make this possible. Maybe isolating i2c on the connector? (I don't see where the SDA/SCK pins are on the 50pin ?)
Anyhow, the thing that solved my behind many times in the industry is COPPER TAPE. One would assume aluminium tape would work too but no, in many cases where aluminium tape did nothing copper tape saved the day. The one I use mostly is some noname 0.5mm sticky copper tape on a roll. You make sure your cable from connector to connector is totally shielded with copper tape. Do not assume there is connection between two strips of copper tape if they are just glued on top of each other so if you use 2 narrower strips to go top/bottom instead spiraling tape around the cable before attaching to cable solder the two stripes to each other. When you cover the cable with copper tape attach (solder) a ground wire to only one point on the tape and connect to ground on main board. That's about it.
The connectors are on the edge of the board so there's not much that this copper tape around cable can short, but still, good practice is to now add insulation over the copper tape (big heatshrink is best, simple electrical insulation tape works ok, but I'v known to just paint the cable with thick coat of pu
-
@kazolar said in Duet 2 underruns high loop times stuttering:
https://www.dropbox.com/s/2fjgf55myqh7rrt/2020-04-27 15-39-26.mp4?dl=0
Mesmerizing.
-
@kazolar, I'm glad you solved it. FWIW I suspect the issue was noise pickup on the interrupt line from the DueX to the Duet. Every time the DueX signals an interrupt, the Duet does an I2C transaction to ask what input has changed. The interrupt line for the chip on the DueX is open-drain and we use a 1K pullup resistor.
Another possibility is that you had a bad connection in the cable on this pin, and moving the ribbon cable has fixed it at least temporarily.
If I'm correct then an I2C transaction count would have been abnormally high. The commit in the v3.01-dev branch of RRF that adds this to the diagnostics is the change to DueXn.cpp in commit 9ead98ce7dc8a4fe1454a7003b14fee1aab51941. But I haven't tested it yet.
I'll check that we enable the deglitch filter on the input used to receive the interrupt signal.
-
@dc42 I did not actually touch the ribbon did not re-seat it -- i just moved everything away from the ribbon, kinda of a hack job now -- but ribbon is freed up. I have to design a new case for this cable arrangement -- I've seen examples of boards sorta facing up sorta next to each other -- I can sort out cooling for them by adding extra 40mm fans to blow across them -- but that lengthens the ground wire run -- would that configuration be worse for i2c transaction -- it would completely eliminate the possibility of any interference to the ribbon.
-
What cables were running over the ribbon cable? Stepper motor cables would be the worst. I doubt that any other sort of cable would be a serious problem, unless you are using very high PWM frequencies on heaters or fans.
Rather than change the layout, it's probably simpler to shield the ribbon cable from the other cables, using aluminium or copper tape, or aluminum foil, or thin sheet metal. It should be grounded, e.g. to a ground pin on the 50-way connector or to the ground pin of an endstop connector. Make sure there is no possibility of it coming into contact with components or connectors on the Duet. One option would be a thin plastic sheet or card with copper tape on top.
Here's an example: https://www.youtube.com/watch?v=8QgT8eiEgFU.
-
@dc42 I had no stepper wires crossing the ribbon, but I did have fans and heaters -- several of them and thermistors ( but I doubt they matter) and several optical end stops -- a bunch of stuff. I actually been thinking of doing a case redesign (after covid -- still printing shields -- not sure when normal manufacturing will catch up) -- so I tried to move 2.05.1 again, and i hit an underrun, maybe I changed too many 32 bit ints to 64 bit -- I was checking vs the build that was working -- I had changed very few. I'll try to start 2.05.1 from scratch -- just take the changes I have in 2.05 that is working and apply them only to 2.05.1 -- the other thing I hadn't noticed is I had power going into the board and going through the loop of the ribbon, so I moved that away. My take on the ribbon is -- I'd rather not mess with it by wrapping up in stuff, either I can find a shielded ribbon that I can buy, or i redesign the case so that basically the side where the ribbon is has not wire access holes. How bad would it be to have the boards next to each other and a longer ground wire -- It will still be a 14 gauge ground wire, just longer.
-
@kazolar said in Duet 2 underruns high loop times stuttering:
How bad would it be to have the boards next to each other and a longer ground wire -- It will still be a 14 gauge ground wire, just longer.
That should be OK. Lots of users do it that way, so do E3D tool changers.
-
@dc42 ok -- I fixed my 2.05.1 -- now it's running on that version. I'll look at 3.0x for i2c count for debug -- see if I can add that in there -- I just don't know what are good or bad numbers -- what's considered high?
-
@kazolar said in Duet 2 underruns high loop times stuttering:
@dc42 ok -- I fixed my 2.05.1 -- now it's running on that version. I'll look at 3.0x for i2c count for debug -- see if I can add that in there -- I just don't know what are good or bad numbers -- what's considered high?
You should get a small number of i2C transactions recorded whenever an endstop or GPIO input on the DueX changes state. That's all. There are additional i2C transactions when DueX fan speeds change, but those are not counted in the stats.