Duet 2 Ethernet and SBC
-
@bearer thanks!
I googled for it but unter "duet 3 schematics" you don't get it
In the duet3 schematics they use 100Ohm resistors.
The duet 2 has for MOSI, MISO and SPCK 47 Ohm and for NPSC0 and EDR 2,2 kOhm
@T3P3Tony NPSC0 and EDR have no influence on the speed, right?
-
@smoki3 said in Duet 2 Ethernet and SBC:
@T3P3Tony NPSC0 and EDR have no influence on the speed, right?
That's correct.
I tested with no resistors and with 500R (two 1K in parallel since that's what I just had at hand at the time). The difference is significant but at the same time negligible. Without resistors you can get up to 25-27MHz. With 500R in series you "only" get 13.5-15MHz - but that's still plenty and most likely more than your ever need while at the same time providing you much more protection.
@Dougal1957 DSF is absolutely the same. It does neither know nor care if it's a D3 or a D2 on the other end.
-
Okay cool. I just ordered some experimental stripboards and the 26 pin connector. So I can test it next week.
I will build up a small pcb with the resistors on it.
So I will just add some resistors to the MISO, MOSI and SPCK pins. The 2.2kOhm on the two other pins should be enough.
How fast is an ESP? Do they also reach the 25 MHz?
-
@smoki3 said in Duet 2 Ethernet and SBC:
How fast is an ESP? Do they also reach the 25 MHz?
The current configuration sets it to 26.7MHz. The ESP (clocked at 80MHz) can go up to at least 40MHz from what I can see in the source code comments.
-
@wilriker what's the worst case scenario if I connect it directly? Or otherwise what if the speed is to slow (if I choose to big resistors)?
-
@smoki3 So worst case: you fry the SAM4E on the Duet or the ARM of the RPi. That's easy.
Let's put the answer about speed this way: currently the default configuration for Duet Software Framework (which controls the SPI speed) is set to 8 MHz for a Duet 3 (which coincidentally has virtually the same max SPI speed as a Duet 2). And so far there have been very to no occasions where this would not have sufficed. So if you run it at 15MHz (with ~500R series resistors) you are still about twice the speed of the normal D3-SBC speed. I guess you run into step-generation limits before you see issues with SPI speed.
-
@wilriker
allright. I will test it soon! -
@wilriker does the duet 2 provide enough current on the 5 volt circuit to power the pi? Or is it better to use a separate stepdown module
-
@smoki3 said in Duet 2 Ethernet and SBC:
@wilriker does the duet 2 provide enough current on the 5 volt circuit to power the pi? Or is it better to use a separate stepdown module
The 5V regulator on Duet 2 does not provide enough current to power a Pi safely.
-
@wilriker said in Duet 2 Ethernet and SBC:
I tested with no resistors and with 500R
thanks for your effort with this btw!
which branch would be the best bet to build Duet2_SBC_RTOS/Duet2CombinedFirmware.bin?nvm checking that all the repos have been switched from dc42 to duet3d github turned out to be an idea -
@bearer I build 3.02 branch with the SBC Configuration. This should work.
The build have a different file name. So you have to rename it to flash it over DWC
-
@smoki3 Yes, for initial flashing you have to rename it or flash it via
bossa
(as I did). If you also buildDuetIAP
and put this into the/sys
folder of DSF you can from then on do regular flashing by just uploading the firmware file as is in DWC. -
@wilriker is it a different DuetIAP as the normal build which is released on GitHub?
-
-
@wilriker did you see anything like https://forum.duet3d.com/post/162547 in your testing?
(that is with 330R inline on the MOSI, MISO and SCK signals, but the ESP is in place with its pins as hi-z and sleeping).
i'll see if I can't put some 2.0mm headers on there so I can switch between WiFi and SBC but will take a while
-
@bearer I remember that I have seen the
6/26/2020, 11:51:59 AM Connection to Duet established 6/26/2020, 11:52:01 AM Warning: Lost connection to Duet (Board is not available (no data response))
cycle at least once but I don't remember what the reason/solution was (as there were a lot of errors at that time ). And I have only ever tested with a Duet 2 Ethernet.
Unlikely but: did you use the
GPIO0
on the ESP as the TransferReady pin? I remember that while testing I got confused that the header for Ethernet does not have all the pins that the ESP needs and thus some contact points where not what I expected in the first place. Usually if you get that wrong DSF will complain about Duet not being available, though.EDIT: I only now saw that you get a connection every once in a while (in your example to issue
M115
). That means basic connection is working. And if SPI speed would be too high that would result in checksum errors rather thanno data
errors.EDIT2: There have been a lot of refactorings lately. Let me quickly check if it still works on my test hardware.
EDIT3: That still works (although I get an error with DCS not being able to deserialize a status update but that's something different).
-
@wilriker haha! Don't worry about it too much, it was just a stab in the dark as I had someone to help me with the wiring. I'll get back to it in a couple of weeks.
Anyways yes, i did use gpio0 or EDR_CONN as the net is called, which looked to be the same pin the w5500 uses, and as M115 did manage to sneak through I presumed that was ok. And despite not seeing checksum errors I tried dropping the SPI speed but made no difference.
I just wanted to see if it was possible to not remove the ESP, so far either i messed up hi-z firmware, or it has to GTFO. Thanks for taking a look!
-
I finished my prototype
It has a 5V 3A regulator on it for the raspberry
-
@smoki3 said in Duet 2 Ethernet and SBC:
It has a 5V 3A regulator on it for the raspberry
have you considered the load on the 1A fuse for the fans when you're taking a good chunk out for the 5v buck?
-
@bearer said in Duet 2 Ethernet and SBC:
I just wanted to see if it was possible to not remove the ESP, so far either i messed up hi-z firmware, or it has to GTFO. Thanks for taking a look!
If the firmware sets up the ESP reset pin and EN pins as outputs in the low state, then I think it should work without disconnecting the ESP. The additional capacitance of the ESP pins might reduce the maximum available SPI speed a little, but that speed isn't critical.