Turnout controller (TOC)

The turnout controller is a small AVR controller interfacing the main CTC controller to a maximum of two Circuitron Tortoise switch machines. The switch machines are run directly from the controller at 5 V, and position feedback from the switches is filtered and output to the main CTC controller, connected by only three wires (per turnout).

The controller performs the following basic tasks:

  • controls the motor according to requested position
  • turns off motor current after 10 seconds
  • debounces inputs (while moving) and delays accepting of the new state by 6 seconds

It only consists of an Atmel ATtiny2313 controller, one resistor, one quartz and three capacitors.
Update: It is advisable to use pull-up resistors on the turnout position feedback lines (TO_0_pos_N, ...). 5.7k to 10k should be OK. This is not yet shown on the schematic.

In the software package, there are two types of firmware: the standard version for two turnouts, and the second for controlling only one turnout.

A note on current consumption: resistance R of a Tortoise is about 625 Ohm, so at 5 V it draws only 8 mA, which is well in range of an AVR output pin.


Schematic and source code

Source code

Version 1.0[download]

Schematics

Version 1.0[download]