Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline Slider  
#1 Posted : 13 July 2015 15:09:15(UTC)
Slider

Netherlands   
Joined: 03/04/2014(UTC)
Posts: 52
Hi all,

I have been searching my proverbial ass off for soms specific information, which I can't seem to find.

In a nutshell, I want to control my Marklin layout to be build, using Arduino and CAN bus.
I know everyone is using the 60113 interface for this.

But what about the C-track 24088 interface, of the MS1?
Are both 60113 and 24088 the same CAN bus? Do they accept the same language?
Or is there a hardware difference?

Reason for this, is that a 24088 rail is much cheaper than a 60113.
I only want to control the decoders in trains, no switches or feedback signals.

I hope someone can help me out :)
Offline rorosha  
#2 Posted : 13 July 2015 16:06:43(UTC)
rorosha


Joined: 06/08/2014(UTC)
Posts: 57
Location: MECHANICSBURG PA USA
Originally Posted by: Slider Go to Quoted Post
Hi all,

I have been searching my proverbial ass off for soms specific information, which I can't seem to find.

In a nutshell, I want to control my Marklin layout to be build, using Arduino and CAN bus.
I know everyone is using the 60113 interface for this.

But what about the C-track 24088 interface, of the MS1?
Are both 60113 and 24088 the same CAN bus? Do they accept the same language?
Or is there a hardware difference?

Reason for this, is that a 24088 rail is much cheaper than a 60113.
I only want to control the decoders in trains, no switches or feedback signals.

I hope someone can help me out :)


There is a major difference between the two!

The difference in price is because the 24088 contains absolutely NO intelligence. It is merely a connection box. The Track interface Controller is in the MS1. If the Arduino CAN interface would work with the MS1 (which absolutely would be required - increasing the cost) is questionable. You would definitely have to do some research to determine the correct pinout of the seven pin connector, and then hope that the MS1 is willing to listen to the Arduino and CAN.

The 60113 contains the Track Interface Controller. You can connect and have it function with or without an MS1 or MS2 attached. I've been playing a little with this, but doing the exact opposite of you. I'm keeping the MS2 for Locomotive control, and working to use the Arduino and CAN to control turnouts.


The MS2 is a very reasonable way to control Locomotives, but is totally inadequate when controlling more than two turnouts, and even with just two turnouts, it is barely convenient. As time permits, I hope to complete my project, and then see how it works attached to the front of the CS2, and eventually into the back of the CS2 as well.

It could make a relatively inexpensive way to build up a keyboard (6040) replacement, a switchboard controller (6041) replacement, and with a little additional programming and hardware, a memory (6043) replacement. Even though the CS2 has excellent keyboard and memory functions, they would be useful for those using the MS2. It could also be a less expensive replacement for the new S88 Link (60883), used as a switchboard controller.


Another thing I would like to do is to link multiple Arduinos, to all use a single CAN interface module. This would be really handy in cases where someone wants / needs multiple switchboards.

Even though the CAN interface module is relatively inexpensive, the Märklin hardware to connect multiple CAN interfaces can get very expensive. And why replicate hardware unnecessarily (multiple CAN interface modules). If done right, Arduinos do talk well with each other.


Rodger
Offline Slider  
#3 Posted : 13 July 2015 16:37:55(UTC)
Slider

Netherlands   
Joined: 03/04/2014(UTC)
Posts: 52
Thnx Rodger, for that great explanation!

Now I know what to expect.
I have decent Arduino experience, from making a USS Defiant (I love that ship) model with lights inside, to my current project.

I'm making a layout, currently using a 6021 Control Unit and 6051 Interface.
Written my own library's for functions, trains controls are easily done.

With several Arduino's, I created 1 system.
Arduino Due (heart of the system)
- Communication to 6051 by serial.
- Using alot of I2C port expanders and optocouplers, controlling all switches and signals.
- Reading several IR gates all over the layout.
- Manual and automatied systems. Automatic has 4 loop option, with 1 to 5 trains to run in each option.
- Control Board: For manual control of all switches, signals and tracks.

Arduino Micro
- Used only for continious RFID reading, trains supplied with RFID tags.
- Serial to Due

Arduino Uno
- Hand-held controller(s). Display, 4x4 keypad and potentiometer. Mimmics a 6021 controller.
- Serial to Due.

The drawback of using the 6021 controller as interface, is the limit of the Motorola protocol, since all trains have ESU M4 decoders.
So only 14 step speed with the 6021.

And, I can't really use the 6021 controller itself.
The Arduino and it's hand-held controller can remember all settings from all trains. But once I use the 6021, those settings become obsolete and useless.

So I was looking for an upgrade, to a more modern system to combine with the Arduino.
If I want to do this, I have to buy an 60113 and CAN bus shield. But does give me alot more option though.
And a **** load of recoding to do hahaha.

Maybe for the future....
Offline rorosha  
#4 Posted : 13 July 2015 17:33:15(UTC)
rorosha


Joined: 06/08/2014(UTC)
Posts: 57
Location: MECHANICSBURG PA USA
Originally Posted by: Slider Go to Quoted Post
Thnx Rodger, for that great explanation!

Now I know what to expect.
I have decent Arduino experience, from making a USS Defiant (I love that ship) model with lights inside, to my current project.

I'm making a layout, currently using a 6021 Control Unit and 6051 Interface.
Written my own library's for functions, trains controls are easily done.

With several Arduino's, I created 1 system.
Arduino Due (heart of the system)
- Communication to 6051 by serial.
- Using alot of I2C port expanders and optocouplers, controlling all switches and signals.
- Reading several IR gates all over the layout.
- Manual and automatied systems. Automatic has 4 loop option, with 1 to 5 trains to run in each option.
- Control Board: For manual control of all switches, signals and tracks.

Arduino Micro
- Used only for continious RFID reading, trains supplied with RFID tags.
- Serial to Due

Arduino Uno
- Hand-held controller(s). Display, 4x4 keypad and potentiometer. Mimmics a 6021 controller.
- Serial to Due.

The drawback of using the 6021 controller as interface, is the limit of the Motorola protocol, since all trains have ESU M4 decoders.
So only 14 step speed with the 6021.

And, I can't really use the 6021 controller itself.
The Arduino and it's hand-held controller can remember all settings from all trains. But once I use the 6021, those settings become obsolete and useless.

So I was looking for an upgrade, to a more modern system to combine with the Arduino.
If I want to do this, I have to buy an 60113 and CAN bus shield. But does give me alot more option though.
And a **** load of recoding to do hahaha.

Maybe for the future....



Seems that you've already got a good start on this project.

Just remember, that along with the CAN shield, you'll need a cable to the 10pin connector. These connectors can be hard to come by, and are a real pain to assemble (I tried, and it was really ugly!). I ended up purchasing a MS2 replacement cable (E146781) from a German eBay seller. It was a lot more expensive, but it looks so much better.

Most of the dirty programming has already been done, if you haven't already, look at Railuino (https://code.google.com/p/railuino/). It seems to work really well.

I am using a US sourced CAN shield which is almost identical to the CANdiy-Shield V2 (http://www.watterott.com/index.php?page=product&info=2863). They also have a DIY cable kit (http://www.watterott.com/index.php?page=product&info=2872) at a very reasonable price. I am pointing these out because a nearly identical shield seems to work well with both the Arduino (UNO and MEGA - sorry, I do not use the DUE) and the 60113. Sometimes, half the problem is trying to find hardware that works the way it is supposed to together.


Without actually seeing your code, I would say, that probably the only major rewrite would be to the DUE code, to communicate with the CAN shilled, instead of with the serial port and the 6051. The project should be pretty manageable if taken in steps, get communications working, and then update your controllers with new capabilities.
Offline Slider  
#5 Posted : 16 July 2015 11:15:22(UTC)
Slider

Netherlands   
Joined: 03/04/2014(UTC)
Posts: 52
Good tip for the connector!

I have researched this some more. Since I'm using a Arduino Due, I can't use the CAN bus solution.
There are CAN shield for it, but no1 has made a library for it.
Only for the Uno and Leonardo.

And I must use the Due, for it's 2x I2C, 4x Serial and many I/O's. Not to mention it's high CPU power (compaired to the Uno for example).
Also, the Due uses 3.3V for everything, also shields.


But there might be a better solution: Desktop Studio
Shield fits directly on the Arduino Due, and wires go directly to the tracks. No need for the MS2 60113 box.

For adjusting the code, I control the train now from my own created library. Which uses a simpel Serial.write command to send the train commands to the interface.
I can't use a library within a library, without some fancy recoding.
So I will have to put the actual command line into my INO file, to send the Train commands. But, should not be that much work.

Maybe I'll order that Desktop Station shield :)


Offline Bigdaddynz  
#6 Posted : 17 July 2015 02:53:46(UTC)
Bigdaddynz

New Zealand   
Joined: 17/09/2006(UTC)
Posts: 18,663
Location: New Zealand
Originally Posted by: Slider Go to Quoted Post
But there might be a better solution: Desktop Studio


Previous forum thread on Railuino - https://www.marklin-user...d-station--Railuino.aspx
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

| Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.548 seconds.