Controlling most desktop 3D printers is as easy as sending them G-code commands over a serial connection. As you might expect, it takes a relatively quick machine to fire off the commands fast enough for a good-quality print. But what if you weren’t so picky? If speed isn’t a concern, what’s the practical limit on the type of computer you could use?
In an effort to answer that question, [Max Piantoni] set out to control his Ender 3 printer with an authentic Apple IIc. Things were made a bit easier by the fact that he really only wanted to use the printer as a 2D plotter, so he could ignore the third dimension in his code. All he needed to do was come up with a BASIC program that let him create some simple geometric artwork on the Apple and convert it into commands that could be sent out over the computer’s serial port.
Unfortunately, [Max] ran into something of a language barrier. While the Apple had no problem generating G-code the Ender’s controller would understand, both devices couldn’t agree on a data rate that worked for both of them. The 3D printer likes to zip along at 115,200 baud, while the Apple was plodding ahead at 300. Clearly, something would have to stand in as an interpreter.
The solution [Max] came up with certainly wouldn’t be our first choice, but there’s something to be said for working with what you know. He quickly whipped up a program in Unity on his Macbook that would accept incoming commands from the Apple II at 300 baud, build up a healthy buffer, and then send them off to the Ender 3. As you can see in the video after the break, this Mac-in-the-middle approach got these unlikely friends talking at last.
We’re reminded of a project from a few years back that aimed to build a fully functional 3D printer with 1980s technology. It was to be controlled by a Commodore PET from the 1980s, which also struggled to communicate quickly enough with the printer’s electronics. Bringing a modern laptop into the mix is probably cheating a bit, but at least it shows the concept is sound.
Seriously cool stuff!
If anyone wants to complain about the use of a modern computer as a go-between, it could almost certainly be done with period-accurate technology, too. There were various third-party (and a couple, expensive, first-party) devices which could buffer outgoing data to a Centronics printer, so that the machine itself could be tasked with other things while a print job was running.
In theory, a Z80 clocked at about 8MHz driving a Motorola MC68681 DUART and a handful of RAM could probably accomplish the equivalent in this case (serial buffering, rather than parallel buffering used by 2D printers of the time). The 68681 has a maximum link speed of 115.2 kilobits, and since the 68681 is two UARTs in one package, incoming data from the IIc could be received along one channel, buffered, and then sent out to the printer along a second channel when an appropriate amount of data has been stored up.
Why not recomiple marlin and adjust baud to 300? its one of the first lines in source code. Funny part is the printer is a much more powerful computer than the 8 bit apple.
It looks like the minimum is 2400, or at least, that’s as low as the M575 command lets you go.
https://marlinfw.org/docs/gcode/M575.html
Maybe you can hardcode it lower in the source, but I’d be surprised if there’s been any testing at that slow of a speed so who knows what would happen.
The IIc’s “printer” serial port defaults to 9600. The “modem” port defaults to 300. Both support up to 19200.
I wouldn’t have even thought to look for an ‘M’ command for that. It’s kind of a chicken and egg sort of solution since you have to be able to send the ‘M’ command at the current speed!
It’s definitely settable in the config file, well one of them. I don’t remember if it’s config of config_adv but I’ve definitely seen it. I would be surprised if you couldn’t just use any speed there that the controller (probably an Mega 2560) supports. It’s just a really big Arduino sketch afterall.
It looks like the Apple IIc actually supports much faster baud rates, it’s just that the default is 300 baud. So just poke the location to change the baud rate (and maybe change the baud rate on the marlin side) – no heroics needed.
I see 2400 listed on the datasheet for a atmega2560 unknown about the 32bit cpu if it is limited differently, perhaps software serial but I doubt marlin expects to use that. Would still be neat to see 300 baud fed o the printer, filling a buffer and sending a bunch of data at once at 115200 is just too fast.. lol.
Definitely cool, although the article title is somewhat misleading.
“In theory, a Z80 clocked at about 8MHz driving a Motorola MC68681 DUART…”
A 4 MHz Z80 system can do this, a 4 MHz SIO can handle up to 800 kbps.
I’m not very familiar with the Apple IIc, but I am super familiar with the 65xx family of processors and peripheral ICs, and I use the 65c51 ACIA (UART) at 115,200 bps on my 5MHz 65c02 workbench computer to program our bluetooth devices at work. You can get the 115.2kbps by clearing the four lsb’s of the control register to 0 so it will take the crystal frequency and divide it by 16 to get the bit rate.
why not use the apple in 115200 speed, drivers for this are available within ADT Pro, just bootstrap it to prodos over serial and the first thing it does is send a high speed serial port driver
I’m on the fence about whether putting a modern laptop in the middle is actually cheating but at least he didn’t gut the Apple and stick a Raspberry Pi inside it.
I genuinely salute anyone who will build this just to say they’ve created a…
mac-in-the-middle solution.
Slow clap mode activated.
If my Atari 800XL can pull off 127kbps over SIO, and 9600bps with an 850….. you could probably find a way to squeeze better than 300bps out of an Apple II serial port.
Try running cura on it :D
There’s been a longstanding debate between the reprap crowd and the people who first invented 3d printing over it’s history. I’m not naming names here because I’m writing from memory and don’t have time to look up the specifics. Feel free to reply with what I missed or got wrong.
The reprap story was that the inventors delayed 3d printing from reaching the masses by patenting everything and then only building high end machines individual users could never afford. The inventors’ story was that nobody ever enforced a patent against a hobbyist and at least one of the inventors actively encouraged the hobbyist community to attempt to build personal 3d printers but nobody succeeded with the technology of the time.
I do remember at least one article in Radio Electronics that supports the latter story although it was about SLA, not FFF printing and so was arguably much more difficult for a home hobbyist especially with the tech of the time and so maybe setting them up to fail?
Anyway, I’ve thought before that trying to build a repstrap using only parts a hobbyist could have obtained in the 1980s and controlling it with a computer from that period would be an interesting project and a test of these claims. It looks like somebody just did one part of that!