CNC - Research

This category holds research done at the My Heap laboratory related to CNC.

Bench Work - Finding Coil Leads


Many times when you find a motor it is not labeled with anything at all or very little if anything. You grasp the motor by the shaft and give it a twist. You suspect it may be a stepper motor or at least feels like one base on descriptions we have read. But what leads got to what coils? Are they center tapped or are they just coils. The experiment below tries to explain how to locate and mark the leads of different coils in the motor.

Not really knowing where to start with this project, I decided that I would start with figuring out how to use a stepper motor. I had scavenged a few motors from some printers and a couple old disk drives. I figured the disk drive was the most expendable motor for testing. After all, if I fried it I am not out of much of anything.

 

Floppy Drive Stepper MotorsI have two stepper motors from 5-1/4" floppy drives. These you would think would be easy to get but these drives seem to be getting scarce really quick. Now these two drives look physically pretty similar and the only real difference is the wire coming from the motor. In the image you will notice that one drive has colored wires but the other looks like it has a sort of ribbon cable for the wires. I have no clue what wires go to what coil in the motor. We will do one of these as an example.  (As with most images on the website, if you click on it, you will be given a larger version of it to look at.)

 

Attached colored wires to the ribbon cableThe first thing I done was attach some colored wire to the wires sticking out from the ribbon cable. Not that they are really needed but it does make it a little easier to identify what you are trying to measure. Note that this motor has only five leads coming out from it. I suspect that there are two coils, both of which are center tapped and the center taps are connected together internally.

 

Stepper Motor DiagramMost 4 phase stepper motor are pictured like the image here. In the center the round circle represents the motor armature and around it you see four coils. Really this is two coils that have center taps in effect giving it four coils. To rotate the motor the coils would have to be energized in order. Starting with Coil 1A, then Coil 2A, then Coil 1B, then Coil 2B, then Coil 1A, ... . If we were to take resistance measurements across these coils we should expect a measurement reading between center tap 1 and 1B to be about half the measurement of points 1A to 1B. If we were to map out these measurements we should be able to tell what wire(s) are the center taps. Now keep in mind this will not tell us what order these wires need to be energised to turn the motor.This image was borrowed from the Jone's on Stepping Motors Web page. I would recommending reading his information. You will find a link in the resource section of the CNC Stuff Menu.

 

OK, let's see if we can figure out what wires go to what coils. Recall above that one of the motors had a brown ribbon cable looking thing sticking from it. I soldered colored wires to it to make them easier to identify. To start out, we want to create a table that identifies each lead in a matrix. See Below:

 ORANGEBLUEYELLOWGREENPURPLE
ORANGE --- --- --- --- ---
BLUE 72 Ω --- --- --- ---
YELLOW 72.3 Ω 144.5 Ω --- --- ---
GREEN 72.4 Ω 143.7 Ω 144.3 Ω --- ---
PURPLE 72 Ω 143.6 Ω 144 Ω 143.8 Ω ---

There are a couple of things to note about the chart above. First you will notice that there are several cells in the table that contain '---' meaning that there was no test for this combination. The reason if you look closely is because that particular pair was already tested and these other combinations are only included to make the process a little easier to understand. Once you have written out your chart filling it in is a simple matter. We will take resistance measurements between each color of wire and write the result in the chart. So looking at the chart, you will notice that it does not make any sense to measure with one wire so the ORANGE - ORANGE combination is scratched out with a '---'. The next combination we have working down the ORANGE column is ORANGE - BLUE. Take your Ohm meter and measure the resistance. I got 72 Ω so I record that in the chart. The next combination going down the ORANGE column is ORANGE - YELLOW. When I measured it I got a reading of 72.3 Ω and recorded it in the chart. We continue this process for each column in the chart, but before we measure and write anything down we will cross out a combination that we have already tried and those combinations that yield the same color like BLUE - BLUE. When all the measurements have been taken and recorded, your chart will look the one listed above. (Only with different values.)

Now, by studying the chart we will be able to figure out what wires are connected to where in a coil. In our chart above you will notice we have basically two values listed, either 72 Ω or 144 Ω. Since 72 is half of 144 we can figure that any reading that is 144 is from one end of a coil to the other end. And 72 must be from the center tap of a coil to the end of a coil. Now if we study the table above and look at all the entries that are 72 Ω and the colors of the wires we determine that the orange wire is involved with all those measurements and as such assume that the orange wire is the center tap of both coils. (Physically the center taps of both coils are tied together internally and brought out with one wire, orange in this case.) Another thing to take note of is that if you look at the remaining four wires it is impossible to tell which wires make a single coil. Keep in mind that as long as we have the center tap of the coils, whether they are tied together or not, we have enough information to figure out what wires make it step. We will cover that in the next experiment.

By using the method above we have figured out what wires are what on the motor, well we discovered what the center tap of the coils was anyway. At this point we do not know in what order these coils need to be energized to make the motor run. We will get into that later, for now lets do a another stepper motor by the above method to see what they look like mapped out in a table.

 

Printer Stepper MotorOur next example will be this motor you see here. This motor was salvaged from an old printer and the only information on the motor was 1.68 Ω / PH. Well that seems really helpful. I am guessing that is the resistance of one whole coil or 1/2 of a coil or something. Let's measure it out and see what we can make of it. See chart below:

 

 GREENYELLOWBLACKREDWHITEBLUE
GREEN --- --- --- --- --- ---
YELLOW 1.8 Ω --- --- --- --- ---
BLACK 3.3 Ω 1.8 Ω --- --- --- ---
RED --- --- ---
WHITE 1.8 Ω --- ---
BLUE 3.4 Ω 1.8 Ω ---

 

This chart is a little more interesting. Not all wire combinations have a resistance reading, instead they are open with no connection. I have represented this in the chart by the Infinity '∞' symbol. And once again I used the '---' to represent either a connection that did not make sense or to represent a combination that has already been tried. This motor has six wires and from looking at the table above we see that there are two different windings (coils) each with their own center taps. From the table we know that the GREEN - YELLOW - BLACK wires are one coil and that the YELLOW wire is the center tap. And we also discover that the RED - WHITE - BLUE wires are another winding (coil) and that the WHITE wire is the center tap. HEY, this is not too hard after all.

The above examples should be enough to help you identify the coils on any unipolar stepper motor. The above example will work on a bipolar stepper motor as well, but when looking at the chart you will notice that there are no center taps on the coils. Armed with this knowledge we will determine the step order in the next bench experiment.

Bench Work


Most of the time when I am trying to learn something, I have to take it in small digestible parts and hope my aging grey matter can noodle it out.  When I do these things, I usually have to do some experimentation to solidify the ideas or concepts that I have read about.  Menu items under the "Bench Work" menu are just that, tidbits of experimentation to solidify those ideas.

Research


WOW, where do you start a project like this? I mean, do you start with the machine, finding a computer, finding software to run it on? What about motors? What about electronics to run those motors? What about power supplies to power the circuits and motors? What do you use to cut with? How big of a machine do you make? What is a CAD program? What in the world is G-code and how is it written.

You can tell that if you are not careful, the questions that pop into your head about a project like this can quickly over run the gray matter and make you think, maybe I should just give up on this stuff. There is just too much to wade through. But for you fishermen and fisherwomen out there who like to detangle line and wade through a pile of fish hooks, then this project is for you. OK, maybe that was not a great analogy, but hey, I think I am up for a challenge. I suppose I will know sooner or later what it all means. Follow along and see what you make of the mess.... :-)

The items below the "Research" menu item are things that I felt necessary to delve into, in order to better understand what I was trying to achieve. I will add items to the menu as I research them or rather as I feel like I understand enough to pass that information along.

G-CODE - G-Code is the programming language that drives a CNC machine.  This section talks about what G-Code is.  How it is written and some examples in writing it.

STEPPER MOTORS - Stepper motors come in a lot of sizes and a lot of flavors. Read these pages to get a better understanding of what a stepper motor is, how they work and links to resources to learn a lot more about them than I could ever hope to explain.

STEPPER MOTOR CONTROL CIRCUITS - Now that I have a general understanding of what a stepper motor is and the types, what about the drive or controlling electronics to make them run. This section discusses some methods to drive stepper motors. Some efficient, and some ... well ... not so efficient.

Subcategories