Machsupport Forum

Third party software and hardware support forums. => Third party software and hardware support forums. => Topic started by: Mad Professor on February 09, 2009, 04:30:22 AM

Title: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 09, 2009, 04:30:22 AM
Good Day All.
 
This is my 1st post so I do hope this is the right place.
 
I am looking at building myself a little cnc rig to drill holes in prototype pcbs.
 
I am going to need 3 axis and spindle control.
 
The rig it's self I am going to be building out of old broken printers and scanners.
 
The stepper motors I have collected so far are a mix of unipolar to bipolar, I don't know witch would be best suited for my rig.
 
I would like to be able to control the rig via my computers printer port, I am looking at using the Mach3 software.
 
I would be looking at building my own driver board, but as I have not worked with stepper motors before I am in the deep end.
 
If possible I would like to build a driver board that would support both unipolar and bipolar stepper motors, If having support for both is not possible then I will build a board for used with the best suited stepper motor for the job.
 
Could anyone please point me the way to find some Circuit Diagrams that will be able to do what I am after.
 
Can anyone please tell me if I can leave the printer port inputs and outputs free floating or if they have to be pulled to ground or vcc?
 
I have been looking at some of the designs over at www.pminmo.com but I would like to know if anyone has a better suited design.
 
Thanks for your time.
 
Best Regards.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 11, 2009, 03:19:05 PM
I am going to use the McGuire Stepper Motor Driver (http://www.instructables.com/id/Easy-to-build-CNC-Mill-Stepper-Motor-and-Driver-ci/), but I am going to be adding quite a numer of LED's so I can see the inputs, outputs, switchs all working.
 
Here is what I have come up with so far: Stepper Motor Driver Board (1) (http://www.mad-professor.co.uk/Misc/3%20Axis%20Stepper%20Motor%20Driver(1).jpg).
 
Both the printer port outputs on my PC and my Laptop go high once windows is loaded, but as soon as the Mach3 Software is loaded they are pulled low, Witch is good, I know the Mach3 software can be setup to rest at Low or High, so that is all fine.
 
Can someone have a look at the way I am driving the LED's and tell me if I am doing it right?
I in my design I am using BC547 and BC577, I don't know if there is better suited transistors for driving the leds.
 
With regards to the switches for the limit and home switches, It is safe for the switches to pull to ground or is it best to put a resistor inline, and if so what rating.
 
Thanks for your time.
 
Best Regards.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 13, 2009, 08:57:41 AM
Hi,

There are many 3 axis stepper driver boards available from China (on ebay) at such low prices that it is hardly worth building your own. Some of these boards incorporate the charge pump safety circuit and spindle control relay as well as providing opto isolation of all inputs and outputs they also have provision for adding a forth axis at a later time.

Yes it is OK for limit switches to pull to ground but make sure it is the controller ground and that ground loops are not created in the process.

If you have the time to take a look at my website you can see the machine which I constructed and there are some details of the problems I encountered in the process.
http://www.cooperman.talktalk.net

I hope this helps. Good luck with your build - please post pictures of your progress.

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 14, 2009, 12:42:00 PM
Tweakie.CNC: Thanks for your reply.
 
I know I could pick up one of them cheep ebay driver boards for not a grate deal of money, but I wanted to build my own so that I can understand better how the stepper motors are controlled, ect.
 
I do like the idea of having opto for isolation of the pc's interface, I will have to look into that.
 
After reading a number of posts, and watching some of the videos, I now have a number of design changes I want to do to my current stepper driver design.
 
I have had a quick scan over your web site, and thats some pice of kit you are making there.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 15, 2009, 04:25:46 AM
I fully understand wanting to make it yourself.

Another suggestion - have you looked at chips such as the Alegro A3977 ?. The advantage of an integrated solution is 'micro stepping' as this produces a much smoother movement of a bipolar stepper motor than say 'half step' will do.

All the best,

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 15, 2009, 05:52:15 AM
Thanks again for your reply.
 
So far I have only been looking at two driver designs.
Tachus42 3 Axis Driver Board (http://pminmo.com/3axis/3axis.htm).
Tom McGuire Driver Board (http://www.instructables.com/id/Easy-to-build-CNC-Mill-Stepper-Motor-and-Driver-ci).

I wanted to start as simple as possible, so that I can understand how it all works then move onto more conplex designs.

I have been hunting over the internet for datasheets for the stepper motors that I have collect so far.

I have 3 sets of Unipolar Stepper Motors from Minebea Motor Manufacturing Corporation.
2x PM35S-048 (48 Steps / 7.5° Step / 24Volt / 2-2 Phase / 50 Ohm Per Phase) (http://www.eminebea.com/content/html/en/motor_list/pm_motor/pdf/pm35s048.pdf). <Click Link For Datasheet.
2x PM35L-048 (48 Steps / 7.5° Step / 24Volt / 2-2 Phase / 30 Ohm Per Phase) (http://www.eminebea.com/content/html/en/motor_list/pm_motor/pdf/pm35l048.pdf). <Click Link For Datasheet.
2x PM55L-048 (48 Steps / 7.5° Step / 24Volt / 2-2 Phase / 30 Ohm Per Phase) (http://www.eminebea.com/content/html/en/motor_list/pm_motor/pdf/pm55l048.pdf). <Click Link For Datasheet.
 
Here is the wiring details for thease motors in Unipolar form.
(http://www.eminebea.com/content/html/en/engineering/motors/pm_motor/selection_pm/images/drivecircuit_cad8.gif) (http://www.eminebea.com/content/html/en/engineering/motors/pm_motor/selection_pm/images/drivecircuit_cad1.gif)
 
I have also been looking into using opto for isolation for when I build my own driver board, as I think that is a very good think to have.

My CNC Drill rig is going to have a working area of 300x300mm, so it's not going to be a big unit, Will any of the above stepper motors have the needed power for this unit?
 
Thanks for your time.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 15, 2009, 08:02:31 AM
Hi again,

I think that both of the boards you are thinking of building will be good. Personally I would prefer the Tom McGuire design as you could use a ready made Break out Board incorporating opto isolators etc for your LPT connection to the computer.

Providing you are only going to use the finished project for pcb drilling then any of the 0.6 to 0.8 Amp stepper motors you have would have enough torque for positioning the spindle as long as you keep the friction on your  X,Y,Z slides low and use a high speed spindle such as a Dremel for the drilling. For pcb routing however, you would probably need more torque and have to upgrade the steppers for 1.5 to 2 Amp models but the driver boards you are looking at will handle this upgrade.

If you go for the Tom McGuire it would be handy if you could find someone local to yourself with a working machine to route the pcb for you as the GCode for the board is available for download.

All the best,

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 15, 2009, 08:42:04 AM
I have just built a single axis of the Tom McGuire design on Breadboard for testing.

I have a bunch of spare Power Supplys I can use for the stepper motors.
0-15volts DC @ 10 amps.
16volt @ 8.5 amps.
18volt @ 8.0 amps.
20volt @ 7.5 amps.
22volt @ 6.5 amp.
24volt @ 6.0 amps.
30volt @ 2.0 amps.
 
I already seem to be running into problems.
 
I have gone over all the Breadboard 3 times now, and it is wired as it is in the design.
 
For the 1st test I am using my bench power supply as the voltage is adjustable as also has overload and short cutout.
 
For the 1st test I set the voltage to 12volts I know that this in under the stepper motor working voltage but I would of tought it would still work but with less power.
 
Mach3 is all loaded up and the connected to the computer, I then witch on the power supply and the stepper motor locks solid I can not spin it by hand, I don't know if this is normal.
 
So I tell Mach3 to run the G-Code I have load, I don't hear anything coming from the stepper motor.
 
I stop Mach3 code running, and adjust the power supply down to 5volts, I then run the g-code again, I can now hear the stepper motor trying to work, huminh and vribrating, but not moving.
 
I then pull out R1, C1, and the zener diode, and replace the power to the IC's with a L78S05CV 5v 2amp Reg, so now the control IC's have a reg 5volt.
 
I then try the driver again at 12volts, the stepper still locks solid again, but now when you run the g-code you can hear it huming, and it's trying to move.
 
So I try again with my 24volt power supply, I get the same again.
 
I am not sure what is going on here atm.
 
I could not get the CD4516BE (http://focus.ti.com/lit/ds/symlink/cd4516b.pdf) and CD4028BE (http://focus.ti.com/lit/ds/symlink/cd4028b.pdf),  I could get HCF4516BE (http://www.datasheetarchive.com/pdf-datasheets/Datasheets-31/DSA-600978.pdf) and TC4028BP (http://www.toshiba.com/taec/components2/Datasheet_Sync/152/49.pdf), Could this be the problem?
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 15, 2009, 09:01:29 AM
That's normal the steppers should lock when power is applied. Nothing wrong with your IC alternatives (I think). Go into Mach config / ports and pins / motor outputs and check that you have the step and direction pins configured correctly (also is the active high/low set correctly). In the Port Setup and Axis Selection try selecting Sherline 1/2 pulse mode.

You are certainly on your way. Hope this helps.

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 15, 2009, 09:07:23 AM
Ok thanks I will do some more testing and report back.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 15, 2009, 11:25:17 AM
This is how I have got Mach3 setup on my computer.
 
Pin 2 - X Axis Step.
Pin 3 - X Axis Dir.
Pin 4 - Y Axis Step.
Pin 5 - Y Axis Dir.
Pin 6 - Z Axis Step.
Pin 7 - Z Axis Dir.
 
As I have only put one axis on the Breadboard I am only using Pins 2 & 3.
 
LPT Pin2 - U1 Pin15.
LPT Pin3 - U2 Pin10.
LPT Pins 18-25 - Ground.
 
I have tried Sherline 1/2 pulse mode, no change that I can see.
 
I have also tried active high/low settings on the step and dir pins, also does not seem to do much.
 
As I am testing the stepper motor at 12-24volts do I still have to use a current limiter.
 
Also I am thinking maybe I have wired this stepper motor in worng.
 
The Tom McGuire driver board has the coils lists as L1, L2, L3, L4.
 
I have my stepper motor wired as follows

Reds - Power.
Black - L1.
Brown - L2.
Orange - L3.
Yellow - L4.
 
I hope this is right other wise I am going to feel like I have shot my self in the foot.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: da21 on February 15, 2009, 01:04:04 PM
confirm that your stepper driver works first , connect stepper power supply and  take the direction pin directly to 0v , and by manualy taking the step pin to 0v ( or 5v depending on your drive logic ) you should see a small movement i.e step each time you touch the wire , this will confirm that at least your motors are working .(sticking a peice of tape on the shaft like a flag makes it easier to see movement ,  then you can work back through your breakout board doing the same at the parrell port connector , will prove your electronics

Dave
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: da21 on February 15, 2009, 01:06:47 PM
post a link to your stepper motor and driver boards or pdf's etc makes it easy for people to check for you

Dave
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 15, 2009, 01:12:43 PM
Thanks for your reply I will manualy pulse the driver board and see what happens.
 
All of the details for the stepper motors and driver board are on, page1, 6th post.

Best Regards.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 16, 2009, 02:51:51 AM
Hi Prof,

Looking at the circuit - the enable pins 4,7,14 I am not certain if these should be left high or if they should be taken to ground.
Also pins 18-25 of the LPT should be ground on your circuit.

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 16, 2009, 03:05:05 AM
I tested the circuit last night without being connected to a computer.
 
When powered on the stepper locks as did before, but you say this is normal.
 
I then manualy quickly pull the step pin high, and the stepper look like it tryed to move then it just go's mad buzzing, and doing things ramdom.
 
I guess it's getting some kind of noise, I have tried 2 power supplys and even a 12volt RC car battery, still the same happens.
 
I am going to go to my local maplins today and pick up some copper clad board and make up a pcb and see if I am still having the same problem.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 16, 2009, 03:25:31 AM
Hi Prof,

From what I see your steppers are wired correctly and your power supply is OK as well - nothing to worry about there.

Whilst experimenting I would try this :-

Each of he step and direction pins should be held at +5V through a resistor of say 100K of so and then pulling a step pin low (0V) should produce a step (active low).

Do not connect any of your step/direction pins directly to the 12V supply or the +5V either.

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 17, 2009, 11:22:38 AM
I have now build the full board with all three axis.
 
When the interface port is disconected from the computer it still acts strange, but once it's connected to the computer it stops acting strange.
 
I have found out that you do have to use the Enable pin on the 4028 chip, and this needs to be pulled high for the steppers to work.
 
I now have my PM55L-048, PM35L-048, and a unknown 6 wire stepper connected to the new board.
 
LPT Pin 2 - X Axis Step.
LPT Pin 3 - X Axis Dir.
LPT Pin 4 - X Axis Enable.
LPT Pin 5 - Y Axis Step.
LPT Pin 6 - Y Axis Dir.
LPT Pin 7 - Y Axis Enable.
LPT Pin 8 - Z Axis Step.
LPT Pin 9 - Z Axis Dir.
LPT Pin 14 - Z Axis Enable.
LPT Pin 18-25 - Ground.

I have noted with the PM55L-048, PM35L-048 that if they are left enabled for a few mins they get to hot to touch.
 
I am still using my bench power supply rated at 10amps and running at 12volts.
 
As thease are getting way to hot very quicky even, at 12volts  but at 10 amps, I guess I will need to use current limters, what is best to use bulbs or resistors, and how do I work out what I would need.
 
I am not sure how to setup or tune my stepper motors or if they should just plug in and work.
 
But if I go into Motor Tuning, and enter 2000 steps, Velcity 6, I can then get my stepper motors on Axis Y & Z to turn.
 
I am sure I have a problem on my X Axis as the just vibrates and does not turn at all.
 
Thanks for your time.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Mad Professor on February 17, 2009, 04:44:23 PM
I have fixed the X Axis, I had a dry solder join on one of the outputs.
 
Can anyone now advice me on how I go about setting up the stepper motors?
 
Thanks for your time.
 
Best Regards.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 18, 2009, 03:15:53 AM
Glad you got it working Prof.

As for setting up the motors - all the info is in the support doc. Here is a link:-

http://www.machsupport.com/docs/Mach3Mill_Install_Config.pdf

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: Tweakie.CNC on February 18, 2009, 03:43:47 AM
Hi Prof,

On the electronics side of things :-

As your motors are only 600mA and 800mA I think they would get hot if they are drawing 10Amps. :'(
Yes you do need current limiters.

The formulas you need are:-

E=I x R and W=V x A

so at 12V, 600ma a series resistance of 20ohms, 7watts would be required and for 12V, 800mA a series resistance of 15ohms, 9watts would be required.
As high wattage resistors are relatively expensive Tom has used bulbs in his design, which is what I suggest you use.

Hope this helps,

Tweakie.
Title: Re: 3 Axis Stepper and Spindle Control Circuit Diagrams
Post by: srikrish1984 on June 24, 2010, 10:41:42 PM
Dear sir
              Please send me the circuit diagram for the stepper motordriver circuit for the 3 axis interfceable with mach3, and alos please send me the component list and their numbers, let me know what will the maximum RPM of the steppers. send me the circuits immediately. My email : rsrikrish1984@gmail.com.

Thanking you

Srikrish R






I am going to use the McGuire Stepper Motor Driver (http://www.instructables.com/id/Easy-to-build-CNC-Mill-Stepper-Motor-and-Driver-ci/), but I am going to be adding quite a numer of LED's so I can see the inputs, outputs, switchs all working.
 
Here is what I have come up with so far: Stepper Motor Driver Board (1) (http://www.mad-professor.co.uk/Misc/3%20Axis%20Stepper%20Motor%20Driver(1).jpg).
 
Both the printer port outputs on my PC and my Laptop go high once windows is loaded, but as soon as the Mach3 Software is loaded they are pulled low, Witch is good, I know the Mach3 software can be setup to rest at Low or High, so that is all fine.
 
Can someone have a look at the way I am driving the LED's and tell me if I am doing it right?
I in my design I am using BC547 and BC577, I don't know if there is better suited transistors for driving the leds.
 
With regards to the switches for the limit and home switches, It is safe for the switches to pull to ground or is it best to put a resistor inline, and if so what rating.
 
Thanks for your time.
 
Best Regards.