5 ms·
Perhaps this might have started as a display for 3D printers using Arduinos? Given that the Mega has a pitiful 8K RAM, it's not really suitable for driving dis
by dale_glass 4y ago
Perhaps this might have started as a display for 3D printers using Arduinos?
Given that the Mega has a pitiful 8K RAM, it's not really suitable for driving displays in anything resembling a normal way. The way you get 3D printers with fancy graphics is that the display has another microcontroller attached, plus SD card software, and takes commands in the form of "Draw rectangle here", and "put this image there".
Fortunately 3D printers seem to be transitioning towards hardware that's less insanely limited.
- londons_explore 4y ago> Fortunately 3D printers seem to be transitioning towards hardware that's less insanely limited. If you use some of these more powerful CPU'd printers, you find a problem... Typically the powerful CPU's run an OS (eg. FreeRTOS), and have multiple processes doing different things. However, the Marlin software which is common in the 3d printer world is designed to run bare metal. When you put it into an OS thread, it stutters and misses steps on the motors when moving fast. There are places in the code which are timing critical - eg. "this loop must complete in 168 clock cycles or fewer for correct operation". Modern CPU's might be far faster, but they aren't good at microsecond accurate timing. Rewriting marlin to not rely on being able to rely on such low latency stuff would be a lot of work.
- dale_glass 4y agoMarlin barely fits on the Arduino anymore, and that's why recent releases also target ARM and ESP32. In any case, my point is that the Atmel Arduino architecture is old and limited, and imposes a number of design constraints. There's hardware that's both better and cheaper out there now.
- indrora 4y agoThere is no such thing as the "Atmel Arduino" You're talking about AVR8, which is the ATMega328p and its children and siblings. There exists, though less popular, a complete rebuild of the AVR architecture in 32-bits called AVR32. The instruction set is different, the peripheral IO is different, but the design is similar. The AVR32 was powerful enough for quite some time to run a full fat Linux, though this was dropped for a handful of reasons.
- RobotToaster 4y agoRepRapFirmware was better designed for more powerful CPUs.
- rcxdude 4y agoModern CPUs can do microsecond accurate timing just fine. You do need to design the software correctly, however, not just shove something into an RTOS thread.
- Doxin 4y agoAnother solution that in my experience seems to work pretty well is what mainsail does. The motion planner runs on a raspberry pi. Theoretically this needs to be a realtime thing, but in practice the RPi is fast enough to where it's never a bottleneck. The actual stepping of the motors is handled by a more traditional microcontroller board with some very basic firmware. As far as I understand the RPi is sending it (step count, direction, rate) commands. This solves a lot of issues since the microcontroller is doing some really basic things it's well suited for, and the RPi is freed from having hard realtime responsibilities.
- RobotToaster 4y ago>Given that the Mega has a pitiful 8K RAM It has support for external SRAM, unfortunately it takes a lot of pins so isn't used that often.
- erosenbe0 4y agoI think a lot of legacy 1980s style systems already had an 8 bit external data bus (think z80, 80xx, 68xx), so if you wanted to upgrade with more I/O, uart, seven segment displays and the like, the atmega is a flexible choice that could be tacked onto the bus. That's my understanding.
- indrora 4y agoSomething people forgot about 3D printer design is just how many THINGS went into early 3D printer hardware. The early Reprap hardware was comprised of at least 8...10 discrete hardware devices, all speaking RS485 at each other. The Generation 3 (first MakerBot generation) hardware required a separated, feedback-enabled stepper driver for each axis including extruder.
- HeyLaughingBoy 4y ago> the display has another microcontroller attached No, they just use a better MCU like an ESP32. I bought an MKS DLC32 3D printer board hoping to repurpose it for something else. It has a 2.4" TFT touch panel, 3 or 4 motor drivers, and a bunch of I/O, all controlled by an ESP32. Source code on github. All that for $50!