Stepper motor control using a PLC

I'm using a Crouzet M3 PLC and I'm trying to drive a stepper motor. The motor is from Lin Engineering and the driver is an R208

formatting link
I've wired the system up and I can get the PLC to drive the stepper, but I can't drive it fast enough. The PLC is only capable of pulsing at 80 hz. To get a smooth rotation in the desired time interval, I need to pulse at about

800 hz. The PLC is operating at 24 vdc and I use a resistor in series to drop the pulse voltage to 5 v.

Is there any way to still use the PLC operating at 80 hz, but increase the frequency of the pulses to 800 hz?

Here is some more background information: the PLC can output pulse width modulation at a variety of frequencies from 14 to 1800 hz, but you can't control the number of pulses.

I'm open to using a different driver is anyone has a suggestion. I would really like to be able to send a single pulse to the driver and then have it send 400 puleses to the stepper motor. (8X stepping requires 400 pulses to rotate the motor 90 degrees.) Then I could send

1 pulse from the PLC for every 90 degrees of rotation needed. Thanks in advance,

-CCE

Reply to
CCE
Loading thread data ...

A simple printed circuit board with a couple of components could do the job you want. You'd need linear regulator to generate 5V from your 24V rail to power your logic - which won't need much current so, a linear regulator would be fine - and some nine bits of counter to count the

400 pulses you want to generate fom every PLC pulse.

In order to produce the 400 pulses at the roughly 800Hz rate that you want, you will also need a 32768Hz watch crystal and a divide by 41 circuit to get this frequency down to 799.2Hz - which is another six bits of counter.

The two counters and the glue logic would fit comfortably into any modern programable logic part. The CMOS Xilinx CoolRunner parts don't consume much current at low clock rates, and would be the first thing I'd look at, but I've been trying to find an excuse to use one for years now.

--
Bill Sloman, Nijmegen (but in Sydney at the moment).
Reply to
bill.sloman

I'm sorry Bill, but you lost me on that one. I'm a ME not a EE.

Reply to
CCE

Here you go Chuck:

formatting link

Reply to
ms

Great resource! Thanks,

-CCE

Reply to
CCE

My Ph.D. is in chemistry. I haven't had any formal training in electronics.

So, where did I lose you, and what do you need to know?

The little printed circuit board has to have a roughly 800Hz clock to generate the burst of 400 800Hz pulses - half a second's worth - that you need to step your motor though a quarter of a shaft rotation.

The easy way to get that is to set up a 32768Hz oscillator with a couple of CMOS gates an a 32768Hz watch crystal, then divide it down by

41 in a programmable counter like the 74HC40103.

The other two things you need are a state machine - which might be a small collection of CMOS logic - to recognise when you feed a single pulse into the board, and start sending out the 400 pulses to your stepper motor - and a power supply to provide 5V if you want to use regular CMOS logic, or 5V and something lower - say 1.8V - if you want to do all the counting and logic it a programmable logic device like a Xilinx CoolRunner chip which does make for a smaller and tidier printed circuit board.

There isn't anything remotely complicated about any of this, and any electronics sub-contractor (with the possible exception of John Fields, who doesn't like using stuff invented after 1980) could put it together quickly and reasonably cheaply.

-- Bill Sloman, Nijmegen (put in Sydney at the moment, and not well placed to design anthing).

Reply to
bill.sloman

On a sunny day (6 Dec 2006 13:21:07 -0800) it happened "CCE" wrote in :

Well, in TTL in the old days youwould have a 74LS13 D flip flop set by the input pulse, enabeling a binary counter that was gated to generate a reset for the D FF at 400. A simple 4046 or 555 clock generator clocks teh counter (and sets pulse speed). One adjustment, some chips (5)?, one 5v regulator.

In these days you could get smallest CPLD or FPGA and write above idea in HDL. Xtal, no adjustment, 2 chips (or 1 if internal flash), some regulators....

Or use a PIC, no xtal, internal osc, one chip, zener regulator.

So PIC it is.

Reply to
Jan Panteltje

Im surprised no ones suggested a microcontroller yet, usualy thats the first thing that gets suggested so here goes :- how about using a microcontroller !

Its not that hard, they even come in little tiny 8 pin packages, it would be versatile so if you decided to have it send any number of pulses, no problem.

Actually then you might find you no longer need the plc.

Colin =^.^=

Reply to
colin

Hi, CCE. Questions on PLCs and industrial controls usually find their way to sci.engr.control -- you might want to try posting this question there, too.

Your description of the problem indicates you want to control the number of pulses as well as their speed. That means your ultra-low end PLC just isn't up to the job on its own.

Your problem shows why it's important to fully look at your project and determine your needs before you specify and purchase a PLC. There are many low-end PLCs out there which offer stepper indexers, and which would easily handle your problem. Your easiest solution (if you can) might be just to upgrade your PLC.

But if you're really stuck with the Crouzet, you might want to go with a separate indexer to go with your microstepping driver. Many of these devices provide logic and/or optocoupled inputs which are compatible with any PLC. When the input is activated, the indexer will travel a pre-programmed motion profile, leaving all the business of pulse counting, rate and acceleration to the indexer (you pre-program these parameters). This multi-module solution was very common in the 1980s, before PLC manugfacturers started putting stepper indexers into all but their lowest end models. And it sounds exactly like the requirement you're describing in your post. Did it myself once or twice back in the day.

You also might just want to call Lin Engineering's apps people and ask them if one of their integrated controller/drivers might be a better fit for your job. Be sure to accurately describe your problem first. You specifically need to know if free-standing operation means you can initiate control moves from your Crouzet with one of their digital inputs. This will oobviously limit the number of different moves you can do, but you may only need "1/4 turn CW" and "Home".

The last thing you want to do for an industrial control circuit is make a complex blivet board that a maintenance guy isn't able to troubleshoot or repair (been there, done that, got the tee-shirt -- and looking back, it was my fault). The whole point of a PLC is to make an electrical control which is simple and easily repairable, that you can walk away from.

Good luck Chris

Reply to
Chris

Chris, You've hit the nail on the head. I'm now looking for a simple inexpensive indexer to go with the driver. Lin has one ($125), that has the driver built in. Any other suggestions are welcome.

-CCE

Reply to
CCE

$125 is a pretty good deal, especially if you consider time = money and you've probably spent double that in this newsgroup already! Good luck, Chuck!

Reply to
ms

Hi, CCE. $125 is a small price. You also might be able to arrange a swap and restock on the R208 (a 20% or 25% restocking fee is common) to save money, if you're at the limit of your budget. Funny how you end up spending hundreds in fiddle factor time to save a few bucks on paper. It's depressing, but it's a small price to pay if you've learned to spec out the PLC last (once you've got a real handle on everything else), then buy it first.

Be sure to call the apps engineers at Lin before you buy. That way, you can get it right and finish the job.

Make sure your docs package includes a section on how to program the indexer. "Git R Done" so you can move on to something else. Due diligence and all that.

Good luck Chris

Reply to
Chris

I've been looking into indexers... I've got some more learning to do! I found one from Anahiem Automation that looks like it could work as well.

formatting link

-CCE

Reply to
CCE

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.