MiniDCC Project

11,802

MiniDCC Project
MiniDCC Project

Develop a self-contained unit that can automatically control up to four DCC-equipped engines, starting and stopping them based on their position on a loop of track. The control PIC interacts with the MiniDCC controller through the MiniDCC's keypad. Six pins from the 16F88 will connect to the keypad through a pair of 4066 ICs. Due to a limited number of available pins on the 16F88, an infrared TV remote control is being utilized to change settings on the controller. The IR signal is received by the PNA4602M, which is designed to respond only to IR signals modulated at 38 kHz, the frequency typically used by TV remote control units. The 16F88 controller is programmed using PIC Basic Pro. The test code for the controller is included below. Note that it is currently unable to sense train position and is primarily being used to test the circuit and its components. A custom 4 x 4 keypad matrix has been created from 16 discrete SPST momentary switches, specifically selected from Electronic Goldmine (part number G1412).

The described circuit involves the integration of a PIC microcontroller (16F88) that functions as the central processing unit for controlling multiple DCC (Digital Command Control) equipped model train engines. The architecture allows for automatic control of up to four engines, facilitating their start and stop operations based on their respective positions on a circular track layout.

The communication between the PIC and the MiniDCC controller is established via a keypad interface. The keypad is constructed using a custom 4 x 4 matrix design, employing 16 SPST momentary switches. This design choice enables user interaction for selecting various functions and settings related to the operation of the DCC engines. The keypad connections are managed through two 4066 analog switches, which provide the necessary signal routing while conserving the limited I/O pins available on the 16F88 microcontroller.

To enhance the functionality of the control unit, an infrared (IR) remote control is incorporated for changing settings dynamically. The IR receiver, PNA4602M, is specifically selected for its ability to detect signals modulated at 38 kHz, which is standard for most consumer IR remote controls. This feature allows the user to interact with the control unit wirelessly, providing a convenient and flexible means of operation.

Programming of the 16F88 is conducted using PIC Basic Pro, a high-level programming language suited for microcontroller applications. The initial test code has been developed to verify the circuit's functionality and the interaction between the components, although it is noted that the current implementation does not yet include train position sensing capabilities. Future iterations of the project may incorporate position detection to further enhance the control system's automation and responsiveness.

Overall, this design represents a sophisticated approach to model train control, integrating both wired and wireless communication methods while utilizing a microcontroller to manage multiple engines efficiently.Develop a self contained unit that can automatically control up to four DCC equipped engines, starting and stopping them based on their position on a loop of track The control PIC interacts with the MiniDCC controller through the MiniDCC`s keypad. Six pins from the 16F88 will connect to the keypad through a pair of 4066 ICs. Because of a limited n umber of available pins on the 16F88 an infrared TV remote control is being used to change settings on the controller. The IR signal is received by the PNA4602M. It is made to react only to IR signals that are modulated at 38 KHz, the frequency used by a typical TV remote control unit.

The 16F88 controller is programmed using PIC Basic Pro. The test code for the controller is below. Note that it is not yet able to sense train position. It is being used primarily to test the circuit and its components. I chose to make up my own 4 x 4 keypad matrix from 16 discreet SPST momentary switches - the ones I have chosen are from Electronic Goldmine (part number G1412) 🔗 External reference