Summer 2025 • Princeton University Laboratory Learning Program (MAE 412)

Princeton University Research

Modernizing the ~20-year-old DCC Railroad Track Switch Thrower for Princeton University’s microprocessor curriculum (MAE 412: Microprocessors and Their Applications)—designing, sourcing, and hand-soldering a single-sided PCB with an onboard ATmega328P microcontroller and dual 4700µF trickle-charged capacitors.

Princeton MAE 412 — Modernized DCC Track Switch Thrower

Interactive schematic of the single-sided PCB redesign featuring an onboard ATmega328P and dual 4700µF trickle-charged capacitors.
Trickle-charges from Track Power (~12s full cycle) • 2nd 4700µF capacitor enables 2 throws in swift succession
ATMEGA-328P 28-Pin Onboard MCU (New) JP1 (1x6) LED D1 DIR Pin: LOW (Straight) TRIG Pin: IDLE Eliminates external TTL wiring for track automation DUAL 4700µF CAPACITORS Bridge Rectifier + R5 (1kΩ) Trickle C1: 4700µF 100% C3: 4700µF 100% RELAY & ISOLATION STAGE OP1 (4N25) + Q2 (TIP120) Q3 (BC327 PNP) + KS2E DPDT Relay: N.C. (11) Straight DCC MODEL RAILROAD TRACK SWITCH BLACK (Common) • GREEN (Straight) • RED (Turnout) ACTIVE PATH: STRAIGHT (GREEN WIRE)
Addition 1 • Microprocessor
Onboard ATMEGA-328P
Eliminates external TTL wiring so the model train track switch can be directly automated on-board
Addition 2 • Energy Storage
Dual 4700µF Capacitors
Stores double the trickle-charged energy so two switch throws can be executed in swift succession
Fabrication Constraint
Single-Sided Copper PCB
Converted the ~20-year-old double-sided board into a single-sided layout (~2 wks design, ~1 wk build)

Modernizing the DCC Railroad Track Switch Thrower

Princeton University's MAE 412 curriculum (Microprocessors and Their Applications) uses automated model train layouts to teach embedded control systems. The department's existing DCC track switch thrower was ~20 years old. I analyzed the legacy circuit and designed, sourced, and hand-soldered a single-sided PCB integrating an onboard ATmega328P microcontroller and dual 4700µF capacitors for rapid successive throws.

Microcontroller
Onboard ATmega328P
Eliminated external TTL lines for autonomous track control
Energy Storage
Dual Trickle Capacitors
Two 4700µF capacitors enable two switch throws in rapid succession
Fabrication
Single-Sided PCB Conversion
Replaced legacy double-sided board with single-layer copper routing
Deployment
Hand-Soldered & Deployed
Fabricated in lab, fully tested, and integrated into course hardware
Princeton MAE 412 • Internship Research Paper

Modernizing the DCC Railroad Track Switch Thrower

Abstract: Analyzed Princeton's legacy ~20-year-old MAE 412 DCC switch thrower schematic and redesigned it into a modern, single-sided PCB. Key upgrades include integrating an onboard ATmega328P microcontroller for direct autonomous track control and adding a secondary 4700µF trickle-charged capacitor to enable rapid back-to-back switch throws.

Read Full Paper Transcript ▸
1. Background & Legacy Analysis

Part of Princeton University’s engineering curriculum is a class centered on microprocessors and their applications (MAE 412). This class uses model train sets as the platform for students to create and test their own automated model train sets. One of the most useful tools is a DCC railroad track switch thrower with a trickle-charged capacitor. With the original board’s design being ~20 years old and the limits becoming clear, it was decided to modernize the board.

Analysis of the legacy schematic (Figure 1) showed it drew power from the track or an optional 5V input, charging a capacitor over ~12 seconds before discharging through a relay to throw the track switch.

2. Modernized Single-Sided PCB Design

The new board introduced two key additions: an onboard ATmega328P chip, eliminating external connections for direct automation, and a second 4700µF capacitor to store additional charge for two rapid throws. The board was engineered as a single-sided PCB (~2 weeks design, ~1 week assembly and hand-soldering), reviewed, approved, and deployed in the lab.

📑 Full Research Paper Document (2 Pages • Schematics & Figures Included) Open Fullscreen ↗
New single-sided DCC railroad switch thrower PCB populated with ATmega328P, relay socket, optocoupler socket, LED, and resistors
New Single-Sided PCB • Component Side
Onboard ATmega328P & Relay Socket Assembly

My newly fabricated single-sided DCC RR switch thrower PCB held up to the lab lights, showing the 28-pin ATmega328P chip, DPDT relay socket, 4N25 optocoupler socket, status LED, resistors, 6-pin header, and single-sided copper routing.

Single-sided copper trace layout and hand-soldered underside of the new DCC track switch thrower PCB
New Single-Sided PCB • Copper Trace Side
Single-Sided Copper Routing & Hand-Soldered Joints

Underside of the new single-sided copper-clad board showing the complex single-layer trace routing and hand-soldered through-hole pads completed in the Princeton lab.

Figure 2: New DCC Track Switch Thrower Schematic with ATmega328P and dual 4700uF capacitors
Figure 2 • New Board Schematic
Modernized ATmega328P & Dual-Capacitor Schematic

My redesigned schematic integrating the 28-pin ATmega328P, dual 4700µF trickle-charged capacitors (C1 & C3), KS2E DPDT relay, 4N25 optocoupler, BC327 PNP, and TIP120 transistor.

Figure 1: Original 2008 Princeton MAE 412 RR Switch Control Trickle Charge Schematic
Figure 1 • Legacy 2008 Schematic
Original MAE 412 Trickle-Charge Schematic

The original Princeton MAE 412 schematic (Rev C, Aug 2008) using track power, a bridge rectifier, a single capacitor (~12s charge time), 4N33 optocoupler, and external TTL control lines.

Figure 3: Old double-sided DCC RR Track Switch Thrower board connected to model train track
Figure 3 • Legacy ~20-Year-Old Board
Original Double-Sided DCC Switch Thrower

The ~20-year-old double-sided Princeton MAE 412 board with a single large electrolytic capacitor, Omron G5V-2-H1 relay, and TIP122 wired to a model railroad turnout.