Arduinos and Microcontrollers ref: Rotary Table Mew 249

Advert

Arduinos and Microcontrollers ref: Rotary Table Mew 249

Home Forums Electronics in the Workshop Arduinos and Microcontrollers ref: Rotary Table Mew 249

Viewing 25 posts - 176 through 200 (of 243 total)
  • Author
    Posts
  • #285280
    Zebethyal
    Participant
      @zebethyal

      My Steve Ward style Division Controller cost me under £5.00 for the board and associated electronics, including the LCD, I chose to use 12mm tactile switches and covers (for a cost of £0.48 for 12 of each).

      I did also buy some Chinese keypads (2 for £0.99) but chose not to use them. If I had, I could have used a much smaller/cheaper perfboard as I would not have needed all of the space on the board for the button layout.

      My stepper driver was about £5.00 and good for 2.3A, the PSU was free (old laptop PSU) and a DC-DC Buck converter for £0.87.

      So the controller electronics cost me less than the cost of an LCD shield or even a clone Arduino, and it was not exactly a complicated layout – if I had gone with a Chinese keypad, the kit of parts would have been a board, a PIC microcontroller, some pin headers, an LCD, a keypad, 8 resistors and about 20 wires.

      OK I had to buy a PicKit 3 and a ZIF adapter to program the microcontroller (about £8.50 for the pair), but these can be used on any other PIC projects I may have in the future (unlike dedicating an Arduino to a project – I prefer buying the Atmel chips and programming these with a cheap reusable programmer as well).

      I applaud anyone who comes up with a new project for others to make use of, likewise using off the shelf items, but for ease of use and overall cost the Steve Ward one is hard to beat.

      Advert
      #285283
      SillyOldDuffer
      Moderator
        @sillyoldduffer

        I rather agree with JS on the subject of nested menus. They're a way of controlling a lot of functions with a few buttons, and that can be confusing, or even completely opaque. I have equipment where it's impossible to access the deeper functions without a manual.

        Gary Liming's Rotary Table menu system is fairly clear, but I think I could improve on it if there's sufficient interest. I can suggest three ways input might be simplified, without changing the display, or requiring too much new hardware.

        One, with a 4×4 keypad, thus:

        rt_keypad.jpg

        Cheap waterproof keyboards are readily available; the main problem would be applying the labels. Anyone know how to print on plastic or rubber sheet to make an overlay?

        Two, with a rotary digital encoder and a panel mounted joystick. The mode would be dialled up by turning the Mode switch. Then up, down, right, left and 'go' would be selected by moving and pressing the joystick. Labelling is easy and the switches could be protected inside a box.

        rt_joystick.jpg

        Three, with a Remote Control like this one:

        dsc04218.jpg

        I'm not happy with the remote method: it's expensive, has excess buttons, I would lose the stupid thing, and I don't like the idea of controlling machinery with with a remote that might get sat on!

        Before I go mad hacking Gary's code, does anyone have an interest in having another interface? If so, is there a preferred solution? I don't have an example of a real one to copy and my ideas about the ergonomics of rotary table control are entirely amateur.

        Cheers,

        Dave

        #285284
        Journeyman
        Participant
          @journeyman

          Like the idea of a mill power feed using a stepper. I have started measuring up my little WM14 to fit a motor on the end without a handle already! I await a suitable article in MEW…

          John

          #285285
          Emgee
          Participant
            @emgee

            John S,

            Have you got a link please to the £1-50 keypad for the Arduino, i've seen keypads but not certain they can be used with the Arduino.

            Emgee

            #285289
            Neil Wyatt
            Moderator
              @neilwyatt

              Hmm…

              My GOTO scope controller has many complex menus and entry screens all done with five buttons.

              Entering an RA & DEC in the format HH:MMS DDD:MMS takes ages (compared to just a number of holes!) so adding a numeric keypad is definitely on the to-do list.

              Neil

              #285301
              Michael Gilligan
              Participant
                @michaelgilligan61133

                Love the [in]appropriate smiley things, Neil

                devil MichaelG.

                #285314
                Neil Wyatt
                Moderator
                  @neilwyatt

                  Ha! It seems : followed by S codes for that smiley!

                  Neil

                  #285316
                  Bazyle
                  Participant
                    @bazyle

                    Dave, how about using the serial interface from the main programming pc which presumably is still available. Though many won't have the pc in the workshop I guess some do for other CNC & 3D printing.

                    #285333
                    Muzzer
                    Participant
                      @muzzer

                      Loads of Arduino (and other) stuff at DFRobot – delivery is quick and prices not bad.

                      And CPC Farnell has a Maker brochure. I wish this stuff had been around when I was younger!

                      Murray

                      #285353
                      John Stevenson 1
                      Participant
                        @johnstevenson1
                        Posted by Carl Wilson 4 on 21/02/2017 12:48:02:

                        The whole point of the article was to show those with little or no electronics knowledge that systems such as the one covered are within anyone's grasp. It was intended to demonstrate that electronics and microcontrollers definitely have a place within the sphere of mechanical engineering, as they now have had in the real world for over 30 years.

                        I hoped to show that anyone can use these modular systems to assemble a device in short order that can solve a production engineering problem as it arises.

                        If I saved £1.50 in the process, so much the better.

                        Carl.

                        It's not about the £1.50, it's about building a better mouse trap.

                        Indexers for most people are use occasionally devices and just have a couple of buttons and nested menu's and loads of clicks isn't something that stays locked in your mind.

                        From replies since I have posted it appears that I'm not the only one that thinks that way. All the hard work is done. The sketches are out there, it just needs someone to demonstrate that it is truly a modular system.

                        #285355
                        John Stevenson 1
                        Participant
                          @johnstevenson1
                          Posted by Bazyle on 21/02/2017 18:39:09:

                          Dave, how about using the serial interface from the main programming pc which presumably is still available. Though many won't have the pc in the workshop I guess some do for other CNC & 3D printing.

                          Been done.

                          Got the tee shirt.

                          Looking back thru some files and pictures dated around November 2010 I found a system that I paid to have developed for British Nuclear Fuels, can't say what the job was or they would kill me but it did involve a £80,000 camera [ no typo ] and it had to work as it was in the hot side, and still is.

                          This is the simplified screen we used for testing.

                          Their system was far more complex and had a load of features we would never use and was integral to their software. This was very simple and worked well.

                          It took signals from the PC, via a USB lead to an Arduino UNO and in turn this spat out step and direction to a Leadshine stepper driver.

                          It only needs the USB in and 3 wires out Step +, Dir + and step and dir –

                          The extra wires were for limits, remote start and stop etc.

                          Because I paid for this I still own the files and the rights to use it.

                          #285371
                          Carl Wilson 4
                          Participant
                            @carlwilson4

                            I have to say that looks very good indeed.

                            #285376
                            John Stevenson 1
                            Participant
                              @johnstevenson1
                              Posted by Carl Wilson 4 on 21/02/2017 23:03:35:

                              I have to say that looks very good indeed.

                              It should do for what it cost wink

                              Seriously this was the test software which was just a spin off from BNF's job.

                              Drawback to this is you are tied to a PC which is why I have never pushed it. It was more a reply to Bazyle asking about PC's.

                              #285379
                              David Taylor
                              Participant
                                @davidtaylor63402
                                Posted by Muzzer on 05/12/2016 12:58:21:

                                Like most of our generation, I've been messing with micros for much of my career but the upcoming generation has been born into this wave of technology, which is so much more powerful, cost effective and user friendly than what we were used to. It's fascinating to think where this is leading…

                                I taught myself to program back in the early 80s, have always been interested in the lowest level operation of computers, and always worked as a programmer.

                                And yet not one of my 4 children has shown the slightest inclination to look beyond watching youtube or playing games.

                                I think their saturation in computers has the opposite effect – to me as a teenager they were new and interesting and thought-provoking. To today's kids they're like a washing machine, VCR, or DVR. There is no real wonder to it.

                                There will always be people interested in them but I don't think we're ever going to raise a generation who consider coding a normal skill any more than we ever had a generation who could all do plumbing, or design rockets.

                                I kind of disagree with the user-friendly part too. Writing programs on a BBC micro or Commodore 64 was a lot easier than all the hoops you have to jump through today, whether it be installing an IDE, running a python interpreter or whatever.

                                There is more info about though, and its a lot easier to get it.

                                #285387
                                Zebethyal
                                Participant
                                  @zebethyal
                                  Posted by Emgee on 21/02/2017 16:05:07:

                                  John S,

                                  Have you got a link please to the £1-50 keypad for the Arduino, i've seen keypads but not certain they can be used with the Arduino.

                                  Emgee

                                  Here is a link to some Chinese membrane keypads on The Bay, 2 for £0.99 and free shipping.

                                  These, and the press button ones, are simply a 4×4 matrix connected via 8 wires (4 across, 4 down).

                                  If you want a library for simple integration, there is one on the Arduino Playground, or you can write your own code to do the same thing (can make for smaller code, as you do not need to cater for different sized keypads).

                                  #285432
                                  Baldric
                                  Participant
                                    @baldric
                                    Posted by SillyOldDuffer on 21/02/2017 16:00:53:

                                    Two, with a rotary digital encoder and a panel mounted joystick. The mode would be dialled up by turning the Mode switch. Then up, down, right, left and 'go' would be selected by moving and pressing the joystick. Labelling is easy and the switches could be protected inside a box.

                                    rt_joystick.jpg

                                    Cheers,

                                    Dave

                                    I must admit I had been thinking along slightly different lines, the rotary being used to do the up/down, but also when in jog mode to actually do the movement. In run mode I had considered using a single axis joystick, but then wondered if a rotary, joystick and something to change mode was to many controls. As with so many things what can make a good application bad is the user interface.

                                    Baldric

                                    #285438
                                    Emgee
                                    Participant
                                      @emgee
                                      Posted by Zebethyal on 22/02/2017 07:16:36:

                                      These, and the press button ones, are simply a 4×4 matrix connected via 8 wires (4 across, 4 down).

                                      If you want a library for simple integration, there is one on the Arduino Playground, or you can write your own code to do the same thing (can make for smaller code, as you do not need to cater for different sized keypads).

                                      Thanks for the links but those keypads have a 7 pin socket, not 8. I was hoping to just have a plug and play keypad as I have no understanding of programming a sketch for Arduino. I see a 7 pin socket on the UNO and a further set of 9 upward facing pins adjacent to the socket, would the keypad connect to either of these ?

                                      Thanks, Emgee

                                      #285454
                                      Zebethyal
                                      Participant
                                        @zebethyal
                                        Posted by Emgee on 22/02/2017 13:19:44:

                                        Posted by Zebethyal on 22/02/2017 07:16:36:

                                        These, and the press button ones, are simply a 4×4 matrix connected via 8 wires (4 across, 4 down).

                                        If you want a library for simple integration, there is one on the Arduino Playground, or you can write your own code to do the same thing (can make for smaller code, as you do not need to cater for different sized keypads).

                                        Thanks for the links but those keypads have a 7 pin socket, not 8. I was hoping to just have a plug and play keypad as I have no understanding of programming a sketch for Arduino. I see a 7 pin socket on the UNO and a further set of 9 upward facing pins adjacent to the socket, would the keypad connect to either of these ?

                                        Thanks, Emgee

                                        Just re-checked the picture on the Ebay listing I linked to – it definitely has an 8 pin connector.

                                        Most of the items marked as suitable for use with an Arduino are not plug and play, they are merely something mounted on a PCB, maybe with some extra electronics and a pin header to interface with it. The assumption is that someone is going to write a sketch to make use of it, or combine a number of libraries in a sketch if they don't feel like writing it all from scratch.

                                        I am sure you are aware that the Arduino is merely a microcontroller on a board with no intelligence other than what you upload via a compiled sketch to it – it is in effect a blank canvas.

                                        If you want to have, for example, an LED light up, it makes no difference to the Arduino if it is attached to pin 1, or pin 5, that is your choice, just so long as you tell it, in your scetch, which pin to send the voltage out of in order to light the LED.

                                        #285462
                                        JasonB
                                        Moderator
                                          @jasonb

                                          The one in your link is a 4x3 matrix so 7 pin socket

                                          Similar 4×4 pads do have 8 pins such as this

                                          #285500
                                          SillyOldDuffer
                                          Moderator
                                            @sillyoldduffer
                                            Posted by Baldric on 22/02/2017 12:51:43:

                                            Posted by SillyOldDuffer on 21/02/2017 16:00:53:

                                            Two, with a rotary digital encoder and a panel mounted joystick. The mode would be dialled up by turning the Mode switch. Then up, down, right, left and 'go' would be selected by moving and pressing the joystick. Labelling is easy and the switches could be protected inside a box.

                                            I must admit I had been thinking along slightly different lines, the rotary being used to do the up/down, but also when in jog mode to actually do the movement. In run mode I had considered using a single axis joystick, but then wondered if a rotary, joystick and something to change mode was to many controls. As with so many things what can make a good application bad is the user interface.

                                            Baldric

                                            Hi Baldric,

                                            Not much progress as I've been diverted on to parent sitting; my mum is just out of hospital.

                                            I hadn't thought of using the switches as you describe, but it is logical! Just goes to show why interfaces are difficult to design. We all expect things to work our way. I was going to jog by pressing the joystick, but the rotary encoder has a press switch too.

                                            At the moment I'm tendiing towards a matrix keypad with the option to control it with a serial interface as suggested by Bazyle as well. It wouldn't be difficult to do away with the physical USB connection with a Bluetooth wifi module and put a graphical interface on a tablet.

                                            A big advantage of a keypad is that mode-select can be done with a single keypress.

                                            My first step has been to check there are enough spare pins on the Arduino. 8, 9, 4, 5, 6, 7 and 10 are used by the DF Robot; 2, 3, 11, A0, A1 and A2 are used to control the motor and for temperature sensing; 0 and 1 are the serial interface. This leaves 5 spare pins (12, 13, A3, A4 and A5) when 7 are needed for a 4×4 keypad.

                                            An Arduino Mega has plenty of spare pins but gosh, they're about £10! So I think I'll dump the temperature sensors and repurpose A1 and A2.

                                            Next step is to separate the motor drive code from the existing key button functions; at the moment they are interleaved. Then I can apply different control interfaces to work the motor. As an armchair project, it's going rather well. There will be tears when I start coding and reality bites me!

                                            Dave

                                            #285502
                                            Frank.N Storm
                                            Participant
                                              @frank-nstorm18349

                                              Although I'm not building a motorised rotary table, I'm experimenting with stepper motors and Arduinos at the moment. So I did read this thread with much interest. I have to admit I was a bit shocked when I checked the links given by J.Swift on the 7/2. One TB6560 driver for £ 11.99! Without knowing this thread (and because I fried the driver I used before) I ordered a couple of drivers via Ebay, and among them I got two such drivers for $ 9.90, postage free.

                                              And now, Mr. Costa: the Chinese are not stupid, and they know about VAT taxes etc. in Europe. On that famous customs slip they stated (in that case) "Electronic parts, value $ 3.00" . Not that it would make a difference, as in my country values below around £ 50.00 are not taxed – the expenses would cost more than the tax. I really don't think that anywhere in Europe imports in one-digit values are taxed – if I'm wrong, how many cents/pennies then?

                                              So, don't be afraid of ordering in China – but naturally it won't be in your letterbox tomorrow.

                                              Regards, Frank

                                              #285517
                                              Zebethyal
                                              Participant
                                                @zebethyal
                                                Posted by JasonB on 22/02/2017 16:16:01:

                                                The one in your link is a 4x3 matrix so 7 pin socket

                                                Similar 4×4 pads do have 8 pins such as this

                                                My mistake – I meant to link to this one here, same price of £0.99 for 2 but 4×4 matrix.

                                                #289114
                                                SillyOldDuffer
                                                Moderator
                                                  @sillyoldduffer

                                                  For anyone interested the latest update to my keypad based indexer and a pdf to read are at this Dropbox Link

                                                  Using a cheap matrix key pad like this:

                                                  dsc04269.jpg

                                                  It provides the same functions as the Gary Liming's program, but has been extended in various ways. (Mainly the ability to type in numbers, PAUSE, REWIND and control via the USB port.)

                                                  • 'A' sets Angle mode. The angle may be a decimal. eg. 41.75°
                                                  • 'B' sets Bump mode (aka Jog)
                                                  • 'C' sets mode to continuous (ie motor turns until stopped)
                                                  • 'D' sets DivStep mode.
                                                  • '*' starts and stops the motor, abandoning the current operation. (The next operation will continue from the stop position, see '1' and '5' for palliatives.)
                                                  • '0' toggles motor direction between clockwise and anticlockwise
                                                  • '1' rewinds the motor to the start point of the previous operation. Up to 10 previous operations may be rewound.
                                                  • '5' pauses or restarts the current operation, which then completes as normal.
                                                  • '9' enters ratio mode. The ratio may set to any integer value.
                                                  • '#' allows control numbers to be entered, for example to set a required angle, or the bump distance. Numeric entry is ended by typing a second #. In number mode '*' doubles as the decimal point.

                                                  The display uses the DFRobot, though it's push buttons are ignored. It is not difficult to substitute a cheaper 1602 display only board or an I2C display. In this example, Bump is selected with 10 steps clockwise. Pressing '*' jogs the motor. A Bump too far may be undone by pressing '1' to REWIND it, which is handy.

                                                  dsc04266.jpg

                                                  When the motor is running a progress countdown is displayed.

                                                  If you try this please report any bugs. Although there's been lots of testing it's amazing how the bleeding obvious still slips through!

                                                  The pdf includes more examples and the wiring diagram.

                                                  Dave

                                                  #309285
                                                  Centurian
                                                  Participant
                                                    @centurian

                                                    I've built a driver for my turntable exactly as specified in the article and cross checked with Gary Limings articles. My problem is that when I power it on it works as advertised to the point where it displays the correct startup screen I.E

                                                    Select Mode, Mode = Step. If I press Select nothing happens. Pressing Left scrolls through the Modes. Pressing Up also scrolls through the modes and Down Scrolls through the modes in the reverse direction. Pressing the "Right" button does nothing. Pressing reset does a reset and also switches off the run light on the stepper driver module. At all times whilst power is applied the actual stepper motor is locked. I have tried another display module and also a different processor module. ( an Arduino Mega) I have also tried it with no stepper driver connected. all I get is the above. Does any one have a clue what I'm doing wrong? I have been very careful in my wiring and anyway I have tried it with just the Arduino Uno and display shield.

                                                    #309303
                                                    SillyOldDuffer
                                                    Moderator
                                                      @sillyoldduffer
                                                      Posted by Centurian on 29/07/2017 07:05:01:

                                                      Select Mode, Mode = Step. If I press Select nothing happens. Pressing Left scrolls through the Modes. Pressing Up also scrolls through the modes and Down Scrolls through the modes in the reverse direction. Pressing the "Right" button does nothing. Pressing reset does a reset and also switches off the run light on the stepper driver module.

                                                      Does any one have a clue what I'm doing wrong? I have been very careful in my wiring and anyway I have tried it with just the Arduino Uno and display shield.

                                                      Hi Centurion,

                                                      This sounds like a well known problem that was discussed earlier on this thread. See my post on Page 4 and John Swift on page 8.

                                                      Those buttons are not individual switches. Instead, they cause a voltage change when pressed. The Arduino measures the voltage and decides which button has been pushed. Your problem is probably down to a small difference between the various versions of the Display Board. (Apart from there being a Mk1 and a Mk2, there are plenty of clones.) To fix it all you have to do is alter a few numbers in the Arduino Sketch to match your particular display board.

                                                      The code is the six 'if (Key_in … )' statements right at the end of Gary's sketch. It looks like this:

                                                      int read_LCD_button() // routine to read the LCD's buttons
                                                      {
                                                      int key_in;
                                                      delay(ADSettleTime); // wait to settle
                                                      key_in = analogRead(0); // read ADC once
                                                      delay(ADSettleTime); // wait to settle
                                                      // average values for my board were: 0, 144, 324, 505, 742
                                                      // add approx 100 to those values to set range

                                                      if (key_in > 850) return NO_KEY;
                                                      if (key_in < 70) return RIGHT_KEY;
                                                      if (key_in < 250) return UP_KEY;
                                                      if (key_in < 450) return DOWN_KEY;
                                                      if (key_in < 650) return LEFT_KEY;
                                                      if (key_in < 850) return SELECT_KEY;

                                                      }

                                                      Note Gary Liming's comment

                                                      // average values for my board were: 0, 144, 324, 505, 742
                                                      // add approx 100 to those values to set range

                                                      In the example above are the key_in values I used. (850, 70, 250, 450, 650, 850) You might try those values first.

                                                      If that fails, download this sketch and temporarily install it instead of Gary's program. All the sketch does is display the actual number generated by your keys. Write them down, then change the key_in values in Gary's sketch as per his +100 comment and re-install it.

                                                      With luck all should now be well.

                                                      Dave

                                                    Viewing 25 posts - 176 through 200 (of 243 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