Marlin Firmware-: Basic introduction and testing

Source: Internet
Author: User
Tags acos

A brief introduction of Marlin

Marlin Firmware is an open source firmware for 3D printing, there are many 3D print firmware, Marlin is the most sound and powerful, of course, relatively complex. Using Gcode to control love, Gcode is a kind of instruction protocol which uses a wide range of industrial control controls such as CNC machine tools. Here are some introductory experiences for Marlin.

Marlin firmware: Https://github.com/MarlinFirmware/Marlin

Marlin Configuration and software detailed:

Http://wenku.baidu.com/link?url=6SpLLAaNvEk5KCjpkvC6ZnOiCB-9_ toqhow8d8trmthrdhwnhguyjjguinbmqsho5xlp06ybrou9nb9-w9vezncnfhfny-juxk2wlekkfbc&qq-pf-to=pcqq.c2c

Http://www.slideshare.net/roboard/3d-printer-marlin

Gcode Interpretation: http://www.3ddayin.net/3ddayinjiceping/1141_2.html

RepRap website: http://reprap.org/wiki/RepRap_Options#Slicing_Software


Second, the configuration of Marlin

I'm using the MKS Base Development Board, arduino2560, and simply list the firmware configurations I think are more important:

Basic configuration of Marlin firmware: Configuration.h

#define SERIAL_PORT 0//serial number

#define BAUDRATE 250000//baud rate

#define Motherboard BOARD_RAMPS_13_EFB//board-level models

#define CUSTOM_MENDEL_NAME "Uarmbot"//LCD screen display content

#define EXTRUDERS 1//extruder head number

#define TEMP_SENSOR_0 1//Extrusion head 1, Temperature sensor model

#define TEMP_SENSOR_1 0//Not 0

#define TEMP_SENSOR_2 0

#define TEMP_SENSOR_BED 0

#define HEATER_0_MINTEMP 5//minimum temperature of nozzle 1

#define HEATER_1_MINTEMP 5

#define HEATER_2_MINTEMP 5

#define BED_MINTEMP 5

#define HEATER_0_MAXTEMP 50//nozzle 1 Maximum temperature

#define HEATER_1_MAXTEMP 50

#define HEATER_2_MAXTEMP 50

#define BED_MAXTEMP 50

#define DISABLE_X false//fail one axis

#define DISABLE_Y False

#define DISABLE_Z False

#define DISABLE_E False

#define Disable_inactive_extrudertrue

#define INVERT_X_DIR false//rotation direction

#define INVERT_Y_DIR False

#define INVERT_Z_DIR False

#define INVERT_E0_DIR False

#define INVERT_E1_DIR False

#define INVERT_E2_DIR False

#define X_HOME_DIR 1//home direction and starting position: 1=max, -1=min

#define Y_HOME_DIR 1//But manual_home_positions can set the starting position after the definition.

#define Z_HOME_DIR 1

Maximum minimum value of the #define X_MAX_POS//xyz

#define X_MIN_POS-500

#define Y_MAX_POS 500

#define Y_MIN_POS-500

#define Z_MAX_POS 500

#define Z_MIN_POS-500

#define The starting coordinates of the Manual_x_home_pos 0//home, you need a macro definition

Manual_home_positions

#define MANUAL_Y_HOME_POS 0

#define MANUAL_Z_HOME_POS 0

#define THE number of Num_axis 4//axis and the speed at home

#define Homing_feedrate {5*600, 5*600,5*600, 0}

The number of pulses corresponding to the unit 1mm distance, moving the 1mm step number

#define DEFAULT_AXIS_STEPS_PER_UNIT {50.0,50.0,50.0,192.59924}

#define DEFAULT_MAX_FEEDRATE {5000, 5000, 5000,5000}//Max speed (MM/SEC)

#define Default_max_acceleration {9000,9000,9000,9000}//MAX acceleration

#define DEFAULT_ACCELERATION 1000//default print acceleration

#define DEFAULT_RETRACT_ACCELERATION 1000//default contraction acceleration

The speed of a single maximum acceleration, the small is fine but slow, big is rough but fast

#define Default_xyjerk 200.0//(MM/SEC)

#define Default_zjerk 200.0//(MM/SEC)

#define Default_ejerk 200.0//(MM/SEC)


Coordinate calculation of special mechanical structure of marlin

Because I am commissioning the machine is a three-axis robotic arm, my calculate_delta is also the calculation of their own

Voidcalculate_delta (float cartesian[3])

{

Double _stretch =sqrt (Sq (cartesian[y_axis]+lenght_oright_to_home+lenght_center_to_origin) +sq (Cartesian[X_AXIS])) -lenght_center_to_origin;

Double _height = cartesian[z_axis]+height_oright_to_home;

Double xx =_stretch*_stretch+_height*_height;

Double xxx=arm_b2-arm_a2+xx;

Double Angleb=acos ((_stretch*xxx+_height*sqrt (4.0*ARM_B2*XX-XXX*XXX))/(Xx*2.0*arm_b)) *rad_to_deg;

Xxx=arm_a2-arm_b2+xx;

Double Anglea=acos ((_stretch*xxx-_height*sqrt (4.0*ARM_A2*XX-XXX*XXX))/(xx*2.0*arm_a)) *rad_to_deg;

Delta[x_axis]=atan (cartesian[x_axis]/(cartesian[y_axis]+lenght_oright_to_home+lenght_center_to_origin)) *RAD_TO _deg;//21 is the y-axis offset from the center to the origin.

Delta[y_axis] = (anglea-angle_lower_arm); Delta[z_axis]= (Angleb-angle_upper_arm);

Convert Angle to pulse number

Delta[x_axis] *= Pulse_unit_angle;

Delta[y_axis] *= Pulse_unit_angle;

Delta[z_axis] *= Pulse_unit_angle;

}

Four, the test is as follows:

1, first on the Internet to download some simple pen drawings or their own in the computer's drawing board to write words, to ensure that the background of pure white (image processing Simple)


2, use B2G software to generate Gcode code, and then use the text to open Gcode, manually adjust the height and speed of gcode writing and painting.

3. Use pronterface software to connect with the robotic arm and send the generated gcode.

4,: The picture of the text and pictures are robotic arms drawn out



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Marlin Firmware-: Basic introduction and testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.