![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Stepper Motors and Drives Discuss stepper motors, drivers and related topics here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
All, I have been playing around with CNC for a few months now. I decided I wanted to go the hard route and write my own code (Visual Basic), build my own machine, and build my own stepper motor circuit. My successes have been all 2D. I programmed an Etch-A-Sketch using two stepper motors and just recently have built a 2 axis table using drawer slides (similar to Etch-A-Sketch but on paper). The knowledge gained has been very useful in understanding the fundamentals of CNC. I have been using the simple parallel port to ULN2003 to control each step that each of the 2 motors take. I found a circuit at www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html that I would like to use. It is the two-wire connection using a ULN2003 to control a motor in high torque mode only. I have tried to wire it exactly as described with no luck. I wondered if anyone has used it, seen it, heard about it used with success. I suppose I could simply buy all of the components and put them together, but where's the fun in that. I just thought it would be cool to build something from the ground up myself and not just grab something off the shelf. Thanks in advance, w102acd |
|
#2
| |||
| |||
I have also had some issues with the pulse width on the inputs to drive a solenoid not a stepper. DC
__________________ Learn cause and effect through experience. Mastering those relationships is the "Common Sense" ability within the art of any trade. |
|
#3
| |||
| |||
| DC, I checked the parallel port outputs and they show something like 3.1V when turned on. I was also trying to use one of the pins of the parallel port to supply the +5V for this circuit. I have a 12V 3A power supply for powering the stepper motors. The inputs are not opto-isolated. I think my logic is wrong on how this circuit works. It states that coils one and three are always the inverse of each other. However, it appears to me that turning coil three on will turn coil one on as well. Similarly, for coils two and four. It appears to me that the 5V power on the right side will supply half of the TTL signal while the parallel port power will supply the rest. Therefore, one of these by themself is not enough to trip the coil. Am I missing something??? Thanks, w102acd |
|
#4
| |||
| |||
The 5v supply on the right side is set up with bias resisters which ties the output near the mid zone of half the 12v supply to feed back the difference when the output is at the supply rail of 12v. The resistor on the input side, I see as current limiting possibly to assure no false triggers to the non-inverted inputs? Input pin1 is inverted and put out via pin16 which is then input back to pin2 and output pin15=coil 1. This places input 1 and coil 1 output non-inverted. However, Pin3 output is direct to output pin14 inverted on coil 3. Same sequence for pins4&6. That explains why coils 1&3 and 2&4 should always be opposite polarity. If the voltage at the pin1 is not 3.5v, then it may not trigger via the input resistors, if the voltage drop across the resistor goes below 2.5-3v at either pin1 or pin6. Just guesses since I have not worked with this circuit. Someone else can chime in and clarify my goofs if need be. DC
__________________ Learn cause and effect through experience. Mastering those relationships is the "Common Sense" ability within the art of any trade. Last edited by One of Many; 02-11-2008 at 09:53 AM. |
|
#5
| |||
| |||
| I will try some more this evening to get the circuit to work. I may possibly just jump to using a 74LS86 and 74LS112 to do the work for me. My problem is that I can't control three stepper motors (one per axis) and still have six limit switches (two per axis) using only one parallel port with the way I have it configured now. Would this circuit help with the maximum speed I can get??? Maybe I am jumping the gun. I can control three stepper motors and have five inputs for limit switches. Is it reasonable to use only one input for each axis limit switch??? My thought and example...Say you have two limit switches on the x axis. The program is running when the x axis limit input becomes high. Since I know which direction I was traveling in the x axis I can figure out which limit I have hit in the x direction. Therefore, I don't need to know which limit was hit, just that a limit was hit. And let the code figure out which one and how to proceed. Thanks again, w102acd |
| Sponsored Links |
|
#6
| |||
| |||
| It's all personal preference as to how you want to handle the inputs and the code. An over travel on many of the older industrial machines was just a limit switch tied in Normally closed series with the E-stop switch. This would require only one input and any fault would drop out the control enabling line. It should be reasonably obvious which axis is in an over travel condition. At that point since it is an open loop stepper system, you might as well re-home the axis or re-orient the origins to the original X0,Y0 and/or Z0 reference to be certain no steps were lost or gained in the incident. I cannot tell you much about speed. This will be partially determined by your code and how it must interpret the path program. Some of the speed limitations will be from the bus or parallel port speed if your code doesn't get in the way. The rest of the limitations may be in the stepper motors ability to take short duration pulses and still keep moving smoothly. Then there is the resolution you expect if running a lead screw for X pulses per distance unit dec or mm. DC
__________________ Learn cause and effect through experience. Mastering those relationships is the "Common Sense" ability within the art of any trade. |
|
#7
| ||||
| ||||
| look at this http://electronics-diy.com/electroni...per_motors.php hope it helps |
|
#8
| |||
| |||
| Well, last night I spent some more time with the circuit with no luck. I then spent the rest of the night wiring the "Control" block of the parallel cable in order to give me the four additional outputs to control the z axis motor. While doing this I pulled out the 5 input channels for future use. And now I have a 3 axis controller. Now I need to build the z axis and test it out. Managed to fry an IC along the way (that is why I bought 5 of them). Motorcoach: Thanks for the link but I was trying to use the circuit which controls a stepper motor with only two input channels. The link you sent describes what I have working already (four input channels). The previous link describes the circuit. 2 pains have already come up when using the "Control" block. The first is the 3 inverted signals (ie need to send "11" to the block to turn off all pins). the second is the change in port address. This does not allow me to simultaneously move the Z and the X or Y motors. Notice X and Y have the same port address. Any advice on how to handle this??? I wanted to use my machine to mill/engrave things into wood/foam/etc. I am thinking that I will do Y-Z sweeps and step in the X. So my tool will travel along constant Y slices while varying Z. And then it will move in the X and return with another constant Y slice. And do this until finished. Does this make sense??? Thanks, w102acd |
|
#9
| |||
| |||
| I'd expect the pulse signals you are after are calculated for a given move based on what an interpreter that can convert the path program into individual step and direction signals, then fed as a word length to the parallel port all at the same time. That breaks it down to the smallest move. Normally 2 lines on a parallel port are used for step and direction. Another approach to consider using 2 lines per axis? DC
__________________ Learn cause and effect through experience. Mastering those relationships is the "Common Sense" ability within the art of any trade. |
|
#10
| ||||
| ||||
| You have several options, latching each axis with a 4 bit latch such as a 74ls75 or 74hc75 and using two other bits to control which latch is updated. But rather than use that type of setup, why not switch to a step/dir control so you would be compatible with most of the cnc software out there? In this circuit on my website you could replace the FETs with the 2003's if you wanted to keep the 2003's. http://pminmo.com/discrete/discrete.htm Also, you can series your limit switches if you use normally closed switches to free up input pins, or you can parallel them to use such as cncpro (free dos cnc program) does.
__________________ Phil, Still too many interests, too many projects, and not enough time!!!!!!!! Vist my websites - http://pminmo.com & http://millpcbs.com |
| Sponsored Links |
|
#11
| |||
| |||
| Thanks for the replies!!! I think I will be happy with the setup I have now (until necessity steps in). I looked at the circuit on the link and some smoke started coming out of my ears!!! Whenever I look at circuit diagrams, it brings back to childhood following the line games where there are lines that are all crossed and you have to start at one end and find the other. Since this is a learning experience for me, I am not allowing myself to do anything that acts as a black box (ie stuff in => stuff out). Since I am writting my own code to do all of this I am not using GCode or anything like that. I am simply using X,Y,Z coordinates. I simply tell the motor to go from here to there in a straight line. The resolution is controlled by the number of points. For example, a circle with four linear segments does not look much like a circle; however, a circle with 1000 linear segments is as close as I will ever get to a circle anyway. So my "input files" consist solely on a header specifying how many points to readin and then a data dump of the coordinates. After this machine, I will most probably build something that uses commercial software, drivers, etc. After I understand how it all works first. I have written a code to convert a picture into a set of X,Y,Z coordinates. The X and Y are simple; the Z is done by converting the color (RGB) into a single value. With a specified tool diameter, I am hoping the tool paths will become apparent. Obviously, the resolution will be set by the tool diameter. If anyone wants to see any of this, let me know and I will post it. Thanks, w102acd |
|
#12
| |||
| |||
| I bet your having fun (I did the same thing about 10 years ago - making my own stepper drives and writing my own software to run a small plotter.)take a look at emc2 - it will run on easy on a 600mhz computer. Its stepper module will do a bunch of different outputs.. http://www.linuxcnc.org/docs/2.2/htm...stepgen.9.html step/dir,up/down,quadrature,3phase, 4phase..... http://www.linuxcnc.org/ http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl It is opensource - so you can take a look at how it is done. sam |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie- stl input | jcoats | CamBam | 1 | 02-09-2008 01:40 PM |
| MDI input for BP Interact 1 Mk2 | motorman46 | Bridgeport and Hardinge Mills | 2 | 01-19-2007 08:23 AM |
| Uln2003 | ipodman1991 | General Electronics Discussion | 2 | 12-03-2006 11:54 AM |
| I need some input | Steve@Reliance | CNCzone Club House | 2 | 09-27-2006 03:54 AM |
| Can a 3ph input VFD run on 1ph ? | Don Lester | Phase Converters and VFD | 3 | 06-27-2006 12:51 PM |