DCC Topics

Links

DCC Command Station (go to spanish description)

Thanks to RAY WEST that helped me with the translation of my project pages!!!! Good job Ray

This is the main train controller which has the ability to encode messages such as speed and direction as well as special functions for light and sound. The signals are amplified and then sent to the track. Some controllers (Command Stations) in the market have the power or amplification system (booster) built-in.

DCC Basic Diagram

Some designs of Command Stations have all the previous elements incorporated in one unit, but the majority of commercial solutions come as separate components. The design of the DCC Command Station which I have worked on is of the integrated type and it was based on the work by Robert Cote (miniDCC), but I have rebuilt the  microprocessor code in C because I did not find any project on the internet that was written using this high level language. It is much easier to understand and maintain, but it is not the most efficient code.

El circuito esquemático usando un L298H

When I designed and built my first booster circuit I used the  L298H integrated circuit from STMicroelectronics since it was easy to use. I didn't have to bother with individual Mosfets which I had never used before. Later I found that Mosfets are a cheaper option but they do have more problems with their application, which I will discuss later.

See the diagram in more detail in PDF The link in the above circuit is for the L298H version. The latest version usign discrete mosfets and mosfets drivers is in this link

The hardware is based on a micro controller - the PIC 18F4550 - which runs with a 4 MHz crystal, but combined with the integrated PLL module, the processor actually operates at 24 MHz. Data entry is via a 4 x 4 matrix keyboard and there is a display of 16 x 2 lines. The station consists of four potentiometers to control the speed of each of the 4 trains which the controller is capable of handling at the same time. The amplification (booster) station uses the STMicroelectronics L298N, which consists of a double H bridge, which if connected in parallel can provide up to 4 amps. Alternatively, using an LMD18200 in the Booster circuit will supply up to 2 amps to the track, but that can be connected in parallel for increased current. Another possible circuit, which could provide even more current uses an H bridge with discrete P and N Mosfets, and this is presented below.

This diagram was taken from http://www.discovercircuits.com/DJ-Circuits/hbridge2.htm as a reference only, and all rights are reserved by Dave Johnson. The USB module is available for a future connection to the PC, but is not yet implemented in the firmware.

This will be one of the future improvements together with the use of an LCD graphic display panel of 128 x 64 pixels rather than the LCD of 16 characters x 2 lines.

Control of the trains is allocated to each potentiometer by each column of keys on the keyboard. The assignment of keys is as follows: * The first key of each column turns off or turns on the train light * The second key changes the direction of the train * The third key activates function F1 of the decoder * The fourth key activates function F2 of the decoder When the control station is not in programming mode, the functions are those that were specified previously. Pressing the normally open switch (SW1 in the diagram) for more than 2 seconds enters the control station into programming mode. In this version there are two screens for programming: 1. Configuration of the direction of the locomotive and selection of the speed steps, either 28 or 128 steps. This is available for each of the four locomotives that the controller can handle at the same time. 2. Programming all the CV (configuration variable) values The software is written in MPLAB C 18 , using compiler version 3.5 (or higher). Download source code

Control of the trains is allocated to each potentiometer by each column of keys on the keyboard. The assignment of keys is as follows:

  • The first key of each column turns off or turns on the train light
  • The second key changes the direction of the train
  • The third key activates function F1 of the decoder
  • The fourth key activates function F2 of the decoder

When the control station is not in programming mode, the functions are those that were specified previously.

Pressing the normally open switch (SW1 in the diagram) for more than 2 seconds enters the control station into programming mode. In this version there are two screens for programming:

  1. Configuration of the direction of the locomotive and selection of the speed steps, either 28 or 128 steps. This is available for each of the four locomotives that the controller can handle at the same time.
  2. Programming all the CV (configuration variable) values

The software is written in MPLAB C 18 , using compiler version 3.5 (or higher).

Download source code

 

This is a Link to a youtube video with a short explanation of the use of this unit

 

Algunas fotos de la estación

Para verlas más grandes puede dar click sobre la imagen

www.000webhost.com