check in
Completed

DCC keychain

PRODCC keychain

tag

272
0
0
0
Mode:OSHWLab Stars
OSHWLab Stars
Reproduction cost: $5

License

Public Domain

Creation time:2024-12-08 18:12:52Update time:2025-03-03 02:18:52

Description

DCC Keychain: a must for DCC train modeler. Read and Write CVs both on the programming track and on the main, using RAILCOM cutout. Interfaced with JMRI for a completely free and open source decoder management system. 

Buy from JLCPCB the assembled board that embeds the following functionalities:

 

 

Download source code at https://github.com/Emppalpatine/CV, compile it and download to the microcontroller using the STC programmer connected to the 3 pads on the top of the "C" letter:

 

This is the particular of pin connection:

 

 

Now the CV programmer is ready to operate, connecting the USB cable (toward PC) and the DCC output connection (toward rails, loco emulator in photo with ESU LokPilot 5).

 

 

Now download and install the last version of JMRI on the PC (https://www.jmri.org/). Start "DecoderPro" and set the connection to the layout as for the following picture (setting the COM port to the correct value for your system - in my PC is COM8):

 

and select on the page "defaults" the following options:

 

 

once configured the link and the options, return on the main page of DecoderPro and then select:

  1. Programming track (page top right): "LocoNet" and mode "Direct Byte"

  2. Select the decoder you want program from the roster list

  3. Select "Programming Track" or "Main Track" options

  4. Push the button "Program" that will open the decoder program windows

 

CV read and write

The CVs are read and written in the following page of DecoderPro (for both programming track and main track). Each CV is read simply pressing the button "Read" and the value in yellow (if the read-out is correct) will become white. If there are some errors in readout, the cell value will become red. To Write a CV, write the new value in the cell "Value" and press "Write": in case of errors the cell will become red, otherwise green.

 

 

Read-out speed 

The CVs are read (on the programming track) with the DIRECT BIT mode. Each bit is check for "one " value and at the end thecomplete CV is checked with DIRECT BYTE to give a error-less operations. The readout speed is approximately one CV every second:

Readout on the programming track

The following link shows the speed for the readout of the LokPilot 5 speed table on the programming track:

Read LokPilot 5 speed table on the programming track

for comparison the same read-out of the LokPilot 5 speed table is done using the programming on the main (POM) mode:

Readout of the LokPilot 5 speed table in POM mode

 

Programmer operative parameters change

The programmer has been designed to work with the largest number of decoders on the market, but there may be some that, for correct management, require a customization of the programmer. In this CV programmer have been inserted 8 parameters that can be modified by the user such as LocoNet LNCV.

How modify a LNCV in DecoderPro:

  1. From the main page, open the "Loconet" menu, then select "Configure LNCV modules" and this page will be displayed:

 
 

Set the "article number" to "1111" and the "module address" to "1", then push "Start Module Programming". The LED on the programmer will start to fast blink. The you can read and modify the parameters in the LNCV from 1 to 8.

 
 
To read a LNCV, simply write its address next to the "CV:" label and press "Read". To write it, in addition to the address, enter the new value next to "Value:" and press "Write". Below is the list of editable LNCVs and the parameters associated with them:
 
LNCV(0) = Module address, can be a number from 1 to 65534. It is only useful during the beginning of the programming procedure, there is no need to change it.
 
LNCV(1) = Threshold (in mA) for the detection of the acknowledge pulse during operations on the programming track. It can be a number between 40 and 200mA, default 60mA.
 
LNCV(2) = minimum duration (in multiples of 90us) of the acknowledge pulse during operations on the programming track. Can be a number between 40 (40 x 90us = 3.6ms) and 100 (100 x 90us = 9ms), default 40 (3.6ms).
 
LNCV(3) = number of reset packets sent before programming packets during programming track operations. Can be a number between 3 and 12, default 3.
 
LNCV(4) = number of programming packets during programming track operations. Can be a number between 5 and 20, default 5.
 
LNCV(5) = number of reset packets sent after programming packets during programming track operations. Can be a number between 6 and 24, default 6.
 
LNCV(6) = number of programming packets sent during main track operations. Can be a number between 5 and 20, default 5.
 
LNCV(7) = number of attempts to read and write a CV during operations on the programming track. Can be a number between 3 and 10, default 3.
 
LNCV(8) = number of command packets to wait before reading the result from RAILCOM. Can be a number between 1 and 20, default 1.
 
When you finish making changes, press "Stop Module Programming" to exit LNCV programming mode, the LED on the circuit board will stop flashing and remain solid.
 
 

Design Drawing

The preview image was not generated, please save it again in the editor.

BOM

Bom empty

Attachments

OrderFile nameDownload times
No data
Clone
Add to Album
0
0
Share
Report

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation