User Tools

Site Tools



Setting the board address

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.


RS-485 / RS-422 Connectors

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:

J7 Pinout

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).

Understanding Motor Power (Voltage & Current Specs)

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)


I think I'm communicating correctly with my STP100/101 but the motor is not turning

  1. Send H+ command and make sure the LED blinks
  2. Send HM0 to stop the motor from moving
  3. Current limit is too low, turn up current limit pots (see users manual)
  4. Motor not connected correctly, either phases are mis matched or one phase is reversed (see users manual)
  5. Make sure you have power to both the motor and logic
  6. Make sure you motor voltage is high enough

I'm trying to communicate with two or more boards and when I send a BDx command followed by a MI command all boards move there motors.

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.

How do I save my current step position when powering off the board?

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.

Frimware Known Issues STP10x

Firmware Version: 2.3

  • II- / MI- cause motor to move but no step count is given (unverified)

Frimware Change log for STP10x

Version: 2.3 2004-07Jul-20

  • Added command OI (offset immediately) Dest = Curr + n
  • Added ability to write and read start up positions from EEPROM (via WSS)

Version: 2.2 2004-06Jun-08

  • Upreved the version in conjunction with moving to flash part PIC16F73
  • In version 2.1 the RX command returned a result that was followed by “\n\r”, it should have been followed with “\r\n” such as in the printNum function

Version: 2.1

  • In version 2.0 and 2.0a the TT1 mode stopped the motor moving in the positive direction on pins 3 & 5 and the negative direction on pins 6 & 8.
  • Startup state of the TC/TS commands be retained in EEPROM.
  • Fixed bug that sometimes would cause limit switches to not work.

Version: 2.0a

  • TC command to sense the stopping of the motor from time to time, the controller fails to stop when the sensor is reached and the pin is set to a low state. The changes made in this version are done to alleviate this problem. This problem occurs while issuing some if not all of the following commands to the STP100:
		RD, RC, RT, RX, RP, II, H+, H-

Version: 2.0

  • added readDirectionSign function
  • added command RX to read the direction sign
  • added command TT1 to enable +/- pin checking
  • added command TT0 to disable +/- pin checking
  • Any TTx command will turn off any pin checking that may have previously been enabled using a TCx or TSx command.
  • added EE_TEST_TYPE to EEPROM location 12
	  0=Original, 1=New Style where checking never stops
  • TT1 Mode allows the for checking of limit switches in a single direction. This allows for testing to be turned on once without having to be reset every time a limit switch is hit. In this mode the AD1 and CT1 pins are used for + moving detection and the AD2 and CT2 pins are used for - moving direction.

Version: 1.9

  • No firm changes, this is a marker version to track the enabling of the brownout enabled bit being set during programming.

Version: 1.8

  • Problems with the EEPROM so I am going to eliminate it from the program and hardcode every thing. The fix implemented seems to be such a good fix that I am going to up the rev and make it a general release.

Version: 1.7x

  • trying to tie the Rx and Tx line of the RS-485 interface together so that the they can use two wires instead of four. The problem they are having is that the firmware initializes the EEPROM when these lines are tied together. v1.7x is a hard coded board number when the chip is started.

Verson: 1.7

  • Fixed a problem when using II or MI and traveling greater than 65k steps
  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

  • Began looking at accel/decel bugs reported below:
	  I have a problem with the Acceleration / Deceleration functions using
	  the STP100 stepper motor controller.
	  For example with these settings -
	  Step Full
	  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.

UpDate: 2-Feb-1999

  • Fixed cued move and increment commands - 2-Feb-1999 JSC
products/stp10x.txt · Last modified: 2015/03/21 21:49 by jacob