Controlling Marklin train via 24088 and Arduino


Like many others, I would like to achieve to control my Märklin train with my Arduino.
I've looked on the Internet and Railuino is the most popular solution. Railuino however requires the Mobile Station 2 and the 60113 connection kit. I would like to try to control my train without the use of the 60113 connector, instead with a 24088 gauge piece connected to a Mobile Station 60651.

In the source code of Railuino I saw that the CAN-library used SPI to communicate with the 60113 connection kit. I've tried this but couldn't get any results. Also I don't have a CAN-shield (yet) so I hoped I could connect the Arduino to the second port of the 24088 using jumper wires. Using Using the Arduino I found the attached 'schematic' is a layout of the CAN 7-pin mini DIN.

So my question is, what do I need to do, or where do I need to look to control a train on my Märklin gauge using a 24088 gauge instead of a 60113 connection kit, preferably without CAN-shield?

Thank you

Image from Original Post so we don't have to download it. See Image Guide

What is a 24088 gauge? Post a link to its datasheet

You also mention a lot of other stuff that people here will not be familiar with. You need to educate us.


Hi Robin,

Thanks for your reply, I'll try to elaborate more.

So I'd like to control my Märklin train using my Arduino.
The way a Märklin railway is generally controlled, is using a Mobile Station and a piece of rail that connects the Mobile Station with the gauge. This piece is the 24088 piece. Here's a picture:

I couldn't find a good datasheet for the Mobile Station 60651 or the 24088 piece of rail because Märklin doesn't really like people knowing what they're doing.

There are solutions for my problem, but therefore I have to buy a 60113 connector, and connect it to a CAN-shield which is placed on top of an Arduino. Here's a picture of the 60113 connector (on top) and a Arduino UNO with a CAN-shield:

Now this 60113 connector box costs about $60,-, and this CAN-shield costs about $25,-. I'm seventeen years old and I'd rather find a cheaper way to control my train with the Arduino.

So I did some research, and I found that on the 24088 piece of railway (upper picture), there are two CAN-buses. In the left CAN-bus you have to plug in the master Mobile Station, in the CAN-bus in the middle you have to plug in the slave Mobile Station. These Mobile Stations will then communicate with each other, to control the train.

But what if I replace the slave Mobile Station with my Arduino? I should be able to listen to the commands of the master Mobile Station, and bring in my own commands. To connect the Arduino to the second CAN-bus I made the drawing Robin has kindly uploaded for me on the message above. The Mobile Station is powered by 18V, but sends it's signals at about 2.5V. So with an Arduino I should be able to listen to the commands of the master Mobile station and bring in my own commands. A very often used way to do this is using the Railuino library. This library works using a CAN-shield on to for mp of the Arduino, connected to the 60113 connector box (second picture). Now I've looked into the source code and I saw that the CAN-library uses SPI to send messages over the CAN-bus. I've tried to do the same way with jumper wires, but no luck so far.

So my goal is to control my Märklin train with the Arduino, preferably without a CAN-shield and without the 60113 connector box. Can anyone point me in the right direction?

I don't know enough about this to be able to help. Sorry.

Maybe someone on some of the model railway Forums has done it.

I did write a PC program to control a DCC system using Xpressnet commands but it would not have been possible for me without the Xpressnet instructions.

I think you will at least need access to the equivalent Marklin instructions.


Ive wanted to connect Arduino to my track for a long time.
It seems like most of you guys have figured out your setup with Arduino and Marklin. how did you do it and do you have more pictures?
thanks SOOOO much