Notifications
Clear all

Electronic Indexer  

  RSS

Millmike2
(@millmike2)
Active Member
Joined: 5 months ago
Posts: 6
2020-02-12 7:05 pm  

I am just about to embark on an electronic indexer for my 2.5 D milling machine. It will be used to make gears, model engine camshafts etc. Its based on an existing dividing head with a 40:1 ratio and this will be driven by a 200 step stepper through a toothed belt drive having a 4.5:1 reduction. Altogether the resolution will be 1/100 of a degree (per step of the stepper). I am OK with the electrical circuitry but I need help with the sketches 1) entering data using a keypad, 2) reading out the programmed steps on a display and 3) incrementing the stepper according to the displayed increments ( of 360 degrees). The angular increment of the indexer will be initiated by push button or external signal from my milling machine and when the angular increment is completed, a signal will be sent back to the mill to increment the mills program. I might add a position transducer to the stepper to display any missed steps. Pretty simple but I am a newbie to programming in C. I shall make use of the stepper and display  tutorials already published but don't see a keypad tutorial.

The requirement to send a stepper a predetermined number of steps based on a displayed key pad entry would be useful for many applications. 


Quote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1767
2020-02-12 7:36 pm  

You probably already took care of this.  But just in case.  Don't forget to add a servo motor or solenoid to unlock and lock the divider head between indexing it.

DroneBot Workshop Robotics Engineer
James


ReplyQuote
chucketn
(@chucketn)
Active Member
Joined: 9 months ago
Posts: 18
2020-02-13 1:51 pm  
Posted by: @millmike2

.... I shall make use of the stepper and display  tutorials already published but don't see a keypad tutorial.

The requirement to send a stepper a predetermined number of steps based on a displayed key pad entry would be useful for many applications. 

 

There is a build thread  That discusses just what you are looking for here. Only difference is this thread is for a rotary table. The original code was developed by Bob Pratl. I can't remember where I downloaded the original code. Most of it is listed in the thread above. You may have to join the forum to access the thread. There are links in the thread to other builds, including an indexer.

I built a Arduino based controller for a rotary table using Bobs code.

 


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 1 year ago
Posts: 970
2020-02-13 3:38 pm  

@millmike2

The keypad is probably so simple it wouldn't warrant an episode of DBW.

Here is the setup:

And here is the code to play with it:

/* @file CustomKeypad.pde
|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates changing the keypad size and key values.
|| #
*/
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); 

void setup(){
  Serial.begin(9600);
}
  
void loop(){
  char customKey = customKeypad.getKey();
  
  if (customKey){
    Serial.println(customKey);
  }
}


ReplyQuote
Millmike2
(@millmike2)
Active Member
Joined: 5 months ago
Posts: 6
2020-02-13 3:42 pm  

@robo-pi

Thanks for your suggestion. Yes I had given some thought to this. The indexer is a worm drive with backlash that can be adjusted. As it is a new unit it is reactively backlash free, but I need to measure it. My thought was to implement a disc brake mounted on the indexer output  spindle using a pneumatic cylinder for application sequenced from the controller. To save building the brake I was going to use a disc brake assembly designed for a pedal cycle. I am not sure how much force I need on the periphery of the disc to prevent any movement during machining but a few experiments will be helpful. I notice they are being used as lathe spindle brakes to good effect. I need to get the code underway, this is the major hurdle for me.


ReplyQuote
Millmike2
(@millmike2)
Active Member
Joined: 5 months ago
Posts: 6
2020-02-13 4:00 pm  

@chucketn

Many thanks for your link to the digital rotary table. I have had a quick look and this seems to more or less what I need for the basis of the unit. If you remember where you got the original code, I would be appreciative of knowing. Very nice series of photos showing the build. Looks like your unit came out pretty good, good electronics packaging too. I am sort of pleased its been done before a couple of times. Should short circuit the development.


ReplyQuote
Millmike2
(@millmike2)
Active Member
Joined: 5 months ago
Posts: 6
2020-02-13 4:05 pm  

@pugwash

Many thanks for keypad code. Yes you are right, it is very simple and would not warrant a tutorial just for this.

Well worth joining the forum. Very thankful of the help I am receiving. 


ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 1 year ago
Posts: 1767
2020-02-13 4:25 pm  
Posted by: @millmike2

My thought was to implement a disc brake mounted on the indexer output  spindle using a pneumatic cylinder for application sequenced from the controller. To save building the brake I was going to use a disc brake assembly designed for a pedal cycle.

An indexer should have a locking lever built right into it.   Mine does.  I index it by hand with the hand crank.  But if I don't lock it after indexing it definitely causes some chatter in the cutting process.   But yeah, there should be a locking lever built right into the indexer.   All you should need to do is have a way to automate that locking lever.   You shouldn't need to build a brake for it.

DroneBot Workshop Robotics Engineer
James


ReplyQuote
Millmike2
(@millmike2)
Active Member
Joined: 5 months ago
Posts: 6
2020-02-13 6:36 pm  

@robo-pi

Yes indeed it does have a locking lever and like you I lock the shaft before machining. Yes I could automate that probably by driving it with a double acting air cylinder. I am not quite sure what part of the spindle it bears on, but I want to make sure I don't overtighten it and can also get it loose once tightened. Need the possibility of higher air pressure to unlock then the locking pressure. I can arrange that. 


ReplyQuote