Discussion in 'Software and Programming' started by cfellows, May 21, 2012.
Beautiful work on a difficult piece to make.
Thank you. In the meantime that mill got cnc-ed
Greetings! I'd be curious to know how you handle odd-numbers of divisions.
Here is a link to my attempt 4 years ago:
I'm afraid that when you work directly from the stepper, the odd number steps won't come out quite right ( like the problem dividing plates solve for a traditional dividing head.
My latest idea (yet to be tried) is to drive a rotary table with it's big-reduction worm gear, and create a very fine number of steps-per-degree that would render the error inherent in the odd counts to an insignificant level. So I'm curious as to how you've addressed this issue.
Love your mounting block/vise setup - a technique I will use when I resume the project.
love the polka dots! But white is a bit ordinary, I'd have going with turquoise or lime green, - for full psychaledic effect. Mind you, having afterimage spots dancing before your eyes while machining *might* not be advisable
I also love the bare bones, close to the machine quality of the small microprocessors. Newbies to microprocessors think these are "computers" in the modern sense, with (quasi)infinite memory and processing power. As someone trained on machines with limited resources, you understand the need for (and value of) 'elegant' code. Quasi-infinite resources induces laziness and code bloat. Another thing that is lost on many is the necessity for closed loop thinking - the code has to be in touch with the 'real world' ! Mechanics, power supplies, electronics, code - you have to think it all as one system.
Lime green sounds tempting...
Anyway, I haven't used the polka dot dividing head almost at all so far, but I've been using my lathe dividing head for a year now without any issues whatsoever. I make tiny stuff and I haven't been able to detect any division errors. In the type of stuff I do, division errors will be shown without mercy in the final product and I'm seeing absolutely none.
Here's an example of the things I've made using the lathe dividing unit:
The diameter of the larger gear is about 12mm and the smaller one is about 2.5mm.
Hi Chuck, did you happen to finish the larger Nema 34 project? liqwrench
Here in Seattle, WA, I am in the process of completing the Arduino spin indexer project. Being my first Arduino project, if if were not for contributors like you Chuck as well as Gary Liming and many others, I would not have been able to nor would I have tackled this great project which will be a addition to my shop. Thank you so much for your input.
I really must thank Chuck and others for their valuable information. Having no experience of coding the info here has been most useful.
My only problem with Chucks code (from post #50) or my setup is the lack of reverse direction. Can anyone tell me where I may be going wrong?
so ive tried reading thru this , the table for dummies and the other one i could find, and im more lost and confused than when i started.
im pretty sure im having the end problem of 1200 steps per rotation.
i changed the line, change line 'for(int i = 0; i < tm; i++)' to 'for(int i = 0; i < 1200; i++)' but... i sstill get 1080 steps per 360 not 1200
my problems are compounded by the driver im using requiring an extra wire for enable.
i had it all figured out and moving, but in the process of trying to fix the numbers i have lost the working sketch for movement.
the scrolling is killing my wrist and the constant walking in and out from pc to shop is pissing my wife off, frustrated to the point im about to cry
china 4th axis from ebay, all the info i can get is....
Angle: 0.3 degrees / step
Reduction ratio: 6:1 (Synchronous belt deceleration mode)
Stepper motor: 2 phase nema23 stepper motor
tb6600 driver, uses enable, pulse and direction signals.
i have enable set to pin 12. enable low or high seems to do something but im not exactly sure how to use it.
if someone who actually understands this code could look at it and tell me what i did wrong i would be so happy.
i currently have it to where it hums when i try to move it, when i put in 360 degrees it says steps 1080
if i could just enter the # of steps i want into the jog prompt i would be sooooo happy. all i need is simple divisions of 2 3 4 5 6 and 8.
i can do that math real easy on my own, 240 steps = 5 divisions, a to jog..... im just not getting the code.
lol, i got it, in //setup vars i changed it to 1200 steps 1 raito, and made the multiplayer 1
also in , float getdivisions, at the botom of that snippet, i changed degrees to = 1200/num
this gives me 1200 steps labeled as degrees. im sure i can change that text too, but you know, gota find it.
and if i enter 240 steps, and hit A 5 times i get 5 divisions with my 0 back at 0.
hope this helps anyone else with the 1/3 problem.
and still, if anyone has a working program for 1/3 raitos with degrees and divisions, i would not mind it at all.
#define stepDir 2 //Digital Pin 2 outputs Step Direction
Pin 2 of the Arduino to the dir pin of the driver [TB6600 pin is balled DIR]
i also cant get reverse to work using a tb6600,
im using the code from the dummies thread.
i cannot find this or anything like it in the script
#define stepDir 2 //Digital Pin 2 outputs Step Direction
My Bad - looked at script post #50
The one you have in 276 shows dir as pin # 3 so pin 3 to dir+ on the 6600 with dir- of the 6600 connected to gnd.
const int dir = 3; // connect pin 3 to dir
yes, thats how i have it and what it says, line 276, im assuming you meant 27.... my editor does not have lines labeled... is there a better arduino code program ? im used to using context, where i can search words, and scroll straight to numbered lines, and this has none of the good stuff.
what currently happens, is when i hit A it moves forward, when i hit B it makes a clicking sound, when i hit A again it sometimes advances, and sometimes makes the clicking sound, if i hit A again after the clicking sound it advances forward again.
yellow is on pin 3 and goes to Dir + , green is on pin 2 and goes to Pulse + , orange is connects to a ground, and goes to all 3 negatives.
enable is wired but not used in the code.
o i have not checked the polarity of the wires on the motor, i may have one set wrong. but im pretty sure its wired the same as all my other working motors.
Dug up my test platform. ill load up the code and see what happens. Hiding from the Honey Do List - Back later . .
Separate names with a comma.