8 axes parallel port stepper control

I was wondering if there was a way to control 8 axes from a parallel port. I only want to use 1 port because it would be good to run this from a laptop if possible. Thank you.

Reply to
Bob
Loading thread data ...

Bob, what Stepper Motor Drivers are you using?? How many bits does it take for each motor? Just Direction and Step, or all the phases done in Software??

Reply to
Terry King

If you will add some TTL latches to the stepper controller you could send two bytes to the steppers. The first would be an address and the second would be the step and direction. One bit would be used to tell the TTL circuit that the byte was a address or step instruction.

I will leave it to you to design the TTL circuit but it probably could be done wit one latch.

Bill K7NOM

Reply to
Bill Janssen

If you will add some TTL latches to the stepper controller you could send two bytes to the steppers. The first would be an address and the second would be the step and direction. One bit would be used to tell the TTL circuit that the byte was a address or step instruction.

I will leave it to you to design the TTL circuit but it probably could be done wit one latch and a 74138 The latch would control some buffers such as the 74LS367 or such.

Anyway, it could be done

Bill K7NOM

Reply to
Bill Janssen

I just need step and direction. Thank you for all your help so far!

Reply to
Bob

OK, so that is 8 sets of 2 bits each, right?? You need two 8-bit latches. I'd suggest 74LS374's or 74HC374's. You'd connect both latch chips with their 8 inputs connected to the regular 8 LPT outputs, pins 2 thru 9. Then use two of the other port output pins to control the 'strobe' pins, one for each latch. In software you'd write the data for

4 steppers (4 each direction + step) to the regular LPT output, then drive the 'strobe' active and inactive to transfer the data to the output of that latch. Same for the other latch.

Most stepper controllers step on a transition on the Step line. You need to know which polarity that is, and return the step line back to the other state in between steps.

So, each motor can either be stepped individually, or you can step at most 4 steppers at exactly the same time. If you write this is asssembler or fast 'C' on a reasonably fast machine, you should be able to write all 8 motor controls in less than, um, 20 microseconds or so. On a reasonably fast (say 386) machine.

Stuff to consider: - The 'second port' bits have pull-up resistors of 4.7K or something. You may want to add a separate pull-up resistor of, um, 680 ohms or so from those port bits to +5 to make sure they get 'up' fast. Sorry, I don't have the old schematics here tonight.

- As mentioned earlier, timing will jitter unless you reprogram the PC timer chip properly. There are Borland 'Units' out there for PASCAL and 'C' that I've seen for fast timing. I'm sure they exist for other compilers. This is for a dedicated old 386-486 machine running DOS. If you want to use Windows, you'll have to use hardware timers or a PIC or other microcomputer to get timing accurate.

If you want, I can send you example PASCAL code that runs a couple of steppers on a toy crane.

I assume you've looked at the myriad help available at sites like:

formatting link

Reply to
Terry King

One more question. I've been reading up on controlling the steppers however, I'm undecided on the os to use. I know that NT windows derivatives cannot directly access the port, but can access the port through a wrapper. But I'm unsure of the pulse rates I can get through doing this. I've grown quite accustomed to programming in C# so I'ld like to be able to continue doing so. If anyone has some statistics regarding usable pulse rates through windows, RTlinux, or dos the information would be greatly appreciated.

Reply to
Bob

Another way would be to tie all the "direction" leads together and connect that group to one of the "control" pins on the printer port.

Then use the 8 bits to step just one of of the 8 steppers.

I haven't checked the ability to contol the extra leads on the prointer port so maybe this won't work.

Bill K7NOM

Reply to
Bill Janssen

PolyTech Forum 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.