32 bit electronics

Discussion in 'BigBox General Chat' started by thingster, Nov 25, 2015.

  1. thingster

    thingster Active Member

    Joined:
    Sep 4, 2015
    Messages:
    31
    Likes Received:
    6
    Did anyone of you thought of upgrading from a 8 bit to a 32 bit printer electronics? There are a lot of advantages of 32 bit over 8 bit (for example better print quality on a properly calibrated machine, smoother/quieter operation, and so on) and I'm definitely going to upgrade my printer in that way. Question for me still is which board I should go for. There are a lot like Ramps-FD, Smoothie Board, RADDS, and more. Currently the last one is my favorite but I'd would like to hear your opinions first.
     
  2. Kanedias

    Kanedias Well-Known Member

    Joined:
    Sep 12, 2015
    Messages:
    406
    Likes Received:
    124
    How will it improve print quality?
     
  3. mike01hu

    mike01hu Well-Known Member

    Joined:
    Apr 22, 2014
    Messages:
    957
    Likes Received:
    166
    I think there is a misunderstanding about the processing differences between 8 and 32bit systems. If there is a large amount of complex processing to be done then bit size and processor speed can assist in performing tasks in a short time but for low processing need, such as providing signals to stepper motors, simple displays and USB communication at relatively slow speeds, 8bit processing is more than adequate and can in fact be used for far more complex functions. Data transfer rates in 3D printers are measured in milliseconds and an 8 bit processor can achieve thousands of operations in the same time. There is a danger of over-defining control systems and thereby increasing costs by chasing populist propaganda for multibit multicore systems that are the province of PC's, tablets and smartphones.

    Mike
     
  4. thingster

    thingster Active Member

    Joined:
    Sep 4, 2015
    Messages:
    31
    Likes Received:
    6
    Mike, you are correct with many statements and I see your point, but it's the truth that 8 bit is indeed too slow for higher stepping rates than only 1/16 or 1/32, not to mention all the other stuff you can do with 32 bit at the same time (!) because of the sheer amount of processing power. You can show me 1/128 stepping on the BigBox. It will just not be possible. I don't see the point to invest in 8 bit in the year of (nearly) 2016, where we already have much more powerful 32 bit electronics that cost nearly the same. Beside of that it's much more future-proof. Nobody knows what exciting firmware functions the near future will bring. 32 bit will be able to handle it. 8 bit? Maybe.
     
  5. Henry feldman

    Henry feldman Well-Known Member

    Joined:
    Sep 5, 2015
    Messages:
    969
    Likes Received:
    389
    Separate clock speed from bit-width. Yes for a given instruction and bus width 32 bit instructions can do more, than 8-bit, but less than 64-bit. That being said this is a mechanical thing, and as such is painfully slow compared even to an 1979 apple ][ unless the electronics are doing some really intense calculations. If I gave you a 100ghz 8-bit processor it would be able to run hundreds of stepper motors and probably have time to play a MAME emulator on the side. Of course if you put in a 32-bit processor then you need a 32-bit memory controller, wide bus (if you can't feed it you can't run it), etc. Also FPU versus emulated FP instructions (like the arduino) make probably a bigger difference.
     
  6. thingster

    thingster Active Member

    Joined:
    Sep 4, 2015
    Messages:
    31
    Likes Received:
    6
    By speaking of 8 bit electronics it is only meant that the classic ATmega2560 and similar boards are slow as hell. There is simply no fast 8 bit board out there. In theory... well, that might be another case. ;)
     
  7. Henry feldman

    Henry feldman Well-Known Member

    Joined:
    Sep 5, 2015
    Messages:
    969
    Likes Received:
    389
    That's true. That being said, since we can't print at 500mm/sec, so I imagine we are slowed down by the properties of the plastic, is the issue that it can't keep up on a realistic rate? I guess we could switch out to an ARM based system running at much higher speeds without a lot of hassle is there is truly a benefit.
     
  8. mike01hu

    mike01hu Well-Known Member

    Joined:
    Apr 22, 2014
    Messages:
    957
    Likes Received:
    166
    OK, so I forgot that the majority of modern program writers write in 'C' and its derivatives, which have to be relatively inefficiently compiled into machine code rather than us assembly language program writers doing it in native code. Yes, compiled programs are likely to require lots of processing power to execute the massive programs that now exist. I have written code in kilobytes, including a Z80 based basic disc management system that were subsequently rewritten in 'C'++ to consume megabytes of memory for the same job at the same rate. Each byte has to be read and interpreted by the processor so more bytes means more time so wide fast processors do the job quickly. OK, modern compilers do a much better job with optimisation but never as good as in assembler.

    I'll accept my admonishment! ;)
     
  9. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    918
    Likes Received:
    183
    So are we saying that since the boards are going to be running inefficient compiled C, a 32bit board may have something to contribute to the BigBox ?

    Certainly there are a lot of fanatics on the web who believe in it.
     
  10. Henry feldman

    Henry feldman Well-Known Member

    Joined:
    Sep 5, 2015
    Messages:
    969
    Likes Received:
    389
    So C actually produces very efficient assembly, which can be tiny. I just built a raw C program (no libraries) for just adding some numbers and exiting from the command line on my mac. It compiled and linked out at a few K using the LLVM compiler. The problem is not C or C++, but rather giant libraries linked in. Even the simple stdio library to provide command line input/output added 18K to the program. And I would bet you would be very hard pressed to be more efficient in hand built assembly for doing stdio yourself (presumably you'd only build what you needed, but also presumably the linker optimized out the stuff I didn't use). Heck, the C workflow allows you even to see and tweak the assembly it creates. The arduino gets away with this somewhat in that stdio is provided by the external computer's console inside the arduino app (good since there is so little RAM). The only reason in most computers nowadays to hand code in assembly is to take advantage of a very specific boundary condition that you can exploit for some specific optimization that a general optimizer won't recognize (like oh, if I push that into the vector unit before that, the interrupt will do x instead of y because the i7 has feature N on it which makes my algorithm slightly faster on that processor)
     
    mike01hu likes this.
  11. mike01hu

    mike01hu Well-Known Member

    Joined:
    Apr 22, 2014
    Messages:
    957
    Likes Received:
    166
    So true Henry, libraries are an issue!
     
  12. R Design

    R Design Well-Known Member

    Joined:
    Oct 7, 2015
    Messages:
    918
    Likes Received:
    183
    I'm very fond of (enhanced 8 bit) PIC18F chips that supposedly handle compiled C very well.

    But nobody is going to say whether 32bit might have something to offer to the FFF world?

    For example, I've heard that "look ahead deceleration" might be a 32 bit advantage: planning to slow down well before a corner so that you can combine sharp edges with high speeds.
     
  13. Sanjay

    Sanjay Administrator
    Staff Member

    Joined:
    Feb 27, 2014
    Messages:
    125
    Likes Received:
    118
    There are some cool potential things you can do with much heavier lifting on the CPU. In regards to motion control, it's not really a matter of being able to get the step pulses out fast enough, which an 8bit ATMega is more than capable of. What you can do with more horsepower is implement more intelligent motion control in which you use things like non-trapezoidal acceleration curves, more read-ahead type planning, and the ability to do things like feedforward pressure control for the extruder.

    The issue with 32bit electronics is the firmware, the current offerings are not as feature complete as Marlin and they don't really implement any of the fancy things talked about above, their just doing what the ATMega does on a 32bit chip. Without the advantages implemented on 32bit controllers and truly mature firmware there isn't much reason to push over to them. Additionally there are some tricky problems with EMI due to the higher clockrate frequencies that begin to get high enough in frequency to be an EMI concern. This presents regulatory hassle with certifying the machine CE/FCC, on the lower clockrate 8bit controllers the frequency is low enough to be ignored.
     
    Mike Kelly and mike01hu like this.

Share This Page