• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Anet A8 Stepper motor question

Scheduled Pinned Locked Moved
General Discussion
5
20
12.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    wilriker @Black Canary
    last edited by 29 Jun 2018, 12:43

    @black-canary Of course, here you go:

    ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Sat Apr 28 2018 20:07:26 GMT+0200 (CEST)
    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves
    M555 P2 ; Set firmware compatibility to look like Marlin output
    ; Network
    M550 PDuet ; Set machine name
    M552 S1 ; Enable network
    ;*** Access point is configured manually via M587
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet
    ; Drives
    M569 P0 S1 C65974 ; Drive X goes forwards and gets TOFF=6
    M569 P1 S1 C65974 ; Drive Y goes forwards and gets TOFF=6
    M569 P2 S0 C65971 ; Drive Z goes backwards and gets TOFF=3
    M569 P3 S1 C65972 ; Drive E0 goes forwards and gets TOFF=4 (default)
    M92 X100 Y100 Z400 E96.939 ; Set steps per mm (at default 16x microstepping)
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M566 X600 Y600 Z24 E300 ; Set maximum instantaneous speed changes (i.e. jerk) (mm/min)
    M203 X6600 Y6600 Z720 E3000 ; Set maximum speeds (mm/min)
    M201 X2000 Y2000 Z100 E10000 ; Set accelerations (mm/s^2)
    M204 P400 T1000 ; Lower accelerations when printing though
    M906 X500 Y500 Z500 E700 I30 ; Set motor currents (mA) and motor idle factor in per cent (increments of 100mA, rounded down otherwise)
    M84 S15 ; Set idle timeout
    ;M915 X S10 R1 ; Enable logging of stallGuard for X axes
    ;M915 Y S15 R1 ; Enable logging of stallGuard for Y axes
    ;M915 Z S1 R1 ; Enable logging of stallGuard for Z axes
    ;M915 P3 S1 R1 ; Enable logging of stallGuard for E axes
    ; Axis Limits
    M208 X-32.5 Y-1.5 Z0 S1 ; Set axis minima
    M208 X220 Y216 Z220 S0 ; Set axis maxima
    ; Endstops
    M574 X1 Y1 Z1 S0 ; Set active low endstop at low end on X, Y and Z
    ; Z-Probe
    M558 P0 H2 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed
    M557 X5:215 Y20:195 S42:35 ; Define mesh grid
    ; Heaters
    M305 P0 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for bed heater
    M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for hotent MK8
    M143 H0 S120 ; Set temperature limit for bed heater to 120C
    M143 H1 S275 ; Set temperature limit for hotend to 275C
    M307 H0 A177.2 C871.3 D2.8 S1.00 V13.4 B0 ; Use PID on bed heater - tuned@60°C
    M307 H1 A744.4 C223.7 D6.5 S1.00 V13.5 B0 ; Use PID on hotent - tuned@220°C
    M305 P101 S"TMC" ; Virtual heater for TMC driver over-temperature state
    ; CPU Temperature calibration
    M912 P0 S-4.25
    ; Fans
    M106 P0 S0 I0 F100 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S0.75 I0 F500 H0 T25 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on
    ; Tools
    M563 P0 S"Hotend" D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0°C
    ; Automatic power saving
    M911 S12 R13 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss
    ; Custom settings
    ;M671 X3:217:217 Y108:3:213 P0.5 ; Adjusting screws for bed, thread pitch 0.5mm
    M404 N1.75 D0.4 ; Filament width and nozzle diameter
    M376 H10 ; Set bed compensation to taper off over 10mm
    M207 S3.5 F1920 Z0.0 ; Firmware retract settings
    ; Miscellaneous
    T0 ; Select first tool

    So, you might need to adjust some of the value to your specific machine:

    • Axis limits (they might differ a little)
    • M307 commands are specific to my exact instances of heaters/thermistors so you should redo PID autotuning
    • Note that my system now runs at 13.6V (turned on the potentionmeter of the stock Anet PSU to get to this value - it would even go up to 15V but that would fry my fans) - that also includes the thresholds of M911 power-failure-command
    • I have commented out some of the stuff that is specific on my machine like adjustment screws (I use 3-point levelling) or stallGuard

    If you have any question/issues just feel free to ask.

    Manuel
    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
    with probably always latest firmware/DWC (incl. betas or self-compiled)
    My Tool Collection

    1 Reply Last reply Reply Quote 1
    • undefined
      OBELIKS
      last edited by 29 Jun 2018, 18:51

      There is also data from this page: https://3dprint.wiki/reprap/anet/a8/steppermotor
      The SL42STH40-1684A motor specs are:

      Step Angle: 1.8°
      Step Angle Accuracy: ±5% (full step, no load)
      Voltage: 2.8V
      Current per phase: 1.68A
      Resistance per phase: 1.65Ω
      Resistance accuracy: ±10%
      Inductance per phase: 3.2mH
      Inductance accuracy: ±20%
      Holding torque: 3.6 Kg·cm (0.4 N·m)
      Moment of inertia: 54 g/cm^2
      Weight: 0.28 kg
      Orientation torque: 150 g/cm
      Length: 40 mm
      Temperature rise: 80°C max (rated current, 2 phases on)
      Ambient temperature: -20°C ~ +50°C
      Insulation resistance: 100MΩ min, 500VDC
      Shaft radial play: 0.02 mm max (450g load)
      Shaft axial play: 0.08 mm max (450g load)
      Max. radial force: 28N (20mm from the flange)
      Max. axial force: 10N

      But I am not sure these are correct, and in the end there is no guarantee that the drives you have on your Anet are really these.

      P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
      Original Prusa i3 MK3S

      undefined 1 Reply Last reply 30 Jun 2018, 18:18 Reply Quote 0
      • undefined
        wilriker @OBELIKS
        last edited by 30 Jun 2018, 18:18

        @obeliks This info is outdated. Anet used to use 1.7A steppers but switched to the 0.9A steppers "because they not get so hot" - which probably means they just get them cheaper. 😬

        Manuel
        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
        with probably always latest firmware/DWC (incl. betas or self-compiled)
        My Tool Collection

        undefined undefined 2 Replies Last reply 1 Jul 2018, 16:24 Reply Quote 1
        • undefined
          Black Canary @wilriker
          last edited by 1 Jul 2018, 16:24

          @wilriker Thanks for the config file, unfortunately only had time today to finish the upgrade of the Duet3D in the anet A8. I already tuned the heaters but I am getting an error saying that I have no home files when I try to home the axis, do you know why is this happening?

          undefined 1 Reply Last reply 1 Jul 2018, 18:15 Reply Quote 0
          • undefined
            wilriker @Black Canary
            last edited by 1 Jul 2018, 18:15

            @black-canary RepRapFirmware works a little different than most other firmwares. Also for homing. It uses 4 different files to home depending on what you want to do. They belong into the /sys folder on the SD card (also accessible via Settings -> System Editor in DWC). They should have been part of the configuration that you get from https://configurator.reprapfirmware.org. Anyway I'll include mine below (filename is always on the first line):

            ; homex.g
            ; called to home the X axis
            ;
            ; generated by RepRapFirmware Configuration Tool on Sat Apr 28 2018 20:07:26 GMT+0200 (CEST)
            G91 ; relative positioning
            G1 Z2 F3000 S2 ; lift Z relative to current position
            G1 S1 X-260 F3600 ; move quickly to X axis endstop and stop there (first pass)
            G1 X5 F3000 ; go back a few mm
            G1 S1 X-260 F360 ; move slowly to X axis endstop once more (second pass)
            G1 Z-2 F3000 S2 ; lower Z again
            G90 ; absolute positioning
            ; homey.g
            ; called to home the Y axis
            ;
            ; generated by RepRapFirmware Configuration Tool on Sat Apr 28 2018 20:07:26 GMT+0200 (CEST)
            G91 ; relative positioning
            G1 Z2 F3000 S2 ; lift Z relative to current position
            G1 S1 Y-250 F1800 ; move quickly to Y axis endstop and stop there (first pass)
            G1 Y5 F3000 ; go back a few mm
            G1 S1 Y-250 F360 ; move slowly to Y axis endstop once more (second pass)
            G1 Z-2 F3000 S2 ; lower Z again
            G90 ; absolute positioning
            ; homez.g
            ; called to home the Z axis
            ;
            ; generated by RepRapFirmware Configuration Tool on Sat Apr 28 2018 20:07:26 GMT+0200 (CEST)
            G91 ; relative positioning
            G1 S1 Z-260 F900 ; move quickly to Z axis endstop and stop there (first pass)
            G1 Z2 F3000 ; go back a few mm
            G1 S1 Z-260 F180 ; move slowly to Z axis endstop once more (second pass)
            G90 ; absolute positioning
            ; homeall.g
            ; called to home all axes
            ;
            ; generated by RepRapFirmware Configuration Tool on Sat Apr 28 2018 20:07:26 GMT+0200 (CEST)
            G91 ; relative positioning
            G1 Z2 F3000 S2 ; lift Z relative to current position
            G1 S1 X-260 Y-250 F3600 ; move quickly to X and Y axis endstops and stop there (first pass)
            G1 X5 Y5 F3000 ; go back a few mm
            G1 S1 X-260 Y-250 F360 ; move slowly to X and Y axis endstops once more (second pass)
            G1 S1 Z-260 F900 ; move quickly to Z axis endstop and stop there (first pass)
            G1 Z2 F3000 ; go back a few mm
            G1 S1 Z-260 F180 ; move slowly to Z axis endstop once more (second pass)
            G90 ; absolute positioning

            Manuel
            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
            with probably always latest firmware/DWC (incl. betas or self-compiled)
            My Tool Collection

            1 Reply Last reply Reply Quote 1
            • undefined
              OBELIKS @wilriker
              last edited by 1 Jul 2018, 18:18

              @wilriker Ah, OK. Mine are probably the old ones. I tried to use 500mA, ad the printer was not moving. So that means they must be 1,68A version. And they get to ~50°C with 23°C ambient temperature.

              P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
              Original Prusa i3 MK3S

              undefined 1 Reply Last reply 1 Jul 2018, 18:24 Reply Quote 0
              • undefined
                wilriker @OBELIKS
                last edited by 1 Jul 2018, 18:24

                @obeliks It is quite easy to tell: the new ones are marked as 42SHDC3025-24B on the back (probably easiest to spot on the extruder motor). The old one have either another or no model number on them.

                Manuel
                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                with probably always latest firmware/DWC (incl. betas or self-compiled)
                My Tool Collection

                1 Reply Last reply Reply Quote 0
                • undefined
                  OBELIKS
                  last edited by 1 Jul 2018, 18:26

                  Yup. Exactly.

                  P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                  Original Prusa i3 MK3S

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    mortn
                    last edited by 1 Jul 2018, 18:37

                    @wilriker Thanks for posting your config.g ! Made setting up my A8 a lot faster 😉 Just one question: how did you come up with the M569 C values?

                    I just tried to do some investigating in the trinamic driver docs, but without an electronics degree its quite cryptic to me 😕

                    undefined 1 Reply Last reply 1 Jul 2018, 18:44 Reply Quote 0
                    • undefined
                      wilriker @mortn
                      last edited by wilriker 7 Jan 2018, 18:46 1 Jul 2018, 18:44

                      @mortn said in Anet A8 Stepper motor question:

                      @wilriker Thanks for posting your config.g ! Made setting up my A8 a lot faster 😉 Just one question: how did you come up with the M569 C values?

                      I just tried to do some investigating in the trinamic driver docs, but without an electronics degree its quite cryptic to me 😕

                      It all came together here https://forum.duet3d.com/topic/5392/does-m906-set-rms-or-peak-current/19

                      Basically this is a bitmap of flags where the TOFF part has the highest influence on noise at standstill. At the end of the linked thread there is also a list of values for all 16 TOFF variants. Not sure if the link is also in that thread but I wrote a little tool to create these numbers:
                      https://github.com/wilriker/chopconf-generator (under releases are pre-compiled versions)

                      In one of the next RRF versions @dc42 will implement a dedicated parameter to set TOFF without having to use these cryptic bitmap-integer in decimal notation (hex notation does no longer work).

                      P.S.: the value for TOFF is motor specific - and note that I did not write model but motor, i.e. even if you have the same model your motor is different and may need different TOFF value to be most silent. So please test various values.

                      Manuel
                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                      My Tool Collection

                      undefined 1 Reply Last reply 2 Jul 2018, 18:44 Reply Quote 0
                      • undefined
                        Black Canary @wilriker
                        last edited by 2 Jul 2018, 18:44

                        @wilriker Cheers man. Like I told you I'm really beginer in this, I did not even created the files on the website you mentioned because I thought I just needed the config.g file, It's working now, I feel that I can make it work better because It doesn't look 100% good, but I will eventually get it to the point. Just another question by the way, Imagine that I want to now use the board in another printer I go to the website and just put the details of the printer, but I got a bit confused in the motors settings, how should I know what is the, max speed and the Steps per mm and every other information? in the data sheet of the motor? (if it has one how about if it doesn't?)

                        undefined 1 Reply Last reply 2 Jul 2018, 19:02 Reply Quote 0
                        • undefined
                          wilriker @Black Canary
                          last edited by 2 Jul 2018, 19:02

                          @black-canary said in Anet A8 Stepper motor question:

                          [...] how should I know what is the, max speed and the Steps per mm and every other information? in the data sheet of the motor? (if it has one how about if it doesn't?)

                          This is a tough one. If this is e.g. a totally new printer build from scratch you'd have to start at reasonable defaults and try from there.
                          Here is how I did it: before switching my A8 to Duet I was using Marlin on the stock board. So I looked at Marlin's values for these settings and just took them exactly over to the configurator for RRF. Except that I forgot

                          M204 P400 T1000 ; Lower accelerations when printing though

                          which led to... say... a surprisingly rough first print. 😁 From there I adjusted the values partly by trial-and-error and partly by using the EMF calculator at https://reprapfirmware.org/. Take the value of "speed at which torque starts to drop (low slip angle)" as the new maximum speed.

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          undefined 1 Reply Last reply 2 Jul 2018, 20:20 Reply Quote 1
                          • undefined
                            Black Canary @wilriker
                            last edited by 2 Jul 2018, 20:20

                            @wilriker Thanks again, at this moment it's not to build one from scratch it's actually to upgrade one printer. So in this case this printer uses marlin, could I just literally drag and drop the config files? Or my only option is to copy the values to the https://configurator.reprapfirmware.org and then use those files? (Sorry if i'm bothering you but I really like 3D printing and my only regretting is knowing just a little)

                            undefined 1 Reply Last reply 3 Jul 2018, 07:05 Reply Quote 0
                            • undefined
                              wilriker @Black Canary
                              last edited by 3 Jul 2018, 07:05

                              @black-canary No worries, we all started some point in time. And this forum was also a great help to me in gaining knowledge (besides hours of videos at YouTube 😁).

                              You cannot use the files used with Marlin. RRF would not understand them. It is actually your second idea how it is done: get the values from the appropriate Configuration.h or Configuration_adv.h in Marlin and enter them in RRF Configurator. This will then create all the necessary files in the appropriate format.

                              The biggest difference of RRF compared to Marlin is that you will (probably) never compile RRF yourself. Everything in RRF is configured via GCode - and it can be done at literally any point in time. So if e.g. you decide in the middle of a print that your acceleration is to high you can just reduce it live with the appropriate GCode command (btw. something I already did more than once).

                              Manuel
                              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                              with probably always latest firmware/DWC (incl. betas or self-compiled)
                              My Tool Collection

                              undefined 1 Reply Last reply 5 Jul 2018, 17:01 Reply Quote 0
                              • undefined
                                Black Canary @wilriker
                                last edited by 5 Jul 2018, 17:01

                                Good man @wilriker, Thanks a lot!

                                1 Reply Last reply Reply Quote 1
                                15 out of 20
                                • First post
                                  14/20
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA