4 ms·
> While it is something Reddit endlessly complains about (despite having no software engineering experience) While I agree Reddit's obsession with weird techni
by dfasdfasd 7y ago
> While it is something Reddit endlessly complains about (despite having no software engineering experience)
While I agree Reddit's obsession with weird technical details is annoying, this is a pretty arrogant position. I've written motion control code for both 8-bit and 32-bit designs, and the difference is bigger than "read a string and pulse an IO a few times". The Atmega has been outdated for the past 10 years, the only reason it picked up in 3D printing was because of the accessibility through Arduino and similar---not for any good, technical reason. They're going to need to switch at some point, may as well be now.
Sure, you don't _need_ a 32 bit processor, but a modern Cortex-M0 or M4 is much more powerful than an Atmega328 for the same cost or less. My Prusa Mk3 takes a non-negligible amount of time to sort files on the SD card, and the screen could really show more information. There is also much more advanced motion planning they could do with a little more power available.
- dfasdfasd 7y agoAdditionally, we don't need to speculate, they explained their reasoning in the article: > Why did we decide to switch to a 32-bit board? Surprisingly, raw performance is not the main reason. We can now write cleaner and more abstract (reusable) code without assembler hacks like on the 8-bit board. Adding new features becomes much less of a hassle and we don’t have to count every single byte in the flash memory. Unit tests and JTAG debugging sped up the development and we also got the chance to include ethernet and optional Wi-Fi connections. If you read through the firmware you'll find 1000000x #define's for different features that I'm sure they're eager to get rid of.
- jrockway 7y agoSure, but now they are a small company that has to maintain two separate codebases. Even big companies like Google can't keep their Android and iOS apps at feature parity, so something has to give and it's the early adopters with old hardware that is just not going to get any new features. Or they are going to have twice the software engineering overhead. I get why you would start from scratch with an M4. I don't get why you would maintain two different codebases commercially, though. (As for the motion control aspect, at the feedrates of 3D printers, I don't think you get anything from a faster processor. Motion control is not what's limiting print speed or accuracy.)
- dfasdfasd 7y ago> Sure, but now they are a small company that has to maintain two separate codebases. Even big companies like Google can't keep their Android and iOS apps at feature parity, so something has to give and it's the early adopters with old hardware that is just not going to get any new features. Or they are going to have twice the software engineering overhead. I mean sure, it's not going to be a perfectly smooth transition, but I think you're underestimating how bad it was on the Atmega. There is _no_ code space left on those chips, which makes adding features nearly impossible. They'll probably just maintain the old version for as long as they can, while switching new products over to the new one. The codebase is also probably simpler than you realize. These microcontrollers don't have the code space for programs of any significant size. Porting the peripheral interfaces over to the new controller is not that hard. > (As for the motion control aspect, at the feedrates of 3D printers, I don't think you get anything from a faster processor. Motion control is not what's limiting print speed or accuracy.) This is actually a real problem. It's not the basic motion control, but doing things like intelligent look-ahead or vibration compensation. I think the technology is further ahead than you realize. It's not an Atmega running your microwave we're talking about. Those chips _are_ seriously limited, in material ways, even if you haven't run into it yourself.
- sannee 7y ago> small company iirc they have well over 200 employees at this point.
- dual_basis 7y agoI think that they're just using Marlin, a lot of the work is done for them.
- dual_basis 7y ago> There is also much more advanced motion planning they could do with a little more power available. But for 3D printing isn't the printer simply reading the instructions in the gcode? It's not doing any motion planning at all, that is all decided by the slicer.
- dfasdfasd 7y agoNo, on most CNC machines the controller actually handles much of the motion planning. The slicer will generate a command that says go from point (x1, y1, z1) to point (x2, y2, z2) with speed f, but it doesn't say anything about acceleration, or how to transition into the next move. A very simplistic controller will use a trapezoidal ramp profile where it will ramp up to the programmed feed rate at a fixed acceleration, then stay at the programmed feed, then ramp down in time to reach the end point. However, if the move was a very short line or arc as part of a large surface, the machine doesn't need to reach 0 speed before starting the next move. A smarter controller will 'look ahead' to predict the next few move and plan the motion of the machine to eliminate jerkiness or stopping. The slicer may tell the machine what acceleration to use, but that's really just setting a parameter in the machine controller, and isn't settable per-move. This isn't as critical for 3D printers as it is for big, heavy milling machines. Nevertheless, you can do clever things like trying to compensate for vibration, or speeding up or slowing down the extruder motor based on the pressure of the plastic in the nozzle. This isn't to say Prusa is switching just to do better motion planning, it sounds like that isn't a primary goal, but I'm trying to illustrate there is a lot more room for intelligence than 'just wiggling some IO'.
- dual_basis 7y agoI see. I can see some benefit to motion planning on the device if, for example, decisions are being made based on real-time data. For example, if there is a pressure sensor for the nozzle then the board could use this this realtime data to adjust it's motion. If there's no realtime data being input then everything is simply a deterministic function of the gcode, and all of these aspects related to acceleration and jerk can be precomputed on your powerful multi-core desktop and "rolled into" the gcode.