How do you program a 3D printer?

5

I'm thinking about building my own 3D printer/Laser Engraver/CNC. Since all use a standard Cartesian axis I wanted to be able to swap out tool heads depending on the purpose. I have everything thought out except the coding aspect of the project.

I currently own a 3D printer and am familiar with some of the coding aspects, gcode, stepper motor moment, axis zeroing, etc; but if I am to build a 3 axis system how do you go about coding it? Are there programs that automatically calibrate all the motors? Can I take existing 3D printer programs and adjust the stepper motor values and build plate area? or do I have to code a new printing program from scratch that can read gcode? For simplicity lets just talk about the printing aspect of the build as I realize that CNC's and laser engravers work on different vector systems. Thanks :)

Gian.Pit

Posted 2018-04-25T18:16:37.863

Reputation: 51

3D printer is like a plotter, so you can use it as laser engraver but for CNC usage you will need an stronger frame. – Fernando Baltazar – 2018-04-25T19:20:59.410

Answers

3

The foundation of any 3D printer is the controller and the firmware. Many devices are based on Arduino type controllers, with stepper motor driver boards either integrated or added as a plug-in component.

Some manufacturers will use in-house or outside resources and develop their own boards and firmware.

You can search for 3D printer controllers and get a pretty comprehensive list of the various devices available for purchase. Smoothieboard is one device, Raspberry Pi and Arduino as noted above, and others.

There can be found varying "flavors" of firmware to load onto these controllers as well.

The field is exhaustive.

To address your focus regarding the printing aspect, that's one stepper motor per print head/nozzle (usually) and involves calibrating the amount of filament dispensed from the nozzle per unit steps, or more easily understood, amount of steps per unit of filament movement. My stepper motor for the extruder has a planetary gear and moves 100 mm of filament for about 5000 steps.

All of the parameters you've noted are integrated with the firmware. Motor calibration requires movement per step or steps per millimeter to be entered, unless you purchase a turnkey system with the values loaded.

You can adjust many of the parameters from the slicing software, but it's more practical to determine the calibration settings, enter that information into your slicer and proceed with model management.

Look into instructables for others' build projects to see what they've accomplished and the steps involved in such a build. This can give you a starting point for your efforts.

fred_dot_u

Posted 2018-04-25T18:16:37.863

Reputation: 8 399

0

this is an extension to fred_dot_u answer. As I am in the process of building my own printer, I decided to use RAMPS Arduino shield for electronics and Marlin firmware + Arduino mega2560 as a logic controller.

As above are battle-tested, I don't need to discover wheel again, but rather focus on the mechanics. The RAMPS mainboard will provide you with the ability to connect 5 steppers and 3 PWM regulated devices (that can be heat-bed, nozzle and fan or combination) and there is still possibility to connect more as a bunch of IO pins are ready to alocate.

MarlinFirmware is avalible on github, so you can download it and then provide all mechanical parameters that are needed to properly drive your printer -so that is:

  1. Mainboard type
  2. type coreXY, XZ ....
  3. bed size (x,y)
  4. gantry size (z)
  5. steps / mm for steppers
  6. thermal protection parameters
  7. LCD display (if in use)

The main benefit of using Marlin for me is that printer configuration is extremely customizable.

profesor79

Posted 2018-04-25T18:16:37.863

Reputation: 1 900

Don't forget to set the correct motherboard type: // Please choose the name from boards.h that matches your setup #ifndef MOTHERBOARD #define MOTHERBOARD BOARD_RAMPS_14_EFB #endif – 0scar – 2018-04-26T06:46:29.233