Most docs I've read, not for samd21 (which I did not read yet) say uC needs 4 clocks to sample SPI clock so max speed at slave is sck/4 which would be 12MHz. Here's the doc I found for SAMD21 http://ww1.microchip.com/downloads/en/AppNotes/00002465A.pdfby newbob - Developers
I found this post, SAMD21 SPI is limited to 8MHz when using DMA. I don't think it's a showstopper but good to know... Arduino compatibility seems like a big plus.by newbob - Developers
Cool table of PIC and SAM controllers listing their features.by newbob - Developers
It actually does more than just PWM: 30. TC – Timer/Counter 30.1 Overview The TC consists of a counter, a prescaler, compare/capture channels and control logic. The counter can be set to count events, or it can be configured to count clock pulses. The counter, together with the compare/capture channels, can be configured to timestamp input events, allowing capture of frequency and pulse width. Iby newbob - Developers
Not sure if we are still looking at other peripherals, anyway, here's SAM D for about $1 (52pin) ATSAMD21J15B-AUT. There is arduino for SAM D and max SPI speed is 12Mhz: Atmel's SAMD21 processor (used on the Arduino/Genuino Zero, MKR1000 and MKRZero boards). EDIT: This is ARM Cortex M0. It has an interrupt for every peripheral.by newbob - Developers
QuoteCthulhuLabs The only draw back is the EFM8UB2's SPI interface is only 4.8MHz in slave mode. Maybe it's temporary and higher speeds will be enabled later. Older (I think) versions EFM8UB1, support SPI slave mode up to 12MHz.by newbob - Developers
It looks neater for sure...three interrupts and individual DIR lines do offer more flexibility over old setup. Looking forward to see how it turns out. Btw, looks like some of the GPI 34-39 are assigned output tasks...by newbob - Developers
QuoteCthulhuLabs QuoteJustAnotherOne But they don't come with Arduinoo IDE, so you have to do real programming,.. ;-) Have to anyways. Was going to port RepRapFirmware to this. QuoteJustAnotherOne PS: Wasn't the Idea to connect them to the ESP as an SPI slave? So why do they need to have USB? Looking at replacing the FTDI serial converter with a second MCU that can act like a USB-UART chip as weby newbob - Developers
Thanks. From TMC doc (page 69) I calculated one cycle (change dir, one step, change dir) to be 652ns (internal 4MHz clk) resulting in max pulse rate of 1533742/s. tDSU+tSH+tSL+tDSH 20+(36+250+20)+(36+250+20)+20=652ns period 652ns cycle = 1533742.33Hz EDIT: corrected calculations at 128 microstepping - that's 1533742/128=11982 steps or ~11982/400=30 revolutions/s or 1800rpm. Just for refereby newbob - Developers
I know you can apply EN to all steppers but how do you control direction with single DIR signal?by newbob - Developers
@CthulhuLabs On the attached I don't see stepper DIR signal anywhere. Btw, when using mux for CS lines - are you planning apply weak pullup on all lines? I wonder how much SPI speed would you loose that way (due to mandatory wait after CS selection) EDIT: found it about 1uS with 4.7k pullup - that's about 300 clock cycles.by newbob - Developers
I don't see that in thread you've linked to - could you point at a post that brought you to that conclusion (in the last post from 7 days ago I think the issue is that tcsaba101 is reading at the top of the range - I'd make 3250 my max)? Overall I agree, while they iron out bugs we could use SPI ADS118 to existing SPI bus and use two temp pins for another stepper or drive SPI display on a seby newbob - Developers
While ESP32 ADC are not accurate in absolute terms (20c on one board will be 21c on other) they are precise and measured results are repeatable (20c will be 20c at the same voltage). Therefore I don't think internal ADC is an issue for 3d printer controller (problem arises when doing IoT temperature monitors and such). Here's a pinout for what could be SIX stepper board: It accommodates 3 axisby newbob - Developers
Quotepamalofeev Quotehg42 you still did not answer from where you got the number 25. He got it here. QuoteFEATURES Klipper touts several “compelling features”: Each stepper event is scheduled with a precision of 25 microseconds or better. The software does not use kinematic estimations (such as the Bresenham algorithm). It calculates precise step times based on the physics of acceleration and tby newbob - Firmware - experimental, borrowed, and future
Thank you for making it clear for me, I should have read your post more carefully. There's one other situation I can think of that could cause this: in four screw arrangement, periodically, one screw could take over from the other (due to backlash between nut and screw bed would not lock out) making vertical movement uneven.by newbob - Developers
Thinking out-loud, assuming that lead screws were attached on one side, if original lead screws caused lateral movement than wouldn't issue be with Z linear guides that failed to keep the bed steady.by newbob - Developers
ATSAM4S looks great and is not that expensive - strange that there were no controller boards made even though it's been out for three years and it's 79GPIO should be enough for any kind of printer controller. Compared to ESP32, ATSAM4SA16BA-MU is twice the price, 1/2 less flash and probably 1/4 speed (EDIT: SAM4S 180 DMIPS vs 600 DMIPS ESP32 vs 125 DMIPS SAM3 in Duet.) as to IO expanders: SX15by newbob - Developers
@CthulhuLabs, on your last pinout chart, GPIO35 (#7) is input only therefore will not output PWM. Btw, how are you going to provide DIR, STEP and EN through demux? Doesn't CD74HC154M96 output one state at a time?by newbob - Developers
ESP32 has two cores, can have one interrupt per core (I'm not sure if Arduino supports it) and costs $7: I think a benefit of using single processor would be keeping relative movement of XY in sync.by newbob - Developers
Cool solution. I agree with o_lampe -I think 'killer app' for the servo motor application would be extruder. Servo equipped extruder would allow for lighter effector/gantry and/or quicker retraction speeds. Even more interesting would be to track movement of the filament itself, not the motor, to eliminate elasticity/slip errors when feeding filament. Overall, I think we need a single servoby newbob - Developers
deletedby newbob - Firmware - experimental, borrowed, and future
Earlier in this thread there was a discussion if ADC is accurate enough in the ESP32. The issue turned out to be with inconsistent internal voltage reference which is affecting accuracy. Espressif has instructions how to correct it manually and planning on fixing in during production in the future. Some more info: https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/adc.html#adby newbob - Developers
Quotedc42 I'm sorry, I forgot that the SX1509B has a blink mode as well as a PWM mode. It does appear that the blink mode may be usable for this purpose. Thanks. I sent a q to Semtech to verify that 256 value sets 100% duty cycle. I noticed that duet expansion board is using SX1509B for end stops. Do you think it would be ok to use SX1509B IO for end stops for homing considering extra delaysby newbob - Developers
Quotedc42 Quotenewbob SX1509B seems to be one the best (another one would be CY8C9520A for 2x the price). I am curious why led blink mode available on SX1509B would not drive an SSR? Because DC-AC SSRs need low frequency PWM (or low frequency sigma-delta modulation) to give predictable results. RRF uses 10Hz for them. Thanks for responding. From what I understand at 256 intensity (I'm assuminby newbob - Developers
Quotedc42 Hubberthus, thanks for that analysis. A few comments: - The ARM specific assembly code in RRF is only there to provide a register and stack dump if an exception occurs, to help identify the cause. So it can be left out, or equivalent ESP32 code substituted. - Even if a USB interface isn't needed, it's well worth keeping the UART pins available for debugging purposes, and to update theby newbob - Developers
Have you looked at Klipper firmware? It's still in development and since recently has a feature to control multiple controller boards. You'll need to add raspberry pi to your setup. It's not a drop in solution but I think it would the most cost effective and high performance. Here's thread with more info: http://forums.reprap.org/read.php?147,667655,page=6by newbob - Developers
You may find more interest in a CNC forum since GRBL is not a firmware for 3d printers and there are no shields available that would create a 3d printer controller (someone is working on one though). As you may already know, there's CNC shield that will work with nucleo board: https://github.com/omuzychko/StepperHub/raw/master/stepperHub.jpgby newbob - Firmware - experimental, borrowed, and future
This is quite interesting project. I've been reading the documentation and have a couple of questions: is GPIO state solely controlled by host? For example, when heater is on and controller disconnects from raspberrypi - will the heater keep on heating? Similarly, if limit is triggered - is it up to the controller to stop processing stepper commands or it's up to the host?by newbob - Firmware - experimental, borrowed, and future
^I agree, klipper is a really interesting solution. I replied specifically to the idea of linking the two ESP32 boards over WIFI which I don't think would work well with klipper design.by newbob - Developers
@paulbearne Your idea is probably more suitable for pacemaker or franklin. From what I read klipper requires low latency and jitter connection between host and client.by newbob - Developers