Block Signal Hardware Description




Refer to the Block Signal Schematic

Two BS2 I/O bits are assigned to each signal for the four possible states of a lamp; twelve signals, twenty-four bits. A pair of 74LS151's are used to select the block detector inputs under program control. The selected input passes through a 74LS32 OR gate to a BS2 I/O pin. The block occupancy detector (schematic) reports an active condition (1) when power is being drawn within its block. This is caused by the locomotive, cars with internal lighting, or cars equipped with resistor wheels.

The Led's used in this circuit are the two lead type that have the red and green Led's connected internally front to back. The Led is wired to a pair of BS2 I/O bits and a series resistor. The prototype circuit uses a resistor pack that contains eight 820 ohm resistors. Adjust the resistor value to obtain the desired Led brightness. Setting the two BS2  I/O bits that are connected to the Led to 0 and 1 causes it to light red. Setting the bits to 1 and 0 causes the Led to light green. Rapidly switching between 0/1 and 1/0 will product a yellow color.

When selecting the bi-color led, refer to the spec sheet and choose one that has similar red and green intensities. A red or green that is brighter will be difficult to balance into a good shade of yellow. Select a led with an opaque lens instead of a clear one. The red and green colors blend better with the opaque lens.

Led's with differing red/green intensities can be used but additional series diodes will be needed. General purpose silicon diodes (1N914, 1N4148) drop .6 volt. Adding two or more diodes in series with the brighter color will lower the voltage applied to that color. One diode for the other color will be necessary to provide a current path. Some bi-color led's may required five diodes in series with the red color and one diode in series with the green color to achieve a good yellow color.

Alternatively, Led's with differing red/green intensities can be balanced by adding a pair of silicon diodes (1N914, 1N4148) and a 10k ohm variable resistor. The diodes serve to steer the current through each Led color. The variable resistor is added in series with the brighter color. Increasing the resistor value will lower the intensity of the associated color. Very fine adjustment of the yellow color is possible with this circuit.

The signal at L8 is a moveable arm semaphore. A R/C servo is used to position the signal arm/color. One of the two BS2 I/O control bits is connected to the servo input. The BS2 PULSOUT command is used to position the servo. The other I/O control bit is used to drive the on/off state of the lamp. A Tomar industries semaphore was used in the prototype circuit which has a 1.5 volt incandescent lamp. A resistor in series with the lamp is required to prevent burnout and to adjust its brightness. Using 5 volts, a 100 ohm series resistor produced the appropriate brightness.

An output pin of the Basic Stamp is connected to a Led and used to indicate operation (heartbeat). Flashing indicates that the code is cycling in the main program loop.

An input pin of the Basic Stamp is connected to an on/off switch. When this switch is set to off (1), normal program operation is performed. When set to on (0), the program runs in exercise/test mode.

Color Bar

Navigation:   D&B Home   Buczynski.com Index

Copyright © 2006 Don Buczynski
San Diego, California