!!

Not Registered?

Welcome!  Please register to view all of the new posts and forum boards - some of which are hidden to guests.  After registering and gaining 10 posts you will be able to sell and buy items on our N'porium.

If you have any problems registering, then please check your spam filter before emailing us.  Hotmail users seem to find their emails in the Junk folder.


Thanks for reading,
The NGF Staff.

Author Topic: Layout a la Smiff  (Read 4236 times)

0 Members and 1 Guest are viewing this topic.

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 98
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #45 on: February 19, 2018, 08:18:13 am »
It does feel a bit like I am in a minoriry of one with what I have done, but that is the beauty of model railways.It can be so many different things to different people. If anyone else is interested in computer control  though,  then I am  happy to share what I have done.
I would be interested to hear about your computer control.  I could write a program in FORTRAN with a VB front end, or even write the whole thing in VBA, but the interface is the problem.  I am using a Gaugemaster Prodigy Advance at the moment, but I think I would have to ditch that if I want to go to proper computer control.

Thank you for your interest.

For hardware I use MERG and for software I use JMRI. JMRI does support a range of other hardware too.

I am guessing most people have some awareness of both already, but if not, they both have very comprehensive web sites that you can refer to, so I won't delve into any descriptions here.

JMRI provides a tool for dispatching trains, but I do not use it and have written my own tool to do that using the scripting language that JMRI provide.
In simple terms,  I use JMRI to handle the computer interface and low level tasks but running of the trains is controlled by own script, with the exception of the signalling logic, which I do use the JMRI built-in tool for. I could go into a lot more detail but it is probably not appropriate.
But if you do want more detail then please let me know.

One point I will mention is that I set my self the task of implementing this  with minimum use of hardware, trying to get the computer to do as much as the work as possible. So in terms of hardware, I have the bare minimum needed. I have control of point motors and the track is split into sections ( 4 per loop ) with an occupancy detector on each section. I have not, however, placed spot detectors, so I only know that a train is in a particular section, not where it is  within that section . There is also no current drawn by the rolling stock, so I have no way to detect when a train has cleared a section, I only know when the loco has moved on from it. So the script I have written has to compensate for this lack of information from the hardware to try and work out where to stop each train, and when the last trailing carriage has left a section. The task would have been much simpler with more hardware, so that is something you may want to bear in mind.

As I said before, you do not need to write your own script at all, JMRI has a tool that will run the trains for you, so you do not need any scripting ability. You can use the tools that JMRI provides ( it is all free by the way). But for various reasons I opted not to use that and wrote my own script. Again I can disucss more detail about the reasons I did so if you are interested.






Offline Innovationgame

  • Trade Count: (+1)
  • Full Member
  • ***
  • N Gauge Society Number: 26531
  • Posts: 2130
  • Country: gb
    • The innovationgame
    • Awards
Re: Layout a la Smiff
« Reply #46 on: February 19, 2018, 04:37:43 pm »
 :thankyousign:
I've visited the MERG website and it looks as though I have to join to buy anything, which is no problem.  What piece of kit would I require to interface with JMRI?

I shouldn't have any problems writing my own script(s). Can all the running be done on timings or is positional feedback required?
With kind regards
Laurence
My personal website is a bit of a mish mash
www.innovationgame.com

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 98
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #47 on: February 19, 2018, 05:21:44 pm »
:thankyousign:
I've visited the MERG website and it looks as though I have to join to buy anything, which is no problem.  What piece of kit would I require to interface with JMRI?

I shouldn't have any problems writing my own script(s). Can all the running be done on timings or is positional feedback required?

All of the MERG boards communicate with each other through a "CBUS", which is essentialy virtually the same as the CAN_BUS used in automotive applications. MERG also have a USB board which interfaces the CBUS to a computer via USB.  JMRI has support for the MERG USB interface..

In my case, from MERG, I have the USB Board, the DCC controller board ( but not the DCC handset ), the DCC current sensing boards to detect block occupancy ( with a second board to interface to the CBUS), the slow point motor driver board for my Cobalt point motors, and the LED driver board for the three aspect signals. All the boards talk to each other over the CBUS, then to/from the computer via the USB board.

There are two very comprehnsive pdf's on the MERG website ( you do not need to be a member to download them ) . They run to many 100's of pages and give a very good overview of MERG products and their application as well as lots of other useful information about model railway electrics.

I should also add that JMRI support other hardware, not just MERG. It is just that is what I chose to use.

To answer your other question, in my implementation I do not use positional feedback. I only know that a train occupies a particular section, but not where it is within that section. So stopping the train is done on timings. Downside is that you have to calibrate all the trains' speeds and of course this drifts over time, or if the pickups get dirty, or the track gets ditry, or more often than not seemingly for no reason at all.

MERG have position sensors and this makes the automation task easier and more dependable but they are not mandatory. I chose not to use them but just build in a margin of error because I know I can never be precisely sure where a train is or where it might stop, and accept that I need to tweek the trains running speeds from time to time as they drift .

To make the task easier I only allow trains to run at three speeds, and try to make that speed the same for each train. The throttle setting can vary by up to a factor of 10 to achieve the same speed in different locos. I set the momentum to a low value (usually 1) in the loco DCC decoder so I get pretty much instant response to throttle settings from the computer, and I use the computer to smoothly ramp the throttle. This makes predicting the speed (and by derivation the position) of a train more reliable to achieve.

As I mentioned previously, you may not need to write your own scripts. JMRI provides a very comprehensive environment without the need to add to it.










« Last Edit: February 19, 2018, 05:25:59 pm by daversmth »

Offline Innovationgame

  • Trade Count: (+1)
  • Full Member
  • ***
  • N Gauge Society Number: 26531
  • Posts: 2130
  • Country: gb
    • The innovationgame
    • Awards
Re: Layout a la Smiff
« Reply #48 on: February 19, 2018, 05:31:58 pm »
Thak you Dave for a very comprehensive answer.  I should have enough to go on now.  It will all have to wait for a bit, not least because I don't have a laptop at the moment and I don't fancy carting my tower system up and down the garden path.  :no: But I could make a start on JMRI (when I get five minutes to spare).  Once again  :thankyousign:
With kind regards
Laurence
My personal website is a bit of a mish mash
www.innovationgame.com

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 98
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #49 on: July 19, 2018, 12:06:22 pm »
It has been five months since I posted my last update on the layout, so here goes ...

I have been tweaking the computer script I use to control the layout, and have added sound to two locos.
That was done by taking sound samples from the brdw web site, chopping them into small samples, then using the script to play the appropriate sample based on what the loco is doing, and panning the stereo of the sound based on the loco's position. I also added a horn, whistle, wheel squeel when slowing etc. Quite pleased with the result, and being a cheapskate, adding sound at zero cost.

I havd started building Metcalf buildings too.



The other news is that we are moving house and I have been promised a man cave/ train room so shoud have scope to build a much larger layout in time. Still pondering what to build. And anyway, really ought to complete the current layout first.

It's forte will be the control system, enabling many trains to run simultaneously on different routes with automated points and signalling, rather than a work of art model. Is this something worth taking to exhibitions ?

Online Bealman

  • Moderator
  • Trade Count: (0)
  • Full Member
  • ****
  • N Gauge Society Number: 23151
  • Posts: 14143
  • Country: au
  • Gender: Male
  • Whoops back we go
    • Awards
Re: Layout a la Smiff
« Reply #50 on: July 19, 2018, 12:37:36 pm »
Could be....

I'd be interested!  :thumbsup:
Vision over visibility. Bono, U2.

Offline themadhippy

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 516
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #51 on: July 19, 2018, 01:50:27 pm »
Quote
I have been tweaking the computer script I use to control the layout, and have added sound to two locos.
That was done by taking sound samples from the brdw web site, chopping them into small samples, then using the script to play the appropriate sample based on what the loco is doing, and panning the stereo of the sound based on the loco's position
Depending on your sound card and software you could extend this to 8 channels. 5.1 or even 7.1 sound  is built into most  modern motherboards,or an external usb boxes can be had for less than £20,the hardest bit is finding  software to allow you to route to the  sounds to individual outputs.

Offline Newportnobby

  • Global Moderator
  • Trade Count: (+63)
  • Full Member
  • *****
  • N Gauge Society Number: 21962
  • Posts: 29570
  • Country: england
  • Gender: Male
    • Awards
Re: Layout a la Smiff
« Reply #52 on: July 19, 2018, 03:56:56 pm »
Any chance of a vid with sound so we can hear what you've achieved? ;)

Offline DarrwestLU6

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: 28089
  • Posts: 58
  • Country: gb
  • Gender: Male
  • Getting back into N after a long break!
    • Awards
Re: Layout a la Smiff
« Reply #53 on: August 27, 2018, 11:56:11 pm »
Dave - an excellent read, thank you! Iím still in planning/ base construction mode on mine but when I get to signalling would like to find out more about automation so I will get back in touch.

Keep posting your latest!

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 98
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #54 on: August 28, 2018, 09:00:41 am »
Dave - an excellent read, thank you! Iím still in planning/ base construction mode on mine but when I get to signalling would like to find out more about automation so I will get back in touch.

Keep posting your latest!

Thank your for your kind comment.
To start, I would suggest looking at the JMRI web site with regards to automation.
Plenty on there to keep you busy for a long time .....

Happy to help if you feel you need it.

Offline daversmth

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 98
  • Country: gb
    • Awards
Re: Layout a la Smiff
« Reply #55 on: September 16, 2018, 01:59:28 pm »
Any chance of a vid with sound so we can hear what you've achieved? ;)


I iust posted 2 short videos.
The sound clarity and panning from speaker to speaker is not as clear as I would have liked due to the recording but hopefully gives some idea of how it all turned out.

Class20
https://www.youtube.com/watch?v=-gZLLqdohJE&t=3s

DMU
https://www.youtube.com/watch?v=x_ytUcgNPHU






 

 

Please Support Us!
October Goal: £55.00
Due Date: Oct 31
Total Receipts: £40.00
Below Goal: £15.00
Site Currency: GBP
73% 
October Donations


Advertise Here
anything