Train decoder for Märklin Digital
History :
Here you can see how the firmware (and hardware) for the
decoder have developed since late 1998.
Frankie and I had expected to have
this finished by 1999 so we could turn to other projects like loco controller,
turnout controller and projects not at all related to model railroading.
We were wrong! This will probably be just another never-ending project. Not
in the sense that it will never be useable, on the contrary. The decoder works
as it is expected to, right now.
But ideas for new features keeps popping up.
And we try to implement them as well as we can. Please keep requesting those
exciting new features you just can't live without!
But! We will run out of codespace soon. We have used around 90% of the
processors codespace now. Even though we constantly try to compact the existing
code to gain a few bytes here and there, the limit is not far away.
So we
have decided to leave version 2 as it is now, and continue with version 3. The
hardware will not change, only the firmware. But existing functionality may
disappear, to make room for new functionality.
- December 7, 1999: A new revision of the decoder software
have been made available for download.
This version have an improved steam
generator, dependant of the speed. Now it can adjust to a user-defined
speedtable, and produce a large PUFF when the loco is accelerating.
We have
also altered the algorithm for storing speed in EEPROM. Now this will only
happen when power is interrupted. This should prolong the expected lifetime of
the EEPROM.
- December 3, 1999: A new revision of the on-track programming
manual have been made available for download.
Version 2 is so close to
being final, that I dare to promise that it will be officially released before
the new millenium. Even Dr. König is very close to being satisfied with
it.
I recieve a lot of emails related to the decoder. Please do not expect
to get an answer from me the same day, I'm too busy to do that.
- December 1, 1999: Version 2 is still being fine-tuned. We
have found and cured most of the known bugs.
The delay now have three
parameters: Minimum delay, additional delay and delay-"knee". This means that
the delay is speed dependant for speed below the knee-value, and constant for
speeds above knee-value. Setting the additional delay to minimum (1) will
result in a constant delay regardless of speed.
Readymade PCBs will be
available soon, kits will be available in january 2000.
And I would like to
announce here that Frankies MasterController (= CU) have been build and
tested, and it is working like a dream. Note that you can use it without a
concentrator unit, and that it also works with Märklin boosters.
A version
with an IB-style speedknop and 27 speedsteps is being tested right
now.
- October 12, 1999: Version 2 is still being fine-tuned. We
still have some mysterious bugs that we can't find.
Some features meant to
be implemented in version 3 can be found in version 2 now.
The delay have
proven to be tricky to get absolutely right. So now the delay is
speed-dependant! And when starting from speedstep zero, the delay will start
from a value (which is on-track programmable) just below the first real
speedstep. We also have trouble with the responsetime on new commands. This is
the one which bothers us the most. We can't find the cause! But we will
persevere.
A word of caution to people building the DC motor version: At
power-up the decoder will draw a large current for a short time. Simply bad
design. Adding a resistor from the gate of one (just one) of the H-bridge
MOSFETs to ground will cure the problem. The PCB will be altered to include
this resistor.
- September 1, 1999: Version 2 is still not completely
debugged. But we are working on it!
Version 3 is well under way. But we
have come to realize that we no longer have enough room in the PIC16C84. So be
prepared to see only a 16F84 version.
We don't consider this a major
problem, as 16F84 is as cheap and easy to get as the soon obsolete
16C84.
First news for a long time - blame summer vacations!
- July 30, 1999: Version 2 is now considered finished (well,
almost). A few, very minor, changes have been made, and will be tested within
the next week or so. From then on, version 3 will be the version in
development.
Planned features are:
-2-rail operation possible (fully
automatic selection of 2- or 3-rail mode).
-Ability to stop at signals,
with all functions still working.
-Expected lifetime increased by using new
algorithm for EEPROM operations.
-User-requested features (keep them
coming!).
- July 28, 1999: A description of the decoder will appear in
the german magazine MIBA Special, which will be published this fall.
- July 27, 1999: The DC version schematic have changed
slightly. We now use MOSFETs to drive the H-bridge instead of bipolar
transistors. We use the function output MOSFET, so no changes to the PCB or
the firmware. A further advantage (apart from the fact that the decoder runs
cooler) is that a new type component won't have to be used.
- July 21, 1999: A new firmware have been posted on Frankies
server. A bug have been corrected: When AUX controls the light outputs, the
output will turn off when AUX is turned off. It is no longer necessary to
change direction to turn the output off.
- July 9, 1999: The DC version is being tested, and things are
looking good. Still need to test on BIG Roco motors.
Speed dependent
steam is also working now, but needs some fine tuning.
The code have been
compacted somewhat, so that we have room for new features.
- June 15, 1999: The DC version have been redesigned, and if
all goes well, we won't need a special version of the software.
We have
implemented a new feature for steamlocs: Steam dependent of speed. It is being
tested now. Thanks to Hans Jørgen Jørgensen for the suggestion.
- June 11, 1999: The second speedtable is tested and working,
but ONLY in the new format. This has been decided because F3 is used to toggle
it on/off, and F3 is not available in the old format. We are tidying up the
code to make room for future features, so it will be a while before this
version is released.
- May 25, 1999: I have implemented a second speedtable, which
can be chosen with the F3 button. This means that you can switch between
normal driving characteristics and shunting characteristics. This should give
better control at low speeds. This version will be released as soon as testing
is completed.
The DC-version have to be redesigned. This will probably also
mean that the software for the AC and DC version will be different.
- May 15, 1999: Frankie have uploaded a new version of the
software, which supports two decoder addresses. Also, the programming of the
light function have been changed in order to utilize FUNC in the new format.
The errors reported by Kenneth have been corrected in this version.
- May 12, 1999: Peter reports that the DC version doesn't work
with ROCO motors. Smaller motors seems to be handled OK.
- May 4, 1999: Kenneth Pallund have put the decoder through
its paces. He have found minor errors in the on-track programming. We are in
the process of correcting these errors.
- April 29, 1999: Peter Besser have started testing the DC
version.
- April 26, 1999: The layout for the DC motor version is now
designed. Still the same PCB size (double sided version), but it is not
manufactured yet. Anyone interested in testing this version??
- April 7, 1999: We have now built and tested seven decoders.
And we can't find any bad behaviour in any of them.
- April 4, 1999: We have successfully tested version 2 on the
double sided board. It also works with 16F84 now.
- March 5, 1999: We have started implementing secondary
address. This means that two locs can be used for double traction AND be used
independently.
- March 24, 1999: A second PCB for version 2 is finished. This
is a single sided board, measuring 32x22mm. Not tested yet!
Documentation will be available as soon as testing is completed.
- March 16, 1999: The PCB for version 2 is finished. It is a
double sided board measuring 19x22mm. I am considering doing a single sided
version too, to make it easier to manufacture. See more here!
- March 12, 1999: We have successfully tested the decoder with
a RC oscillator instead of the ceramic resonator. This will reduce the price
considerably.
- February 20, 1999: A bug have been removed. Further, the
MAX809 IC is replaced by a transistor and three resistors to avoid
"bucking".
- January 25, 1999: A new, tested, version is now posted on
Frankies webpage. This version is for the old PCB. Also, two descriptions have
been completed.
- December 23, 1998: We don't have access to a 6021 for
testing, until after christmas. This may well delay the release of the newest
version. Please have patience !
- December 21, 1998: Hmm. New functionality means new bugs. We
still hope to have a new version ready before christmas. And the version for
the new, smaller PCB should be ready before 1999.
- November 19,1998: Most bugs seems to be removed now. We
start working on implementing additional functions to the on-track
programming, such as: F4 can be used as an output, or be used to turn the
delay on and off.
- November 16, 1998: The new PCB (20x20mm, doublesided) is
finished. A PCB for use with DC motors (Roco etc.) is in progress.
- November 6, 1998: Now we can program the speedtable, AND use
it in normal operation.
- November 2, 1998: On-track programming is getting along. The
address and delay can now be programmed.
Back to the main
decoder page
(C) 1999 Bo Brændstrup