Duet 2 Ethernet and SBC
-
@bearer said in Duet 2 Ethernet and SBC:
could you get away with using a regular right angle connector and solder it smd style to pads on the top and bottom of the board?
yes, that would work but I hate those comb soldering + it would require thicker board to properly work, also I don't think I ever seen 90 degree female double header, usually male is 90 degree and we need female here.
Thing is, there's nothing important between connector and edge of the board, I can just move the connector closer to the edge (cut the edge closer to connector) but for now it's not a big deal since I just used another rpi that does not have active cooler on it and the passive heatsinks are more than enough as this will be in a box with duet that will have active cooling anyhow so air movement will happen for sure ... also, dunno when plugins will come but for now load is very low so rpi is rather cold
-
test jig
-
finished simulation
M122 === Diagnostics === RepRapFirmware for Duet 2 + SBC version 3.2-beta2 running on Duet 2 1.02 or later + SBC (SBC mode) Board ID: 08DJM-9178L-L4MSN-6J9F0-3S46J-KT16P Used output buffers: 1 of 24 (20 max) === RTOS === Static ram: 23252 Dynamic ram: 100992 of which 40 recycled Exception stack ram used: 292 Never used ram: 6496 Tasks: Linux(ready,31) HEAT(blocked,135) MAIN(running,435) IDLE(ready,19) Owned mutexes: HTTP(MAIN) === Platform === Last reset 11:58:35 ago, cause: software Last software reset at 2020-10-05 21:21, reason: User, none spinning, available RAM 6580, slot 1 Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0440f000 BFAR 0xe000ed38 SP 0xffffffff Task Linu Error status: 0x00 MCU temperature: min 31.7, current 32.6, max 33.4 Supply voltage: min 1.6, current 1.7, max 1.7, under voltage events: 0, over voltage events: 0, power good: no Driver 0: position -936, ok, SG min/max not available Driver 1: position -3271, ok, SG min/max not available Driver 2: position 320880, ok, SG min/max not available Driver 3: position 0, ok, SG min/max not available Driver 4: position 0, ok, SG min/max not available Driver 5: position 0 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Driver 11: position 0 Date/time: 2020-10-06 09:20:31 Cache data hit count 4294967295 Slowest loop: 353.02ms; fastest: 0.11ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 30.0MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === Hiccups: 0(0), FreeDm: 169, MinFreeDm: 169, MaxWait: 244ms Bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves: 1563560, completed moves: 1563560, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 CDDA state: -1 === AuxDDARing === Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 CDDA state: -1 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP* is ready with "M122" in state(s) 0 Telnet is idle in state(s) 0 File* is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger* is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Filament sensors === Extruder 0 sensor: no data received === SBC interface === State: 0, failed transfers: 0 Last transfer: 6ms ago RX/TX seq numbers: 9278/9280 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 File: Buffered code: M98 P"print_stop.g" Buffered code: ; Build Summary Buffered code: ; Build time: 10 hours 10 minutes Buffered code: ; Filament length: 159104.0 mm (159.10 m) Buffered code: ; Plastic volume: 382690.08 mm^3 (382.69 cc) Buffered code: ; Plastic weight: 478.36 g (1.05 lb) Buffered code: ; Material cost: 22.00 ==> 424 bytes Code buffer space: 4096 Configured SPI speed: 8000000 Hz Full transfers per second: 32.35 File /opt/dsf/sd/gcodes/belly-4-repaired.gcode is selected, processing, simulating
-
now question is how is simulation related to real stuff wrt sbc/duet communication
-
@arhi said in Duet 2 Ethernet and SBC:
now question is how is simulation related to real stuff wrt sbc/duet communication
The simulation runs on the Duet, so the SBC to Duet traffic is much the same as for a real print, except for fewer status requests/responses because of the shorter duration.
-
@dc42 said in Duet 2 Ethernet and SBC:
@arhi said in Duet 2 Ethernet and SBC:
now question is how is simulation related to real stuff wrt sbc/duet communication
The simulation runs on the Duet, so the SBC to Duet traffic is much the same as for a real print, except for fewer status requests/responses because of the shorter duration.
Great, so I can assume this "link" between SBC and Duet2 is stable.
I intentionally put a DCDC close to the "link" and I have these long pins sticking out like antennas so "worse case scenario" and after the relativly long simulation I don't see any errors in the log. When I trim the pins and remove the DCDC from there it should be even better :).Awesome
btw, another question. How does the SBC+Duet work now? Similar to klipper where SBC is calculating paths and duet just executing stepping table or more like octoprint where SBC is streaming G-Code to the duet and the path calculation is executed on the Duet? (I know it's not identical to neither of those two but those are 2 extremes)
-
@arhi said in Duet 2 Ethernet and SBC:
btw, another question. How does the SBC+Duet work now? Similar to klipper where SBC is calculating paths and duet just executing stepping table or more like octoprint where SBC is streaming G-Code to the duet and the path calculation is executed on the Duet? (I know it's not identical to neither of those two but those are 2 extremes)
GCodes are pre-parsed on the SBC and certain operations (e.g. macro expansion) are done on the SBC. The motion calculation is done on the Duet.
-
@dc42 nice, so closer to octoprint than to klipper but unique ... /me like
-
I really like the Idea to use a SBC with the Duet 2! Really great work! Are there any plans to offer some official adapter(s) in future? (maybe in the DUET-Shop?) I'm ready to pay for such a nice solution like the adapter made by @arhi or @deadwood83.
-
v0.2
- changed the shape of the board
- re-routed the comm tracks so that there's even less crosstalk
- cut the excess pcb from the side of the connector so that it does not interfere with those big heatsinks on SBC
- added 5V connector for SBC
Unfortunately it still does not clear panelDue and Probe connectors. I was thinking about changing the relation between duet and sbc connectors (to move the duet connector more towards other end of the sbc connector) but that would move the SBC more out of the allignment with the duet, already the SBC is 6mm in front of duet messing up the case design so looking at that I should move the connector the other way 6mm making access to those two ports even more problematic... so I'm leaving it as is. The way board is now shaped the cable from the probe port can come out but you either need to use the long pins for the duet connector or you need to desolder paneldue and probe connectors from duet and solder in 90 degree ones (this is what I will be doing myself)
-
JLCPCB fabrication data:
https://mega.nz/file/AvomlYgQ#H2On-xkR0LZO4Alfz3XwbGmhdHH57dhXkqwBkmfA9zgkicad project:
https://mega.nz/file/ovhVha7J#dEpw6RDbxD9zF51nwtblrdI7CGkv-v5sYsYhZ_GNx1slicence: public domain - a.k.a. "do what ya wish I don't care"
-
@arhi nice! what i learned with my STM32 LPC Pi adapters is that people would love atleast some gpio pins broken out of the PI and a DC in port
-
@PCR that's why there's a kicad file so anyone can add whatever one wants
5mm terminal block makes much more sense to me than DC barrel jack as this is not something that's going to be plugged/unplugged non stop, you screw in your wires and that's it... as for GPIO, SPI is already used by the DUET and that's usually what I expose from that 40pin connector .. i2c don't really work with wires so no point, 1wire is more/less dead so again no point... I exposed serial from the Duet, might be smart to expose serial from SBC too but .. if anyone wants it there are sources
I was actually thinking about doing a 4 layer board (difference in price is insignificant) with dual sbc connectors so I can connect opi too (opi has expansion connector rotated 180 degrees) as I believe opi would work for this purpose just as good as rpi or even better and I have ton of those ... but the v0 already works so I'm not that motivated ... I need to finish as soon as possible my rpi hat that will house all the sensors I need on the camera (I'm making 20 "devices" that will serve in my new house as security cameras, pid, smoke, temperature, humidity, air quality, voc.. sensors and access points so I need a hat to mount all the sensors on, still deciding if I want discrete spi adc or I wanna add some mcu with adc there)
-
modified duet
I hate removing connectors from 4 layer boards but this was rather easy not a lot of thermal mass on the prc clone, obviously 1oz copper -
@arhi said in Duet 2 Ethernet and SBC:
I hate removing connectors from 4 layer boards but this was rather easy
That corner of the real deal is also the easiest to work with, not a lot of ground planes and heavy traces. But yeah, 1oz "helps"'D
-
This post is deleted! -
@bearer yup, I have some exp. desoldering from 4 layer 2oz and I had to preheat the board not to destroy the holes... this came out like it was a 2layer board ... anyhow, the adapter, as is, if one wanna use the probe and panel connectors operation like this is necesary .. and is def not for everyone (100000% kills your varanty )
the "bottom add adapter" by @deadwood83 is probbly much better solution, I like this for me as I don't have any wires and it holds my sbc in place but not sure this approach is the best, I think his approach is much better.
-
@dc42 do you know if something like this is planed?
-
I've been having comms issues since installing one of @deadwood83's boards. It will connect fine in DWC, but every so often it will reset the controller. Looking at the log, it keeps getting bad checksum errors. I don't believe my wiring is to blame, but it could be. Any ideas?
The thick white cable + yellow wire comprise the connection to the pi. It is a bit of cat5 cable with connectors crimped on.
P.S.- Measuring the cable length, it's about 200mm. Maybe that could be the issue?
P.P.S- I do not have a duex. Just the duet.
-
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.