Merging modern software development with electrons and metal
Random header image... Refresh for more!

Category — CANOpen XY Table

XY Table Part 6: Determining Stepper Configuration

Since I couldn’t find a datasheet on my Sanyo Denki stepper, I decided to figure out how the motor was wired myself.  There are a variety of sources; PIClist has the best list of methods I found, and RepRap is also worth a look.

If you’re not familiar with stepper motors and their terminology (such as unipolar or bipolar), Wikipedia’s article is a good start.  A 4 wire stepper can be used in bipolar mode only, a 5 wire stepper can be used in unipolar mode only, but 6 and 8 wire steppers can be used in either bipolar or unipolar mode.

The exact procedure to use will vary depending on the motor (and its number of leads) and the equipment you have.  Since I have an 2 channel oscilloscope, I decided to use it and look at the phase differences between the leads of my Step-Syn 103-771-16.

My Step-Syn is a 5-wire stepper motor so it has one common wire connecting the center-taps of both coils, and four wires connected to the ends of the two coils.   The wire colors are black, red, blue, yellow, and orange.

The first step is to find the common wire:  the resistance between the common wire and any other wire will be half of the resistance between any other two wires.  The resistance  between the black wire and the other wires was 130 Ohms; between all the other wires, 260 Ohms.  So the black wire is the common.

The next step is to set up the oscilloscope with the black (common) wire connected to the oscilloscope probes’ ground and the two channels connected to any two wires.  You then spin the motor and adjust the oscilloscope settings (V/Div, timebase, triggering, etc) until you can capture a good set of data.  If the waveforms are 180 degrees out of phase, the wires are from the same coil.  If they are 90 degrees out of phase, the wires are from different coils.

Same Stepper Motor Phases, Normal Oscilloscope Mode
Phase Difference for Wires on Same Coil, Normal Oscilloscope Mode
Different Stepper Motor Phases, Normal Oscilloscope Mode
Phase Difference for Wires on Different Coils, Normal Oscilloscope Mode

If your oscilloscope can be used in XY mode (often used for showing Lissajous patterns), it’s even more obvious: wires from the same phase create a diagonal line while wires from different phases create a circular pattern.  My Fluke 196 doesn’t have a real XY mode, but I used a Tek TDS210 to get the pictures below.

Same Stepper Motor Phases, XY Mode
Wires on Same Stepper Coil, XY Mode
Different Stepper Motor Phases, XY Mode
Wires on Different Coils, XY Mode

If the wires are connected to the same coil, then the other two wires are the other coil.  If the wires are connected to different coils, then swap out one wire until you find two wires on the same coil.

Suppose I connect the Step-Syn’s orange and yellow wires to the scope.  The scope trace would show they are connected to the same coil; therefore, the other two wires (red and blue) are the other coil.  Or, suppose I connect the orange and blue wires to the scope; the trace would show they are connected to different coils, so I would swap out one wire (for example blue for yellow) and try again until I find two wires connected to the same coil.

The procedure would be similar for a 6-wire stepper motor, except you have to find two common wires, but the procedure would be considerably more complex for an 8-wire stepper.

The final part is determining the how to connect the wires to the driver.  Basically, connect the coil wires up using your best guess.  If you swap wires within a coil or swap the coils you will change the direction of rotation.  I’ll give a real world example in a paragraph or two.

When I got ready to connect my Step-Syn motor to my Stepnet I discovered I had a problem: the motor is unipolar only while the Stepnet is bipolar only.  The Stepnet manual doesn’t state that (there is no mention of bipolar or unipolar stepper motors), but it became obvious when I looked at the motor connection diagrams in the manual.

Sometimes you can convert a 5-wire motor to a 6-wire by taking the motor apart, cutting the connection between the two center-taps, and then bringing out the second center tap.  I did take the case off the Step-Syn, but I didn’t see any obvious way to bring out the sixth wire.

Since I still wanted to test this motor, I decided connect it to a Allegro Microsystems UCN5804 unipolar stepper driver.  I connected the black wire, Pin 2, and Pin 7 to +24VDC, orange to Pin 1, yellow to Pin 3, blue to Pin 6,  red to Pin 8, and Pin 14 (Direction) is tied to ground.  The motor rotated the direction I wanted: clockwise when viewed from the front.  Using the UCN5804 datasheet, I determined that in 2-phase drive the wires were energized in the order yellow/red, red/orange, orange/blue, and blue/yellow.  In wave mode (1 phase), the wires were energized in the order red, orange, blue, and yellow.

Swap two wires within a coil, for example, yellow and orange.  yellow is now connected to Pin 1 and orange is connected to Pin 3.  The motor now moves counter-clockwise.

November 30, 2011   4 Comments

XY Table Part 5: Finding Information

I don’t have complete information about any of the motors I selected so this post is about how I search for data.

I normally start by googling around.  In my experience Google returns better results than Bing for technical searches.  I typically start with the manufacturer (Sanyo Denki) or type (“Step-Syn”) and part number, and modify my search approach depending on the results.

If the manufacturer has a good datasheet on their website, googling will typically find it faster than going to their website.  Unfortunately, many manufacturers do not provide datasheets for their older, not in production, products.

I recommend reading up on advanced search techniques.  Here are some I use frequently with Google:

  1. Add filetype:pdf to search only PDFs (since datasheets are often PDFs)
  2. Add site:url to search only within the given URL.  For example, adding site:sanyo-denki.com returns results only from within the sanyo-denki.com domain.
  3. Use quotation marks to search for a complete phrase.  Searching for Sanyo Denki will return results that have both words in the page (but not necessarily together), but searching for “Sanyo Denki” will only return pages that has the phrase Sanyo Denki.
  4. Use a dash to eliminate search results; for example, adding –eBay will skip results with the word eBay in them.  -eBay is very handy if a whole bunch eBay sellers are cluttering up your results.
  5. There are many more, so try searching for posts about how to search…

I also look at the manufacturer’s web site; occasionally the web site’s search box returns results Google can’t find.  Sometimes you can find data based on the product line, not the specific part number (which may not appear because there are so many variations; the datasheet just lists the possible options).  For example, I received the best results for the Oriental Motor Vexta PH265L-04 by searching their catalog for PH265*.

Let’s look at some searches for the Sanyo Denki 103-771-16:

  1. Searching for Sanyo Denki 103-771-16 currently brings up 8 results, none of which look useful (and 3 refer back to here!).
  2. Searching for Sanyo Denki 103-771 brings up a lot more results, but I didn’t find any useful data.
  3. Now let’s get creative and add the wire colors: Sanyo Denki 103-771 blue red black orange yellow returns interesting looking results.  Unfortunately all of the Sanyo Denki PDFs are for newer motors that are wired differently.

So sometimes even Google can’t find what you want; instead, in the next post, I’ll look at how I determined the Sanyo Denki stepper’s connections.

November 29, 2011   No Comments

XY Table Part 4: Stepper Motors

Sanyo Denki Step-Syn 103-771-16

Sanyo Denki Step-Syn 103-771-16

I had planned to use a Sanyo Denki Step-Syn 103-771-16 stepper motor, but since it will not work with my Stepnet, I will be using another motor.  (The Step-Syn is unipolar only and the Stepnet is bipolar only).  For more information on the Step-Syn please go to its Trac page.

Vexta PH265L-04

Oriental Motor Vexta PH265L-04

So right now I’m planning on using an Oriental Motor Vexta PH265L-04 in bipolar mode.  I’ve created a Trac page for it, too.

The Vexta was easy to connect to the Stepnet.  The Vexta really benefits from a higher supply voltage; using a 24VDC power supply, I could only reach around 600 RPM no load, but using my 48V Logosol power supply I could reach over 1200 RPM no load.  OK, that’s not impressive compared to a servo motor (my Emoteq BH023 has reached 20000 RPM), but it’s still a big improvement.

A personal note: since the Christmas season has started, I probably won’t be able to blog as much.

November 2, 2011   No Comments

XY Table Part 3: Major Components

XY Table Components

XY Table Components

What are the major components and why did I choose them from my stock of automation components?

  • XY Table – a Parker Daedal simply because it’s the only one I own.  I can’t find a part number on it, but it looks similar to a 806006CTE5D1L2C1M1E1.  It’s a beefy cross roller stage with 0.2″ pitch (5 turns per inch) ballscrews and NEMA 23 motor mounts.
  • Joystick – a CH Products HF22S10-U USB hall effect joystick, because it’s an awesome joystick.  Besides, the USB interface is a lot easier to use than analog voltage or resistive interfaces.
  • PC – a Shuttle X50 all-in-one because it’s compact, has a touchscreen, and has plenty of USB ports.
  • CAN Interface – a Kvaser Leaf Light, because it’s really nice, I haven’t featured it before, uses a USB inteface (the X50 has no PCI slots) and it’s well supported by Copley.  My Ixxat USB to CAN compact would also be a good choice.
  • Drives – Copley Accelnet ACP-055-018 and Stepnet STP-075-07.  I also have AMC and Elmo CANOpen servo drives, but Copley was my choice because I only have Copley stepper drives (and I want to show stepper performance versus servo performance) and only Copley includes high level software (CMO, Copley Motion Objects).
  • Servo Motor – currently a MCG IB23000-E1 because this is a typical NEMA23 servo motor and I haven’t used it before, so I can describe getting an unknown servo motor up and running.  Besides, my Emoteq BH02300’s are too fast.  If it doesn’t work (and someone has written “Bad Hall” on it), I’ll substitute another servo motor after describing my troubleshooting.
  • Stepper Motor – a Sanyo Denki Step Syn 103-771-16 because it was the first single shaft NEMA 23 stepper motor that I found.
  • Power Supply – my trusty Logosol LS-1148.  I’ll be using the E-STOP input option.
  • E-STOP – a IDEC AOLD39911DN-R-24V lighted 30mm mushroom switch.  It’s not really an E-STOP, but it should work OK, I like IDEC’s quality, and I was able to pick up a couple for a good price on eBay.
  • Development Tools – SharpDevelop, because it deserves to be highlighted.  Microsoft Visual Studio would also be a good choice, and the Express Editions are free, but SharpDevelop has some unique features that can be useful even if you already have Visual Studio.  Besides, I’m pretty sure the download is a whole lot smaller.

I do have enough equipment that I could use a traditional motion controller (Galil or MEI) and analog servo amplifiers (AMC), but I decided to go the CANOpen distributed route because it’s a heck of a lot less wiring.

October 18, 2011   1 Comment

XY Table Part 2: Overall Architecture

What are the major components and how do they fit together?

XY Table Architecture Overview

XY Table Architecture Overview

Let’s start at the top and work our way down:

  1. Motion commands are generated by the joystick; the joystick reports values separately for the X and Y axis.
  2. The PC reads the joystick X and Y values, translates them into velocity commands and sends them out over the USB to CAN interface.
  3. The CANOpen drives receive the motion commands, and send the appropriate voltage and current to the X and Y motors.  (I use the drive to refer to an integrated motion controller and amplifier.  I will be using one servo drive and one stepper drive.)
  4. The motors are connected to XY table ballscrews through a coupling and cause the XY table to move.
  5. Limit sensors on the XY table stop the motors if you try to move too far, preventing damage to the XY table.
  6. The E-Stop switch is there to turn off power to the motors (with no software involved) in cause of an emergency.
  7. The Power Supply drives DC power to the motors through the drives.

So the basic idea isn’t too complicated, but there will be a lot to learn along the way to sucess.

October 16, 2011   No Comments

XY Table Part 1: Introduction

This new series is a tutorial on putting together a joystick controlled XY table from parts to a complete, working system.  I want it to be a comprehensive tutorial on getting a two axis system up and running, including:

  • The electrical part, for example,  connecting to the motors and limit sensors.
  • The mechanical part, for example, attaching the motors to the stage and setting the limit sensors.
  • Setup and initial testing.
  • Software, including sending commands to the drives and reading a joystick.
  • Finding information on motors, stages, and such so you can use them.

Why write this?  Because I haven’t seen a similar detailed project.  Automation magazines articles are almost always very general (why product X was great for project Y).  I will not get into theory (such as matching inertia using gear heads, motor sizing, etc); this is an introduction, and the XY table will work fine driven by ordinary NEMA23 servo and stepper motors without noisy gear heads.

The tutorial will be detailed, but not a step by step recipe.  Instead, I want to provide a detailed example and resources that you can apply to the particular parts you have.  I hope it will be useful to people who have bought surplus automation equipment.

I expect basic familiarity with automation concepts such as servo motors, quadrature encoders, and such, but will provide some basic links — and don’t forget, if you don’t know something, google it!

I will be using a bunch of parts I already have, but I will also cover some of the many other possible ways of getting to the same end result.

October 10, 2011   No Comments