Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CNC lathe stepper motor issues

Status
Not open for further replies.

packet_loss

New Member
I'm not 100% sure where to put this thread, but I'm gonna try here first.

I'm building this lathe, mainly just to say I did. I've been a cnc programmer and tool and die maker for 18 years, so making a machine tool is a pretty natural inclination. However, this machine will never make a chip. I have worked in many shops where the owner let old manual machinery sit and rot even though they still work great. I've tried a thousand times to convince some of these people to let me turn the manual equipment into a full fledged, top notch CNC using fairly cheap stepper motors, driver boards and EMC Linux for the actual control. Not a single taker. I'm building this machine as a business card, more or less.

Since this machine will never actually cut anything I tried to get away with using small 5V motors to drive each axis, FAIL! Well, kinda fail? It was actually kinda of strange, what happened, I'm hoping you guys can shed some light. First, lemme show you a few pics, everybody likes project pr0n I hope.

Nice view from behind the spindle. That's the spindle on top and the Z axis stepper motor underneath. This was before the leadscrew was installed.
**broken link removed**

Underneath you get a fairly clear shot of the leadscrew and the nut that was eventually JB welded to the carriage base.
**broken link removed**

The 'new' stepper.
**broken link removed**

More pics **broken link removed** if you're interested.

Alright, so here's a few details. The stepper motors were 5V 65Ω (part#LA82120-MI), these were being driven with an NTE2013. I should have looked closer at the specs for NTE2013 since I didn't catch the 12-24V for the voltage and my motors are rated 5V. I figured I would still test the circuit to make sure it worked since they never work for me anyway. I figured if it did work 12 was way more than 5, that just means it'll be stronger, I think. I just wont let it run but a hot second and it shouldn't burn anything up. So I do that and much to my amazement the circuit works! Well, kinda. Below is the schematic I used.
**broken link removed**

I have not built my cable yet for emc so I used the program and instructions found here. When I hit start the motor began to vibrate. I thought maybe it just could not turn the load so I hooked up another loose one I have. The output shaft is so small on the 5V motor that I couldn't really tell what is was doing exactly. At any rate it wasn't working properly and the most convenient thing to blame it on was having a 5V motor connected to a 12V supply, so I went and bought bigger motors. I was able to get three of these and a few other items for $11 at my local parts house. I have no idea what voltage these are rated for and to make things worse the color coded wires are different than the schematic and my other motors. These have brown, yellow, blue, red then two whites. I did my best guessing job and started it up, same thing, vibration. The output shafts on these are a 1/4", so I could see what was going on with these, they were going back and forth one step, thats why they seemed to be vibrating only. I am assuming the small motor was doing this too but I just couldn't see it or feel it. Since the colors don't match my schematic and I have no idea how to reconcile that I can't help but think I hooked both motors up wrong and that's my whole problem.

Well, if that wasn't too much of a painful read and you're still with me I'd love some help on how to translate these colors. Thanks in advance for any help you guys can give me!
 
Just a quick guess, but it sounds like you have the motors wired out of phase..

EDIT: If you disconnect the motor wires from the ULN2003 and use a battery...PP3 for example...and briefly touch each wire in turn, you should be able to work out the sequence.

With the wires disconnected, with an Ohmmeter, measure from one wire to each of the rest and note the resistance. A coil wire going to a common wire will have half the resistance of a coil wire going to a coil wire. Using your image above, measuring orange to yellow may give you 6 Ohms, whilst measuring either orange or yellow, to red, will give you 3 Ohms. The wire(s) with the least resistance to the others will be your 'common'. I say wire(s) because your 'new' motors have 6 wires, two of which will be common.

Again, using the above image, with the PP3 Positive terminal connected to the red wire, briefly touching the yellow, black, orange & brown wires in turn, to the Negative, should step the motor in one direction. Reversing the sequence should step it in the other direction.

To aid in finding the correct sequence, put some tape on the motor shaft, sort of like a a flag.

HTH.
 
Last edited:
Woohoo, I have learned somethin'! I was able to use my meter to figure out the windings then my power supply to figure out the sequence and it worked like a charm. However(you know there has to be a however), I did have some weirdness. I discovered, by accident, that I can totally disconnect my power supply from pins 8 and 9 from my IC and nothing changes. What's up with that?
 
I discovered, by accident, that I can totally disconnect my power supply from pins 8 and 9 from my IC and nothing changes. What's up with that?

Pin8 must be connected somewhere (accidently). Operate the stepper for a while with pin9 unconnected to +12/24V and the chip will cross "river Jordan".

Just enough back EMF from the stepper will take care of that. :)

The diodes within the IC are important when driving inductive loads (such as steppers).

Boncuk

P.S. A buffer between parallel port and ULN2003 will protect the port of the PC.
 
Last edited:
The first image looks like you built that from an old erector set. And is that a joint in your ashtray :)


**broken link removed**
 
Last edited:
How about doubling inputs and outputs of the ULN chip for higher current?

Instead of leaving three inputs unused you could as well add one and use the ULN2803 instead.

Paralleling inputs and output might be useful.

Here is a driver circuit including an input buffer (for a longer life of the parallel port in case of any failure)

Boncuk
 

Attachments

  • ULN2803-DRV-SCH.gif
    ULN2803-DRV-SCH.gif
    17.1 KB · Views: 2,222
  • ULN2803-DRV-BRD.gif
    ULN2803-DRV-BRD.gif
    20 KB · Views: 1,921
The first image looks like you built that from an old erector set. And is that a joint in your ashtray :)

Looks like one made with the lathe. :)
 
Last edited:
The first image looks like you built that from an old erector set. And is that a joint in your ashtray :)


**broken link removed**
It's a new erector set, I'll have you know and yes, that is a joint. California orange if you were wondering :D
Pin8 must be connected somewhere (accidently). Operate the stepper for a while with pin9 unconnected to +12/24V and the chip will cross "river Jordan".

Just enough back EMF from the stepper will take care of that. :)

The diodes within the IC are important when driving inductive loads (such as steppers).

Boncuk

P.S. A buffer between parallel port and ULN2003 will protect the port of the PC.
I'm not sure what any of this means. What's the river Jordan? I have a feeling you know what's going on here, the only problem is I am not familiar enough with the language to understand the answer lol.
How about doubling inputs and outputs of the ULN chip for higher current?

Instead of leaving three inputs unused you could as well add one and use the ULN2803 instead.

Paralleling inputs and output might be useful.

Here is a driver circuit including an input buffer (for a longer life of the parallel port in case of any failure)

Boncuk
Thanks! I'm trying to get my parts store on the phone now to see if they have 2803 in stock (they only have NTE stuff so I'm actually looking for 2018) If they have it I'll run and grab that sucker.
 
For those of you interested, I just bought the erector set a couple days ago. I should have done it years ago. **broken link removed**, but I only paid $70 at toys r us.
 
I think what Hans (Boncuk) means, is that you may let the magic smoke out...

There's a funny tale about electronic circuits running on magic smoke - once you let out the smoke, there is no way of putting it back and the device which let the smoke out will no longer work!
 
I'm not sure what any of this means. What's the river Jordan? I have a feeling you know what's going on here, the only problem is I am not familiar enough with the language to understand the answer lol.

Before Israel occupied the East Jordan land it was a natural border. Israeli forces shot everyone trying to cross the river heading towards Israel.

If your IC goes across the river Jordan it will experience the same. :)

I like to express myself clearly and distinctively - also could have said: "The IC will generate "Indian smoke signals". :)

If somebody complains about his TV set not working and I find it unplugged I usually ask: "Do you expect a fart from a dead pork?" :D

Cheers

Boncuk

P.S. Here is a map showing river Jordan.
 

Attachments

  • jordanrv.gif
    jordanrv.gif
    7.8 KB · Views: 326
Last edited:
Did you realize that quite a few companies sell as much as complete kits for retrofit including relatively good software packages that operate similar to modern, high quality CNC machines. I am not entirely sure of what you are trying to accomplish so I am not being critical. I can tell you that my brother has converted several manual machines with this stuff and is about to accept delivery of a retrofit kit for a CNC lathe that has an obsolete control system. Machmotion is one of the suppliers though I am certain there are others.

I helped my brother construct a "business card" out of a part conveyor. He had regularly designed/machined/built this conveyor however one customer was frustrated because the electrical guys who followed would add to the cost and complexity - largely due to the fact that they weren't given all the proper information. What I did was work with suppliers/applications engineers to specify/obtain/install/program a stepper motor, driver/controller and PLC w/small touchscreen HMI. The cost was reasonable and his initial customer was pleased because all of it was off the shelf, robust, tried and tested - and the manufacturer was quite well known in Europe, the likely final destination. So, he got the job done but the prototype became the business card of sorts and allows my brother to offer one more service to potential customers.
 
Last edited:
Before Israel occupied the East Jordan land it was a natural border. Israeli forces shot everyone trying to cross the river heading towards Israel.

If your IC goes across the river Jordan it will experience the same. :)

I like to express myself clearly and distinctively - also could have said: "The IC will generate "Indian smoke signals". :)

If somebody complains about his TV set not working and I find it unplugged I usually ask: "Do you expect a fart from a dead pork?" :D

Cheers

Boncuk

P.S. Here is a map showing river Jordan.
**broken link removed**

Did you realize that quite a few companies sell as much as complete kits for retrofit including relatively good software packages that operate similar to modern, high quality CNC machines. I am not entirely sure of what you are trying to accomplish so I am not being critical. I can tell you that my brother has converted several manual machines with this stuff and is about to accept delivery of a retrofit kit for a CNC lathe that has an obsolete control system. Machmotion is one of the suppliers though I am certain there are others.

I helped my brother construct a "business card" out of a part conveyor. He had regularly designed/machined/built this conveyor however one customer was frustrated because the electrical guys who followed would add to the cost and complexity - largely due to the fact that they weren't given all the proper information. What I did was work with suppliers/applications engineers to specify/obtain/install/program a stepper motor, driver/controller and PLC w/small touchscreen HMI. The cost was reasonable and his initial customer was pleased because all of it was off the shelf, robust, tried and tested - and the manufacturer was quite well known in Europe, the likely final destination. So, he got the job done but the prototype became the business card of sorts and allows my brother to offer one more service to potential customers.

If there is any practical purpose in what I'm doing it is to show off in the hopes that I may get work retrofitting old machinery with Linux EMC driven stepper motors or servos. My main reason, at least 96% of my main reason is just because I love to tinker with stuff. More than anything I love to learn, this is a chance for me to learn more about electronics by doing something I'm interested in. I have an old lathe that I may retrofit at some point but for now, I'm content to play with an erector set lol. I also bought an etch-a-Sketch yesterday. Anybody ever see **broken link removed**? Lol, I love it!
 
Status
Not open for further replies.

Latest threads

Back
Top