Electronic Dividing Head using the Arduino

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

cfellows

Well-Known Member
Project of the Month Winner
Joined
Aug 25, 2007
Messages
3,890
Reaction score
715
I've made some strides on my Arduino powered dividing head the past few days. Here's a little background for what I am doing. First, the Arduino micro controller.

db5e6546.jpg


Available online for under $30, has 32K memory, numerous analog and digital inputs and outputs, including serial and PWM.

Next, the Sainsmart LCD display and keyboard shield

b829d9dc.jpg


This board is called a shield because it is pin compatible with and piggybacks right on top of the Arduino board. It has a 2 line x 16 character display and 5 input keys plus a reset. The keys are configured like the cursor keys on a PC having a left, right, up, and down as well as a select. So, with this shield in place, the microcontroller can be used with only a power supply and doesn't have to be tethered to a computer. The keys provide input and the LCD provides the display.

Here is the Sainsmart shield mounted on the Arduino...

f89430c6.jpg


The Sainsmart gets its power from the Arduino.

Another picture

93e96bf4.jpg


The Arduino is programmed by hooking it up to your PC through a USB cable. This also provides power to the Arduino board. A free programming environment is available for the PC and allows you to develop programs in a language that looks almost exactly like C. There are a host of standard libraries for interfacing to LCD's, keyboards, wireless, serial devices, and others. You write the programs and compile them on the PC. The compiler then automatically downloads the program to your Arduino. Once the program is loaded on the Arduino, you can decouple it from the computer and run it off a separate power supply from 9 - 12 volts. The program will stay in the Arduino memory even when the power is switched off.

423c8d56.jpg


So this is the basis for controlling my electronic dividing head. The up and down arrow keys will be used to set the number of divisions I want, then the left and right arrow keys will be used to step forward or backward one division at a time. The program I have written will calculate the number of stepper steps need for each division and keep track of the position I'm on. The display shows the number of divisions and the current dividing head position.

I have purchased a stepper driver board that is about the size of a postage stamp and will power a stepper of up to 2 amps, 35 volts. I still have to select the stepper motor I want to use and build the mechanical part of the dividing head. Still have a few challenges ahead of me.

Chuck
 
That is a great idea Chuck! I wonder if you could just send step and direction pulses to a Gecko drive. They can source 7 amp. Not so much for the driving force but for the holding power.

Anyway, awesome project.
 
Chuck, or in fact anyone else who is going along the electronic RT route. here are a couple of links on to how I did things to mount the stepper to the RT.

You don't need to follow religiously, but they will give you an idea of what is required to get a backlash free with smooth movement RT, and to keep the swarf out. Once assembled, the slot in the tube is covered over with tape.

Vertex type

http://madmodder.net/index.php?topic=4040.msg44911#msg44911

Arc Euro type

http://madmodder.net/index.php?topic=4730.msg52166#top

Hope it helps someone


John
 
Looks really nice so far Chuck.
The stepper board you're looking at sounds like a Pololu driver. Is that the case? The A4988 version is quite good (certainly good enough for a dividing head), and really difficult to kill. By which I mean the short protection actually works. I tried it.

I'm not sure too much holding torque will be needed, because of the worm drive. The one thing you will need to be careful of is that the pololu driver will get extremely hot if you don't give it a good heat sink, and even then will roast if you feed the motor more than about 1.25A. I have some heat sinks that work marvelously on the pololu drivers (if those are what you are using), and would be happy to send one your way.

Best of luck.
 
stevehuckss396 said:
That is a great idea Chuck! I wonder if you could just send step and direction pulses to a Gecko drive. They can source 7 amp. Not so much for the driving force but for the holding power.

Anyway, awesome project.

Thanks, Steve. I don't see why this wouldn't work with pretty much any stepper driver, incluing the Gecko. There are two outputs from the Arduino... direction and step start/stop.

Bogstandard said:
Chuck, or in fact anyone else who is going along the electronic RT route. here are a couple of links on to how I did things to mount the stepper to the RT.

You don't need to follow religiously, but they will give you an idea of what is required to get a backlash free with smooth movement RT, and to keep the swarf out. Once assembled, the slot in the tube is covered over with tape.

Vertex type

http://madmodder.net/index.php?topic=4040.msg44911#msg44911

Arc Euro type

http://madmodder.net/index.php?topic=4730.msg52166#top

Hope it helps someone


John

John, I'll have a look at your thread. I'm sure there are number of issues you have thought of that I will miss otherwise.

Jeremy_BP said:
Looks really nice so far Chuck.
The stepper board you're looking at sounds like a Pololu driver. Is that the case? The A4988 version is quite good (certainly good enough for a dividing head), and really difficult to kill. By which I mean the short protection actually works. I tried it.

I'm not sure too much holding torque will be needed, because of the worm drive. The one thing you will need to be careful of is that the pololu driver will get extremely hot if you don't give it a good heat sink, and even then will roast if you feed the motor more than about 1.25A. I have some heat sinks that work marvelously on the pololu drivers (if those are what you are using), and would be happy to send one your way.

Best of luck.

Yes, it is the pololu driver. I've sent you a private message regarding the heat sink. I haven't selected a stepper motor yet, but with a 30:1 worm reducer and no real load on the dividing head, I'm guessing it won't take much of a stepper.

Chuck
 
Chuck,

I don't know what sized RT you have, but both I have converted (a 6" and a 4"), plus my dividing head when I get around to it, all or will use the recommended 180N steppers, which are rated at 2.5amps.

OK, go small if you only want to move the table, but if you are going to use it for machining, even the 2.5 amp one that I use is a little underpowered, and I have to be careful on my depths of cut and feed speeds to stop them stalling.

I would have preferred something around 4.5 to 5 amps to work really comfortably, but my unit just won't give that amount out.

John


Sorry, should have shown location of stepper motors

http://www.arceurotrade.co.uk/Catalogue/Stepper-Motors/Stepper-Motors

2nd or 3rd one down. They work out to approx 18kg/cm holding power.
 
I have two candidate steppers in my surplus stepper motor box. Both are bipolar and smaller than the NEMA 23, but I think either would suffice for my needs. This will strictly be a dividing head, not a rotary table and will be used just for positioning, not for machining.

One motor is a 7.5 degree, 48 step motor with 16 oz in holding power. It requires 12 volts and the resistance per phase is approximately 28 ohms which works out to little less than half an amp. The other motor wants 5.2 volts at 0.9 amps and the resistance per phase is about 6.2 ohms. This second motor is a 1.8 degree and has a holding power of 30.2 oz in.

At the moment, I'm leaning toward the first motor because I think 48 steps per rev is more than adequate for a dividing head geared down 30 : 1. This gives me an overall resolution of 1440 : 1. I'm also thinking that the Pololu driver I have will easily handle half an amp with no problem. And, finally, both the Arduino and the motor will operate off 12 volts which means I only need one power supply. Anybody see a flaw in my thinking?

Thx...
Chuck



 
I'd go for the motor with more steps/rev and more torque. You'll get smoother, (and more importantly) faster motion.
 
Help! :-[

Not having so much luck getting my stepper motor to work.

I have the following loop to step the stepper forward.

write direction pin HIGH Forward (or Backward depending on direction setting);
loop:
write step pin HIGH;
delay (10);
write step pin LOW;
delay (10);
repeat the loop n times (n=33 in this case)

It will step one step forward, then nothing unless I press the back button twice, then the forward button again in which case it moves one step forward. It never moves backward...

I know this is probably pretty fundamental stepper motor operation, but I can't make it work!

Thx...
Chuck
 
I'm assuming the delay is in milliseconds?
Things to check:
Are the leads wired correctly?
Is the separate motor voltage connected to the driver, and does it share a common ground with the controller?
What is the current pot set at?

Upload the code, maybe it's something subtle there.
 
Jeremy_BP said:
I'm assuming the delay is in milliseconds?
Things to check:
Are the leads wired correctly?
Is the separate motor voltage connected to the driver, and does it share a common ground with the controller?
What is the current pot set at?

Upload the code, maybe it's something subtle there.

Yep, Jeremy, it was subtle! I took a picture of the arduino and driver chip to upload and when I got to looking at it, I discovered my error. I thought I was using pins 3 for direction and 4 for step, but I got caught by the old zero base problem. The third pin is really pin 2 and the fourth pin is really pin 3. I just changed the program to work with 2 and 3 and it works great! I do have a bug when the position rolls over the top and back to zero that I need to work out but that will be simple.

Since I took the picture of the circuit, here it is. Not too pretty, but I will tidy up the wiring when I finalize the whole thing.

5cb2b6ed.jpg


The resistors are 12K pull-down resistors. The leads from the stepper driver are soldered to the LCD / Keypad shield to pins which are carried through from the Arduino. I don't have the stepper leads hooked up in this picture. I'm also not using the half step, quarter step, enable or sleep functions. Don't think I'll need them.

The 12v, .5 amp stepper has a lot of torque and holding power. And even though it's 7.5 degrees per step, I'll be driving the dividing head through a 24 pitch, 60 tooth worm gear. That will give me a huge amount of torque and holding power, not to mention 2880 steps of resolution.

I'm Pumped!!! :big: I'll fix my program bug then take video to upload, maybe tomorrow or this weekend.

Chuck
 
Glad to hear everything is working now. I can't wait to see this working!
 
The worm wheel I want to use for my dividing head is a 60 tooth, 24 pitch bronze worm gear. Turns out I don't have a worm for it and I'm too impatient (and cheap) to order one from SDP. So, guess I have a go at making one. I figured if I replace the 48 tooth gear on my lead screw with a 46 tooth and set the quick change gear box to 8 TPI, that should get me 7.66 TPI which is very close to the 7.64 required for 24 pitch. I've got a tungsten carbide acme threading insert which I ground back to the right depth profile so we'll see how this goes.

7b298f59.jpg


I'll be using the ER16 spindle for my dividing head spindle.

Chuck
 
Here's a video of the preliminary setup. This doesn't include the dividing head, but does have the Arduino, the stepper motor driver and the stepper. You can see how I'm able to control the divisions per rotation of the stepper. I can change the program to work with any resolution by changing one variable.

http://www.youtube.com/watch?v=ZRcPKY3APM0&feature=youtu.be

Chuck
 
Hi Chuck

Excellent idea and this has been needed for some time with an Arduino.

I recently did something similar to make a small dividing head for my horizontal milling machine: http://www.raynerd.co.uk/?p=1578

Good luck with the build and I look forward to further updates! PM sent to you as well.

Chris
 
Here's some pictures of the dividing head. I've hooked it up to the arduino and it works. More than enough torque and holding power using the NEMA 23 motor. The ratio of the timing pulleys is 12 : 60 or 1:5.

6577e64c.jpg


de8c2faf.jpg


fbddb469.jpg


The spindle is an ER20 with a 3/4" shaft running in sealed ball bearings.

Chuck
 
Nice one Chuck, :bow:

At least you won't be confused by all the hoohaa associated with a mechanical one. :p

Best Regards
Bob
 
Back
Top