Block Speed Controller

Eight of the PIC outputs are used to give four PWM speed controlled ports. Each PWM port has a speed and a direction line. The driver consists of two L293 chips. Each chip has 2 H bridge circuits. Each bridge can handle up to 1A of current. As they are expected to drive only part of the layout this may be adequate. The L298 is a good upgrade if more current is required.

The H bridges can have a sense resistor to measure the current passing through the bridge. The sense lines of all four bridges are tied together and are used to detect block occupancy and short circuit conditions. Two of the PIC inputs are used for this purpose. This leaves two I/O pins free which are used for debugging.

The block speed controller has 15 forward and 15 reverse speeds. It responds to the following commands.

  Command    Function
  ---------  ---------------------------------
  0100 0000  Poll(respond with 2 status bytes)
  0010 00pp  Increase speed of port pp by one step
  0010 01pp  Decrease speed of port pp by one step
  0010 10pp  Bring speed to zero on port pp
  0010 11pp  Emergency stop on port pp
  0011 00pp  Select port(followed by set speed command)
  001d ssss  Set speed to ssss in direction d
  0010 0101  Emergency stop on all ports

On a poll command it returns the following two status bytes.

  Response   Function
  ---------  ------------------------------------
  0010 pppp  Bit pattern indicating short circuit
  0011 pppp  Bit pattern indicating occupancy.
The controller puts out a variable duty cycle, constant frequency output rather than distributing the ons and offs. This eliminates the need for a speed shift register lookup table and may reduce the 'Do-Re-Mi' effect. The momentum profile will, for now, be handled by the host.

In future, the momentum profile may be stored in the controller itself reducing the burden on the host. The command set may even allow downloading a momentum profile. This may be done whenever a train enters a block. There is enough data EEPROM to handle this although programming time could be a problem.


Home Back Previous Next
Updated on 2 Nov 95. Feedback to