Announcement

Collapse
No announcement yet.

Sketch (Arduino) for Hobbing gears

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sketch (Arduino) for Hobbing gears

    I have been unsuccessfully trying to code in Arduino C language one sketch in C to drive the gear mandrel affixed to the milling table and driven by a stepper motor rotating on ratios needed for certain number of teeth digitally coupled by the Arduino Uno with an optical sensor with slotted wheel without any real practical flow chart that make sense.
    Does anyone have any experience in that area with suggestions for a flow chart?

    The best explanation I can give is by looking an YouTube video by AndysMachines. Very clever and he also supplies free download of his creation. I have and most probably will utilize (loaded already on my Arduino Hno).
    Any pointers?
    thanks, Wilson

  • #2
    Hi Wilson, I have some slight experience with Arduino. Please give me, or point me to, more information on your project. John

    Comment


    • #3
      Thanks John; just trying to code or start on a strategy for keeping two shafts digitally coupled with Arduino Uno to do gear Hobbing.
      the cutter on the milling machine spindle with and optical rotary sensor watching Slots if a wheel fly by.
      the a stepper motor driven by and Arduino rotates the gear “blank” at spindle revolutions divided by number of teeth desired for the gear =N.
      N typically from 12 to. 130 teeth.
      Cutter with only one lead(just like a common bolt thread, but machined appropriately to cut while it turns.
      There is one very capable person that has done it and provides also a free download of his executable file in Patreon section in YouTube.
      his handle is: AndysMachines
      He has several videos, the one I watched is for HOBBING.
      Thanks for your offer to help, your time and suggestions,
      Wilson

      Comment


      • #4
        Is the Arduino accurate enough to do floating point type stuff? (if the ratio between the encoder and hob stepper isn't an integer ratio?)

        People have hobbed with linuxcnc and the printer port - read back some post by even sir John switched his gear hobbing black box setup to linuxcnc





        You are then starting with a powerful motion control platform..

        sam

        Comment


        • #5
          Wilson, if I understood it correctly he has done all the software and you can download that for your Arduino and no further software development is required.

          The video I have looked is called 'Gear Hobbing Controller', https://youtu.be/beT8312k3yI

          So you need to collect the hardware, connect it together, download his software and load that to you Arduino then you are ready to hob gears.

          The hardware would include,
          mill, rotary indexer, hob (which you can make), (I am not sure you need the rotary indexer but you do need something to hold the blank so the stepper can rotate it)

          stepper motor, stepper motor driver, power supply, Arduino, LCD keypad shield,

          You do not need to write any software for the Arduino as he has done that already for you and he wrote it in machine code which is a 'lower' layer than 'C' and has many advantages for those who know how to do it.

          He also made the nice 3D printed box and panel but I see that as an option.

          I suggest you watch that video again and see if the way ahead becomes clearer for you.
          John
          Last edited by The Artful Bodger; 08-06-2022, 04:22 PM.

          Comment


          • #6
            Originally posted by skunkworks View Post
            Is the Arduino accurate enough to do floating point type stuff? (if the ratio between the encoder and hob stepper isn't an integer ratio?)

            People have hobbed with linuxcnc and the printer port - read back some post by even sir John switched his gear hobbing black box setup to linuxcnc





            You are then starting with a powerful motion control platform..

            sam
            All very interesting Sam but I prefer to direct myself to the question that Wilson asked.

            Comment


            • #7
              With appropriate sized steppers, it's easy to synchronize multiple axes at any ratio using a Teensy (Arduino compatible). My rose engine can synchronize five motors. Spindle is programmed as radial movement, X and Z motors linear, and two other motors which can be programmed either radial or linear. Here's an example with helixes on the side and top of a small box:
              Click image for larger version

Name:	20220716_113459c.jpg
Views:	506
Size:	384.8 KB
ID:	2011692

              Comment


              • #8
                Hi Wilson, have you made any progress and do you need help?
                John

                Comment


                • #9
                  Originally posted by skunkworks View Post
                  Is the Arduino accurate enough to do floating point type stuff?
                  You do not need floating point. Even industrial servos (e.g Mitsubishi MR2 JS era) used integer math for their electronic gearing. If you have enough integer bits, the error is small and trackable. The problem is a close cousin of Bresenham's one.

                  Comment


                  • #10
                    Originally posted by djc View Post

                    You do not need floating point. Even industrial servos (e.g Mitsubishi MR2 JS era) used integer math for their electronic gearing. If you have enough integer bits, the error is small and trackable. The problem is a close cousin of Bresenham's one.
                    Sure.. though I thought sir John tried to use the gearing within the servo drives and had issues. (Might not be remembering 100%). I thought it was the reason why he switched to linuxcnc.

                    Comment


                    • #11
                      From memory Sir John used a 4000 bit encoder (or 2k doubled) to 'take out' the 40:1 of the dividing head and no maths was needed so it was done with TTL binary dividers not a computer. However he had to do it all in one go or would lose sync. Then he found a chap to write some code that would was more tolerant and would allow the spindle to stop and reverse even. The thread is somewhere in the forum archives.

                      Comment


                      • #12
                        Originally posted by skunkworks View Post
                        Is the Arduino accurate enough to do floating point type stuff? (if the ratio between the encoder and hob stepper isn't an integer ratio?)

                        People have hobbed with linuxcnc and the printer port - read back some post by even sir John switched his gear hobbing black box setup to linuxcnc





                        You are then starting with a powerful motion control platform..

                        sam
                        Just read your helping replay; .thanks.
                        I am not sure that I will get anywhere the way things goes.......age taking its toll....
                        Thanks

                        Comment


                        • #13
                          Garbage in, garbage out. This problem is exactly the same as an electronic leadscrew for a lathe. One can examine the Clough42 ELS project. Some takeaways, he uses a 32bit MCu with built in encoder peripheral, and he uses a high encoder count rotary encoder that is many magnitudes more sensitive and accurate than your wheel. He STILL has to deal with math errors with floating point conversion, although it's been minimalized for the scope of use(no one is turning a screw 100 yards long)
                          The Arduino is an 8bit MCu(AVR ATMEGA 328), the Teensy I believe is a 32bit MCu that is in an Arduino form factor, running inside the Arduino system.
                          The 8bit MCu can read the quadrature output of the rotary encoder but you will want to use interrupts so it doesn't miss any counts.
                          As a learning experience, the slotted wheel and IR LED is a great way to have some fun and rudimentary speed control of a DC motor, but for machine tool spindle synchronization you'll want a few magnitudes better.

                          Comment


                          • #14
                            That is why linuxcnc is such a good platform for experimenting with this. It already has motion, encoder counters, limits, and such that have already been sussed out. It is kinda like a lego set of motion and logic building blocks. Each one bug free and working as expected.

                            no re-inventing the wheel.

                            Comment


                            • #15
                              Originally posted by skunkworks View Post
                              That is why linuxcnc is such a good platform for experimenting with this. It already has motion, encoder counters, limits, and such that have already been sussed out. It is kinda like a lego set of motion and logic building blocks. Each one bug free and working as expected.

                              no re-inventing the wheel.
                              You should take your YouTube channel and make tutorial videos on how to leverage and use LinuxCNC. You are a huge proponent of it, you could have the power to bring it to the masses.

                              Comment

                              Working...
                              X