Arduino Rotary Table MEW 249

Advert

Arduino Rotary Table MEW 249

Home Forums Drawing Errors and Corrections Arduino Rotary Table MEW 249

Viewing 25 posts - 76 through 100 (of 109 total)
  • Author
    Posts
  • #287470
    Carl Wilson 4
    Participant
      @carlwilson4

      I’ll go the whole hog and make it RS485.

      Advert
      #287471
      Journeyman
      Participant
        @journeyman
        Posted by Neil Wyatt on 06/03/2017 14:03:21:

        Here's some big news for the flat-earthers… captured during a recent Lunar eclipse:

        The elephants have wandered off cheeky.

        #287485
        HasBean
        Participant
          @hasbean
          Posted by Neil Wyatt on 06/03/2017 13:57:20:

          Can we have RS422, please? Some readers have very long gardens with workshops at the end

          Neil

          RS422

          Blimey that takes me back

          #287495
          duncan webster 1
          Participant
            @duncanwebster1
            Posted by John Stevenson on 06/03/2017 13:05:16:
            Be better if you used Morse

            Keep some contributors happy if you used Royal Mail, none of this electronics stuff.

            #287511
            SillyOldDuffer
            Moderator
              @sillyoldduffer

              A while ago John Stevenson suggested the controller would be easier to use from a keypad rather than nested menus. Unable to resist the challenge I immediately sat in my armchair.

              If anyone would like to try it, this dropbox link will let you download such a beast. No proper instructions but there's a pdf that should help. It uses the same motor connections as Carl's article and also works with the DF-Robot shield, though the push-buttons aren't needed. The keypad is a cheap membrane type about £2 from ebay etc.

              The control keys are laid out thus:

              keypad.jpg

              Here's the lash-up.

              dsc04248.jpg

              As well as eliminating the nested menus, I have built in more ratios (90:1, 60:1, 45:1, 15:1, 12:1, 3:1 and 1:1) and made it easier to add more. A new feature is that the indexer reports it's status back to an optionally connected PC, and it should be possible for the PC to control the indexer. (This remote control feature is untested.)

              Not implemented (yet) is keypress repeat. Otherwise the code replicates the same motor control applied by the Gary Liming's program as described by Carl.

              This is beta software offered "as is". It has only been tested moderately carefully. I would be grateful for any comments, bug reports, or criticisms. The display and keypad layouts are just as they occurred to me and no doubt could be improved. At the moment STOP/GO are on the same button: it may not appeal to everyone.

              I'm sorry I didn't anticipate JS's requirement for the indexer to support Morse Code. (Typical computer user, always changing what they want.) I could add CW quite easily if anyone really wants it. It should be easy because someone else has already written an Arduino morse decoder.

              Seriously though, Morse is sometimes used to signal audibly to the operator as part of a real man-machine interface. (Like SMS on mobile phones. And my old dishwasher did it. ) Not sure there's an application for that here though.

              Just for fun and interest.

              Cheers,

              Dave

              #287513
              John Stevenson 1
              Participant
                @johnstevenson1

                Dave,

                This looks very interesting but one point and it's not morse wink

                Two other common ratios are 40:1 which is most dividing head and 72:1 for a lot of the cheaper import tables.

                It's peaked my interest and I 'may' have to send for an Arduino to have a play which after I have got back from a trip.

                Many thanks Dave.

                #287518
                SillyOldDuffer
                Moderator
                  @sillyoldduffer
                  Posted by John Stevenson on 06/03/2017 21:07:30:

                  Dave,

                  Two other common ratios are 40:1 which is most dividing head and 72:1 for a lot of the cheaper import tables.

                  It's peaked my interest and I 'may' have to send for an Arduino to have a play which after I have got back from a trip.

                  Hi John,

                  I'll have you converted to the dark side yet!

                  I've added 40:1 and 72:1 to the program. Thanks for the info – that's the sort of thing I don't know.

                  Ta,

                  Dave

                  #287529
                  duncan webster 1
                  Participant
                    @duncanwebster1

                    Can it do 'number of divisions in a full circle'. If I want a 41 tooth gear (not that I do at present) can I enter 41 rather than 8.7805 degrees.

                    #287530
                    Another JohnS
                    Participant
                      @anotherjohns
                      Posted by Neil Wyatt on 06/03/2017 14:03:21:

                      Here's some big news for the flat-earthers… captured during a recent Lunar eclipse:

                      Hah! Love it!

                      #287547
                      Journeyman
                      Participant
                        @journeyman
                        Posted by SillyOldDuffer on 06/03/2017 20:57:08:

                        A while ago John Stevenson suggested the controller would be easier to use from a keypad rather than nested menus. Unable to resist the challenge I immediately sat in my armchair.

                        If anyone would like to try it, this dropbox link will let you download such a beast. No proper instructions but there's a pdf that should help. It uses the same motor connections as Carl's article and also works with the DF-Robot shield, though the push-buttons aren't needed. The keypad is a cheap membrane type about £2 from ebay etc…

                        Thanks Dave, I have downloaded the "ino" file and am awaiting keypads to arrive from China.

                        John

                        #287551
                        SillyOldDuffer
                        Moderator
                          @sillyoldduffer
                          Posted by duncan webster on 07/03/2017 00:56:31:

                          Can it do 'number of divisions in a full circle'. If I want a 41 tooth gear (not that I do at present) can I enter 41 rather than 8.7805 degrees.

                          Hi Duncan,

                          As it stands the code does the same (I hope!) as Gary Liming's program. His angle function has fixed steps of 5 degrees. You've got me wondering about using the keypad to type in actual values.

                          I don't quite understand the purpose of Gary's STEP function, but it may be what you want. Taking into account the ratio, STEP moves the motor by the number of microsteps needed to complete a rotation divided by the number of steps input by the user. I have to go out shortly so checking the maths will have to wait, but is this right for your 41 degrees?

                          microsteps_per_rotation / number_of_steps = 360 / 41

                          Dave

                          #287552
                          SillyOldDuffer
                          Moderator
                            @sillyoldduffer
                            Posted by Journeyman on 07/03/2017 10:30:22:

                            Posted by SillyOldDuffer on 06/03/2017 20:57:08:

                            Thanks Dave, I have downloaded the "ino" file and am awaiting keypads to arrive from China.

                            John

                            Just in case you haven't spotted it already, the ino uses the Brevik keypad library and won't compile without it. The library is installed using the 'Manage Library' part of the Arduino IDE.

                            Good luck,

                            Dave

                            #287555
                            Journeyman
                            Participant
                              @journeyman

                              Dave, yes I noticed that in the comments and installed the library. Compiled first time. All I need now is the keypad!

                              John

                              #287558
                              Baldric
                              Participant
                                @baldric

                                Dave,
                                I was thinking that I will use the numbers and have ordered **LINK** as it had the start & stop buttons, I am waiting for it to arrive. I wanted the stop so that I can easily stop it if I think something is going wrong.

                                Baldric

                                #287562
                                duncan webster 1
                                Participant
                                  @duncanwebster1
                                  Posted by SillyOldDuffer on 07/03/2017 11:02:46:

                                  Posted by duncan webster on 07/03/2017 00:56:31:

                                  Can it do 'number of divisions in a full circle'. If I want a 41 tooth gear (not that I do at present) can I enter 41 rather than 8.7805 degrees.

                                  Hi Duncan,

                                  As it stands the code does the same (I hope!) as Gary Liming's program. His angle function has fixed steps of 5 degrees. You've got me wondering about using the keypad to type in actual values.

                                  I don't quite understand the purpose of Gary's STEP function, but it may be what you want. Taking into account the ratio, STEP moves the motor by the number of microsteps needed to complete a rotation divided by the number of steps input by the user. I have to go out shortly so checking the maths will have to wait, but is this right for your 41 degrees?

                                  microsteps_per_rotation / number_of_steps = 360 / 41

                                  Dave

                                  If I've understood, that seems a bit unhandy. With the motor driver set to 1/2 stepping and a 60:1 worm I need 24000 steps for a full rev or 585.4 steps for each of my 41 teeth. I deliberately chose something not a factor of 360. It must have resulted in sore fingers inputting that via an up/down button system. A lot easier to input 41, no arithmetic for starters. What do others think?

                                  To reduce cumulative error it might be possible to have not all increments the same, as a starter for 10 alternate between 585 and 586 steps. If every increment was 585, you would be 0.03 teeth out after a full circle. Am I nit picking? Probably. Using a series of 1 off 586 followed by 2 off 585 gives 23999 which is close enough. Last cycle is 1 off 586 followed by 1 off 585 for those who are into checking sums

                                  #287563
                                  John Stevenson 1
                                  Participant
                                    @johnstevenson1
                                    Posted by duncan webster on 07/03/2017 13:08:22:

                                    If I've understood, that seems a bit unhandy. With the motor driver set to 1/2 stepping and a 60:1 worm I need 24000 steps for a full rev or 585.4 steps for each of my 41 teeth. I deliberately chose something not a factor of 360. It must have resulted in sore fingers inputting that via an up/down button system. A lot easier to input 41, no arithmetic for starters. What do others think?

                                    To reduce cumulative error it might be possible to have not all increments the same, as a starter for 10 alternate between 585 and 586 steps. If every increment was 585, you would be 0.03 teeth out after a full circle. Am I nit picking? Probably. Using a series of 1 off 586 followed by 2 off 585 gives 23999 which is close enough. Last cycle is 1 off 586 followed by 1 off 585 for those who are into checking sums

                                    Duncan,

                                    This is one of the reasons that I mentioned the Steve Ward controller in that you get simple menus, more of them for very little more outlay on expense.

                                     

                                    I have been following the Arduino project over on HMEM

                                    for a 3" table and that ones does use a keypad but as with all the other threads some can't get it running after literally hours of work.

                                     

                                    Now I know for some it's the learning curve and wanted to know these things which is fine but for other who want a table to carry on with another project then it's a warning what you could be letting yourself in for.

                                     

                                    Even with Steve Wards controller you have a choice of literally buy the modules and plug and play or build it. True you have to wire in a stepper driver and put it all in a case but you have to do this with an Arduino anyway so nothing lost.

                                     

                                    [edit] link added.

                                     

                                    Edited By John Stevenson on 07/03/2017 13:19:33

                                    #287564
                                    Journeyman
                                    Participant
                                      @journeyman

                                      Duncan, as it was written originally it can do number of divisions. I tried mine out with a an offcut in the chuck on the table I set divisions to 7, a nice odd number. Then drilled a hole, step, drill hole etc. and I ended up with 7 holes that looked equi-spaced. Just to see what happened I went round the circle again and the drill went neatly into each hole without apparent deflection. Just to see what happened I ran it in reverse and the drill again dropped neatly into each hole. So the system seems to work. Not able to measure accurately enough to tell the angle the holes are at but seems pretty good for a simple test. Probablt accurate enough for my needs.

                                      John

                                      #287566
                                      SillyOldDuffer
                                      Moderator
                                        @sillyoldduffer
                                        Posted by Baldric on 07/03/2017 12:34:13:

                                        Dave,
                                        I was thinking that I will use the numbers and have ordered **LINK** as it had the start & stop buttons, I am waiting for it to arrive. I wanted the stop so that I can easily stop it if I think something is going wrong.

                                        Baldric

                                        Hi Baldric,

                                        Not difficult to modify the code to use separate STOP / GO buttons. At the moment I use a single button to toggle STOP/GO. The code is:

                                        case 'G': // GO / STOP toggle
                                        rstatus.go = !rstatus.go;
                                        break;

                                        After assigning 's' to the STOP button, you would change the above to:

                                        case 'G': // GO
                                        rstatus.go = true;
                                        break;

                                        case 's: // STOP
                                        rstatus.go = false;
                                        break;

                                        What's complicated about using the numbers on a 4×4 keypad is fitting in the functions. Run, Step, Jog, and Angle can be assigned to F1 to F4, but what to do about ratio?

                                        Duncan is interested in numbers too so I'll have a think. Ideally the solution shouldn't involve nested menus! It may be necessary to use a 5×4 keypad like this one.

                                        Apart from the labels your keypad is probably the same as mine so the program should still work. I would like to make an overlay that goes over the existing key labels but that's an unsolved problem.

                                        Dave

                                        #287572
                                        SillyOldDuffer
                                        Moderator
                                          @sillyoldduffer
                                          Posted by duncan webster on 07/03/2017 13:08:22:

                                          Posted by SillyOldDuffer on 07/03/2017 11:02:46:

                                          Posted by duncan webster on 07/03/2017 00:56:31:

                                          Can it do 'number of divisions in a full circle'. If I want a 41 tooth gear (not that I do at present) can I enter 41 rather than 8.7805 degrees.

                                          Hi Duncan,

                                          As it stands the code does the same (I hope!) as Gary Liming's program. His angle function has fixed steps of 5 degrees. You've got me wondering about using the keypad to type in actual values.

                                          I don't quite understand the purpose of Gary's STEP function, but it may be what you want. Taking into account the ratio, STEP moves the motor by the number of microsteps needed to complete a rotation divided by the number of steps input by the user. I have to go out shortly so checking the maths will have to wait, but is this right for your 41 degrees?

                                          microsteps_per_rotation / number_of_steps = 360 / 41

                                          Dave

                                          If I've understood, that seems a bit unhandy. With the motor driver set to 1/2 stepping and a 60:1 worm I need 24000 steps for a full rev or 585.4 steps for each of my 41 teeth. I deliberately chose something not a factor of 360. It must have resulted in sore fingers inputting that via an up/down button system. A lot easier to input 41, no arithmetic for starters. What do others think?

                                          To reduce cumulative error it might be possible to have not all increments the same, as a starter for 10 alternate between 585 and 586 steps. If every increment was 585, you would be 0.03 teeth out after a full circle. Am I nit picking? Probably. Using a series of 1 off 586 followed by 2 off 585 gives 23999 which is close enough. Last cycle is 1 off 586 followed by 1 off 585 for those who are into checking sums

                                          I agree! Even if I get key-repeat to work (next job), it would be a considerable improvement to simply type in the required numbers and hit GO. As I mentioned in my reply to Baldric, the problem with allowing numbers is to squeeze everything in on a 4×4 keypad without going back to nested menus.

                                          I like the idea of reducing errors. Step motors aren't fantastically accurate in the first place but that;'s no reason to leave obvious improvements out. I shall need Duncan to explain the maths though!

                                          At the moment this project is a clean room implementation, that is I haven't looked at how others have done machine control with a push button interface. I'm not going to copy a commercial product. I expect Steve Ward has a done a good job and don't want to pinch his livelihood by knocking out an imitation.

                                          Dave

                                          #287575
                                          Emgee
                                          Participant
                                            @emgee

                                            Like John I too followed the HMEM arduino article by Chuck Fellows, eventually I got the Arduino UNO and a Sainsmart display. I already had a stepper and driver so it only needed a few wiring links to get up and running, fortunately the downloaded sketch from Chuck worked first time, any number of divisions can be entered and the control buttons provide steps in either direction at a single speed and there is no jogging function.

                                            So this is a very basic set-up compared with what's achievable by adding another sketch (program) to provide further functions.

                                            What I would like to do is add a separate switch or proximity detector to activate the single step move so that when on a cnc mill cutting gears after the cutter has cut the space and returned to the start position the table advance switch is triggered by the X axis travel and the div head rotates to the next tooth position.

                                            I have no idea on writing a sketch but can copy and paste, or how to wire in a switch or proximity sensor, any help much appreciated.

                                            Emgee

                                            typo edited

                                            Edited By Emgee on 07/03/2017 14:42:59

                                            #287592
                                            Journeyman
                                            Participant
                                              @journeyman
                                              Posted by SillyOldDuffer on 07/03/2017 14:00:25TOP/GO. The code is:

                                              What's complicated about using the numbers on a 4×4 keypad is fitting in the functions. Run, Step, Jog, and Angle can be assigned to F1 to F4, but what to do about ratio?

                                              Dave, I would guess that most people only have the one R/T or Dividing Head that they want to automate. Therefore the ability to change ratio easily may not be required. I for one would just hard code it into the program. I presume that there is also the choice of adding an extra button, possibly one of those paddle switches I am already using to start it running in the required direction?

                                              John

                                              #287597
                                              Neil Wyatt
                                              Moderator
                                                @neilwyatt

                                                An alternative to nested menus is to have sequential ones, press a menu key and cycle through the relative short list of modes, so the display runs through (e.g.) 'angle', 'Number of holes', 'jog', 'continuous' etc. you just enter a number and press go.

                                                The four function keys could be: Menu, backspace, enter and direction (the latter one would toggle CW/CCW). No need for nesting and each key keeps its function.

                                                For my projects I tend to have the major selections as sequential menus, then nested functions when needed within each major menu.

                                                Neil

                                                #287604
                                                Bazyle
                                                Participant
                                                  @bazyle

                                                  If you have numbers all you need after that is 'backspace'. You start with say an menu of 4 items so pick one, that gives you another menu and so on until the last menu is 1=go, 0=abort. If you make a mistake all you need is backspace or the abort at the end (or assign a key on every page or this)
                                                  It takes only 2 key strokes to give you 100 options.
                                                  There is a system in use for tens of millions of devices worldwide called "SNMP" that is number driven like this and it is very reliable. Even today I have accessed devices in peoples homes (legally) all over the UK using SNMP to retrieve data and set control parameters. Unfortunately it is being replaced by TR069 which is XML to please the programmer geeks who can't handle simple numbers and that is a cumbersome nightmare.

                                                  #287641
                                                  Neil Wyatt
                                                  Moderator
                                                    @neilwyatt
                                                    Posted by Bazyle on 07/03/2017 18:44:53:

                                                    If you have numbers all you need after that is 'backspace'. You start with say an menu of 4 items so pick one, that gives you another menu and so on until the last menu is 1=go, 0=abort. If you make a mistake all you need is backspace or the abort at the end (or assign a key on every page or this)
                                                    It takes only 2 key strokes to give you 100 options.

                                                    Yep, but people has asked for a way to avoid nested menus, also multiple options often don't work well on a two-line 16 character LCD

                                                    My battery charger has three buttons (left, right, select) and does something like this:

                                                    menu 1 top line: Chemistry

                                                    Buttons 1&2 scroll through (on) bottom line: NiCad, NiMH Lion, SLA

                                                    Select then moves on to number of cells, then capacity.

                                                    Finally you get presented with the settings and have to press left or right to start the charge or cancel (if you have made an error).

                                                    When running the display shows voltage, current, elapsed time and temperature. The select key aborts.

                                                    Downside is I have made steps in the capacity selection too large, it's a bit slow.

                                                    #287646
                                                    Mike Poole
                                                    Participant
                                                      @mikepoole82104

                                                      The most user friendly menu system I have encountered is my Brennan MP3 unit, the menus are selected by a rotary knob which scrolls through the major headings then push knob to select,which will either drill down to the next selections or when you reach the required parameter push to select and turn to alter value and push to enter, job done. The trouble with any menu system is you either need to know where what you want is located or waste time hunting it down. The most useful page in a manual is the menu tree where you can see at glance what you want and where to find it. Many industrial intelligent sensors have a few buttons to access a menu and enter the parameters, by the time you have entered an IP address, subnet mask and all the other stuff you quickly lose the will to live.

                                                      Mike

                                                      Edited By Mike Poole on 07/03/2017 21:32:15

                                                    Viewing 25 posts - 76 through 100 (of 109 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up