January 4, 2015:
We are now into 2015 and the Christmas holidays are over. But for once, I have had a vacation. A real vacation with a lot of model train time. My wife is studying for her exams. So I have been able to spend half and whole days. The victories are multiple:
1. I have made decoder programming from JMRI work through IB-COM and IntelliBox II in close cooperation with a vertain mister Alain Le Marchand from somewhere in France.
2. At the same time, I have sneaked other corrections into JMRI: Control of turnouts via IB-COM / Intellibox II as well as an earlier patch for feedback from IB-COM / Intellibox II to JMRI, that by mistake only was implemented for Intellibox I.
3. I have done a small quick test with scripts in JMRI, to be exact an adapted version of BackAndForth.py.
4. I have built an S88-N-P and an S88-N module. Both works.
5. I have converted my old Märklin 3060 locomotive to DCC / digital.
6. I have been experimenting with my infrared diodes / photo transistor pairs.
7. I have made better and more specific plans for the extension of my prototype layout.
Ad. 1 and 2: The weekend before Christmas was used to implement as much decoder programming in JMRI as I could read from the RocRail source code. IT was enough to get “hole through”. I committed it as a patch and very fast got feedback from Bob Jacobsen (the perhaps most active person in JMRI) and from Alain Le Marchand.
Bob immediately implemented my patch and improved it regarding fit into the JMRI code base. In addition, he asked me back, why I had not enabled more ways of programming in JMRI than I had – for example PoM (Programming on Main), + wrote how I could enable that. According to my knowledge, IB-COM and thereby (I thought) Intellibox II does not support PoM. But Alain could inform me that at least Intellibox II does support PoM. It has however been proven true that IB-COM cannot do PoM.
During Christmas (while I was visiting my family in Jutland) Alain did some experiments, where he via the keys on his Intellibox II and using the LocoNEt monitor in JMRI produced documentation regarding which LocoNet messages that correspond to PoM programming. Besides, he tested my programming track programming. We had a lively conversation via e-mail and I could sit 100’s of kilometers away from my IB-COM and my PC and just using an iPad reach almost full understanding of these LocoNet messages.
Monday after Christmas and most of the Tuesday and Wednesday went with both getting PoM to work and to find out that programming track programming is not only one thing: There are three modes (direct byte, register and ???????), which have each their sub-command in LocoNet. I still don’t know what the difference is, but I somehow think register mode is for old decoders.
It was all quite a fun process. And it was a good and memorable cooperation with Alain, who was sending outputs from LocoNet Monitor, tested my changes and ended up committing it all into the JMRI code base. Alain is a registered JMRI developer even though he is not exactly an expert when it comes to Java. Alain was however simultaneously implementing support for F9 – F28 for both Intellibox I and II. A topic that I did not participate in, but where Alain did the ground work and Bob finished.
Ad. 3: There was not much time for Jython code. I hav not been writing a single line. But I did manage to find an hour or two to try out existing scripts. Generally it works great. I both made it sound the horn and run my BR216 back and forth between two sensors.
When I decide to do more, I guess I have to start by deciding what I want to achieve, i.e. To write a requirement specification. At this point, it is not quite clear to me what I want. Will I make something for my specific layout or shall it be generally usable? In the latter case, shall I invent my own data format to describe my layout or shall I use what already exists in JMRI? Shall my program run trains at random or according to schedules? How shall the program handle when I run a train manually? At least, the program must keep track of all trains and update their position on the layout (contrary to RocRail that only keeps track of the trains that RocRail is running).
Ad 4: The day before new years evening, new years day and part of Friday, I was building an S88-N and especially the S88-N-P module. “Especially” because it took very long time to design and implement a veroboard layout and finally measure everything through with a multimeter before inserting the various integrated circuits. There were only two problems before everything worked: There was one place on the veroboard, where I had forgotten to disconnect (which I found out using the multimeter), and I had a bit of trouble programming the PICs. See more information under “Feedback modules”.
Ad 5: Saturday before new year was the absolute last opening day at Spor23 alias Taastrup Togcenter. And I was there to buy ESU LokPilot 4.0 decoders for my old Märklin locomotive and my Lima MR train. IT wasn’t exactly a sale. I spent 50 kroner more a piece than I would have at LokDoc. But I could go ahead with the rebuild right away: It did not take many minutes to disassemble the Märklin locomotive and throw the gearbox in a glass of terpentine to dissolve all old oil etc.. The biggest problem was to find the two screws that was holding the motor together. It was ccovered in dirt. For information: They are placed in the upper right and lower left corners.
It took a little longer to place an LED instead of the original bulb. But if I shall do it again, it will be much faster: A 5 mm LED fits in the hole where the bulb was sitting, and shall just be fixed with a drop of glue and then be equipped with a 1 kohm resistor.
Sunday (the last day before going back to work) I lubricated the gearbox with a drop of new oil and assembled the motor with a new magnet and a new front. It did not take many seconds. All parts were included in the Märklin conversion kit I bought in the spring of 2014. A 21-poled print for mounting the decoder came from an MFX decoder kit that I bought at the same time. The MFX decoder itself has been sitting in the BR216 for quite a while.
There are quite many wires on such a print. But I removed the ones that I didn’t need. Soldering the ones I actually needed and fixing the decoder print took a little time because I had never tried it before. But really, the whole thing is quite easy to do and took less than an hour. And another success was reality: The locomotive runs fine. The LED lights With a very white tone. But that is actually quite nice. It is no way blue. Just different from the old bulb that I am used to. But they are on the other hand probably too yellow.
The LokPilot 4.0 decoder proved to work far better on the programming track than the Märklin MFX decoder in mu BR216 locomotive. The Märklin decoder is quite impossible to program until MFX has been disabled. But there are no problems whatsoever with the LokPilot. That is except for the missing mention in the manual that the CVs controlling how light and AUX outputs shall function are only available if you write the value 16 in CV 31 and 0 in CV 32. Bat that doesn’t matter much, if you program from JMRI: It knows LocPilot and these kinds of peculiarities, so one shall just select the right pane and let it read all the decoders settings and then change whatever one wants changed (via checkboxes etc. with good labels instead of CV numbers) and finally write the changes back to the decoder. Et voila: My Santa Fe Locomotive does not light as brightly, dims the light when stopping and finally it has a more realistic max. speed. It could go at least 200 km/h, which is not suitable for a locomotive from 1950. And all changes are now stored inside JMRI as a backup.
Ad. 6: Sunday also gave a little time to play with the CNY 37, which is a little plastic thing with an IR diode and a photo transistor – one in each side and with an air gap between them. I calculated a resistor for the IR diod at 100 ohm, but decided to use 330 ohm. It works well.
Ad. 7: In between – especially during the evenings – I managed to make a list of track etc. that I need to buy plus I made a plan for how to fix the 55 cm extension board to the existing board.