Recent Topics      
YMR logo

You are here:  Your Model Railway Club > Computing & The Model Railway > Computer Software. > Homemade DCC Software To bottom of page
                 

 Moderated by: Spurno
Start New Topic Reply Printer Friendly

Homemade DCC Software - Computer Software. - Computing & The Model Railway - Your Model Railway Club
AuthorPost
 Posted: Sat May 5th, 2018 03:38 pm
PMQuoteReply
link to this 1st post
TeaselBay
Novice
 

Joined: Fri Aug 4th, 2017
Location: United Kingdom
Posts: 1130
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

As well as physically building Teasel Bay (http://yourmodelrailway.net/view_topic.php?id=15131&forum_id=21) I set out to build some software to run it.  Just like people build scratch built models, my interest lies in scratch building some software.

My plan is to be able to run locomotives, accessories such as signals and points as well as control lighting etc from multiple computers which are all connected.  Eventually adding sensors to locate locomotives around the layout so I can automate them with the ability to take control of aspects such as a locomotive or the signals and the system react.  I also want to be able to control locomotives from my mobile as well as a more tactile controls like I used to on DC.

If you are not interested in the technical bits simply ignore anything in italics!.. I've written Mainline as a web service in .NET Core. Having it as a web service means I am unrestricted in how many devices and connect and fur fill different roles. The front end is written in Angular with JSON as the communication layer between the server and client. I found an open source library called XPressNetSharp which takes commands and converts them to HEX which is then fired down to the eLink.


Today I got trains running with it for the first time which is exciting!  It needs prettying up but this is how it looks currently. Hitting connect creates a link to the eLink and initialises it ready for commands.


"Trains"/Control screen has a list of my trains and a control for each.



Its a start, I've no idea if I'll ever get around to writing half of the software I plan to but it was very satisfying controlling trains this evening on something I'd written.

Hope this is of interest to some!



____________________
Chris

Teasel Bay

Teasel Bay on Facebook
Back To Top PMQuoteReply

 Posted: Sat May 5th, 2018 08:02 pm
PMQuoteReply
link to this 2nd post
Sol
A modelling Moderator.


Joined: Mon Nov 28th, 2011
Location: Evanston Gardens, South Aust, Australia
Posts: 4397
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

It shows that there are so many aspects in this hobby so enjoy what ever you do is the motto....



____________________
Ron
NCE DCC ; 00 scale UK outline.
Back To Top PMQuoteReply

 Posted: Tue May 8th, 2018 07:31 am
PMQuoteReply
link to this 3rd post
gdaysydney
Member


Joined: Mon Mar 28th, 2011
Location: Sydney, Australia
Posts: 1291
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

A someone that uses a computer program to run a layout I think your new venture is great.
I dont know much about computer programming but I have heard of Xpressnet in conjunction with JMRI software.



____________________
Dave
Notmutley
British OO outline, DCC - NCE PowerPro, Sound chips, Computer Control- RR&Co software
Back To Top PMQuoteReply

 Posted: Fri May 11th, 2018 09:22 pm
PMQuoteReply
link to this 4th post
John Dew
Full Member


Joined: Tue Dec 1st, 2009
Location: North Vancouver, British Columbia Canada
Posts: 4612
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

gdaysydney wrote: A someone that uses a computer program to run a layout I think your new venture is great.
I dont know much about computer programming but I have heard of Xpressnet in conjunction with JMRI software.


Xpressnet is the information bus used by Lenz and other DCC systems.......I assume it is the equivalent of loconet.

So on Granby, Xpressnet sends data to the Lenz box which in turn sends it to Train Controller



____________________
John
Granby III
Lenz DCC,RR&Co Gold V9 B3 Windows 10
Back To Top PMQuoteReply

 Posted: Tue May 15th, 2018 05:47 am
PMQuoteReply
link to this 5th post
gdaysydney
Member


Joined: Mon Mar 28th, 2011
Location: Sydney, Australia
Posts: 1291
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

Thanks John  :thumbs :thumbs



____________________
Dave
Notmutley
British OO outline, DCC - NCE PowerPro, Sound chips, Computer Control- RR&Co software
Back To Top PMQuoteReply

 Posted: Tue May 15th, 2018 08:46 am
PMQuoteReply
link to this 6th post
TeaselBay
Novice
 

Joined: Fri Aug 4th, 2017
Location: United Kingdom
Posts: 1130
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

John Dew wrote: gdaysydney wrote: A someone that uses a computer program to run a layout I think your new venture is great.
I dont know much about computer programming but I have heard of Xpressnet in conjunction with JMRI software.


Xpressnet is the information bus used by Lenz and other DCC systems.......I assume it is the equivalent of loconet.

So on Granby, Xpressnet sends data to the Lenz box which in turn sends it to Train Controller

Yeah spot on, Xpressnet is a protocol which just defines how information is passed down the DCC bus to the locomotives/accessories. XpressNetSharp is a C# implementation of it which simply takes messages and converts them into commands for the ELink in this instance: https://github.com/networkfusion/XpressNetSharp

Thank you for the positive feedback, it is most appreciated. I wasn't sure if anyone would be interested in this aspect!



____________________
Chris

Teasel Bay

Teasel Bay on Facebook
Back To Top PMQuoteReply

 Posted: Tue Jun 26th, 2018 04:28 pm
PMQuoteReply
link to this 7th post
TeaselBay
Novice
 

Joined: Fri Aug 4th, 2017
Location: United Kingdom
Posts: 1130
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

I recently bought an Arduino Mega https://www.arduino.cc/ (which is basically a simple computer) which is very good at controlling inputs/outputs. This makes it perfect for controlling lighting across the layout.

I created a simple proof of concept application on the Arduino which listens for inputs from the usb and then changes the state of the output which is a light. I then wrote a little C# play app to toggle the light on the laptop. You can see it working in the video below.




This can easily be scaled up to turn on the platform lights, building lights etc.



____________________
Chris

Teasel Bay

Teasel Bay on Facebook
Back To Top PMQuoteReply

 Posted: Mon Aug 27th, 2018 05:17 pm
PMQuoteReply
link to this 8th post
TeaselBay
Novice
 

Joined: Fri Aug 4th, 2017
Location: United Kingdom
Posts: 1130
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

The Arduino finally being pushed into action! Simply blue-tacked to the frame so it can easily be removed for prototyping. As I stated above, the Arduino takes commands from my laptop and turns on/off the corresponding light. Wiring is using reclaimed CAT5 cables, for the LEDs is low powered 5v 20ma direct from the Arduino digital outputs.

Commands to pin:
  • Gnd - Black
  • 13 - Green: Signalbox
  • 12 - Red: Station lights
  • 11 - Orange: Station building lights
  • 10 - White: Station house outside light
  • 9 - Yellow: Ticket office outside light


At the moment this is controlled by a very simple C# desktop app which simply toggles the lights on/off.



There is something strangely satisfying by simply turning the lights on/off, lol!



____________________
Chris

Teasel Bay

Teasel Bay on Facebook
Back To Top PMQuoteReply

 Posted: Mon Aug 27th, 2018 09:54 pm
PMQuoteReply
link to this 9th post
gdaysydney
Member


Joined: Mon Mar 28th, 2011
Location: Sydney, Australia
Posts: 1291
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

TeaselBay wrote: There is something strangely satisfying by simply turning the lights on/off, lol!

:thumbsI agree - maybe its the therapy/gratification  from the satisfaction of getting it to work

:nice
I am following this thread with interest as the electronics / automation side of layout building has always appealed to me. Keep it going



____________________
Dave
Notmutley
British OO outline, DCC - NCE PowerPro, Sound chips, Computer Control- RR&Co software
Back To Top PMQuoteReply

 Posted: Tue Aug 28th, 2018 02:29 pm
PMQuoteReply
link to this 10th post
TeaselBay
Novice
 

Joined: Fri Aug 4th, 2017
Location: United Kingdom
Posts: 1130
Status: 
Offline

My photos:
view photos in Gallery
view photos as slides

Brill Dave.  Glad it is of interest to someone  :)



____________________
Chris

Teasel Bay

Teasel Bay on Facebook
Back To Top PMQuoteReply

This is topic ID = 15609     Current time is 10:28 am  
You are here:  Your Model Railway Club > Computing & The Model Railway > Computer Software. > Homemade DCC Software
You can type a quick reply to this topic here. Click in the box below to begin.

Or to reply to an individual post, or to include images, attachments and formatted text,
click the Quote or Reply buttons on each post above.

To start a new topic in this forum, click the Start New Topic button below.
To start a new topic in a different forum, click the Forum Jump drop-down list below.
Start New Topic

Back to top of page

           
15 Most Recent Topic

Problems with this web site? Please contact the Webmaster.

All material submitted to this web site is the responsibility of the respective contributor. By submitting material to this web site you acknowledge that you accept full responsibility for the material submitted.
Unless stated otherwise, all the material displayed on this web site, including all text, photographs, drawings and other images, is copyright and the property of the respective contributor. Registered members are welcome to use it for their own personal non-commercial modelmaking purposes. It must not be reproduced or re-published elsewhere in any form, or used commercially, without first obtaining the owner's express permission.
The owner of this web site may edit, modify or remove any content at any time without giving notice or reason.    © 2008

                 

Recent Topics Back to top of page

Powered by UltraBB 1.15 Copyright © 2007-2011 by Jim Hale and Data 1 Systems. Page design copyright © 2008-2013 Martin Wynne. Photo gallery copyright © 2009 David Williams.