Member Login
Search
Jump to a Date
Sponsored Communities
Cool stuff
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
According to my best recollection, I don't remember.
-- Vincent "Jimmy Blue Eyes" Alo
-- Vincent "Jimmy Blue Eyes" Alo
RSS Feed
www.control.com/rss/
To get a personalized feed, become a member at no cost.
from the Automation List department...
Stepper Motor control and Encoder monitoring with Parallel PortI'm relativly new to all these sorts of thing; however, I've been given a task to design a relativly cheap (under $100) for a circuit/bread board that connects a stepper motor, and 2 optical encoders to the computer.
The encoder I'm using is this:
http://www.usdigital.com/products/e4p/
The bipolar stepper motor I'm using is this:
http://web1.automationdirect.com/adc/Shopping/Catalog/Motion_ Control/Stepper_Systems/Motors_-z-_Cables/STP-MTR-23055
I am planning to connect and control these devices via the parallel port.
I have semi-figured out how to connect the stepper motor to the parallel port using the dual H-bridge IC SN754410, where the 4 output are connected to 4 of the data pin on the parallel port (with optical isolators of course). One thing I have yet to figure out is where am I suppose to put resistor and capacitors on the board?
For the encoders, I've been told various things. Some people say that you need an A/D converter for connecting it to the parallel port, while some say I don't. So, which one is it?
Furthermore, I am using pin 1 on the parallel port to power the IC, and the 2 encoders, and I was wondering, is that enough?
The encoder I'm using is this:
http://www.usdigital.com/products/e4p/
The bipolar stepper motor I'm using is this:
http://web1.automationdirect.com/adc/Shopping/Catalog/Motion_ Control/Stepper_Systems/Motors_-z-_Cables/STP-MTR-23055
I am planning to connect and control these devices via the parallel port.
I have semi-figured out how to connect the stepper motor to the parallel port using the dual H-bridge IC SN754410, where the 4 output are connected to 4 of the data pin on the parallel port (with optical isolators of course). One thing I have yet to figure out is where am I suppose to put resistor and capacitors on the board?
For the encoders, I've been told various things. Some people say that you need an A/D converter for connecting it to the parallel port, while some say I don't. So, which one is it?
Furthermore, I am using pin 1 on the parallel port to power the IC, and the 2 encoders, and I was wondering, is that enough?
To read a quadrature encoder you need a board that has a quadrature counter input. These boards have a counter that counts up for clockwise and down for counter-clockwise indications from the encoder. You can make such a thing yourself, but why bother? They are available off-the-shelf.
I would also advise you that there is no good cost-effective reason for continuing along the line you have begun with the parallel port. You talk about the limitation of $100. But you are going to spend the equivalent of over $10,000 of engineering development time to create something like this. The parallel port has no future. Modern computers are being made without any parallel port. If you indend to run under Windows, you will have problems getting the kind of real-time access you need to do any serious high-speed stepper motor control. Just look at what you can buy ready-made and I think you will see that it is just not worth it to try to design something like it.
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
I would also advise you that there is no good cost-effective reason for continuing along the line you have begun with the parallel port. You talk about the limitation of $100. But you are going to spend the equivalent of over $10,000 of engineering development time to create something like this. The parallel port has no future. Modern computers are being made without any parallel port. If you indend to run under Windows, you will have problems getting the kind of real-time access you need to do any serious high-speed stepper motor control. Just look at what you can buy ready-made and I think you will see that it is just not worth it to try to design something like it.
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
Robert, you are wrong and I'm sure you work for a big firm doing desk work. But with a week-end of work and a few Visual Basic lessons he will do it.
Ciao
Ciao
Actually, both you and Robert are at least partially correct. Robert is correct that the parallel port is going the way of the DoDo bird and there is existing hardware out there at modest cost that will accomplish the same thing. Now you are also correct in that it doesn't take all that long to write the code to do what the original poster wanted. Of course, he still has to design and fabricate the interface circuitry.
Anyway, I do industrial CNC machinery, and for what the original poster wanted to do I would recommend using existing off the shelf components.
Just my two cents worth.
Anyway, I do industrial CNC machinery, and for what the original poster wanted to do I would recommend using existing off the shelf components.
Just my two cents worth.
It is much more than coding. The OP doesn't even have a plan for reading an incremental encoder. That is going to take some serious circuit design in addition to coding. Trying to put all the intelligence into the host computer is not going to work. The host computer does not have the needed real-time response. By the way, in case "no way" is still reading this thread a year and a half later, no, I don't work for a big firm. I run a 1-person consulting business out of my home and I build prototype boards in my basement. So I know the home-brew world too. And I still think that when off-the-shelf equipment is available, you can never "roll your own" for the same price without sacrificing a lot of quality or functionality.
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
This reply is a bit late, but I hope it might still be useful.
For the encoder, the hardware requirements depend upon how fast the encoder is turning. At typical speeds, the output will be in the kilohertz. That is too fast to do with a PC in software and you'll need a hardware counter for this. You'll need a counter/timer chip as someone else has mentioned. I cannot imagine why someone would tell you that you need an A/D converter for this.
As for details of driving a stepper motor with a PC parallel port, please see the following article. I've referenced the following article several times this year for previous similar questions.
"http://linuxgazette.net/122/sreejith.html".
It describes controlling stepper motors using the parallel port of a PC. It includes circuit diagrams as well as 'C' source for the device driver and an example program. The article is intended to describe the basics of controlling motors for student robotics projects.
Most people trying to do a "cheap" stepper system would leave out the encoder and control the stepper motors "open loop" (no feedback). If you really need the encoders, you might look at running your board with a microcontroller chip and interfacing with the PC using an RS-232 connection (instead of the parallel port). You could send commands and receive position data via the serial link while the board operates autonomously.
For the encoder, the hardware requirements depend upon how fast the encoder is turning. At typical speeds, the output will be in the kilohertz. That is too fast to do with a PC in software and you'll need a hardware counter for this. You'll need a counter/timer chip as someone else has mentioned. I cannot imagine why someone would tell you that you need an A/D converter for this.
As for details of driving a stepper motor with a PC parallel port, please see the following article. I've referenced the following article several times this year for previous similar questions.
"http://linuxgazette.net/122/sreejith.html".
It describes controlling stepper motors using the parallel port of a PC. It includes circuit diagrams as well as 'C' source for the device driver and an example program. The article is intended to describe the basics of controlling motors for student robotics projects.
Most people trying to do a "cheap" stepper system would leave out the encoder and control the stepper motors "open loop" (no feedback). If you really need the encoders, you might look at running your board with a microcontroller chip and interfacing with the PC using an RS-232 connection (instead of the parallel port). You could send commands and receive position data via the serial link while the board operates autonomously.
From Control Engineering magazine...
Related articles from Control
Engineering magazine- Here's what you need to know about controls, says Automation Federation, U.S. government
- Electrical product safety: Are testing labs needed or is a supplier's declaration enough?
- Automation vendors boost biofuels
- Cyber security issues take center stage in 2009
- AIC Series presents new high energy storage chokes
- Decrease arc flash risk with new motor control center option
- Relays: Slim industrial relays have push-in terminal sockets
- 2009 Automation Integrator Guide
- Relays: Industrial relays for OEMs, process industries available in kits
Above articles copyright 2009 Reed Business Information.
Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2009 Control Technology Corporation. All rights reserved.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!




