Sunday, December 4, 2016

PSX DenshaDeGo Loconet controller

In my last trip to Japan I found an old PSX "Densha De Go" Japanese controller. This is a controller simulating a train cab and used with that train simulator game, very popular in Japan.

I don't remember if I found it in a BookOff second hand store or in Mr Potato, Last one is a very famous retro gaming shop in the heart of Akihabara district in Tokyo.

My idea was to use the controller to move trains in my layout, and to accomplish that I would use an Arduino acting as interface between the PSX controller and my Loconet network.

Let's check the hardware needed:

1 x Arduino UNO. (Another Arduino version is also possible)
1 x Loconet shield. As always that you want to interface Arduino and Loconet, you need a Loconet shield. You can build it your own, or buy it directly to the Rocrail guys. The item code is GCA185 and here you have all the information about it and the electrical schemes if you want to build it by your own:
1 x Sensor Shield v5. This is not strictly needed, but makes it easier to connect wires and build the prototype before soldering everything in place. You can have it from ebay for 2$
You will need also some Dupont female to female jumper wires for easy connecting and testing of the prototype.


Plug the Loconet shield GCA185 on top of Arduino UNO, and Sensor shield on top of GCA185. Then you have to connect the pins of the PSX joystic to the following Arduino pins if you want to use directly the Arduino sketch I'm providing later on in this post:

PSX pin 1 (DATA) to Arduino PIN 12
PSX pin 2 (COMMAND) to Arduino PIN 11
PSX pin 4 (GND) to Arduino GND pin
PSX pin 5 (VCC) to Arduino +5V pin
PSX pin 6 (ATT) to Arduino PIN 10
PSX pin 7 (CLOCK) to Arduino PIN 13

You can check in this page all information about PSX controller, also how to identify which is the pin number 1 of the connector:

Here you have an image of my temporary connections of the PSX connector and the Arduino Sensor shield for further clarification:


Finally, you need to compile and upload the following sketch into the Arduino board:

To be able to compile the sketch you need to add two libraries to the Arduino environment:

MRRWA Loconet library:
PSX library:

The first one is the library in charge of Loconet communications. You have many examples included in the library. I used of them, Loconet Throttle, as basis for making the current sketch. The example turns the Arduino in a Loconet Throttle receiving the commands through the serial monitor. You only need to change it a little bit to use any device connected to Arduino. In my case I changed it to use a PSX controller, but you can connect a potentiometer, a LCD display and a keypad or anything you imagine to build your personalized throttle.

The second one is a library written by Kevin Ahrendt and based on the PSX communication protocol analysis from Andrew J McCubbin. I also had to do some reverse engineering as this controller is not like the normal ones. And I found the brake throttle is not working properly, some times it is sending strange values. That's why you will find in the sketch some weird code to skip strange values that my controller sends some times. But if it works with my broken controller, I guess it will also work properly with a good one.

If you have any question just comment under the post or open an issue in the GitHub repository. If it works well and you try it, you can also comment.  :P

Saturday, November 26, 2016

First exhibition of ClubNCaldes

Last weekend we did our first N scale module exhibition. It was held in a small town called Sant Fost de Capcentelles, near Barcelona, by the shopkeepers association. This year they choose the slogan "Don't miss the train! Buy in San Fost,  local business". And they asked us to mount our modular layout during the whole weekend.

We were lucky to have a 14 meters long room to mount the layout, as it is exactly the total length of our modules together as we still don't have any curve module. We only had time to make two loops and eight straight ones, and now we have to produce more headers to build more modules. We plan to build some curved ones and a big train station.

The assembly and set up of the modules was pretty fast, it only took us 2 hours to have all them assembled and ready to run trains. There was no problem in the track alignment between modules, and trains ran in a very smooth way between modules. That was the first time we were mounting all our modules together, so the system is proved to be reliable.

It took a bit longer to have the digital part and Rocrail up and running as some modules were not tested and needed to be configured properly. The truth is in the last two weeks all of us had to finish many things and were quite stressed finding were to buy the skirt, how to fix it, installing the electronics in some modules, preparing the Rocrail plan, .....

But, I still don't know how, everything was ready and trains were able to run in automatic mode when the mayoress of Sant Fost came to open the exhibition:

The event was well attended and each of the members had also many visits from friends and familiars who never before had the chance to view the results of our hobby. During all this time I had my modules upside down, pending of decoration, and it was almost impossible to access the garage where I spent so many hours building them.

The digital system has been proved also to be reliable and easy to manage. All of us were able to use our tablet or smartphone to manage trains, lights or accessories of the whole layout. And even our youngest club member managed alone all the traffic with no problems. And everything built by us, only using Arduinos and Open Hardware and Open Software.

Here you can see a couple of videos, one of them recorded with an on-board camera:

We really spend a fantastic weekend, we are looking forward to organize a bigger train exhibition soon, with more modules for sure.

We want to thank this opportunity we had to San Fost mayoress, the Shopkeepers Associacition, and specially to Juan, the most active member of the club who prepared the complete event.

Thanks Juan!!!!

Monday, October 31, 2016

Module tests

I couldn't write any post in the last months but I was a little bit stressed trying to finish my two first modules. If you read previous posts, you know ClubNCaldes created its own digital normative for N scale modules. The base and module headers are according EuroN standards. But as there is no standard norm in N scale for digital exploitation, we created our own.

We have our first "public appearance" in less than one month and all club members were quite stressed in finishing the modules with an acceptable decoration, and also quite concerned about the technological part as we are making also our own electronics, despite all the system is fully compatible with Loconet and any Loconet device can be used. One of our main goals is to create an Open Source and Open Hardware digital system, but compatible with the main standards in the market.

Each of us had until now his own layout at home. Each one depending on the space restrictions of his home was building a bigger or smaller layout, but none of us has never finished it. There is people in this club investing time and money in his layout for more than 15 years, others less, but nobody has finished his layout. Probably is because none of us wants to face the question that would arise once the layout is finished: "And now, how should I continue my hobby??". Probably destroying it and starting again from scratch. I still remember when I placed last piece of track in my layout and closed the track circuit, and instead of being a happy day I was quite sad, because I realized I won't place any more piece of track in the future. And it was a pity as I had to go through many errors until I learned the good way to do it. But then I learned about modules, and today I would never start a traditional layout again.

Modules are an enclosed work of 91.5 x 40 cm (size is free, but this is a standard size for a module as it has the exact length of an straight Peco 55 track). Wiring is very simple if you don't want to install switches, and even with them you don't have to worry about current loops or short circuits as in our norms all this has been solved. And create a simple decoration in a board of this size is quite fast and very satisfactory. Because you see it finished very fast, you can always enhance the decoration, exchange modules, create and substitute them with newer ones with better designs, join your modules with your friends' ones and run long trains that will never fit in your layout.

And the fact is in July 11th we started building our module headers ordering them to a local professional woodworking company:

And this weekend, October 29th, that's what we accomplished:

You see the decoration theme is not uniform. Some of you may be was shocked seeing a JR Freight train from Japan crossing a Spanish RENFE. But over being a railroad club, ClubNCaldes is first a friends group and each member puts a remembrance, lived experience or personal image when building a module that deserves all the respect, so we decided not to have any type of restriction in decoration themes, epoch or rolling stock type. This makes our meetings even more funnier and interesting.

I have many photos stored to write more articles about the process of building and decorating those modules, I promise to do it soon.

Meanwhile I hope you like these videos and get inspired to create N scale modules like us.

Thursday, August 25, 2016

Building a module (Part 1: Track)

In this post I want to show you how to build a simple straight module following our standards. First of all we need to build the wooden "box" that will be the base for our piece of the layout. If you read our norms there is a very important part (as in all modular norms) called "header". This is the wooden piece that connects with another module. As we are doing a straight module those pieces are in the East and West part of the module, but they can be placed in any part of our module where we want to connect to the following or previous one. It is also possible a module with more than two "headers" when diverging the track, or even just one in case it is an ending module with a loop.

In any case the "header" is the most important part and must be done with exact precision, so do not try to do it yourself using manual tools. Just half millimeter of error will cause trains to derail in our scale as tracks will not be aligned in a perfect way. So my suggestion is to go to a carpenter's workshop where they have a numerical control machine and pay for these pieces to be done following the measures in the manual. They can even make small holes to place and drive the screws to assemble the whole box.

Next important thing you need is the gauge, which is also defined in the manual. Gauges you see in the photo above have been laser cut and are made in stainless steel. They have the same exact precision as the headers. And finally you will need also a straight tracksetta from Peco available at any train shop offering Peco products.

Gauge is used to check several measures when placed in the gauge holes:
  • At both sides shows the top limit of the header. It will check the header is correctly done.
  • Inner slots show the base of the track (3mm over the top of the header) 
  • The width of the inner slots is exactly the 9mm gap between rails, the same width as the tracksetta that will fit in this holes. Tracksetta combined with the gauge will assure the track is aligned, perpendicular to the header and at the exact height.
First of all we have to place the track bed. I like to use 3mm cork, but you have other solutions like Woodland Scenics track bed which is also 3mm height. In the last 5cm at each end of the module you should use a rigid track bed to make sure the track height is not altered. In my modules I cut a piece of 3mm PVC or methacrylate. Use the gauge to center it and glue it with carpenters glue or contact glue. The rigid pieces of PVC is better to glue them with cyanoacrylate or any other specific glue:

With the track bed fixed in place we can place the track using Peco pins. Use the Tracksetta to make sure the rail is completely straight and aligned with the gauge, and do not fix the last 10 cm of the track at both sides until the next step:

Then use a Dremel tool or similar to cut the rails if they stand out of the header limits:

Now you can put again the gauges at each side and center the track using the tracksetta. Tracksetta fits in the gauge gaps and makes sure the rail is perpendicular to the header, and with the tracksetta and gauge in place fix the last centimeters of track with both pins and cyanoacrylate:

You can see in the following photo how precise has been fixed the track:

In next steps I will show how to make the wiring and sensors.

Wednesday, August 17, 2016

ClubNCaldes modular norms v. 2.1

We published the first non draft document with the norms we are using to build our modules. This first "stable" version is 2.1 (Spanish):

Click here to download module manual v2.1

Main change is about the connectors between modules. For loconet signal we keep on using the DB9 connector as published in the first draft version. But for track current and power source (12Vdc and 5Vdc) we decided not to use banana connectors. We found an standard 6 poles connectors widely used in the automotive industry very easy to find and extremely reliable. From to any local automotive spare parts shop. This type of connectors are called "Superseal":

You can buy these connectors worldwide through Würth shops and eshops (locally in each country) but also in or electronic dealers like Mouser.

Mounting them is really easy, they are sealed against liquid and dust and there can be no mistakes connecting them as there is just one way to plug it. You can also connect and disconnect them as many times as needed and are reliable as DB9 connectors. So for our modules you just have to plug two connectors and all the job is done.

There aren't more significant changes. Now we are working on the software debugging and finishing the Arduino sketches for the PC Interface (for both UNO and NANO) and adding the Loconet support to the DCC++ command station software. Everything is already working in our first test modules and it will be published soon.

As in previous version we decided to use the Loconet Over TCP protocol implemented with an Arduino NANO. This keeps the system independent from the command station. Using the PC interface of the command stations normally means you cannot change it because the command station PC protocols are neither generic nor standard. This will allow to anybody to use any other command station Loconet compatible (Uhlenbrock, Digitrax, Digikeijs, ...) with our modular system.

More information soon!!

Tuesday, August 16, 2016

1:32 Handcrafted train models

I had the pleasure not too long ago to know Jose Manuel León. He is an artisan who makes his own RENFE 1:32 models. But not only makes scaled and operational locomotives, he is also developing a modular norm to build 1:32 scale modular layouts and assists to train fairs showing his incredible work.

He was one of the modular layouts that I wanted to present in the train fair in Logroño, but unfortunately I had to left the project of the train fair. It's really a pity because never more will be the chance of having a more incredible (and free!!) place to hold it, including expositor expenses and module transportation also for free, but if who has to be more interested in it is not into it....obviously the biggest efforts and the best chances are not enough for the success. But this is another long story I'll pass by.

Going back to Jose Manuel, he has a must see blog called  "Creaciones Ferroviarias" with all the step-by-step instructions to build fantastic models like these:

Over rails excavator

You can see also this video in his youtube channel showing the process to build a RENFE 252:

You can see in this video he can lift the pantograph, open doors, manage lighting, ... everything controlled with an Arduino.

I hope to meet Jose Manuel in person in the next train fair. And if you want to acquire any of this 1:32 models or order any special design, you can contact Jose Manuel at his mail or phone: 687415413

Saturday, August 6, 2016

TOMIX Usui Pass (碓氷峠) EF63 DCC conversion

Some time ago I won both TOMIX EF63 locomotive tandem models in an auction at a very good price. It's item number 92908, decorated in brown color, and 92123 decorated in blue. Seem to be special models as they are come in a beautiful case. Notice that one of the engine models ends with "T", while the other ends with "M". Only "M" locomotive is equiped with Motor, while "T" locomotive is only a dummy.

The Usui Pass (碓氷峠 Usui-tōge) is a mountain pass that lies between Nagano and Gunma Prefectures in Japan, near to Karuizawa city. It has served as one of the major transportation routes in central Japan since at least the eighth century and Shinetsu main line was crossing it. Due to its high gradient, banking engines where needed in both ascending and descending. That was the job of these EF63 models.

Tomix models are for me the best detailed ones, but on the other hand are the most difficult models to convert to DCC. Normally is difficult to find room enough for the decoder, and access to the motor is also complicated as the pick up current plates are not accessible unless you disassemble it completely. This is the case:

Each locomotive only has lights, and its respective light board, in one of the sides. Taking a tiny decoder (D&H DH05 in my case), you can place it in the space of the missing light board and you won't need to sand any locomotive's part.

My plan is also to replace the bulb light in the board with a led light. Only the red light uses a led:

First of all you have to perfectly isolate the motor engine and solder the gray and orange cable there, like any other similar Tomix model. Wires fit in the space between the two metal blocks where motor is enclosed in. I recommend you to use Kapton tape, normal tape is too thick for this.

The only tricky part is the light board. Taking a look to the original board we want to keep the resistor and existing red led, remove the bulb light and associated components (diodes), and add a white led using also the same resistor for it to do not add more components as the room is imitated. Positive lead will be connected directly to the rail current, and negative lead will be connected to the white and yellow wires of the decoder. As the board has pick up current tracks, I plan to use it also for the red and black wires of the decoder as is impossible to solder something directly to the lead pieces:

This is how I prepared the light board, removing the SMD components of the bulb and the bulb light itself, and soldering the white led. The point where I soldered it is isolated but will fix the led in place. That's why I added a wire to the positive lead of the other led. Negative lead of each led will be isolated and connected to the white and yellow decoder cables:

And that's the result once in place:

First tests worked fine, with no short circuits. Take all the time you need to make sure decoder, motor and function cables are not in touch with the rail current (lead blocks) or your decoder can burn in the first test.

I thought the most tedious job was done, but I spent even more time detailing with the accessory parts both locomotives:

outlets, hose connectors

Horn? Antena?

This antena needs to drill the holes


These locomotives run in a really smooth way, and once detailed they are really beautiful. I hope you found this tutorial useful.

Thursday, July 21, 2016

New ClubNCaldes modular layout

ClubNCales has started to define its own norms to build a modular layout. You will find always all the related information in the new section of the top horizontal menu, under the "Modules" tag.

We examined the existing ones for N scale (T-Track, IngaNet, EuroN, PlataformaN, ...) but none of them was covering all our requisites:

  • Variable length and shape of modules, only connector should be under norms
  • Prototypical track: Code55 and switches managed by servo
  • Possibility to use it in both analogue and digital exploitation, keeping switches and accessories in digital
  • Based on Loconet bus
  • Open Source - Open Hardware. This is the aim of our club, to develop and provide a low cost and high performance digital system based on Open solutions.
  • Basically we decided to use EuroN standards for connecting headers and Peco code 55 as well. We only decided to change the gauge between parallel tracks to 27mm to be closer to Peco geometry. EuroN has changed also from 25mm to 30mm, and many people is using 27mm despite it isn't the standard.

The main communication bus will be Loconet, and the official software will be Rocrail running under a RapberryPi. Any Command station and accessories or feedback module can be used if they are Loconet compatible, but Arduino will be the preferred solution to use as command station (based on DCC++ software running on an Arduino MEGA), Ethernet LocoBuffer (using the standard protocol Loconet over Ethernet), and modules.

As Arduino cannot manage high loads of current to activate outputs or detect current consumption itself, boards from Peter Giling or own produced boards (ViDa boards) will be used, all them connected to an Arduino equipped with a Loconet Shield (ViDa LocoShield or GCA185).

Here you can find the complete norms, but they are not yet finished and are available only in Spanish:

Click here to download draft manual v. 1.4

Soon there will be more information and examples on how to mount a ClubNCaldes module, program the boards, setup the system, ....

Sunday, May 29, 2016

New projects and organization of the blog

I'm sorry to have my blog a little bit unattended, but I'm involved in some interesting projects that are taking all my free time.

Complete digital system (Loconet and DCC) based on Arduino

In the Arduino side, my purpose is to build a complete digital system based on this fantastic open source platform. Until now I was using Arduino just to implement some Loconet modules with special functionalities that I was not able to find in the market. Those developments where always thanks to Alex Shepherd and his Loconet libraries for Arduino ( Peter Giling, from Rocrail team, created an interface board usable with MRRWA libraries that enabled those project from the hardware side.

Two months ago I found another interesting development to turn Arduino into a complete DCC command station. It has no possibilities to be connected to an standard bus like Loconet, but it can be connected to JMRI and Rocrail via the USB serial port of Arduino or an Ethernet shield.

Having all the mentioned code, I plan to merge it and have a complete DCC command station with Loconet connection. For that I need some changes to the Loconet Shield (GCA185) from Peter Giling as it should have the Loconet terminator for all system to work properly. It would be also very useful to have a power source of 12Vcc feede from this command station board to the DB9 connectors.

Unexpectedly, a friend from India wrote me and offered his help to develop not only this shield, but a lot more of useful boards to develop this complete digital system (Loconet + DCC) for Arduino. I'll be posting all information here as I get some free time. As always, all my code will be Open Source and public, so everybody can contribute and expand it.

Source code and blog reorganization

I'm also working in a reorganization of the sections of the blog and a common repository for all source code. I'm moving all .ino files to github. I think it's the best option, or at least better than shared spaces with no specific source code support like I'm doing with Google Drive.

New standard for N-scale digital modules

Members of Club N Caldes are quite excited to build our digital system ourselves, and we want to apply it to modules. At least in Spain, is very difficult to see digital modules in train fairs. Until now each member had his own layout, and we were sharing our knowledge and helping ones to the others. As soon as we have all software and hardware ready we want to define a norm to construct our modules and be able to assist to some of the big module fairs.

We plan to use EuroN norm as it is the most extended here, and redefine or add an extension to the norm for digital use. Some requisites are the possibility to change rail current to analogue if desired, keeping the management of switches, lights or any other automatism through Loconet.

New train fair in Logroño (La Rioja - Spain)

Also came to me the opportunity to collaborate in the organization of a train fair in Logroño. I think it will be a very special one, as it will be held in a magnificent place, not the common pavilions. Also this Spanish region is very well known by its wines, and in Autumn the landscape and red colours of the vineyards are superb. We also plan to add an extra value making some workshops and talks for both beginners and seniors in the hobby. But I still have to wait a little bit to post more information. I'll do it soon.

So, the plan is to develop our digital - open source system, make some modules, and assist to the train fair in Logroño in October to present it. We will be quite busy for the next three or four months....

I'll keep you informed!

Friday, April 1, 2016

New high quality 3D printing models from Ferro3D

A new railway model accessories shop is born in Spain. It's name is Ferro3D. I know the owner, Pedro, from many time ago. He is a passionate of railways and his personal works in his layout always stunned me.

I wanted many time ago to acquire a 3D printer to make my particular models and accessories like stone lamps, shinto gates, guts, pipes, .... possibilities are infinite. I was looking some of the cheap and common models like RepRap, Prusa or Kossel. But soon I realized it's not possible to have even a medium quality with this kind of printers and I would have to spend thousands of euros to have the desired quality.

Ferro3D is printing with those high quality and professional printers and can give even in N scale the best quality and precision.

First models to come to light have been buffers for N and HO scale, with many finishes and options. Take a look to the first one, with the concrete formwork finish:

I'm sure Ferro3D will have a great success with all models and accessories in which Pedro is working. His passion and eager to obtain perfect and realistic models for sure assure his company a long life. Keep an eye to the news of this page, I had to chance to look at some impressive models that will be launched soon.....

Sunday, March 13, 2016

"Lleida Expotren 2016" Train fair held in Lleida

This weekend is being held in Lleida one of the biggest train fairs of Spain, named Lleida ExpoTren ( Modular layouts of all scales are exhibited, and also real trains restored thanks to the ARMF, an association dedicated to restore historical rolling stock and put it in service again.

When I arrived I first visited ARMF garage where is possible to have a ride on a RENFE 1003 and on a MZA 602, a former railway company from Spain prior to RENFE.

This association is working also in the restoration of other rolling stock, it must be really hard as they dismount completely the locomotive, sand it, change panels, paint, make new electrical installation, ... really a huge work:

Here you can see a common utility in all Spanish steam locomotives, the "botijo" holder. "Botijo" is how we name a clay water can, that keeps the water fresh all the time even in the hottest summer:

There I met some of the hobby colleagues from Barcelona, they are really funny and generous people, it's a pleasure to know them and enjoy their friendship. Just a pity not all the club members were there:

Here just a view of the old railway installations in Lleida, next to the ARMF garages:

After a good lunch of the typical "cargols a la llauna amb all-i-oli" from Lleida, was time to enter to the huge exhibit of rail-road models.

First of all I met Francesc, one of the promoters of T-Track systems in Spain:

That was the zone of the big scales, the funniest for all kids (and not so young people also...):

Then I took a look to the H0 layout, some modules where really beautiful and had lot of detail:

There was also an impressive diorama of Stalingrad, one of the coolest I've ever seen:

My friend Emili J. Sanmartin has an stand there showing his incredible models:

Finally, I spent the rest of the time admiring the N modules:

And that's the end of my review. A really enjoyable day where I met old colleges and new ones. I hope to see you all soon again.