<p>I have replaced the main board of my Anet A8 printer with a Raspberry Pi based one, running <a href="https://github.com/Nikolay-Kha/PyCNC" rel="nofollow noreferrer">PyCNC</a>.</p>

<p>After many issues I have finally got to a point where all the motors work as well as heating and sensors.</p>

<p>However I am unable to print due to the E motor seems to run too much. How can I figure out what values should go to the <a href="https://github.com/Nikolay-Kha/PyCNC/blob/master/cnc/config.py" rel="nofollow noreferrer">config</a> of PyCNC? I use Cura, maybe a different slicer/gcode format needs to be chosen? Thanks!!</p>

<pre><code># Maximum velocity for each axis in millimeter per minute.
MAX_VELOCITY_MM_PER_MIN_X = 3000
MAX_VELOCITY_MM_PER_MIN_Y = 3000
MAX_VELOCITY_MM_PER_MIN_Z = 300
MAX_VELOCITY_MM_PER_MIN_E = 150
MIN_VELOCITY_MM_PER_MIN = 1

# Average velocity for endstop calibration procedure
CALIBRATION_VELOCITY_MM_PER_MIN = 300

# Stepper motors steps per millimeter for each axis.
STEPPER_PULSES_PER_MM_X = 50
STEPPER_PULSES_PER_MM_Y = 50
STEPPER_PULSES_PER_MM_Z = 50
STEPPER_PULSES_PER_MM_E = 15

# Mixed settings.
STEPPER_PULSE_LENGTH_US = 2
STEPPER_MAX_ACCELERATION_MM_PER_S2 = 3000  # for all axis, mm per sec^2
SPINDLE_MAX_RPM = 10000
EXTRUDER_MAX_TEMPERATURE = 250
BED_MAX_TEMPERATURE = 100
MIN_TEMPERATURE = 40
EXTRUDER_PID = {"P": 0.059161177519,
                "I": 0.00206217171374,
                "D": 0.206217171374}
BED_PID = {"P": 0.226740848076,
        "I": 0.00323956215053,
        "D": 0.323956215053}
</code></pre>

<p>Update: None of the motors work properly. When I try to print a gcode file the motors travel too much an too fast.</p>

CC BY-SA 4.0
2019-09-20T07:56:22.193Z
I'm not familiar with PyCNC, but generally, first you need to define how much is "too much" and after that you would need to most probably update your `STEPPER_PULSES_PER_MM_E` with a value other than 15.
0scar
CC BY-SA 4.0
2019-09-20T09:27:51.157Z
Thanks for your comment. This is where I got stuck. I don't know what should be the number for `STEPPER_PULSES_PER_MM_E`. Actually, turned out all the other motors have this issue. I have no idea how to get these numbers.
haxpanel
CC BY-SA 4.0
2019-09-20T12:18:10.873Z
Generally you calculate the value, but you can use this one and measure how much extrudes so you can adjust to a new value. You could look into ["How do I calibrate the extruder of my printer?"](/q/6483) for hints.
0scar
CC BY-SA 4.0
2019-09-20T12:54:26.350Z
Great, thanks, i'll have a look! How to calculate the other values, for the X Y Z motors? This is a common printer, can't i just use the values from .. somewhere? :)
haxpanel
CC BY-SA 4.0
2019-09-20T16:52:32.347Z
Yes, e.g. [here](https://github.com/MarlinFirmware/Marlin/tree/1.1.x/Marlin/example_configurations/Anet/A8). For the steppers: `#define DEFAULT_AXIS_STEPS_PER_UNIT   { 100, 100, 400, 100 }` for respectively X, Y, Z and E. You've got too few steps configured, so X and Y are twice the speed, Z four times, etc... If those values work, an answer can be composed for you.
0scar
CC BY-SA 4.0
2019-09-21T07:54:02.953Z
I forgot to mention that I have tried with these values, no luck. X Y moves too fast on `G28` and Z seems to be just buzzing no movement at all.
haxpanel
CC BY-SA 4.0
2019-09-23T04:47:54.127Z
Your acceleration is also very high, in Marlin the acceleration values are one third or less the values PyCNC uses; e.g.: `#define DEFAULT_ACCELERATION          400     // X, Y, Z and E acceleration for printing moves` and values of 1000 for retraction of filament and travel moves.
0scar
CC BY-SA 4.0
2019-09-23T15:00:56.770Z
Unfortunately still no luck. Motors become super fast now.
haxpanel
<ultimaker-cura><anet-a8><raspberry-pi><pycnc>
PyCNC - How to configure for my setup?
haxpanel
# PyCNC - How to configure for my setup?

(Asked by: username_0 on 2019-09-19)

I have replaced the main board of my Anet A8 printer with a Raspberry Pi based one, running [PyCNC](https://github.com/Nikolay-Kha/PyCNC).

After many issues I have finally got to a point where all the motors work as well as heating and sensors.

However I am unable to print due to the E motor seems to run too much. How can I figure out what values should go to the [config](https://github.com/Nikolay-Kha/PyCNC/blob/master/cnc/config.py) of PyCNC? I use Cura, maybe a different slicer/gcode format needs to be chosen? Thanks!!

```
# Maximum velocity for each axis in millimeter per minute.
MAX_VELOCITY_MM_PER_MIN_X = 3000
MAX_VELOCITY_MM_PER_MIN_Y = 3000
MAX_VELOCITY_MM_PER_MIN_Z = 300
MAX_VELOCITY_MM_PER_MIN_E = 150
MIN_VELOCITY_MM_PER_MIN = 1

# Average velocity for endstop calibration procedure
CALIBRATION_VELOCITY_MM_PER_MIN = 300

# Stepper motors steps per millimeter for each axis.
STEPPER_PULSES_PER_MM_X = 50
STEPPER_PULSES_PER_MM_Y = 50
STEPPER_PULSES_PER_MM_Z = 50
STEPPER_PULSES_PER_MM_E = 15

# Mixed settings.
STEPPER_PULSE_LENGTH_US = 2
STEPPER_MAX_ACCELERATION_MM_PER_S2 = 3000  # for all axis, mm per sec^2
SPINDLE_MAX_RPM = 10000
EXTRUDER_MAX_TEMPERATURE = 250
BED_MAX_TEMPERATURE = 100
MIN_TEMPERATURE = 40
EXTRUDER_PID = {"P": 0.059161177519,
                "I": 0.00206217171374,
                "D": 0.206217171374}
BED_PID = {"P": 0.226740848076,
        "I": 0.00323956215053,
        "D": 0.323956215053}

```

Update: None of the motors work properly. When I try to print a gcode file the motors travel too much an too fast.

**Tags:** ultimaker-cura, anet-a8, raspberry-pi, pycnc

> **Comments:**
> **username_1**: I'm not familiar with PyCNC, but generally, first you need to define how much is "too much" and after that you would need to most probably update your `STEPPER_PULSES_PER_MM_E` with a value other than 15.  
> **username_0**: Thanks for your comment. This is where I got stuck. I don't know what should be the number for `STEPPER_PULSES_PER_MM_E`. Actually, turned out all the other motors have this issue. I have no idea how to get these numbers.  
> **username_1**: Generally you calculate the value, but you can use this one and measure how much extrudes so you can adjust to a new value. You could look into ["How do I calibrate the extruder of my printer?"](/q/6483) for hints.  
> **username_0**: Great, thanks, i'll have a look! How to calculate the other values, for the X Y Z motors? This is a common printer, can't i just use the values from .. somewhere? :)  
> **username_1**: Yes, e.g. [here](https://github.com/MarlinFirmware/Marlin/tree/1.1.x/Marlin/example_configurations/Anet/A8). For the steppers: `#define DEFAULT_AXIS_STEPS_PER_UNIT   { 100, 100, 400, 100 }` for respectively X, Y, Z and E. You've got too few steps configured, so X and Y are twice the speed, Z four times, etc... If those values work, an answer can be composed for you.  
> **username_0**: I forgot to mention that I have tried with these values, no luck. X Y moves too fast on `G28` and Z seems to be just buzzing no movement at all.  
> **username_1**: Your acceleration is also very high, in Marlin the acceleration values are one third or less the values PyCNC uses; e.g.: `#define DEFAULT_ACCELERATION          400     // X, Y, Z and E acceleration for printing moves` and values of 1000 for retraction of filament and travel moves.  
> **username_0**: Unfortunately still no luck. Motors become super fast now.  

---

## 0 answers

