Myke's Home Page

Book CD-ROM Home

File Copying/Harddrive Setup

Development Tools

Experiments

Projects

Useful Code Snippets and Macros

Introduction to Electronics

Introduction to Programming

Datasheets

PCBs

Links

McGraw-Hill Professional Publishing

"TrainCtl" Project

In some ways, this is a more complex application than some of the later ones due to the PICmicro being powered by and controlling Alternating Current devices. The project itself, which changes traffic signals when a train (detected by a "hall effect switch") goes by and could be used for the traffic lights in a model train "level crossing". The circuit is very simple and can be built in a half hour or so.

An important caution for this project is that it is designed to use the 18 VAC auxilliary power available in most train sets. This project is NOT designed to be used with 110/220 household/industrial wiring. If you would like to create a project which uses these voltages, consult the text for the explanation of how I came up with the values for this circuit and check with your local power authority to ensure that you are creating an application that is safe.

Click Here to look at the application's source code.

The circuit used for this application is:

The bill of materials for this application is:
Part Description
PIC12C508 PIC12C508-JW
5.1 Zener 5.1 Volt, 1/2 Watt Zener Diode
1N914 1N914 Silicon Diode
TRIAC1-TRIAC3 Forward Current 6 Amp, 25 mA Gate Current (Radio Shack Part Number 276-1000)
220 Ohm 220 Ohm, 1 Watt Resistor
330 uF 330 uF, 35 Volt Electrolytic Capacitor
0.1 uF 0.1 uF, 16 Volt Tantalum Capacitor
Train Sensor Open Collector Hall Effect Sensor (See Text)
Miscellaneous Prototype PCB, Wiring, Screw Terminals for Electrical Connections