Duet 2 Ethernet and SBC
-
More info:
- Letting the printer sit idle (heaters off, motors off) produces almost no errors.
- Letting the printer sit idle (heaters on, motors off) produces more errors.
- Running a simulation has no effect.
Scoping the SPI pins, the waves look to be well-formed. A little bit of jitter, but otherwise good.
Overall, it seems pretty random to me.
-
@SAtech I tested (with my "pcb-link" so no wires) so far only the simulation as I have no motors nor heaters attached to that duet board yet. If you run a long simulation, does it pass ok? you don't see any errors?
... === SBC interface === State: 0, failed transfers: 0 Last transfer: 20ms ago RX/TX seq numbers: 4497/4498 SPI underruns 0, overruns 0 Number of disconnects: 0 Buffer RX/TX: 0/0-0
-
@arhi Simulation seems to work. However, if I have the heaters on, it will give a few errors:
=== SBC interface === State: 0, failed transfers: 2 Last transfer: 11ms ago RX/TX seq numbers: 27937/27939 SPI underruns 0, overruns 0 Number of disconnects: 0 Buffer RX/TX: 0/0-0 === Duet Control Server === Duet Control Server v3.2.0-beta2 Code buffer space: 4096 Configured SPI speed: 4000000 Hz Full transfers per second: 28.70
In the DCS log, it gives a few more than that, mostly bad checksum errors and disconnects.
When I try to print, that's when I get problems. When and how it errors out can vary. Sometimes it just stops, sometimes it causes erratic behavior (mis-probes the bed, halts in the middle of a move):=== SBC interface === State: 0, failed transfers: 3 Last transfer: 8ms ago RX/TX seq numbers: 34957/34958 SPI underruns 0, overruns 3 Number of disconnects: 0 Buffer RX/TX: 0/0-0 === Duet Control Server === Duet Control Server v3.2.0-beta2 Code buffer space: 4096 Configured SPI speed: 4000000 Hz Full transfers per second: 31.21
In this instance, it got through the homing procedure and tried to probe the bed. It only probed one point, but three times, and then stopped.
DCS log:[warn] Bad header checksum (expected 0x2001, got 0xfb88) [warn] Bad header checksum (expected 0x2001, got 0xfb88) [warn] Bad header checksum (expected 0x2001, got 0xfb88) [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00004000) [warn] Restarting transfer because the number of maximum retries has been exceeded [debug] Cancelled M83 ; use relative distances for extrusion [debug] Cancelled G92 E0 ; set extruder to zero [info] Aborted macro file bed.g [warn] File: ==> Cancelling unfinished starting code: G32 ; home axes, calibrate bed leadscrews, and load saved mesh heightmap [warn] Controller has been reset
-
@SAtech I can't determine this from the image: do you have a direct ground connection between your RPi and your VIN PSU? I found that the ground pin on the Duet network header is not sufficient for this purpose.
-
@wilriker I do. I have two PSUs, one 24v and one 5v. All the grounds are connected in star topology, and the red/black connector on the pi is connected to 5v and ground.
-
It seems like it must be something software related, since I can't see any reason why it shouldn't work.
Just so I'm not crazy:
-
@SAtech said in Duet 2 Ethernet and SBC:
It seems like it must be something software related, since I can't see any reason why it shouldn't work.
that signal looks decent.
it is probably sw related but sw detects error in CRC (good that there is CRC checking for packets) and that is hardly sw related, in my, limited, experience that is usually transport line issue when hw spi is used on both sides (and I doubt anyone is bit banging the 8 MHz spi )
few questions
- did you try reducing the SPI speed ? dropping from 8 MHz to 1 MHz ?
- did you try the "drill" test ? (start a long running simulation, take a drill, one that connect to mains outlet, not those battery powered ones, turn on a drill and bring it close to the wires) do you see increase in errors?
- the utp cable you are using, its not shielded? did you maybe tried shielded cable?
-
I was playing bit more, since via's are free I stiched it up a bit, I moved the SBC connector 10mm up so now the front of the both pcb's (duet and rpi) are in line, sbc is not sticking up messing up with case) and also since the "extended" part of the connector is not used I made a via-cut so you can snap off that part of the pcb and solder on shorter connector.
signal pats are not crossed anywhere (that's why 3v is routed all the way around) so return current should flow easy trough the ground plain and this should work at super high speeds without any issues .. and 8 MHz should be a brieze ... when I order the boards I'll do the "electrical drill test" but I believe this is rather resilient like this
-
@arhi said in Duet 2 Ethernet and SBC:
I made a via-cut so you can snap off that part of the pcb
lemme know if jlcpcb accepts that without insisting on a paneling fee for multiple designs?
-
@bearer I hope they do but even without those few via-s it is easy to cut off that part of the board ... I won't be ordering it yet, waiting for more testing with existing pcb (too slow for now, I'm still one-handed) ...
I was also thinking about making another change - to add 2 female pinheaders over the paneldue and probe connectors so one can just "cut the plastic" of the connector and press the board on to the duet hitting both ethernet port and the paneldue and mode ports, and then add those 2 connectors on this board so they are accessible from the top .. but will see .. maybe just a more comples cutout
-
Well it seems that by twisting MOSI, MISO, and SCK with ground has basically solved my issue. I am now getting NO errors, and I can print successfully. Seems there was significant crosstalk in the lines.
The only thing that is a little troublesome is sometimes the movement is quite jerky. Like in a long travel move it will just stop for a few ms and resume, as if the duet is choking on step generation. I don't think this is happening, but that's how I can best describe it.
-
@arhi said in Duet 2 Ethernet and SBC:
and 8 MHz should be a brieze ...
Just as a benchmark: the maximum the Duet can achieve reliably is around 27MHz.
-
@SAtech said in Duet 2 Ethernet and SBC:
as if the duet is choking on step generation
should show up in
M122
? -
@SAtech said in Duet 2 Ethernet and SBC:
The only thing that is a little troublesome is sometimes the movement is quite jerky. Like in a long travel move it will just stop for a few ms and resume, as if the duet is choking on step generation. I don't think this is happening, but that's how I can best describe it.
If that persists please open a new thread (since this one is getting very long and a bit hijacked ) and include your
config.g
as well as theM122
output that @bearer mentioned and a sample GCode file. -
@smoki3 After what felt like ages (sorry for that) I finally got to rig up a Duet 2 + DueX5 + SBC. It's just a bench setup but at least I attached steppers, a thermistor and a PT1000. I intentionally ran all stepper wires over the SPI wires but I cannot see a single checksum error or any problems at all.
Did you retest with latest RRF 3.2-beta2? If you still experience your problems please provide me with your full
0:/sys
directory contents as well as all possibly other required macros and a GCode file so I can try to reproduce it. -
@wilriker I have only tested with 3.2 beta 1.
Have you tried stall detection on a core xy? The tool changer has 6 axis and all are homed with stall detection.
If I find some time I will assemble my duet Ethernet again to check if its fixed on beta 2.
-
@smoki3 As you can see it's simply something cobbled together on my desk. It is configured as a simple 3 axis Cartesian and is only pseudo-homed using
G92 XYZ
. So maybe that is the problem already. If possible you could test if it works for you if you useG92
as well. Maybe it's just stallDetect that fails. -
@wilriker said in Duet 2 Ethernet and SBC:
@smoki3 As you can see it's simply something cobbled together on my desk. It is configured as a simple 3 axis Cartesian and is only pseudo-homed using
G92 XYZ
. So maybe that is the problem already. If possible you could test if it works for you if you useG92
as well. Maybe it's just stallDetect that fails.As far I remember homing was one of the main issue. But let me check again with beta 2. I will come back to you
-
Can anybody explain me advantages of sbc attached to duet?
-
@smoki3 said in Duet 2 Ethernet and SBC:
As far I remember homing was one of the main issue. But let me check again with beta 2. I will come back to you
I tried stallGuard as endstop now (manually blocking the motor shafts) and still no problems. So maybe putting the LinuxInterface into its own FreeRTOS task solved it eventually. Looking forward to your feedback.