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

Support for AS5311 High Resolution Linear Encoder

Scheduled Pinned Locked Moved
CNC
6
22
976
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
    Guus
    last edited by Guus 26 Jan 2025, 15:25

    In 2016, I bought a Cirqoid CNC milling machine to produce prototype circuit boards. Only 1 month after bought this machine, the manufacturer closed their website and disappeared. I could not get it to work and had other things to do. So it sat in a box for too long. It is build very well. And while looking at the controller it was ahead of its time, unfortunately too far ahead. Here is a video(1) of this wonderful machine. And here a link(2) to the software. And a ,link(3) to the manual. This is not a commercial message! The manufacturer went out of business and I am trying to make it work with Duet3d stuff.

    Now I have bought a Duet 3 Mini 5+ and start to upgrade this CNC machine.

    There are Magnetic Linear Encoders on this machine. The Osram AS5311(4) High Resolution Linear Encoder are at tiny prints in the machine near the magnetic strips.

    On the X axis there is one Nema 14 stepper and one time a Linear Encoder
    On the Y axis are two Nema 14 steppers and 2 times Linear Encoders
    On the Z axis there is one Nema 14 stepper and one time a Linear Encoder

    The AS5311 has SPI and PWM outputs.

    The AS5047P is at Your "Duet3D Magnetic Encoder".

    Now my questions;

    Is it today possible today use the AS5047P chip as a Linear Encoder?.

    So NOT at the back of the stepper? I will have to make new PCB's with the AS5047P(5) to be abile to fit into the existing locations on this machine.

    Otherwise?

    Is it possible to add support for the AS5311 to the Duet 3 Expansion 1HCL?

    Bye,

    Guus

    Links:
    sorry, I may not put the links here.

    1 Reply Last reply Reply Quote 2
    • undefined
      Phaedrux Moderator
      last edited by 26 Jan 2025, 17:25

      I've given you an upvote so that you may post links.

      Z-Bot CoreXY Build | Thingiverse Profile

      undefined 1 Reply Last reply 26 Jan 2025, 19:36 Reply Quote 0
      • undefined
        Guus @Phaedrux
        last edited by 26 Jan 2025, 19:36

        @Phaedrux I'm new at this Forum. I need to votes before I can add links in my messages. I need to wait

        undefined 1 Reply Last reply 26 Jan 2025, 21:27 Reply Quote 0
        • undefined
          Guus @Guus
          last edited by Guus 26 Jan 2025, 21:27

          @Phaedrux Thanks

          (1) https://www.youtube.com/watch?v=DABF_JWJdXY
          (2) http://cirqwizard.org/docs/intro.html
          (3) https://www.pintoelettronica.com/files/np_Files/DocFiles/000/000/094/Cirqoid_user_manual_EN-20140610.pdf
          (4) https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5311-linear-sensor
          (5) https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5047p-high-resolution-position-sensor

          1 Reply Last reply Reply Quote 0
          • undefined
            Guus
            last edited by droftarts 27 Jan 2025, 11:51

            In 2016, I bought a Cirqoid CNC milling machine to produce prototype circuit boards. Only 1 month after bought this machine, the manufacturer closed their website and disappeared. I could not get it to work and had other things to do. So it sat in a box for too long. It is build very well. And while looking at the controller it was ahead of its time, unfortunately too far ahead. Here is a video(1) of this wonderful machine. And here a link(2) to the software. And a ,link(3) to the manual. This is not a commercial message! The manufacturer went out of business and I am trying to make it work with Duet3d stuff.

            Now I have bought a Duet 3 Mini 5+ and start to upgrade this CNC machine.

            There are Magnetic Linear Encoders on this machine. The Osram AS5311(4) High Resolution Linear Encoder are at tiny prints in the machine near the magnetic strips.

            • On the X axis there is one Nema 14 stepper and one time a Linear Encoder
            • On the Y axis are two Nema 14 steppers and 2 times Linear Encoders
            • On the Z axis there is one Nema 14 stepper and one time a Linear Encoder

            The AS5311 has SPI and PWM outputs.

            Now my questions;

            Is it possible to add support for the AS5311 to the Duet 3 Expansion 1HCL?

            Bye,

            Guus

            Links:

            (1) https://www.youtube.com/watch?v=DABF_JWJdXY
            (2) http://cirqwizard.org/docs/intro.html
            (3) https://www.pintoelettronica.com/files/np_Files/DocFiles/000/000/094/Cirqoid_user_manual_EN-20140610.pdf
            (4) https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5311-linear-sensor
            (5) https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5047p-high-resolution-position-sensor

            undefined 1 Reply Last reply 27 Jan 2025, 12:35 Reply Quote 0
            • undefined
              droftarts administrators @Guus
              last edited by 27 Jan 2025, 12:35

              @Guus Please don't create duplicate threads.

              According to the specification sheet, the AS5311 has a "standardized quadrature output interface". The 1HCL should be able to support this, as it supports "a linear quadrature encoder that tracks position on a linear axis" (https://docs.duet3d.com/en/Duet3D_hardware/Duet_3_family/Duet_3_Expansion_1HCL#compatible-encoders). So it may work, but we have not tested this specific encoder.

              To use a linear encoder in closed loop mode on the 1HCL, you also need a motor shaft encoder on the stepper motor to handle the motor commutation, and it needs to be an encoder like the Duet3D Magnetic encoder, to be able to use the SPI encoder input on the 1HCL, as the linear encoder will already be using the quadrature input.

              I note you added a link to a second encoder, the AS5047p. Is this the shaft encoder supplied with the Cirqoid? It looks like there may be a rotary encoder in each of the motor mounts. This encoder says it has a "standard 4-wire SPI serial interface". Again, I'm not sure if this makes it already compatible with the SPI encoder input on the 1HCL. @dc42 may be able to tell you if both of these are already supported.

              If you haven't already, have a look at OpenPNP for controlling the pick-and-place aspect of this machine: https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_OpenPnP

              Ian

              Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

              undefined 1 Reply Last reply 27 Jan 2025, 15:13 Reply Quote 0
              • undefined
                Guus @droftarts
                last edited by Guus 27 Jan 2025, 15:13

                @droftarts

                The AS5047P is at the "Duet3D Magnetic Encoder".

                Can I use the "Duet3D Magnetic Encoder" as an linear encoder instead of on the back of a stepper motor?

                If yes:

                Then I can make new pcb's for the AS5047P to use at this machine. (not at the back of the steppers)
                and
                Then I can make new pcb's who fit on nema 14 steppers.

                Bye
                Guus

                undefined undefined undefined 3 Replies Last reply 27 Jan 2025, 15:36 Reply Quote 0
                • undefined
                  T3P3Tony administrators @Guus
                  last edited by 27 Jan 2025, 15:36

                  @Guus you need an encoder on the back of the motor. the linear encoder would be a second encoder for the axis position. Currently we have only tested the LM10 linear encoder but the OSRAM one may well work.

                  www.duet3d.com

                  undefined 1 Reply Last reply 27 Jan 2025, 15:45 Reply Quote 0
                  • undefined
                    Guus @T3P3Tony
                    last edited by Guus 27 Jan 2025, 15:45

                    @T3P3Tony The machine uses sturdy spindles and I do not expect any backlash. So once I have mounted the encoder on the back of the steppers, the linear encoders will no longer be needed. All I have to do is to fit end stops. Because the function of end stop was also done with the linear encoders. This way I don't need any new code, or testing new things. I keep 100% to the actual design of Duet3d. I'm learning! Thanks for the support! Up to the next step: ordering stuff;-)

                    1 Reply Last reply Reply Quote 1
                    • undefined
                      droftarts administrators @Guus
                      last edited by 27 Jan 2025, 15:50

                      @Guus said in Support for AS5311 High Resolution Linear Encoder:

                      The AS5047P is at the "Duet3D Magnetic Encoder".

                      Ah, yes, so it is! https://github.com/Duet3D/Duet3-Magnetic-Encoder/blob/main/Duet 3 Magnetic Encoder v0.3/MagEnc_Schematic_v0.3.pdf

                      Can I use the "Duet3D Magnetic Encoder" as an linear encoder instead of on the back of a stepper motor?

                      No. It communicates via an SPI interface. As far as I know, the 1HCL expects the rotary encoder on the SPI input, and the linear encoder on the quadrature input. You need both for the linear composite encoder that the 1HCL supports.

                      I would think you could shrink the size of the PCB to NEMA 14, there seems to be a lot of spare space on the PCB. You could also mount the NEMA 17 size Duet 3 Magnetic Encoder on a NEMA 14 motor with a suitable adapter.

                      Are you sure there is no encoder on the motor shaft already?

                      Ian

                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                      undefined 1 Reply Last reply 27 Jan 2025, 16:07 Reply Quote 0
                      • undefined
                        dc42 administrators @Guus
                        last edited by 27 Jan 2025, 15:58

                        @Guus I've taken a look at the AS5311 sensor data sheet. It appears to me that, the quadrature outputs it provides could be used. They would need to be buffered from 3.3V to 5V because the 1HCL board includes pullup resistors to 5V on the A and B inputs. A bi-colour LED should be driven from the MagINCn and MagDECn outputs to indicate whether the magnet strength is in range.

                        Alternatively, the serial output could be used, provided that it can be guaranteed that this output is read at least three times per pole pair. Unfortunately the maximum clock rate of the serial output is only 1MHz, which is rather low (much lower than for the AS5047).

                        Duet WiFi hardware designer and firmware engineer
                        Please do not ask me for Duet support via PM or email, use the forum
                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                        undefined 1 Reply Last reply 27 Jan 2025, 17:02 Reply Quote 0
                        • undefined
                          Guus @droftarts
                          last edited by 27 Jan 2025, 16:07

                          @droftarts

                          I made a mistake. The steppers for Z and X are Nema 17. So the "Duet3D Magnetic Encoder" will fit.

                          Only the stepper for Z is Nema 10. I will make an adapter for the "Duet3D Magnetic Encoder" and try to get it working.

                          The steppers have only 4 wires and were directly connected to stepper drivers. No SPI or anything else.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            Guus @dc42
                            last edited by Guus 27 Jan 2025, 17:02

                            @dc42 I decided not to use the Linear encoder for the time being. I will install end stops. Thanks for the answers.

                            HHmm. Maybee the linear encoders are only used as end stops.

                            Question: Can I use the PWM signal from the AR5311 as end-stop signals in RRF?AS5311-B.jpeg

                            undefined undefined 3 Replies Last reply 27 Jan 2025, 17:23 Reply Quote 1
                            • undefined
                              Guus @Guus
                              last edited by 27 Jan 2025, 17:23

                              @Guus The processing board and the driver board where not that complex. I don't see it being used with closed-loop steppers.Old and new cntroller.jpeg

                              undefined 1 Reply Last reply 28 Jan 2025, 09:25 Reply Quote 0
                              • undefined
                                Guus @Guus
                                last edited by 27 Jan 2025, 17:25

                                @Guus These are the steppers. Stepper X.jpeg atv the X axis. Stepper Y.jpeg at the two Y steppers and Stepper Z.jpeg at the Z stepper.

                                undefined 1 Reply Last reply 28 Jan 2025, 08:49 Reply Quote 0
                                • undefined
                                  T3P3Tony administrators @Guus
                                  last edited by T3P3Tony 28 Jan 2025, 08:38

                                  @Guus said in Support for AS5311 High Resolution Linear Encoder:

                                  Can I use the PWM signal from the AR5311 as end-stop signals in RRF?

                                  No, but those encoder have an Index output, if that index pulse is at the right point on the axis it might be possible to use that. See DC42's response below.

                                  www.duet3d.com

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators @Guus
                                    last edited by 28 Jan 2025, 08:49

                                    @Guus the index pulse is generated once every pole pair (see page 10 of the datasheet), so it's not much use as an endstop. I guess you could use it to detect the passing of a magnet, but a Hall effect device would do that more simply.

                                    Duet WiFi hardware designer and firmware engineer
                                    Please do not ask me for Duet support via PM or email, use the forum
                                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      droftarts administrators @Guus
                                      last edited by 28 Jan 2025, 09:25

                                      @Guus The controller board is interesting. It looks like it has an ARM MCU, and the encoder plugs in directly to that. The stepper drivers are standard 'stepstick' plug-in modules, and are probably Allegro A4988 drivers. I'd guess the firmware reads the motor position from the encoder, and maybe adjusts the position, but this isn't quite closed loop, as it's not taking the motor commutation into account, which allows for accurate positioning. The drivers on the Mini 5+, even though in open loop mode, will be nicer!

                                      Interesting that there are 5 drivers on the motor board. I guess it uses three for X, Y and Z. Does it use the driver with 8 output pins for Y? What does it use the other drivers for? I did see it comes with other tools, eg paste dispenser and pick-and-place toolhead, so I assume those.

                                      Ian

                                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                      undefined 1 Reply Last reply 28 Jan 2025, 11:21 Reply Quote 0
                                      • undefined
                                        Guus @droftarts
                                        last edited by Guus 28 Jan 2025, 11:21

                                        @droftarts

                                        Here are more photo's. This will explain many questions very fast.

                                        The boards;

                                        MCU board front side
                                        MCU board front side.jpeg

                                        MCU board rear side
                                        MCU board back side.jpeg

                                        Driver board front side with ET4988 chips.
                                        Driver board front side.jpeg

                                        Driver board rear
                                        Driver board backside.jpeg

                                        Bottom with Duet Mini 5. You can see 2 tubes with compressed air and a vacuum pump.
                                        Bottom with Mini 5+.jpeg

                                        Solder paste head
                                        PnP head.jpeg

                                        PnP head The 5the driver is for the motor for positioning
                                        Solder paste head.jpeg

                                        Mill and drill head
                                        Mill and Drill head.jpeg

                                        This was sold in 2016. It is really not badly designed. But I could not work with the software and never used this machine. Now have to mill small microstrip antennas. And that requires a lot of testing and milling. So this machine would speed up my development time for antennas a lot.

                                        undefined undefined 2 Replies Last reply 28 Jan 2025, 11:37 Reply Quote 1
                                        • undefined
                                          droftarts administrators @Guus
                                          last edited by 28 Jan 2025, 11:37

                                          @Guus Interesting! As it has an STM32F407, you might be able to run RepRapFirmware on it via the STM port of the firmware: https://teamgloomy.github.io/.

                                          @jay_s_uk might know if it would work, though it may take some effort to get it working, because you would have to define what the pins do. And the linear encoders would still not be supported in firmware.

                                          And you have a Mini 5+ now, so probably not much point.

                                          Ian

                                          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                                          jay_s_ukundefined 1 Reply Last reply 28 Jan 2025, 11:38 Reply Quote 0
                                          10 out of 22
                                          • First post
                                            10/22
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA