Blog Manager

Universal Article/Blog/News module

How 3D Printer made and how it works?

Like Up:
Like Down:
Created:
15 thg 4 2020

We are still a long way from having our personal 3D printers work just like our microwaves, yet there has been a lot of progress made by a group of intrepid developers to not only give you options for how you want to use your 3D printer but to make it more reliable and easier to use. How we interact with our 3D printer is determined by the printer’s toolchain: the electronics, firmware, control software, and slicing software that take a 3D model to a 3D object. If you bought your 3D printer as a complete kit or preassembled, then you probably have a set toolchain provided by the kit manufacturer. On the other hand, you might be piecing your 3D printer together from a variety of sources and are choosing parts of the toolchain that best fit your needs. Either way, this chapter is here to help you understand how these different parts of the toolchain work together. This chapter also introduces the idea of the 3D printer workflow as a way to use our printer’s toolchain to make 3D prints.

You might later decide to upgrade parts of your toolchain, so this chapter will help give you a place to start. For example, we might want to upgrade our three-year-old MakerBot Cupcake with new electronics running new firmware with advanced features originally designed for a RepRap. We might also want to upgrade our slicer program to make repairing models for printing a little easier. All of this would give us a significant upgrade in an older printer’s print quality and performance, breathing new life into it.

From a 3D Model to a 3D Object

If I want to print a document in my home office, I simply hit the print button in whatever application I’m using and the document is beamed over the radio waves of Wi-Fi, waking up my laser printer that then springs to life to churn out my finished printed piece of paper. Printing 3D objects on your personal 3D printer is not this simple yet. That’s not to say that it is all that difficult either; it’s just that we need to follow a few steps in order to go from a 3D model that we downloaded or made on our computer screen to holding the actual plastic object in our hands. This process is called the workflow and this chapter intends to demystify the whole 3D printing process, including the workflow and the specific components involved. Let’s begin with Figure 2-1.

Figure 2-1. 3D printer workflow

In this image, we have the overall organizational flow that combines to form the entire 3D printing process, from starting with a 3D model that you either downloaded or created, to holding the finished object in your hands. Let’s take a look at how this breaks down in much more detail.

3D Models

The whole process begins with a good 3D model. This might be something you download from a resource online or something you’ve made after working through the projects in this book. Generally, the model we are looking for will be in the STL, or stereo lithography, file format. This model should also be scaled appropriately for the size of our printer and it should be a clean and manifold model—more on this last one in a bit. If the file doesn’t fit these basic requirements, it will need to be scaled or repaired using one of several different techniques that we will cover throughout this book.

Slicing and Toolpath

If our model is good, then we are ready to process the model for printing. Because our 3D printers print by laying down successive layers of filament, one layer at a time, we need to slice the model into these layers and generate the toolpath that tells the extruder where to go and when to extrude plastic. This process is called slicing. It will involve one of several applications called slicers that generate a set of commands for the 3D printer to follow, called G-Code. This is an instruction set that’s been around for a while and appropriated for use with our 3D printers. We can slice a model by launching the slicing application independently, but we can usually launch this application through our printer control.

Printer Control

The printer control is a host application that fittingly enough controls our printer and will generally form the hub from which everything is operated. From this application, we can launch our slicing application; control the printer’s three axes of movement; set and monitor the temperature for our extruder and printbed; and start, pause, and cancel print jobs. Most host applications will provide some visual indication for the model or G-code file to be printed. The most important job for the host software is to process the G-code file and by communicating with the printer’s electronics, it will send these commands to the 3D printer to build our objects layer by layer.

So, What’s a Toolchain?

This general workflow wouldn’t be possible without a series of applications and hardware that we will need to use at each stage of the process. These individual pieces that play such a crucial role in the day-to-day printing process are what make up our 3D printer’s toolchain. For the intent of this book, our toolchain begins with our host software and includes the slicing application; the code, or firmware loaded on the electronics; as well as the electronics and the wiring. In a simple sense, this toolchain is represented in Figure 2-2.

Figure 2-2. The 3D printer toolchain

Referring to this simplified illustration, the printer control application will bring in the 3D model and send it to a slicer application, if needed. The printer control then communicates with a specialized set of code called firmware, which runs on the electronics platform. The firmware controls the electronics hardware to build our 3D objects according to the instructions received from the printer control and sends data—like temperature, positioning, and other information— back to the control application.

While there are many different toolchains made from different combinations of slicers, printer controls, firmware, and electronics, all of the 3D printers that we looked at in the last chapter share the same basic toolchain structure and can often use different parts of the toolchain interchangeably. For example, it might be possible to use many different electronics platforms with any one printer or to make use of many different printer control applications with any one set of electronics.

Before we get to how to put our toolchain to use, let’s look at each of these elements in closer detail to see what options are out there. As with our discussion of 3D printers, this survey will only briefly look at the most common options available, beginning at the bottom of the chain.

Electronics

If we start at the bottom of the chain, we have the electronics platform that controls our 3D printer and communicates through its firmware to the control application. Most of the time you do not have much choice on which electronics come with your printer, so this will likely serve as a summary that gives you an idea of the capabilities of the electronics platform of your printer in relation to the other available options out there. On the other hand, having an understanding of these different platforms will open possibilities for swapping out your printer’s electronics to later gain additional functionality.

The electronics of your 3D printer includes many different parts working together to build your 3D prints. These components include a microcontroller, a main board, motor drivers, stepper motors, a hot end, a printbed, and parts like endstop or limit switches and temperature sensors. To help map how these different parts work together, let’s look at Figure 2-3.

Figure 2-3. 3D printer electronics map

In this 3D printer electronic map, you can see how each of the different parts of the electronics system interconnect, with arrows representing the direction of control from one component to the next. Central to the electronics platform is a controller main board that connects all the different hardware needed by a 3D printer to the microcontroller; it is essentially the brain of the entire system. To switch the high current associated with the printbed and extruder heaters, the main board will have specialized switching hardware rated for the necessary maximum loads. Most electronic main boards have the capability of reading resistive-based temperature sensors called thermistors, while others can make more-accurate readings using a type of sensor called a thermocouple. The main board also forms the power hub to the whole system, taking in a high current power source and distributing power to the other systems as needed. Finally, the main board will also need to interface with the endstop limit switches on each of the axes to allow the printer to locate its print head prior to a print job.

The microcontroller, found on the main controller or on a separate board entirely, is a small, simple computer that runs specialized code called firmware to allow it to read and interpret sensors like temperature sensors and limit switches, as well as controlling motors using motor drivers and switching high loads using high current transistors called MOSFETs. Most of the electronics packages for personal 3D printers use the Arduino microcontroller. An open- source hardware design, the Arduino ecosystem promotes the use of its hardware in other platforms so that developers can use Arduino’s C-based programming language across several different electronics platforms.

To drive the stepper motors that are used with our 3D printers, the control electronics use a separate stepper motor driver for each motor. While dedicated stepper drivers have existed for a while, a little, $12 stepper breakout board, shown in Figure 2-4, is very popular. It is produced by Pololu Electronics (www.pololu.com/catalog/product/1182) and is in demand for several of the electronics platforms.

Figure 2-4. Pololu stepper driver breakout board

This little board is a simple breakout board for the Allegro A4988 stepper driver chip. It can drive a single stepper motor and is used by a few different controller boards for driving each of the printer’s axes. Other controller boards use the same basic hardware found in the Pololu breakout board and either make their own boards or build the separate drivers onto the single control board.

Chances are, if you bought a preassembled 3D printer or an inclusive kit, then your printer probably came with some form of electronics package that includes all of these separate bits and pieces. If instead you are building your own 3D printer from scratch or you’re looking to upgrade that three-year old MakerBot Cupcake, then we should look at a few of the more common controller boards—the most significant part of the 3D printers electronics. These

three controller boards—RepRap Arduino Mega Pololu Shield, Sanguinololu, and Printrboard—represent only a small selection of the options out there, although they are somewhat common and readily available. Some printers, like the Ultimaker or MakerBot Replicator, ship with controller boards that are specific to those printers. And even though those controllers would work just as well on other printers, they are not currently available for sale separately, so we will stick with the more flexible of the controller boards.

RepRap Arduino Mega Pololu Shield

The RepRap Arduino Mega Pololu Shield, known affectionately as RAMPS, is shown in Figure 2-5.

Figure 2-5. RepRap Arduino Mega Pololu Shield

This electronics package has the following features:

Up to five stepper driver boards using Pololu 4988 or similar

Three high-power switched loads fused at 5 amps and 11 amps for the extruder and printbed

Six endstop connections

Three thermistor connections

Dual-power input of 12 to 35 volts at up to 16 amps

RAMPS (http://reprap.org/wiki/RAMPS_1.4) is a two-board solution that consists of a separate Arduino Mega microcontroller board and a specially designed shield that plugs on top of the Arduino. The Arduino Mega provides the brains of the platform, while the shield provides the switching hardware for the heater and printbed, along with the option to interface with up to five Pololu stepper driver boards. Four of these boards are shown installed on the shield in Figure 2-3, with a fifth one used for the possibility of adding a second extruder.

Because of its shear capacity for possible future upgrades, RAMPS has become very popular and will most likely be the platform that paves the way for dual extruders on platforms outside of the MakerBot. This platform is in use by many RepRaps, the MakerGear Mosaic, and a distantly related version of the board is used by the Ultimaker. Part of the draw to this platform is that it comes with a stock Arduino Mega microcontroller, making uploading firmware that much easier especially for those new to the Arduino microcontroller.

The RAMPS controller sits in the middle of the road when it comes to overall size and cost, making it a very popular choice among DIYers. RAMPS highlights include the following:

Uses standard Arduino electronics, making the platform easier to use 

Additional power output for switchable cooling fans

Future support for dual extruders built right in

Mid-range cost, sometimes difficult to source

Sanguinololu

The Sanguinololu, shown in Figure 2-6, is a single-board electronics controller solution with a very silly name.

Figure 2-6. Sanguinololu

The Sanguinololu has the following features:

Four stepper-driver boards using Pololu A4988 or similar

Two high-power switched loads rated at 30 amps for extruder and printbed

Three endstop connections

Two thermistor connections

Single-power input of 7 to 35 volts

Onboard microcontroller and USB

Being a single-board controller, the Sanguinololu (http://reprap.org/wiki/Sanguinololu) has the microcontroller and the switching hardware and stepper drivers on a single electronics board. This means that the Sanguinololu is smaller, simpler, and cheaper than RAMPS. Its name is a mashup taken from the Sanguino, a derivative Arduino-compatible microcontroller, and the Pololu stepper driver boards. The Sanguinololu only has

the option for four stepper drivers and two high-power-switching circuits, so it will only work with a single extruder. It also only works with a single external power supply, so if you have a more elaborate setup for your heated printbed, then this solution will not work.

While the Sanguinololu is in many ways a simpler, more direct solution than the RAMPS, if you choose to build a Sanguinololu yourself, then you will need additional Arduino hardware to upload the Sanguino bootloader (special code needed to make the microcontroller Arduino-compatible) on the board.

This means that if you have no previous experience with the Arduino, it is a little more complicated to get up and running. As more developers work with the Sanguinololu, and as additional derivatives get released, such as Teensylu and Melzi, this platform may become much more common.

The following is a summary of the Sanguinololu:

The smallest single-board electronics controller

The most inexpensive controller available at about $100 in kit form

Only supports machines with single extruders

Can be a little more complicated to set up

Printrboard

The newest single-board electronics solution for personal 3D printers is the Printrboard, shown in Figure 2-7. It was developed by the team working on the Printrbot series of entry-level 3D printers.

Figure 2-7. Printrboard (courtesy JDS Labs, 2012)

The features for the Printrboard include the following:

Four non-replaceable onboard stepper drivers

Two high-power switched loads rated at 30 amps for the extruder and printbed

One low-power switched output for the cooling fan Three endstop and one emergency stop connection Two thermistor connections

Single power input of 12 to 20 volts

Onboard microcontroller with integrated USB and onboard

MicroSD

The Printrboard (http://reprap.org/wiki/Printrboard), a distant relative of the Sanguinololu, is the newest option in the lineup of electronics controllers for personal 3D printers. Unique to the Printrboard is the onboard microcontroller that features integrated USB, allowing the Printrboard to communicate with the host computer at a much faster native speed. This prevents any pauses that might happen during a print whenever the computer sends commands to the controller, a problem that affects print quality. The Printrboard also has a MicroSD card reader built on the board so that you can load sliced files onto an SD card and be able to print models and still disconnect your computer from the printer.

The Printrboard is designed to be manufactured and is not available as a kit, so all Printrboards come prebuilt from the supplier. This makes it even easier for someone new to electronics, although it does mean that all four of the motor drivers are irreplaceable. This is really only a problem if you happen to damage your motor drivers because of a silly mistake; but mistakes happen, which make some people nervous about this board. Either way, this is the most inexpensive preassembled option for printer electronics, and the easiest to get up and running, so there are many reasons why this board makes a lot of sense for your next 3D printer.

The Printrboard can be summarized as follows:

Inexpensive, preassembled single-board controller

Integrated USB and onboard MicroSD

Only supports machines with single extruders

Onboard motor drivers might be a problem down the road

While there are other electronics platforms for personal 3D printers at various stages of development (and, of course, those like the MakerBot MightyBoard that come included in the MakerBot Replicator), these three platforms represent some of the more common options for those wanting to build their own RepRap or are looking for an upgrade.

Let’s move on to talking about the specialized code called firmware that runs our electronics.

Firmware

Every control board needs specialized code called firmware loaded on its microcontroller to make the electronics come to life. The firmware is responsible for interpreting the G-code commands sent to the electronics from the printer control application. How well the firmware does this will determine how well  your 3D printer will print objects.

If you bought a 3D printer in a kit—which you did right?—then the electronics in your kit will generally come preinstalled with its own firmware from the manufacturer. This lets you jump straight to printing 3D objects without ever thinking twice about the firmware installed on your electronics. This is a good thing. If, however, you are looking to squeeze out every last possible ounce of print quality in your 3D printer, or if you were one of the adventurous types to source and build their 3D printer from the ground up, then you will want to experiment with using different firmware and adjusting the firmware settings to get your 3D printer just right.

Sometimes just moving to a different version of firmware will bump up your print quality enough to make the upgrade worth it. For example, if buying a Prusa or Mosaic 3D printer kit, the usual default firmware to ship with the included RAMPS electronics is the Sprinter firmware. Sprinter has been around in one form or another for a while and is a stable and reliable printer firmware. Using default firmware is a good choice if you are getting started on these particular platforms because the firmware will work and there is always the knowledgeable community available if something doesn’t. With that said, a new firmware called Marlin is picking up steam at the time of this writing. It

improves on Sprinter by better supporting arcs and print speed acceleration using a technique called “look-ahead” to more efficiently plot the movement of the extruder, resulting in much cleaner and more precise prints.

While changing the firmware might result in better prints, and in some cases it’s needed to properly calibrate your printer, if your printer works out of the box with the default firmware, only venture forth with firmware modification if you are an advanced user and feel confident with your knowledge of your 3D printer.

Sprinter

Sprinter (https://github.com/kliment/Sprinter) is a popular firmware for RepRap, MakerGear, and Ultimaker 3D printers. It is generally the easiest firmware to get up and running and works with the greatest number of machines. Sprinter was based on earlier firmware designs and through this combined development has been in use for quite awhile, so it is often easy to find help online.

Sprinter is designed for electronics controllers such as RAMPS and

Sanguinololu, although it has been shown to work on other platforms. It can be easily configured through the configuration.h file in the Sprinter package. Features of Sprinter include the following:

Movement acceleration for fast and controlled prints

Min and max endstop support

PID temperature control

SD card support

Marlin

Marlin (https://github.com/ErikZalm/Marlin) is fairly new to the scene, but it has been pretty popular on the RAMPS and Ultimaker platforms, and is seeing a lot of development. It is a mashup between Sprinter and Grbl, an open-source CNC firmware for Arduino microcontrollers.

Like Sprinter, Marlin is designed for some of the more standard platforms like RepRaps and Ultimakers. Marlin, however, features a number of improvements over Sprinter that result in cleaner, smoother prints. This includes a better interpretation of acceleration that uses a look-ahead feature to anticipate the upcoming moves to prevent any unnecessary stopping in midprint. Marlin also supports printing true arcs and information display through an external LCD.

The following is a summary of its features:

Acceleration with look-ahead to keep speeds fast with arc acceleration planning

Temperature oversampling for more accurate readings PID temperature control with automatic PID tuning Early LCD display and SD card support

SJFW

Every other week it seems as though someone new has written an alternate firmware. Most of the time the code doesn’t last, but ScribbleJ’s firmware

(https://github.com/ScribbleJ/sjfw), also known as SJFW, is an alternative firmware that works with systems like RAMPS and Sanguinololu, as well as the older MakerBot Generation 4 electronics, making it versatile and a popular choice for a greater range of machines.

SJFW is a bit of a best-of-mix tape, cribbing a lot of code from other firmware. What makes it unique is support for MakerBot electronics, meaning it is possible to give your old MakerBot printer a new life. It supports acceleration and Marlin-style look-ahead, along with SD card support and native display on an LCD. The SJFW can be summarized as follows:

Acceleration that does not need to slow down between moves LCD and SD support

Supports MakerBot Generation 4 electronics

Compatible with ReplicatorG

MakerBot

If you have a MakerBot printer, then more than likely you will be using MakerBot’s custom firmware. To update the firmware on MakerBot electronics, you need to download ReplicatorG (http://replicat.org) and choose the Upload New Firmware… option from the Machine menu.

MakerBot firmware has the single virtue of working out-of-the-box with MakerBot electronics. It’s not any more complicated than it needs to be and it handles many of the configuration settings for the different MakerBot printers in a separate XML-format configuration file. Once you get it working, then that’s about all there is to it. Highlights include the following:

Most compatible option for MakerBot printers

Supports multiboard MakerBot electronics

Does not support other third-party main boards

Slicers

To generate the path for our printer’s extruder, we need to use a separate application called a slicer to take our solid 3D model and slice it into layers suitable for 3D printing. This process makes the code that tells the 3D printer where to move the extruder, when to extrude plastic, and how much plastic to extrude. These commands, or G-code, are sent from our printer control software to the firmware on our electronics, which are responsible for interpreting these codes to control the printer’s motors and heaters. To get a sense for what this toolpath looks like, we’ve sliced a bunny—not literally—using the slicer application Skeinforge to see the resulting path and direction of the extruder in Figure 2-8.

Figure 2-8. One layer of the Stanford bunny

The model shown in Figure 2-8 is the Stanford bunny (www.thingiverse.com/thing:3731), a perennial favorite on Thingiverse, the 3D model-sharing web site. The lines show the path the extruder takes when printing this layer of the model; the arrows show the direction the extruder travels. The short, highlighted line at the top of the image is generated from the following line of code:

793 G1 X-5.5075 Y3.8282 Z1.8 F744.0

In this line, 793 is the particular line of code. G1 tells the firmware to perform a controlled move to the following X, Y, and Z coordinates; for example, X-5.5075 moves the extruder in a negative direction along the x- axis. The last value, F744.0, specifies the federate, or how fast the axes are expected to move in millimeters per minute.

For every line seen in Figure 2-8, there is a line of G-code similar to the one just explained, building the 3D model line by line and layer by layer. When the model is put back together, we end up with a finished sliced object, as shown in Figure 2-9.

Figure 2-9. Sliced bunny

In this image, we have the bunny put back together after being sliced into layers. Each alternating band of dark and light gray is about five layers, for a total of 100 layers in the finished print. In order for the slicer to be able to generate these sliced layers, it needs some general information about your printer and filament, such as the filament diameter, extruder nozzle size, and layer height, as well as a few specific print settings for the job, such as the number of outlines to make for each layer (Figure 2-7 has two), the amount to infill each layer (Figure 2-7 is set at 100 percent), and the print speed for different parts of the model.

While not all slicers can be directly integrated with all printer control applications, and in very rare cases, the sliced G-code might not be compatible with a particular firmware, G-code is a reasonably standard code, so you can often use multiple slicers with your toolchain, depending on your circumstances. That way, when the next “greatest thing in slicers” rolls out, you’ll be able to take advantage of better quality prints simply by switching to the new slicer.

Let’s take a quick look at a couple of the major slicers that are in use today.

Skeinforge

Skeinforge (http://reprap.org/wiki/Skeinforge), shown in Figure 2-10, was the slicer that started it all. It has been in use since the RepRap project first got under way.

Figure 2-10. Skeinforge 49

At the time of writing, we are nearing the fiftieth revision of this collection of Python scripts that create the G-codes needed to print a 3D model. Skeinforge has been put to use by nearly every personal 3D printer out there, offering the greatest level of configurability and customization. This rich feature set comes at the cost of overall complexity, both in the sheer volume of options that can be set and in the cryptic settings themselves. If, however, you are looking for the most options in your slicer, then this is the one for you.

SFACT

Take Skeinforge, put it on a diet, have it make a little more sense, and you end up with SFACT. SFACT (http://reprap.org/wiki/Sfact) caught on in popularity pretty quickly due to its slimmed-down option list and for making the configuration of your printer easier handle with settings that automatically

configure themselves. It also helps that SFACT slices a model much quicker than Skeinforge, letting you get back to your printing. Unfortunately, not all control applications support SFACT, so you might still be stuck with Skeinforge unless you use SFACT by itself.

Slic3r

The newest guy on the block, Slic3r (http://slic3r.org), shown in Figure 2-11, is a complete, ground-up revision of what a slicer application can be.

Figure 2-11. Slic3r 0.7.0

Slic3r is quickly becoming one of the more popular slicers because of its ease of use, blistering slicing times, and remarkable print quality. It previously lacked some of the features that the more mature slicers have, but with the addition of cooling and support material, it has addressed many of its faults. Where Skeinforge asks users to make a lot of calculations regarding the filament extrusion, Slic3r calculates all of these values under the hood after inputting only a few parameters about your printer, the filament, and the desired print settings. While I have personally used just about every slicing application out there, Slic3r has become the only one I use to slice 3D models because it is so easy to use and for its consistent high-quality results.

No comments yet...

Leave your comment

23034

Character Limit 400