The official version of Grbl on ARM is not out yet. You'd have to use something like this; which is a 3rd party effort: https://github.com/terjeio/grblHALWhere did we land on using the SAMD21 at the primary controller (vs the sub axis controllers)?
I have not tried to use it yet; so I don't know where it's limitations, pitfalls, or bugs, if any, would be.
Being power steering motors; it would have to have sensors; for two reasons: 1) safety, so it's probably (hopefully!) got a redundant set of them; and 2) it needs to work smoothly at zero to very low RPM, which a sensor-less driver can't do (you don't get any back-emf if it's not moving, so sensor-less drivers start up blindly, and expect the motor to fall into sync as the output frequency increases - works well for RC propellers and rotors on drones; doesn't work well at all for servos, which is what that power steering motor essentially is). However, if the motor was positively geared to the steering box, I suppose the commutation angle could have been deduced from the steering angle sensors.ceramic magnet at the end of the shaft
It's more like the first stage of the BIOS on a PC than the operating system - it runs, well, at boot time; and allows you to load the main program onto the flash using something other than the chip's native programming protocol. It's not technically needed if you are using the manufacturer's programmer (or an equivalent) but if you want to have your board be updatable by people (customers or field technicians) using just a standard PC (or smartphone, etc) then you need one. Arduinos, being designed for beginners, were intended to be used with standard PCs - and thus the standard method of sending your main program to the Arduino's processor is over the serial port (or in the case of later Arduinos, the processor chip's built-in USB port); and that's where the bootloader comes in: it runs at startup, checks for specific conditions required to trigger the upload routines, and if those conditions are found, starts to communicate with the upload program running on the PC (the Arduino IDE uses several different command-line programs, depending on which kind of Arduino it's talking to; but for Unos, it's AVRDude - you will have seen that in the build process logs part of the window when sending a sketch to an Arduino). Then, the bootloader copies the man program code that's incoming from the serial or USB port onto the flash, verifies it, and then reset's the Arduino.honestly I am not sure I totally understand what bootloaders do
If the requisite conditions for upload are not found at boot time; the bootloader just jumps right into your program's main() function (er, close - it executes the C++ automatic startup routines first, so that your global variable's constructors get called before main()).
The SAMD21 (and most of the other ARM processors I've encountered recently) use a PLL (Phase Locked Loop) to generate the main system clock. That PLL in turn uses the 32.768 crystal (well, actually it's an oscillator being driven by the crystal, but I digress) to adjust the actual output frequency of the 48Mhz oscillator to keep it right at 48Mhz regardless of supply voltage or temperature fluctuation. Setting this up on the SAMD21 is one of the first things that the bootloader does; and it expects to find that crystal connected (if you wrote your own bootloader - or didn't have one at all; and just did the setup yourself - you could, in principle, omit the crystal and just run the 48Mhz oscillator "open-loop" - and your clock speed would vary, but be somewhat close to 48Mhz, and for some applications that's good enough). I've read comments on forums (I didn't verify this myself by reading the bootloader source code, though) that the Arduino SAMD21 bootloader goes thru a configuration briefly at boot where the 32.768Khz crystal is the only clock running, and is the CPU's clock - so if that crystal is missing or defective the Arduino bootloader will hang there (no clock).re: crystal - a bit confused here, I understand the relevance of 32.768 khz, but I thought the oscillator was responsible for timing cpu cycles....but how does a 32.768 kh produce a 48 mhz cpu cycle?
I figured that soldering down a crystal and two capacitors was easier than re-writing the bootloader and sorting out any communication issues that may spring from not having a dead-on 48Mhz clock rate.
It isn't, per se - but precision is relative. In this case it will be good enough. Or, there are a bunch of voltage reference ICs available, or for this application, a voltage regulator feeding into a 10-turn trimmer pot would probably be OK.re: precision voltage reference: is a zener diode sufficient for this, or is that not considered to be a precision reference?
Well, they worked OK back when it was doing teeth, so.... sure, I guess? Assuming you are reading the encoders at the full edge count you get four times the optical lines of resolution, so then there's 2000 states per revolution. Multiply that by whatever the ballscrew drive factor is (turns of the motor per inch or MM of travel); and you get the actual resolution of the system (steps per inch or MM, depending on which unit system you are using). Multiply that figure by the desired travel rate (inches or mm per second) and you get the rate in Hz that your quadrature decoder ISR needs to run at.encoder: these are hedl 5540 encoders
Assuming a 1:1 belt ratio, and 5mm per turn ballscrews, that 500 optical lines would give you (500 x 4) x 1 x (1/5) = 400 steps per MM.
Assuming that you want a 100mm/sec travel rate for rapids, then (100 x 400) = 40000.
So, for the above example, your quadrature decoder ISR would need to be capable of handling a 40Khz trigger rate.
I would. Any of the SAMD21-based Arduino's will do (or a clone).It seems like developing these boards is gonna take a bit, I was thinking about ordering a SAMD21 dev board to start familiarizing myself with it, thoughts?
Wat. Let me repeat myself: Wat.the lead screws have no rear support bearings on any of the axis!
Unbelievable. Even cheap chinese ballscrew kits for DIY wood routers include support bearings on both ends.