Ttelmah
Joined: 11 Mar 2010 Posts: 19509
|
|
Posted: Tue Jul 13, 2010 2:12 am |
|
|
It is not clear from your question, what sort of interface circuitry you have between the stepper, and the PIC....
Directly, a stepper needs a minimum of three separate phase signals (normally four, or two used in bipolar mode), so a massive amount of extra interfacing would be needed before you could 'drive a stepper' from TTL serial.
Assuming though you have one of the off the shelf step/direction controllers, with the direcion wire driven correcly either high or low, then all that is needed on the 'step' wire, is a pulse train. However you then talk about 1500RPM. Now most of these control boxes would implement full stepping, half stepping, or micro stepping modes. The frequency required on the wire for a given speed, will vary massively according to which of these your controller implements. Assuming full stepping (the mode with the highest torque), and one of the fairly typical 1.8 degree stepper motors, then '1500RPM', would require driving at 5000Hz. Perfectly possible with the standard serial port. _BUT_ - you then run into the big problems of the motor inertia, and inductance. First the inertia. Typically motors will have a specification for the fastest step train that can be delivered and they will start moving, rather than just sitting oscillating. Usually specified for 'no load', and 'half load' conditions. This is typically betwen perhaps 600Hz, and 2000Hz. Vastly below the rate needed here. You will _not_ get a stepper to start, feeding it with a pulse train at a rate for something like 1500RPM. You need to start at a lower rate, and then increase this rate to accelerate the motor, to have any hope of this working. The rate you will need to ramp, will depend on the inertia of your system. You can implement ramping by changing the UART baud rate.
The second problem is the coil inductance of the motor. When you apply power to an inductor coil, initially no current flows. The current then rises with time, the rate of rise, is dependant on the inductance, and the endpoint voltage driving the coil. The current is eventually limited by the resistances present in the drive, and coil. The problem is that for something like a '12v' stepper, this voltage, is the one at which the _maximum_ allowable current will flow through the coil, if attached, and not stepped. Using 12v, on such a motor, it'll take several mSec, for the current to reach this level, and the maximum step rate to deliver reasonable torque will be only a few hundred Hz. The only way to drive the required power into the coil _quickly_, is to feed the coils off a massively higher voltage than this 'rating', and then have a current control circuit, to limit the delivered current to the maximum allowed, when the motor is moving more slowly. Typically expect to see motors running off at least 5* their 'nominal' voltage, and for fast step rates like 5000Hz, think in terms of more like 20* this voltage. You won't get the motor to move with any reasonable torque, unless you have this implemented - things like small milling machines moving the table at reasonable rates, will use something like 50 to 60v supplies, with 3.6v motors....
So, comments:
1) You won't get a stepper to start at this rate. You need to ramp the pulse train.
2) Even with this ramped, you need a driver using much higher voltages than the motor 'rating' to use a stepper at such speeds.
3) A PWM output does this much easier....
4) For movement at such high speeds, other motor technologies are 'better'.
Best Wishes |
|