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

Low cost, public domain, stepper analyzer - season 2.

Scheduled Pinned Locked Moved
General Discussion
17
49
3.2k
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
    zapta
    last edited by 30 Jan 2021, 05:33

    Hi everybody,

    Last year I posted here a DYI design of a stepper motor analyzer that was based on teensy 4.0 (600Mhz processor, at $20 a piece) and a 3.5 Nextion smart TFT(~$35).

    Since then I worked on and off on a simpler and less expensive design and it works even better. This design uses a 3.5" 'dumb' TFT with a capacitive touch, and ~$3 'blackpill' STM32F401CE board from Ali Express.

    7cc58730-8a51-4d2a-9977-d1bbe4e78533-image.png

    The hardware design is trivial, with a blackpill module, two small current sensors and a EEPROM to save the settings, and it has a 40pin connector that plugs into the TFT screen. All the heavy lifting, including the signal processing, extraction of stepper measurements and user interface are done by the firmware.

    Github repository and documentation are here https://github.com/zapta/simple_stepper_motor_analyzer and electrical schematic is here https://github.com/zapta/simple_stepper_motor_analyzer/blob/master/kicad/stepper_analyzer-sch.pdf .

    I may be able to make a few available for cost, especially for developers that want to add functionality (C++, Platformio under VSCode, programming/debugging using stlink V2). Flashing of new boards can be done with DFU software over USB, no tools of dongles required).

    If you want to build one, or ten, or a thousand and have questions, I will be happy to answer. The connectors BTW are duet2 compatible. 😉

    6dcbcaec-99bc-4f99-b030-dc2ceeeef53e-image.png

    fd29b9fd-e6d4-48a7-a331-4bb8e5ea41cd-image.png

    c410b83c-372f-40b1-9924-66c8f36c4fda-image.png

    undefined 1 Reply Last reply 30 Jan 2021, 19:14 Reply Quote 9
    • undefined
      TypQxQ
      last edited by 30 Jan 2021, 07:23

      This is exactley what I need to test my diffrent steppers with the diffrent boards...
      Unfortunatley my soldering skills and electronic DIY are not that good but would love to buy one if there is one for sale.

      1 Reply Last reply Reply Quote 0
      • undefined
        PCR
        last edited by 30 Jan 2021, 07:53

        I will Order some pcbs and can Order some for Europe with all SMT components! Please upvote the Post If you want one!

        Would supply the Board without Blackpill and Display!

        Great Work!!!!!!

        undefined undefined 2 Replies Last reply 30 Jan 2021, 16:07 Reply Quote 11
        • undefined
          zapta @PCR
          last edited by 30 Jan 2021, 16:07

          @PCR said in Low cost, public domain, stepper analyzer - season 2.:

          I will Order some pcbs and can Order some for Europe with all SMT components!

          Thanks PCR. Please let me know if you have any questions.

          The three LEDS and their respective resistors are optional and I use them just for software development.

          undefined 1 Reply Last reply 30 Jan 2021, 18:39 Reply Quote 0
          • undefined
            PCR @zapta
            last edited by 30 Jan 2021, 18:39

            @zapta will do! btw will "sell" them for nonproft! shoukd be here in 1 week

            1 Reply Last reply Reply Quote 0
            • undefined
              Sindarius @zapta
              last edited by 30 Jan 2021, 19:14

              @zapta this is very cool!

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User
                last edited by 31 Jan 2021, 01:31

                Nice! Still haven't gotten the pcbs for the first one but I have a small pile of screens and teensys lol. Maybe time to place a third order of boards..

                undefined 1 Reply Last reply 31 Jan 2021, 20:54 Reply Quote 0
                • undefined
                  zapta @A Former User
                  last edited by zapta 31 Jan 2021, 20:54

                  @bearer said in Low cost, public domain, stepper analyzer - season 2.:

                  Maybe time to place a third order of boards..

                  Yes, this one is much smoother. The LVGL software is is more solid than the Nexion approach, display is crispier, and it costs less, unless if you want to wait for a 2022 model with a RPI Pico . 😉

                  BTW, an interesting application is to measure the consistency of homing. I connect the analyzer to a stepper, home once, reset the steps counter, and then home again a few times and watch the step count after each homing. It should stay zero. Works unless your the uses senseless homing which causes it to lose a few steps when the driver detects a stall.

                  Currently resolution is one full step but I think it's possible to compute also fractions of of full steps, from the ratio (coil1 current / coil 2 current).

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    fma @PCR
                    last edited by 1 Feb 2021, 15:22

                    @PCR said in Low cost, public domain, stepper analyzer - season 2.:

                    I will Order some pcbs and can Order some for Europe with all SMT components! Please upvote the Post If you want one!

                    Thanks!

                    Frédéric

                    undefined 1 Reply Last reply 23 Apr 2021, 08:38 Reply Quote 0
                    • undefined
                      PCR
                      last edited by 1 Feb 2021, 18:06

                      Pcbs orderd! Enough i Hope!

                      undefined 1 Reply Last reply 2 Feb 2021, 04:25 Reply Quote 0
                      • undefined
                        zapta @PCR
                        last edited by zapta 2 Feb 2021, 04:26 2 Feb 2021, 04:25

                        The analyzer now can measure and show fractions of a full step in 1/100th of a step resolution.

                        4c03e607-bca6-4704-a9d0-d050fb0fe96f-image.png

                        The Allegro Microsystems datasheet such as this one (starting at page 16) https://www.allegromicro.com/-/media/files/datasheets/a5985-datasheet.ashx provide useful information about the relation between the current and the sub-step position.

                        The current patters are divided into electric cycles or 'electric rotations', each representing 4 full steps and the position of the stepper within that electric rotation can be done by feeding the two coil currents into the standard trigonometric function atan2(current1, current2). It ended up simpler than I expected.

                        I also updated the firmware and 4 steps diagram to reflect the new understanding that the centers of the full steps at the points where both coils have the exact same current (regardless of polarity, this happens at ~70% of peak current which is also the RMS current) and not when one is at its peak and the other at zero as I thought before.

                        e194e7f5-0946-4fec-8c82-7129406629f7-image.png

                        I tested it with a Pololu stepper driver, incrementing a 1/8 of a step every 2 seconds and watching the display. Works like a charm.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Marcossf
                          last edited by 2 Feb 2021, 16:53

                          I am really interested in buying some when it is available. As a mounting kit or fully assembled. Any price is cheap just by saving time with this amazing idea.

                          I'll keep an eye around here.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            zapta
                            last edited by zapta 2 Oct 2021, 05:43 10 Feb 2021, 05:41

                            I am experimenting now with a new screen whose purpose is to evaluate the signal and phase cleanness. It takes the signals from the two coils and draw them as https://en.wikipedia.org/wiki/Lissajous_curve .

                            Here what you get from a well fed stepper with good microsteps interpolation, a balanced, large and smooth circle.
                            screenshot1.png

                            And this is what you see in a system where the supply is insufficient to drive the current at high movement speeds. Skinny and distored.
                            screenshot2.png

                            BTW, each rotation along the circle is equivalent to 4 full steps that make up a single 'electronic rotation'.

                            These patters are shown in real time while the printers operates. This screen is experimental, need to clean it up and include in the official release.

                            EDIT: here is an interesting animation from Wikipedia that shows how it works:

                            https://en.wikipedia.org/wiki/Lissajous_curve#/media/File:Circular_Lissajous.gif

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              PCR
                              last edited by 16 Feb 2021, 07:10

                              PCBs are here,

                              i can supply the pcb, the two sensors and the eprom.
                              due too some family buisness i do not know if i can solder them in the next weeks. So selling the parts only would be the best for me. Best

                              1 Reply Last reply Reply Quote 1
                              • undefined
                                fma
                                last edited by 16 Feb 2021, 10:59

                                No problem to sold them myself.
                                How do we proceed to pay you?

                                Frédéric

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  PCR
                                  last edited by 16 Feb 2021, 13:16

                                  Contact me via PM

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    PCR
                                    last edited by 17 Feb 2021, 07:24

                                    So for the price.

                                    5 € the pcb
                                    2,5€ for the sensors and eprom
                                    1€ for 40 pin connector
                                    1€ for resistors

                                    due to a mistake at digikey the capacitors are to small.. So these have to be self sourced ( easy)

                                    shipping with tracking 8€ without 4€ in europe
                                    germany 3 € shipping

                                    fcwiltundefined 1 Reply Last reply 17 Feb 2021, 07:29 Reply Quote 0
                                    • fcwiltundefined
                                      fcwilt @PCR
                                      last edited by 17 Feb 2021, 07:29

                                      @PCR said in Low cost, public domain, stepper analyzer - season 2.:

                                      So for the price.

                                      5 € the pcb
                                      2,5€ for the sensors and eprom
                                      1€ for 40 pin connector
                                      1€ for resistors

                                      due to a mistake at digikey the capacitors are to small.. So these have to be self sourced ( easy)

                                      shipping with tracking 8€ without 4€ in europe
                                      germany 3 € shipping

                                      Do you have any for sale?

                                      Can you ship to the US?

                                      Thanks.

                                      Frederick

                                      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        PCR
                                        last edited by 17 Feb 2021, 07:30

                                        I have about 20pcbs and for 10 pieces parts

                                        undefined 1 Reply Last reply 7 Mar 2021, 22:54 Reply Quote 0
                                        • undefined
                                          fma
                                          last edited by 17 Feb 2021, 12:23

                                          I sent you a message in the private chat; did you get it?

                                          Frédéric

                                          fcwiltundefined 1 Reply Last reply 17 Feb 2021, 12:41 Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA