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

Category — Series

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

Why I Like Copley Accelnet Servo Drives

A couple years ago I was looking for a distributed servo drive, and selected the Coley Accelnet Panel.  There are a lot of other good servo drives out there, but  I like a lot of little details on the Accelnet Panel ADP drives, such as:

  • The ADP uses a standard fieldbus, CANOpen, so I’m not tied to a proprietary network.
  • Copley’s free CMO software makes it easy to get started with CANOpen, assuming you can use COM objects.  Raw CANOpen has a substantial learning curve.
  • The ADP uses HD (high density sub-D) connectors, so I can buy affordable, molded cables.  The HD connector is also robust; the MDR (Micro-D Ribbon) cables on the previous model (ACJ) are a nice idea, but I can’t get affordable cables for them, and they do not have same level of mechanical robustness.
  • The ADP uses RJ45 cables for CANOpen, with isolated DC/DC converters, so it’s easy to daisy chain units using affordable cables, without having to worry about providing the right voltage to the CAN line driver.
  • There are no cables used for normal operation coming out the top of the bottom; this fit our mechanical footprint much better than having to deal with cables coming out three sides (front, top, bottom).  (The serial port is on the top, but not used during operation).
  • The serial port, used for setup, has fixed settings (baud rate, etc) so it’s also easy to communicate (I don’t have to start guessing at baud rate, parity, etc on an unknown servo drive).
  • The CANOpen address is set via a hex (0->F) rotary switch.  I like being able to see what a servo drive’s address is at a glance.  DIP switches are second best; I can decode them, but it’s not as easy.  The worst is having the address set only using a serial setup port.  (Note: the ADP switch is actually on offset, but we always keep the offset at 0.  You can also ignore the switch).
  • The ADP buffered encoder output is great, since we need to provide the encoder output to a custom board on about half the axes.  We don’t need to provide an encoder splitter, unlike in our older systems.
  • Finally, 100% of the Accelnets I’ve bought from eBay have worked (and I’ve bought 7 ACPs so far), and that hasn’t been true for some other brands.

October 9, 2011   No Comments

My Toolbox — Oscilloscope

Fluke 196 with Pelican Case

Fluke 196 with Pelican Case

Why do I have an oscilloscope?  The real answer is that scopes are cool, and many years ago, I couldn’t resist when Fry’s had Fluke Scopemeters on sale — at 50% off!  So I own a 100MHz dual trace Fluke 196 Scopemeter.  Later I bought the yellow the Pelican case for it; the two are a great combination.

Since software ties everything together, I’m also the “systems” guy, and thus I should be able to troubleshoot the entire machine.  I do use my multi-meter much more than my scope, but the oscilloscope is essential when troubleshooting encoders, hall sensors, and the occasional electrical glitch which won’t show up on a DMM.

I’ve used other scopes, such as the Tek THS720 handheld, the Tek TDS 210 desktop, Tek analog scopes, and a Heathkit analog scope.  Recently, I participated in a hands-on demo of the new Rhode and Schwartz RTO1014 1GHZ oscilloscope.  It’s quite impressive, even intimidating at first, with all the buttons and things it can do.  Fortunately, such high powered scopes aren’t needed for typical factory troubleshooting; a dual channel, 20-100MHz real time digital does fine most of the time.

There is uncommon feature that’s really handy: isolated channels (each channel’s ground is isolated from the others).  With a typical dual channel scope such as the TDS 210, I can only view one differential encoder signal (channel 1 probe on A+ signal, channel 2 on A- signal, display mode set to combine channels).  But with a dual isolated channels, I can view two differential signals (channel 1 probe on A+, channel 1 ground on A-, channel 2 probe on B+, channel 2 ground on B-).

Hand-held scopes, such as the Fluke 196 and Tek THS 720, typically have isolated channels, along with ruggedness, battery power, small size, and a hefty price tag.  However, a 4 channel desktop scope is often cheaper than a 2 channel isolated channel scope.

I once spent a lot of extra time because I was too enamored with isolated channels.  The system had a servo motor with the differential encoder output split, with one set of signals going to a motion controller and the other set going to a custom board.  The motion controller was counting correctly, but the custom board wasn’t.

I set up my Fluke 196 to look at the differential signals.  The B+/B- signal did look smaller (less voltage swing) than the A+/A- signal, but it had to be OK because the motion controller was picking it up.  So I started swapping out components — and kept getting the same problem.

I figured it out when I looked at each signal (A+, A-, B+, B-) individually; the B- signal was dead (because of a broken wire in the cable from the motor).  The motion controller worked because it was less sensitive, managing to count the smaller transitions.  My lesson learned: check everything, and don’t make unsupported assumptions.

May 10, 2011   No Comments

My Toolbox — Software

What software do I like on my service laptop?

  • All my development software.  I never know when I might need a particular software package.
    • However, licensing can be an issue; nobody wants to pay extra money for a license that sits mostly unused on a laptop.  Some software allows for multiple installations.
    • If the software only allows for one installation, I prefer using a dongle to a software key, because it’s easy to move the dongle around — and way too easy to “lose” the software key (I’ve seen it happen every time with software keys, which why I hate software keys).
    • Software licensing based on the MAC address or such, that can be moved around easily (e.g. return key via internet, then check it out on another computer) is better, but is still a hassle.
    • Of course, the best vendors say: “You can copy the software; just don’t tell us” (said to me by a saleswomen for a large German automation vendor).
  • Electrical Schematic viewer
    • I don’t always have a paper schematics with me, so it’s important to be able to view schematics on my laptop.
    • Since our schematics are in DWG files, I use eDrawings as a convenient DWG file viewer.  You can also use a full AutoCAD clone; DoubleCAD XT (Windows only) and DraftSight (Windows, Mac, Linux) are both high quality, free AutoCAD clones.
  • Merge software with directory comparisons
    • I’ve found file comparison software to be a life-saver.  Version control is great, but a machine in the field might be in a different state.  I can use the directory comparison to quickly see what files have changed, and then zero in on the changes using file comparison, and then merge between the two versions if needed.  Some software handles three-way merges.
      • I just did this kind of directory comparison recently when upgrading two almost-but-not-quite-identical machines.
    • I’ve been using Araxis Merge for a long time, and have no regrets about spending my money on it.  I’ve used some free options (such as TortoiseMerge with TortoiseSvn), but I feel Araxis works better for some file comparisons.   TortoiseMerge doesn’t do directory comparisons.
  • If you use a personal laptop for work, consider using a Virtual Machine (VM) to keep your private and professional lives separate.  With USB pass through features, you should be able to access USB, serial (via USB to serial converters), and networked equipment from within the VM.
  • In the future, I might look at taking my version control system with me; since I’m currently running Subversion and Trac in a Virtual Machine, I could do it easily by copying the VM to my laptop.

April 18, 2011   2 Comments

My Toolbox: Laptop

My Toolbox series is about my tools for working on machines, including some stories.  I’m going to talk about my tools; your toolbox will be different, but hopefully I’ll give some useful ideas.

Yeah, I’m a software guy, but as the automation software guy, I have the privilege of understanding the whole machine and making sure it is all working right.  That’s why I have a toolbox filled with mechanical tools and electrical test equipment, but I’ll start with service laptops.

Service Laptop

  • I’m using Win7 64-bit on my own laptop, but Win7 32-bit is probably the best choice for a field service laptop,  since you should not need >3G RAM, and many device drivers are still not available for 64-bit Windows.
  • Since almost all automation software is Windows only, you really have to use Windows.
    • Siemen’s SoftComfort Logo! development environment is a notable exception (it’s written in Java).
    • However, if you can talk to all your equipment via USB (including USB to serial converters) and Ethernet, you could use Linux or Mac OS X as your host OS and run the Windows software in a VM (Virtual Machine) with networking and USB pass through for outside access.  Or you can dual boot.
  • I’m partial to Lenovo Thinkpads because of their excellent keyboards and overall quality.  Besides, most Thinkpads support using a FDE (full disk encryption) hard drive, which is a good idea when venturing out with gigabytes of proprietary information.
    • Not all Thinkpads come with with FDE drives, but it’s an affordable do-it-yourself upgrade.
    • Thinkpads are more affordable at the Lenovo Outlet, and you still get a 1 year warranty.  If an older Thinkpad is good enough, and a shorter warranty is OK, then TigerDirect often has great deals (<$400) on off-lease Thinkpads.
  • Of course there are plenty of other good possibilities.  My advice is always get a business class laptop; I’ve seen way too many problems with consumer laptops.

Don’t forget the cables

  • I typically bring along an extra RJ-45 cable, a standard DB9M/F serial cable, USB extension cable, USB A to micro-B cable, Panasonic FP0 serial cable, and USB to serial port converter (since my laptop doesn’t have a serial port).
  • I normally don’t bring along all the special serial stuff, like null modem (laplink) cables, DB9/DB25 cables, and assorted gender changes.  I’ve only needed something weird once in the past 5 years.

Other Computer Hardware

  • A 4G or larger USB memory stick.
    • I frequently have to transfer files without using a network.
    • If you work with really old computer systems, a USB floppy drive would be useful.
    • Don’t forget the memory stick!  Always remember to put it back in your bag or pocket.
  • 3G/4G wireless is a nice option, so you can access the internet to research problems, download files you forget to do earlier, and such without needing access to the customer’s network.
    • On the other hand, 3G is another monthly fee (typically $40-$80/month in the US) for a service that’s typically not often needed.  If AT&T does complete its acquisition of T-Mobile, expect prices to go up.
    • Pre-paid (from Virgin Mobile and others) gives the option of paying only when needed, but pre-paid is more expensive for heavy data use. Walmart probably has the best pre-paid deal: $20 for 1G for 1 month.
    • Another option is tethering (via USB cable, Bluetooth, or WiFi) to a cell phone with 3G/4G.  However, tethering usually adds another monthly charge (often about $15) on top of the data fee.

March 31, 2011   No Comments

Eagle 3D PCBs with Alibre: Assembling the Model Part II

Before starting to put all the pieces together, spend some time planning.   Things to think about include:

  • What is your naming convention?  A good naming convention for parts and assemblies really helps you remember what is what.  Which is a more useful name for a connector model, Part_21 or AMP 5499206-IDC-26?
  • How are you going to assemble the part?  Are you going to use any sub-assemblies?  Good use of sub-assemblies makes assembling the model easier and more logical.
  • Do you have all your part models?  I like to have all my models ready before assembly, but you could start with what you have, and download or create as you go.
  • Do you need to modify any manufacturer provided models?  For example, your part might be slightly different from the closest manufacturer model, or you may need to modify the part (e.g. by adding reference geometry) so you can easily add constraints.
    • I’ve come across both these cases, and will discuss them more in the future.
  • Are you going to directly import your manufacturer models into your assembly, or convert them into Alibre parts first?  Alibre Design 2011 can directly import STEP, SAT, and IGES parts into assemblies.
    • IIRC, previous Alibre versions couldn’t directly import into assemblies, which is why my current designs convert all imported parts into Alibre parts.

Here are my tips on adding constraints:

  • Come up with a naming convention for constraints: J1_Align_Pin1 provides much more information than align22.
  • Position the parts so you can see all the features you plan on using to mate the parts together.  I really like using the triad tool, with minimum motion mode off.
  • I’ve had much better results using the manual constraints dialog than trying to use quick constraints.  Sometime I’ll give quick constraints a try again.
  • I’ve found it’s always necessary to move and zoom all around, and every time I use the icons, my constraints dialog goes away, so shortcuts are the way to go:
    • Pan: press and hold middle mouse button, then move mouse pointer
    • Rotate: position the mouse pointer where you want to rotate, then press and hold right and left mouse buttons, then move mouse pointer.
    • Zoom in: press Page Up
    • Zoom out: press Page Down
  • Be careful where you click; it’s easy to select a feature you don’t want.
  • I like anchoring one part (for example, the PCB) so I know which part will be moving when I add constraints
  • Check the defaults.  Often, the mate constraint will show the current distance between parts, so I have to change it to zero.
  • Use your PCB layout as a guide.  OK, if I could get Alibre to handle the silkscreen layer this wouldn’t be necessary, but it’s handy when I have a PCB full of holes and no silkscreen information on the PCB model.

January 13, 2011   2 Comments

Eagle 3D PCBs with Alibre: Assembling the Model Part I

The final step in creating a 3D PCB model is to assemble all the pieces together.  Normally Alibre assemblies are created by constraining the parts.

A constraint limits how two parts can be located relative to each other.  Three constraints fully constrain a part.  For example, think of mating a through hole connector with 10 pins in one row to a PCB.  You could add three constraints like this:

  1. Use an Align constraint to align the axis of the connector’s pin 1 with the PCB hole for pin 1.  Now the connector is limited to two degrees of freedom: it can move close and farther from the PCB and it can rotate 360 degrees  around the pin-1/hole-1 axis.
  2. Use another Align constraint to align the axis of the connector’s pin 10 with the PCB hole for pin 10.  Now the connector cannot rotate: it can only move close or father from the PCB.
  3. Finally, use a Mate constraint with a zero offset to mate the bottom of the connector with the top of the PCB.  Now the connector cannot move at all; it is attached the the PCB just like you had perfectly soldered a perfect connector to a perfect PCB (pins centered in the holes, connector just touching the PCB, etc).

That sounds pretty easy, right?  Well, the reality is often different.  Extruding a PCB is straightforward.  Mating parts together is not; there are many possible ways of mating the parts together, and the best approach depends on the specific parts and PCB.  I think MCAD assemblies are complex enough that an expert could write a book just about assemblies (and I’m definitely not an expert).

I haven’t found a lot of practical information on Alibre assemblies.  My findings so far:

  • You should definitely read the Alibre Design User Guide chapter on assemblies.  It covers what’s available, including about 20 pages on constraints, but is brief and descriptive.  It does not give any examples or practical advance.
  • Based on the table of contents, the Learn 3D CAD book also only covers constraints briefly (about 20 pages), but still looks like it’s worth the price, since it has a real world example, and advice on overall design (top down vs bottom up).  I’m planning on getting the PDF version when the 2011 update is available.  Note 10/5/2011:  the Learn3DCAD website is no longer active, so this is no longer an option.
  • The Alibre forums look useful if you have a specific question, but aren’t a tutorial.  Also, if you’re on maintenance, there’s always tech support for specific questions.
  • I’m not sure how useful Alibre’s paid training materials (DVD, exercise book, online seminars) since they don’t provide detailed information on the contents.  I suspect they wouldn’t cover some of the problems I’ve had.

Next up in this series: some specific tips from my experience.

January 11, 2011   No Comments

Eagle 3D PCBs with Alibre: What’s Left?

I haven’t forgotten about my Eagle 3D PCBs with Alibre series.  There is one big topic left:  putting all the pieces together using Alibre assemblies.  Unfortunately, my experience is that mating parts to create assemblies is often very tricky (especially when you’re using imported parts), and there’s not a lot of resources.

I’ve done a fair amount of research, but it’s hard to give the same kind of step-by-step instructions for mating parts in an assembly that I did for extruding the PCB.

Also, I’ve just re-done my blog PC (a Thinkpad X61t) with a bigger hard drive and Windows 7 64-bit, so that’s sucked up a lot of time recently.   (Side note: there’s not a lot of 64-bit software out there yet.  But so far I’m quite please with the upgrade.  Alibre Design 2011 does have a 64-bit version, but only for Professional and Expert users.)

What I’ll probably do is write an article (hopefully in the next week) with some notes on how I mated everything together.  I’ll post the files in Alibre Design 2011 format so you can see what I did.

Then this series will be complete.  But I do plan on writing about some Alibre tips that are sort-of related to this series.  And I do have a new series planned that’s more automation related.

November 20, 2010   No Comments

Interesting Motor Power Supplies

I think it’s interesting that there are so few switch mode power supplies (SMPS) designed for powering motors.  Motor power requirements are different from electronics; voltage regulation isn’t critical.  Servo motors benefit from a large current peak (overload) capability and sometimes need a shunt.  Steppers are best with a power supply designed to handle a rapidly changing inductive load.

A typical switch mode power supply, however, is designed for tight voltage regulation, does not have a shunt and handles over current by limiting current to its maximum rating.

Some switching power supplies are better because they have 20% to 50% peak capacity for a brief time.  I’ve seen this capability in models from Cabur (sold by ASI in the US), Puls, and Delta; I’m sure there are other examples.

I’ve used the Delta CliQ series for servo motor power, and so far they’ve worked well.  The CliQ can handle 50% over current for 3 seconds, the pricing is quite good (under $150 for 24V at 10A), but they’re only available for 12V and 24V.

The first designed for motors SMPS I discovered was the IMS ISP200/300 series, which are unregulated switching supplies specifically designed for handling the rapidly changing, inductive loads typical of stepper motors or DC motors.  IMS is now Schneider Electric, and they have discontinued the ISP series.

I don’t really consider the Galil PSR series a SMPS for motors; it looks like an ordinary enclosed switcher with an added shunt resistor.  The PSR costs $250, and is available in 24V at 12A or 48V at 6A.

I recently discovered a second SMPS for motors, the Cabur XC series (sold in the US by ASI).  They have a 72-85V output at 3.1A, 6.6A, or 13.3A, have a 20% reserve capacity when <45C, can handle 50% over current for 5 seconds, and have output over-voltage protection (equivalent to a shunt).

It’s interesting to compare the XCSF500G (72V at 6.6A) to the Logosol LS-872.  Logosol makes my favorite linear power supplies (I own a LS-1148 and use it extensively); they are relatively compact, are switch selectable between 115V and 230V input, have ESTOP inputs, front panel mount fuses, and are available in a variety of output voltages.  (The only other 120V/240V switch selectable linear motor power supply I’ve been able to find is Copley’s  DP models in their PST series, but they cost much more).

Cabur XCSF500G Logosol LS-872
Input Voltage 90-132VAC or 187-264VAC 100-120VAC or 200-240VAC (switch selectable)
Output Voltage 72V 72V
Voltage Regulation <1% -10%, +15%
Current, Max Cont 6.7A 8A (50% duty cycle)
Current, Peak 10A for 5 sec 20A for 5 sec
Weight 2.6 lbs 9 lbs
Dimensions Not listed; appears to be smaller than the LS-872 8.55″ x 6.7″ x 2.8″
Other features DIN Rail Mount

Output overvoltage protection

Parallel Connection

Short circuit, overload, and over temp protection

E-Stop Inputs

Separate, unregulated 24V 2.5A power supply

Optional shunt

Approx. Price $550 $425 (no shunt)

October 2, 2010   No Comments

Eagle 3D PCBs with Alibre: Model Sources

Nope, not the kind of models you find at Model Mayhem; this post is all about finding 3D models of your PCB parts.

You can always make your own, but unless you are an MCAD software expert, rolling your own will take a lot longer.

So far I haven’t had to make a model, but I’ve only used connectors, which typically have STEP or IGES models available from the manufacturer.   But many electronics manufactures do not provide models.

Here are some good model sources:

  1. Always check the manufacturer first, especially for electromechanical products (connectors, switches, etc).  You might have to register first.  Also, sometimes you can get a model by asking (I’ve done that successfully with Amphenol).
  2. Check out general purpose CAD part libraries.  I haven’t used any yet, so I don’t have any personal recommendations.  Ten Link’s list looks like a good starting place.
  3. You might be able to use MCAD vendor specific user generated CAD libraries.  If you have good import options (e.g. Alibre Design Expert) you can try importing Solid Edge, Pro/E, or SolidWorks models.
  4. Pay for model creation, using either a free-lancer or a company such as Simplified Solutions.
  5. For MCAD software with an API (which includes Alibre Design), you can use this API and information (for example, from an IDF file) about the part to automatically create models — or pay for someone else’s add-in.  My earlier post has some more information on this approach.
  6. You might be able to use STL, Sketchup, or 3-D POVRay models developed for projects such as Eagle’Up or Eagle 3D.  Sycode makes affordable Sketchup and STL importers for Alibre.
  7. There’s always Google and other search engines.  I place web search near the bottom because a lot of models are hidden where search engines can’t find them.
  8. Do it yourself; in that case, I recommend spending a lot of time and some money learning how to model well (to save you time overall).  The “some money” is best spent on books (such as Introduction to Solid Modeling NOTE: Learn3DCAD website is no longer active) or videos, although don’t forget to search for free resources and check out what came with your MCAD software.

Simplified Solutions does have some interesting solutions, including:

  • An existing library of electrical components in STEP format.  Pricing is reasonable for professional use at $550 for 50 models or $1700 per year for unlimited models.
  • 3D part creation at a reasonable price ($650 for 20 parts, but check on the details; you probably need to provide data in a format they like, e.g. IDF, which for Eagle PCB users means you’ll have to update your library with IDF information).
  • 3D PCB model creation (they model the entire PCB).

September 13, 2010   No Comments