Sunday, February 23, 2014

software Firmware Initial set-up

Initial set-up

First download all the programs for controlling and setting up the printer ;
  • Arduino IDE - To configure the firmware
  • Pronterface - Controls the printer and is used for testing
  • KISSlicer – My personal favorite slicer. Download my settings Here
  • Firmware – The adapted version of the Marlin firmware which is already modified for the Kossel with the RAMPS electronics.
My firmware is based on Johann’s Deltabot fork and the only modifications are to fit it to the Kossel so some size differences, steps settings and lcd/motherboard settings.

If you use different electronics or use a different LCD (or none) change these values as well. Look through the file, it is pretty self-explanatory. When the basics are set proceed with uploading the firmware.

Upload the firmware

Open the file Marlin.ino with the Arduino software. It will open a lot of files which are displayed in tabs.

A whole list of files, but fortunately we only really need these four :
  1. Configuration.h – Lists the main settings for the printer. Click the link for more information on the most common settings.
  2. Configuration_adv.h – Contains some more technical settings. Normally we wouldn’t need them.
  3. Marlin_main.cpp – Contains the location settings for the auto level function.
  4. Pins.h – Contains all pin definitions that connects the software to the physical pins on the electronics board.
Always save a working configuration! You can’t extract the firmware from the Arduino, only upload a new one.

Go to the Configuration.h tab. Locate the section “Delta Settings” and the line #define DELTA_DIAGONAL_ROD. Measure the distance of your diagonal rods. It should measure 214 mm between the center of the 2 holes on each end. If it’s not 214 mm then change this value to your measurement. If you’ve build them accurately, which you should have, then they would all be the same length.

Gently move the spider to the very top until it hits the endstops on all 3 legs. Measure the distance between the tip of your hotend and the surface of the bed. Now find the variable #define MANUAL_Z_HOME_POS in configuration.h and change the value to the height of your machine (in mm).

Hook up a standard USB cable to the electronics.
RAMPS electronics only: Select the Arduino MEGA board in Tools => Boards.
Then upload the custom firmware by clicking Upload. The software will check your code for errors, and then upload it to the board. Every time you make a change you need to re-upload the firmware this way. Remember that it’s not real-time so the printer must not be printing when you upload new firmware.

Some led’s will start blinking during the upload if all goes well. When they stop and the software says that the upload is done you’re ready to get it to do something.

Checking basic functionality

PronterfaceScreen1

Connect the printer to your computer and start Pronterface. The screen should look similar this picture.

There are 3 main areas/buttons.
  1. This is where you can do almost everything. It’s basicly a direct communication to and from your printer.
  2. This is the home button. It’s a quick shortcut to get your printer to it’s start position.
  3. This is the height control of your printer, known as Z-height or Z-axis.
As I said, number 1 is the place to be. You printer is controlled using Gcode. It’s a semi-universal language for CNC machines and now altered for 3D printers. Gcode is just text and consists of simple 3-4 digit codes to make it do something.

For a list of available Gcodes look here.

A typical piece of GCode as sent to a 3D printer might look like this:
G28
G92
G1 X10 Y50 Z0 F3000
Let’s just begin using them and it will become clear what they mean.
Check that the connection speed (top row) is similar the the setting in your configuration.h, normally 250000 and that you have selected the USB port where the printer is attached. Hit Connect and you should see the spiral thing lite up and see some text scroll in the righthand window. You are now connected to your printer. Getting anxious yet?

Go to the console area (at number 1 in the picture). Type M119 and hit enter (all commands are followed by enter). This command returns the status of the endstops. If you printer is not touching any of the endstops then the result should be ‘open’ on all endstops. Now hold down one of the endstops and do a M119 again. One of the results should be ‘TRIGGERED”. Repeat for the other 2 endstops and the Z-probe. The Z-probe switch should behave exactly the opposite.

If the endstops do not respond at all check your wiring and check with a multimeter if the switch is working. Check that it’s plugged in the board correctly. If they do respond but report “open” when triggered and “TRIGGERED” when the’re not, switch the wiring on the switch.

If the endstops work OK enter G28 in the console. This is the command to home the printer and is the same as hitting button no. 2 in the picture. The spider (the moving part of the printer) should now go up, hit the endstops twice and stay there. If it doesn’t stop, kill the power as fast as possible and check your endstops again! If a motor is going down instead of up, check the wiring of that motor and match it to the others.

Wow, that’s the sweat-in-your-hands part. If this works you’re halfway there.
Now, type G1 X0 Y0 Z100 in the console. The spider should now move straight down till about 10 cm from the bed.

Here’s the explanation about this Gcode command. G1 means doing a controlled movement. X0 & Y0 are coordinates on the X and Y plane (in this case dead center) and Z100 is the height from the surface of the bed (Z0 is almost touching the bed).

Now make it move 10 mm down by increasing the Z height (G1 Xo  Y0 Z110). If the difference is indeed 10 mm then you’re doing great. If not, increase or decrease

the DEFAULT_AXIS_STEPS_PER_UNIT value and repeat these steps until you get it right. Always start with a G28!

You can play around a bit by giving it some coordinates like G1 X70 Y-50 or G1 X0 Y80.

Now the last thing to set-up is the extruder. Disconnect the bowden tube from the extruder if you already had it on there. Run some filament through it until it comes out the end where the bowden normally is.

Now give the command G92 (sets the extruder to 0) followed by G1 E10 F1000. This tells the extruder to put out 10mm of plastic (the F1000 is to set a specific speed, otherwise it is way to slow).

Now measure the amount that has actually come out. If it is too short then increase the last value in the line #define DEFAULT_AXIS_STEPS_PER_UNIT   {100, 100, 100, 450} in Configuration.h. If you have to much plastic decrease the number. Be very precise here!

If this all works then proceed with the actual calibration.

Delta Configuration

Configuration.h

Here a list of the most common variables that you may need to edit in configuration.h

#define BAUDRATE 250000
Sets the communication speed to the Arduino. 250000 is good but if you have troubles lower it to115200.

#define DELTA
Tells the firmware we’re dealing with a Delta and not a Cartesian model.

#define DELTA_SEGMENTS_PER_SECOND
You can’t make a true circle, all circles are actually segments of small straight lines. This sets how many of these segments can be calculted. Higher is better but an Arduino doesn’t have the processing power to calculate it all so 200 is a good balance.

#define DELTA_DIAGONAL_ROD
Indicates how long the arms are from hole to hole . In my case, 214 mm.

#define DELTA_RADIUS
Displays the curvature correction of the print head. Too large leads to cupping, too small makes the printer think that the printing surface is a mountain peak. This value is made up of

DELTA_SMOOTH_ROD_OFFSET , DELTA_EFFECTOR_OFFSET and DELTA_CARRIAGE_OFFSET.

If you want adjust the DELTA_RADIUS then alter DELTA_SMOOTH_ROD_OFFSET. The autoleveler calculates this more accurately.

#define TEMP_SENSOR_1
Sets what type of sensor is in the hot-end. Choose the one that comes with your hotend . Most thermistors will work with option 1. The rest can be set to 0 since we have only one sensor.

#define TEMP_HYSTERESIS
Sets how much the measured temperature value may deviate from the reference value. Default is 3.

#define HEATER_MAXTEMP
Sets the maximum temperature for the hot end. Be careful going over  245 degrees Celsius because
above this the Teflon liner will smoke and it emits toxic fumes.

#define EXTRUDE_MINTEMP
Sets the minimum hotend temperature before the extruder may start supplying plastic. The extruder will not work below this temperature as a safety funtion. You can disable this for testing but be careful.

#define ENDSTOPPULLUPS
Sets the internal pull-up resistor so the firmware can read the switch.

Const bool X_MIN_ENDSTOP_INVERTING
Sets the normal state of a switch. So if it should be reported as triggered if it’s pressed or when it’s not pressed.

#define X_HOME_DIR 1
Sets the location of the endstop. 1 is at the top, -1 at the bottom

#define X_MAX_POS 90
Sets the range of your buildplatform, in this case from 90 to -90 which is 180mm of movement. The printbed is off course 170 mm but this little overhead is needed to be able to print ‘over the edge’ and to reach the probe retract position if this is not a separate raised point.

#define Z_MIN_POS
This tells the printer it can go 30mm under the printbed. This is also for the retract position if this is not a separate raised point.

#define MANUAL_X_HOME_POS
Sets the total height of the printer. Just measure it from the tip of the hotend to the printbed surface. The autolevel feature will adjust this setting somewhat to make the surface flat for the firmware. Be aware, it will not move to a value higher than this so if the autolevel needs to be lower than this it will not work. Better to measure from the tip of the retracted probepoint to the surface and add an extra cm.

#define AUTOLEVEL_GRID
Sets the distance between the measuring points during autoleveling.

#define HOMING_FEEDRATE
Sets how fast the printer returns to the home position , in mm / min.

#define Z_PROBE_OFFSET
This is the setting that you will change the most. This sets how far the tip of the probe is below the tip of the hotend when in it’s extended position.

#define DEFAULT_AXIS_STEPS_PER_UNIT
Sets how many steps the stepper motor must make to move the platform 1 mm. On http://calculator.josefprusa.cz/ # MotorStuffSPMB you can calculate how much it must be for your printer . The suggested motors with 1.8 degrees per step , control with 1/16 microstepping , 16 teeth on the pulley and GT2 belt will give you 100 steps. If you have 20 teeth, then it’s 80 steps etc. You may need to adjust this value so your printer will print the correct size . The extruder is more difficult to calculate but it’s easy to test. In PrintRun give the command to extrude. For example 10mm. Then just measure how much comes out . Be very precise!

#define DEFAULT_MAX_FEEDRATE
Sets the maximum speed at which the plastic can be extruded.

#define DEFAULT_MAX_ACCELERATION
Sets how fast movements may be performed in mm/sec.

#define DEFAULT_RETRACT_ACCELERATION
Sets how fast the filament may be retracted to prevent stringing.

Calibration

Calibration

Here comes the fun part…. not. This is normally the part where most of your time is spent and frustration is build up. On my original Rostock it took me numerous evenings (and parts of the night) to get decent results. The Kossel took me about an hour or so and gave way better results. Here goes…

Open Pronterface and connect to the printer.

First home the printer using the G28 command. Now make it go down by giving the G1 X0 Y0 Z10 command. This should position the tip of the hotend about 1cm from the bed. Gently move the head further down by decreasing the Z value. So give go to Z5 (5mm from bed) to Z1 (1mm). Now be careful. Your hanging very close to the bed. Put a piece of normal paper under the tip of the hotend. Gently bring it down until in just touches the paper. You should be able to still move the paper and lightly feel some resistance from the hotend. If you can’t move the paper you’ve gone to far. Increase the number and try again.

If you’ve gone to Z0 and the tip is still to far from the paper then you need to increase the #define MANUAL_Z_HOME_POS value in configuration.h, re-upload the firmware and try again.
You can not use Pronterface and the Arduino program at the same time. So if your connected to your printer with Printerface and want to make an adjustment then first disconnect before you start an upload. After the upload is done, reconnect in Pronterface.
So now you’re barely above the surface at Z0 in the center. Great! But when you would go to another location you wil probably float way above the surface or try to bury through it. Here’s where the auto-level comes in.

First give the G28 command to home the printer. The command to do an auto-level is G29. There is one initial catch. When you issue a G29, it will first go to a position near the back leg and then moves sideways. This action is to deploy the probe (the Allen key on the platform) by gently pushing the angled part of the Allen key against the belt until it clicks into place.

You’re Allen key is probably to short to reach that so you need to lengthen it. I used a piece of heatshrink to make it longer. If you do a G29 and your probe is not correctly deployed it will keep going down and slam into the bed. So if it doesn’t click into the position and the head starts to go down, cut the power immediately. Make it so that it will click into position every time you run it.

If this process is going well then let it go down and probe the surface. It will go to various positions and each time lower the tip until it touches the surface and triggers the switch. At the end of that it will move up and go to a position in the far left corner and lower itself again. This is the point where it tries to retract the tip again. You will want to place a screw there or print something like this to make it retract automatically.

If for some reason this position is not OK for you then you can change it in the marlin_main.cpp file. Find void retract_z_probe() and just below that line there are these lines:

destination[X_AXIS] = -55;
destination[Y_AXIS] = 63;
destination[Z_AXIS] = 30;

These are the coordinates where it should go to for retracting the probe. If you need it to go lower or higher than change destination[Z_AXIS] = current_position[Z_AXIS] - 20 to a higher or lower number. After your done, re-upload the firmware and test it until you’re happy.

Now the last part. As you can see, there is a distance between the tip of the hotend and the tip of the deployed probe. This distance should be as accurate as possible.

A simple way to determine it is doing the following. First start with an actual measurement. Open Configuration.h in the Arduino program and locate the line:
#define Z_PROBE_OFFSET {0, 16, -2.45, 0}

There are 4 sets of numers in there. The first (0 in the example) is the X offset, the second is the Y offset, the third is the Z offset and the last is for the extruder and should always be 0. What does this mean. You need to tell the firmware how far the tip of the deployed probe is removed from the tip of the hotend. In most cases the X offset will be 0 meaning that the probe is directly behind the hotend.

The Y value will probably be OK but check it anyway. This should be how far behind the tip is from the hotend center. Off course it’s important but not crucial to know this to 1/10th of a mm. The third however is very important. This is the height difference (Z offset) between the probe and the hotend.

The easiest way to get this accurate is to do the following procedure:
  • G28 to home the printer
  • G29 to auto-level
  • G1 X0 Y0 Z5 to go to center and 5mm above the bed
  • Place a piece of paper under the hotend
  • Gently lower the hotend by decreasing the Z value in steps to 0 (G1 X0 Y0 Z0)
If the hotend hits the bed before it reaches 0 then increase the value in the firmware by the height you have left and try again.

If the hotend isn’t low enough at Z0 then decrease the number. Repeat this until you can just move the paper and feel a slight drag from the hotend.

When you’re done with this than the hard part is over! This may sound like a lot of work but it’s really quite easy and way less then traditional calibrating.

Now your ready to actually print something!

Endstops, Z-Probe Wiring

Wiring

I can’t say it enough, double check your connections! Route the cables neatly and keep them well organised with tie-wraps or cable sleeves.
First here are the schematics so when you route the cables you can can see where you need to go. If you need a bigger version for more detail, you can get it here.
You can plug in the motors, the hotend temperature sensor and connect the heater and fan wires. Orientation for the motors and fan is important, not for the rest.
Wiring_3Dprinter_000
The micro switches all have 3 connections. They are labelled COM, NO and NC. Solder 2 wires to the COM and NO connections (the 2 outer ones) of the endstops. Route the cables through the sides of the OpenBeam plug them into the correct position. It doesn’t matter which way you plug them in as long as they are in the right spot. Wiring_3Dprinter_001
Do the same with the probe switch but now use COM and NC. Wiring_3Dprinter_002
You’re 3D printer is now ready for use. Make a final check that the platform can move in all directions freely but without any play. The frame should be sturdy and the electrical connections safe and double checked. If all is OK than let’s move on to getting this thing up and running!

Ramps V1.4 Electronics

Electronics

This part is tricky to describe because there are so much personal choices as I mentioned in the sourcing page. There are several ways of doing this. The most commonly used set is the RAMPS system which consists of several boards. Below is description how to join these boards.
You may choose to use another system without penalty just make sure the general connections are the same.
If you have some troubles please refer to the manual of the manufacturer for information or forums on the internet since we can’t support every system out there.

Place the RAMPS board on the Arduino. Electronics_3Dprinter_000
Place the jumpers on the RAMPS board. These set the stepping rate. No jumper means just the hardware steps (200 per rotation). 1 jumper makes 4x the steps, 2 jumpers make 8x steps and 3 jumpers make 16x steps. That means the original 200 steps per revolution are multiplied to 3200 steps. Electronics_3Dprinter_001
Place the controllers on the print. Mind the orientation! If your controllers looks like mine than place them like in the picture. If not, refer to the manual of you controller and of the RAMPS board to see what the orientation should be. Electronics_3Dprinter_002
Optionally, you can mount heat-sinks on the stepper controllers and/or a fan but didn’t need to.

Monday, February 17, 2014

Arduino 2500 + Ramps V1.4 + Repetier Firmware 0.91 For The Delta'Q 3D Printer

Arduino 2500 + Ramps V1.4 + Repetier Firmware 0.91 For The Delta'Q 3D Printer Proposal.

Yes. As the title says, We will be building a Delta, Kossel, Rostock 3D Printer.
I am very excited with this project, as i understand the delta configuration are the most fasttest, coolest and among the hardest printer to set up to date. With that in mid, I will, at my very best, be documenting all the steps taken to building this 3D printer.

DELTA'Q 3DX

This Will be a mix steps documentation, taken for my reference only.

 So Lets Start With The Firmware ( Repetier Firmware 0.91 )

/*

    ========== Start configuration string ==========
    { DeltaQ 3D Printer Ramps 1.4  "version": 0.91 }
    ========== End configuration string ==========
  
    This file is part of Repetier-Firmware.

    Repetier-Firmware is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Repetier-Firmware is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Repetier-Firmware.  If not, see .

*/

#ifndef CONFIGURATION_H
#define CONFIGURATION_H

/**************** READ FIRST ************************

   This configuration file was created with the configuration tool. For that
   reason, it does not contain the same informations as the original Configuration.h file.
   It misses the comments and unused parts. Open this file file in the config tool
   to see and change the data. You can also upload it to newer/older versions. The system
   will silently add new options, so compilation continues to work.

   This file is optimized for version 0.91
   generator: http://www.repetier.com/firmware/v091/
*/

#define NUM_EXTRUDER 1
#define MOTHERBOARD 33

#include "pins.h"

// ################## EDIT THESE SETTINGS MANUALLY ################
// ################ END MANUAL SETTINGS ##########################

#define FAN_BOARD_PIN -1
//#define EXTERNALSERIAL  use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
// Uncomment the following line if you are using arduino compatible firmware made for Arduino version earlier then 1.0
// If it is incompatible you will get compiler errors about write functions not beeing compatible!
//#define COMPAT_PRE1

#define DRIVE_SYSTEM 3

// ##########################################################################################
// ##                           Movement settings                                          ##
// ##########################################################################################
/*  =========== Parameter essential for delta calibration ===================

            C, Y-Axis                   |--*
            |                                  |  |\
            |                                  |  | \  DELTA_DIAGONAL_ROD
            |                                  |--|  \
            |                                      |   \
            |_________ X-axis        |    \   Carriage is at printer center!
           / \                                    |     \_____/
          /   \                                   |     |--| END_EFFECTOR_HORIZONTAL_OFFSET
         /     \                                  |-----| DELTA_RADIUS         
         A      B                              |--------| PRINTER_RADIUS

    Column angles are measured from X-axis counterclockwise
    "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
*/
// Delta settings
#define DELTA_DIAGONAL_ROD 215 // mm
//#define DELTA_RADIUS 137.0

#define DELTA_ALPHA_A 210
#define DELTA_ALPHA_B 330
#define DELTA_ALPHA_C 90

#define DELTA_RADIUS_CORRECTION_A 0
#define DELTA_RADIUS_CORRECTION_B 0
#define DELTA_RADIUS_CORRECTION_C 0

#define DELTA_X_ENDSTOP_OFFSET_STEPS 0
#define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
#define DELTA_Z_ENDSTOP_OFFSET_STEPS 0

#define SOFTWARE_LEVELING

// ################# Stepper. settings ##################

//delta buffer. With defaults 7 * 16 * 30 = 3360 bytes. This leaves ~1K free RAM on an Arduino Mega.
#define MAX_DELTA_SEGMENTS_PER_LINE 27 // 30

//#define MICROSTEP_MODES {8,8,8,8,8} // [1,2,4,8,16]
//#define STEPS_PER_ROTATION 200
//#define MICRO_STEPS 8

#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
#define STEPS_PER_ROTATION 400
#define MICRO_STEPS 16

#define XAXIS_STEPS_PER_MM 55.5
#define YAXIS_STEPS_PER_MM 55.5
#define ZAXIS_STEPS_PER_MM 55.5

#define STEP_COUNTER

#define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
#define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves

#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 9000
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 9000
#define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 9000

#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 3000
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 3000
#define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 3000

#define STEPPER_INACTIVE_TIME 360L
#define MAX_INACTIVE_TIME 0L

#define RAMP_ACCELERATION 1
#define STEPPER_HIGH_DELAY 0
#define STEP_DOUBLER_FREQUENCY 12000
#define ALLOW_QUADSTEPPING 1
#define DOUBLE_STEP_DELAY 1 // time in microseconds

#define MAX_HALFSTEP_INTERVAL 1999
#define MAX_JERK 20
#define MAX_ZJERK 20 //0.3

#define MOVE_CACHE_SIZE 16
#define MOVE_CACHE_LOW 10

#define LOW_TICKS_PER_MOVE 250000

#define FEATURE_TWO_XSTEPPER 0
#define X2_STEP_PIN   E1_STEP_PIN
#define X2_DIR_PIN    E1_DIR_PIN
#define X2_ENABLE_PIN E1_ENABLE_PIN
#define FEATURE_TWO_YSTEPPER 0
#define Y2_STEP_PIN   E1_STEP_PIN
#define Y2_DIR_PIN    E1_DIR_PIN
#define Y2_ENABLE_PIN E1_ENABLE_PIN
#define FEATURE_TWO_ZSTEPPER 0
#define Z2_STEP_PIN   E1_STEP_PIN
#define Z2_DIR_PIN    E1_DIR_PIN
#define Z2_ENABLE_PIN E1_ENABLE_PIN

#define FEATURE_DITTO_PRINTING 0

// ################# Stepper XYZ movements ###################

#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0

#define DISABLE_X 0
#define DISABLE_Y 0
#define DISABLE_Z 0
#define DISABLE_E 0

#define INVERT_X_DIR 0
#define INVERT_Y_DIR 0
#define INVERT_Z_DIR 0

#define X_MAX_LENGTH 200
#define Y_MAX_LENGTH 200
#define Z_MAX_LENGTH 120

#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0

// ################# Homing. settings ##################

#define DELTA_HOME_ON_POWER 0
#define HOMING_ORDER HOME_ORDER_ZXY

#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR 1

#define MAX_FEEDRATE_X 200
#define MAX_FEEDRATE_Y 200
#define MAX_FEEDRATE_Z 2

#define HOMING_FEEDRATE_X 40
#define HOMING_FEEDRATE_Y 40
#define HOMING_FEEDRATE_Z 2

#define ENABLE_BACKLASH_COMPENSATION 0

#define X_BACKLASH 0
#define Y_BACKLASH 0
#define Z_BACKLASH 0

// ################ Endstop configuration #####################

#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX true

#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y true
#define MIN_HARDWARE_ENDSTOP_Z true
#define MAX_HARDWARE_ENDSTOP_X false
#define MAX_HARDWARE_ENDSTOP_Y false
#define MAX_HARDWARE_ENDSTOP_Z false

#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING true
#define ENDSTOP_X_MAX_INVERTING false
#define ENDSTOP_Y_MAX_INVERTING false
#define ENDSTOP_Z_MAX_INVERTING false

#define max_software_endstop_r true

#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false
#define max_software_endstop_x true
#define max_software_endstop_y true
#define max_software_endstop_z true

#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 1

#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3

#define ENDSTOP_X_BACK_ON_HOME 1
#define ENDSTOP_Y_BACK_ON_HOME 1
#define ENDSTOP_Z_BACK_ON_HOME 0

#define ALWAYS_CHECK_ENDSTOPS 1

// ################# Misc. settings ##################

#define BAUDRATE 115200
#define ENABLE_POWER_ON_STARTUP
#define POWER_INVERTING 0
#define KILL_METHOD 1
#define GCODE_BUFFER_SIZE 2
#define ACK_WITH_LINENUMBER
#define WAITING_IDENTIFIER "wait"
#define ECHO_ON_EXECUTE
#define EEPROM_MODE 1
#define FEATURE_WATCHDOG 1

/* ======== Servos =======
Control the servos with
M340 P S   / ServoID = 0..3  pulseInUs = 500..2500
Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
*/
#define FEATURE_SERVO 0
#define SERVO0_PIN 11
#define SERVO1_PIN -1
#define SERVO2_PIN -1
#define SERVO3_PIN -1

// #################### Z-Probing #####################

#define FEATURE_Z_PROBE 0 //1
#define Z_PROBE_PIN -1
#define Z_PROBE_PULLUP 1
#define Z_PROBE_ON_HIGH 1
#define Z_PROBE_X_OFFSET 0
#define Z_PROBE_Y_OFFSET 0
#define Z_PROBE_WAIT_BEFORE_TEST 1
#define Z_PROBE_SPEED 2
#define Z_PROBE_XY_SPEED 150
#define Z_PROBE_SWITCHING_DISTANCE 1
#define Z_PROBE_REPETITIONS 1
#define Z_PROBE_HEIGHT 40
#define Z_PROBE_START_SCRIPT "start z probe"
#define Z_PROBE_FINISHED_SCRIPT "finished probing"
#define FEATURE_AUTOLEVEL 1
#define Z_PROBE_X1 20
#define Z_PROBE_Y1 20
#define Z_PROBE_X2 160
#define Z_PROBE_Y2 20
#define Z_PROBE_X3 100
#define Z_PROBE_Y3 160

// #################### SDCARD Support #####################

#ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
#define SDSUPPORT 1
#define SDCARDDETECT -1
#define SDCARDDETECTINVERTED 0
#endif
#define SD_EXTENDED_DIR 1 /** Show extended directory including file length. Don't use this with Pronterface! */
#define ARC_SUPPORT 1
#define FEATURE_MEMORY_POSITION 1
#define FEATURE_CHECKSUM_FORCED 0
#define FEATURE_FAN_CONTROL 1

// #################### LCD Display Setting #####################

#define FEATURE_CONTROLLER 2
#define UI_LANGUAGE 0
#define UI_PRINTER_NAME "RepRap"
#define UI_PRINTER_COMPANY "Home made"
#define UI_PAGES_DURATION 2000
#define UI_ANIMATION 1
#define UI_DISABLE_AUTO_PAGESWITCH 1
#define UI_AUTORETURN_TO_MENU_AFTER 30000
#define FEATURE_UI_KEYS 0
#define UI_ENCODER_SPEED 2
#define UI_KEY_BOUNCETIME 10
#define UI_KEY_FIRST_REPEAT 500
#define UI_KEY_REDUCE_REPEAT 50
#define UI_KEY_MIN_REPEAT 50

#define CASE_LIGHTS_PIN -1
#define UI_START_SCREEN_DELAY 1000
/**
Beeper sound definitions for short beeps during key actions
and longer beeps for important actions.
Parameter is delay in microseconds and the secons is the number of repetitions.
Values must be in range 1..255
*/
#define FEATURE_BEEPER 1
#define BEEPER_SHORT_SEQUENCE 2,2
#define BEEPER_LONG_SEQUENCE 8,8

// #################### Display Setting #####################

#define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
#define UI_SET_PRESET_EXTRUDER_TEMP_PLA   190
#define UI_SET_PRESET_HEATED_BED_TEMP_ABS 110
#define UI_SET_PRESET_EXTRUDER_TEMP_ABS   240
#define UI_SET_MIN_HEATED_BED_TEMP  30
#define UI_SET_MAX_HEATED_BED_TEMP 120
#define UI_SET_MIN_EXTRUDER_TEMP   170
#define UI_SET_MAX_EXTRUDER_TEMP   260
#define UI_SET_EXTRUDER_FEEDRATE 2
#define UI_SET_EXTRUDER_RETRACT_DISTANCE 3

#endif