This simple window application will allow you to open a com port and change the board address of a STP10x. The commands used are WE0 x where x is the board address to set.
The STP10x have two six pin RJ12 connectors that present RS-485 / RS-422 differential transmitter and receivers. The STP10x can only act like a RS-422 receiver. To utilize bi directionally RS-485 communications the Tx and Rx signals must be connected together.
The RJ12 pinout on the STP10x is staggered as shown in this picture of the PP232-485f:
The pinout of J7 of the STP101 is shown below. The STP100 has the same pinout, but pin 4 and 7 are no connect. The pinout is not clear in the users manual and is shown below. Most headers connectors have pinout in this orientation. The image of the connector is from the top (component) side of the PCB without the connector installed. The resistors on pin 4 and pin 7 of are intended at current limit resistors for LED's that can be used to power photo interrupters for limit switches . To calculate the current that will flow through your LED find the Vf parameter for your device. The current is calculated using ohms law:
I = V / R
So if you LED is powered through pin 4, which has 5V connected to a 200 ohm resistor. You would calculate the current using the following formula:
I = (5V - Vf) / 200 Ohms
I = (5V - 1.7V) / 200 Ohms = 0.0165 A = 16.5 mA
The Vf voltage drop is subtracted from 5V to determine the voltage drop across the resistor. This can be used to calculate the current through the resistor (and therefor through the LED since its in series).
Stepper motors are typically specified with a voltage and a current, but when trying to control them it is better to think of these two together as a single power rating rather than individual voltage or current rating. Since motors are make of insulated copper wires and not silicone substrate the material properties are not actually at there immediate limit for break down when either the maximum voltage or current is reached, because of this you can exceed either limit (or even both for shot periods of time) if the (average) power is not exceeded.
In a motor a general rule of thumb is that voltage is proportional to speed and current is proportional to torque, so you can maximize one or the other as long as the average power is constant.
P(Power) = I(Current) * E(Voltage)
When you send commands to the board they should be followed with a ASCII 13 (CR) if you follow them with ASCII 13+10 (CRLF) this problem shows up.
For firmware versions 2.3 or greater you can issue a WSS command before powering off the board to save the current step position into eeprom. When you next power up the board you will start at this position. If power to the board is removed without issuing this command, the previous startup position will be used.
Version: 2.3 2004-07Jul-20
Version: 2.2 2004-06Jun-08
RD, RC, RT, RX, RP, II, H+, H-
0=Original, 1=New Style where checking never stops
The motor slows down...
The problem only appears when both SA and SM are set for acceleration.
The problem only appears when moving greater than 65k steps.
Added RL // Read decelPoint
Added RPS // Read ShortMove (1 if short)
Version: 1.6 5-May-1999 Cinco De Mayo
I have a problem with the Acceleration / Deceleration functions using the STP100 stepper motor controller.
For example with these settings -
SA=10 (acceleration factor)
SD=700 (step delay)
SM=3000 (start step delay)
Command a II or MI positive or negative motion of 255 or less, the
accel. and decel. work properly.
Command a II or MI positive or negative motion of 256 or more, the
positive motion accel. is ok but there is no decel.. It just stops. The
negative motion accel. and decel. works fine.
I also discovered that if you switch directions while the motor
is accelerating or decelerating the motor continues at the current
speed until it reaches it's former destination position then switches
directions, after the direction change the accel/deccel seem to
preform as expected.