Lowa

Train Automation - Track Switch Motors

Recommended Posts

Tom, I'm really happy with the switch motors. A few improvements I think could be made nControl are:

Being able to click on the switch on the track layout to operate it rather than just the tile.

Remembering the state of the switch after closing and reopening the program otherwise what is shown on the track layout is wrong unless you operate all the switches

Automatically connect to the controllers on opening the program

Remembering the zoom and window sizes as I need to adjust everytime I open nControl

Other than that it all works great

Share this post


Link to post
Share on other sites
32 minutes ago, mattmarsden said:

Tom, I'm really happy with the switch motors. A few improvements I think could be made nControl are:

Being able to click on the switch on the track layout to operate it rather than just the tile.

Remembering the state of the switch after closing and reopening the program otherwise what is shown on the track layout is wrong unless you operate all the switches

Automatically connect to the controllers on opening the program

Remembering the zoom and window sizes as I need to adjust everytime I open nControl

Other than that it all works great

I'm glad to hear you're happy with the motors!

About your suggestions for nControl:

  • Being able to click on the switch on the track layout to operate it rather than just the tile: That's indeed something I have to look into as finding the right tile becomes increasing challenging with the number of switch motors.  
  • Remembering the state of the switch after closing and reopening the program otherwise what is shown on the track layout is wrong unless you operate all the switches: I'm aware of that issue.  At the moment the project file doesn't contain the state of the switches, we're going to add this so that nControl opens with the same state as you closed it.  That's to only option I see, retrieving the position from the motors is not possible as the motors don't allow bidirectional communication, they cannot tell you the position they are in.
  • Automatically connect to the controllers on opening the program: I hadn't thought of that but I can see this would be very convenient once your system is set-up.  Most probably it makes sense to add this as a project settings. I guess it would also be handy to have a 'default project' that opens automatically when you open nControl ?
  • Remembering the zoom and window sizes as I need to adjust everytime I open nControl: Yes, that makes sense.  That shouldn't be a big deal.

Thank you for the feedback!  These are all very useful remarks and will improve the software.  I need to see when I can incorporate that.  I'm currently working on the port to Mac.  So I need to be careful with making modifications to the software as I'm working on two systems.

 

 

Share this post


Link to post
Share on other sites
16 hours ago, mattmarsden said:

Remembering the state of the switch after closing and reopening the program otherwise what is shown on the track layout is wrong unless you operate all the switches

thats the reason i was asking for a reset button.

in real live a switch use a TC contact "(point blades conrole)  English, (zungenuberwachung) Deutsch" for direction lights and state.

Share this post


Link to post
Share on other sites

I think it would be a good solution for nControl to remember the state of the switches when you close it as you can't change them without nControl anyway.

Share this post


Link to post
Share on other sites
On 12/11/2016 at 3:57 AM, Lowa said:

If  you use our 4DBrix controllers:

  • the motors will be $15 / motor.
  • the controllers will be $40 / controller, each controller can handle 4 motors.  (The controller is embedded is a brick that has a 4 x 6 foot print and is 2 bricks + 1 tile high)
  • the control software is free.

If you use your own Adruino controllers:

  • the motors will be $15 / motor.
  • the controllers: your own Arduino
  • the control software: you will need a subscription which will be $12/ year

We're currently making the first systems.  If all goes well they should be available by the end of the year / beginning next year !

I've had a play with the software and it looks very promising. Good work :) How far away will the ability to add sensors to the software so we can start creating some really cool automated layouts?

Also I would be looking at integrating the software with my own controller that communicates over WIFI using MQTT. How can I purchase the subscription for the software? Is it possible to run all communications through a single COM port and have my controller send it out to the relative device? I don't really like the idea of having a separate USB for each group of devices, especially when the numbers and distance gets up.

Awesome work :)

Share this post


Link to post
Share on other sites

@mattmarsden

I have been working on nControl and in the next release the state of the switches will be stored in the project file and the tiles will be initialized with these values when you open the project.  You can actually get the tiles out-of-sync with the actual switches by going into simulation mode; that changes the tiles but not the actual switches.   Therefore I also added a 'synchronization' function, it sweeps all the tiles and sets the switches in the layout in the state of the tile.  @Q371, I guess that's (close to) what you meant with a 'reset' button, or not ?

Share this post


Link to post
Share on other sites
On 2/4/2017 at 4:38 AM, skaako said:

I've had a play with the software and it looks very promising. Good work :) How far away will the ability to add sensors to the software so we can start creating some really cool automated layouts?

I'm glad you like nControl and thank you for the complements!

I'm getting very close; I'm currently finalizing the design of the sensor and sensor controller.  The software is ready to use the sensors, it just needs testing and debugging.  I do still need to add a hook so it can process sensor feedback from your DIY board, but that shouldn't be too complex.

On 2/4/2017 at 4:38 AM, skaako said:

Also I would be looking at integrating the software with my own controller that communicates over WIFI using MQTT. How can I purchase the subscription for the software? Is it possible to run all communications through a single COM port and have my controller send it out to the relative device? I don't really like the idea of having a separate USB for each group of devices, especially when the numbers and distance gets up.

I guess that should be possible by adding custom Python scripts to the tiles.  If you hit a bottleneck, we can see what features we need to add, because the goal is to have a framework that is flexible enough to do things like this.  I'm very interested in the set-up you're trying to build: have you built anything or is it still in a conceptual phase ?  To get started, I would give you free nControl trial license for DIY boards for a couple of months so you can figure out how to get it to work with your system...

Share this post


Link to post
Share on other sites
On 2/5/2017 at 1:54 PM, mattmarsden said:

Tom, do you have any experience of networked USB hubs with your controllers?

Hi Matt,

No, I don't have experience with them in general.  What's the goal of using them ?

Share this post


Link to post
Share on other sites
13 hours ago, Lowa said:

Hi Matt,

No, I don't have experience with them in general.  What's the goal of using them ?

Was thinking about running ncontrol on a tablet and with a networked hub I wouldnt need any cables attached to it. Great news on the next version of ncontrol.

Share this post


Link to post
Share on other sites
On 2/7/2017 at 4:29 PM, Lowa said:

I'm glad you like nControl and thank you for the complements!

I'm getting very close; I'm currently finalizing the design of the sensor and sensor controller.  The software is ready to use the sensors, it just needs testing and debugging.  I do still need to add a hook so it can process sensor feedback from your DIY board, but that shouldn't be too complex.

I guess that should be possible by adding custom Python scripts to the tiles.  If you hit a bottleneck, we can see what features we need to add, because the goal is to have a framework that is flexible enough to do things like this.  I'm very interested in the set-up you're trying to build: have you built anything or is it still in a conceptual phase ?  To get started, I would give you free nControl trial license for DIY boards for a couple of months so you can figure out how to get it to work with your system...

You're welcome :)

For a simple serial controller you could have it checking for incoming data from the serial port frequently and maybe have it read in multiple sensor values from a string and convert them to python variables that can be used in the tile code. e.g. S001=1,S002=0,S003=256 etc.

I started off with a simple tile script that could change multiple switches and lights (let me know if there is a better way of coding this)

curState = self.getState()

switch4 = self.getTile('Switch 4')

light1 = self.getTile('Light 1')

light2 = self.getTile('Light 2')

 

if curState == 1:

    self.setSwitchTurn()

    switch4.setSwitchTurn()

    light1.setGreen()

    light2.setRed()

elif curState == 2:

    self.setSwitchStraight()

    switch4.setSwitchStraight()

    light2.setGreen()

    light1.setRed()

 

I then added some code to open a serial port and write some data to test it, but having the ability to setup a custom controller would be great. If it could be made to support MQTT directly would be awesome!! But one step at a time.

 

I'll get some photos of my test setup to show my setup. I'm using ESP8266's as the nodes and using MQTT as the communications protocol. They work well over WIFI, really cheap and have them working over their own VLAN to separate them from the rest of the network traffic. At the moment I'm using Mosquitto as my MQTT broker running on the same PC as nControl and have an ESP8266 connected by serial as a basic MQTT adaptor.

 

I'm looking forward to testing it with some sensors, let us know when it's ready :)

 

 

Edited by skaako
Clicked post too early :)

Share this post


Link to post
Share on other sites

So for every 4 switches i need 1 USB Port? Also cabling length might be a problem for usb? How long can the cable from controller to switch be? Maybe any plan in the future to make a Bus-System and only have 1 central interface? Would then also be nice instead of a USB Interface to  something to run this on an iPad/Tablet App instead. Easier to carry around then the notebook :) Aynway this looks awesome and i hope you make it available in europe soon.

Share this post


Link to post
Share on other sites
On 7-2-2017 at 3:42 AM, Lowa said:

 

  @Q371, I guess that's (close to) what you meant with a 'reset' button, or not ?

that's what I meant with a reset button, thank you.

Share this post


Link to post
Share on other sites

Finally had the time to make a short video of my progress with a custom controller...

More to come... 

Edited by skaako

Share this post


Link to post
Share on other sites

That looks cool already, I can't wait to see someone integrate this with a fully scenic layout. I think that would be beyond awesome.

Share this post


Link to post
Share on other sites

Tom, would it be possible for nControl to assign colours to switches in the track layout and the associated tile so at a quick glance you could see what tile relates to what switch?

Also I need to order 1 more controller and 2 more left turn servos. Are there any in Europe or will you need to ship from the US?

Share this post


Link to post
Share on other sites

Sorry for the late reply... the port of nControl to MacOS consumed all my time lately...

Concerning your questions:

So for every 4 switches i need 1 USB Port? => Indeed, one controller can handle up to 4 motors, but you can connect multiple controllers to one computer.  The system is designed to be able to handle multiple controllers simultaneously.  The maximum number of controllers is limited by the number of USB devices a computer can handle: 127.

Also cabling length might be a problem for usb? How long can the cable from controller to switch be? => We have tested it with a 3m/10ft extension cable between the motor and controller and everything worked fine.  This is most likely not the limit, we didn't test it with a longer cable.  The motors have 24AWG (measure of wire thickness) while we only found 26AWG (=thinner) extension cables; that what we used for our 3m/10ft test.  We custom ordered 24AWG extension cables, the are currently making them.  Once we have our 24AWG cables we'll test to see how far we can really go...

Maybe any plan in the future to make a Bus-System and only have 1 central interface? => That how it is when you use a USB hub.  You connect all the controller to the USB hub and then you can use nControl as you central interface to control everything.  You can also combine different type of controllers: motors, lights, sensors, etc.

Would then also be nice instead of a USB Interface to something to run this on an iPad/Tablet App instead. => An app for mobile devices would indeed be nice, but we're not there yet... porting to mobile will have consequences on both the software and hardware level.  We stared with computer applications because we wanted to go beyond simple 'remote control'; with the sensor you need to program how you want to respond to a train detection; and it seemed more convenient to do that on a computer than with a tablet.  But the ultimate goal is to indeed have nControl run on mobile devices as well.

I hope you make it available in europe soon. => Yes, we're working on that!

Share this post


Link to post
Share on other sites
On 2/19/2017 at 8:48 AM, mattmarsden said:

Tom, would it be possible for nControl to assign colours to switches in the track layout and the associated tile so at a quick glance you could see what tile relates to what switch?

Also I need to order 1 more controller and 2 more left turn servos. Are there any in Europe or will you need to ship from the US?

Hi Matt,

Assigning a custom color to each switch should be possible and could help to identify the switches/tiles.  But we released the version 2017.2 yesterday (Windows and Mac) and it has all the features you suggested in your previous post, so now you can flip the switches by clicking/tapping on them in the train layout.  Can you give that a try and let me know if with this there is still a need for color coding the switches ?

We don't have any track switch motors stock in Europe at this points.  The goal is to send some at the end of the month.  So depending on your time frame you can get them right now from the US of wait until (half ?) March to order them from our European store.

 

On 2/9/2017 at 11:13 AM, Q3671 said:

that's what I meant with a reset button, thank you.

Hi Q3771. Version 2017.2 has a 'Synchronize' function; it loops over all the tile and synchronizes the actuators to the state of the tiles.  Thanks for suggesting this feature; it's pretty cool to see it in action... it shows a progress bar and a preview of the tile that is currently being synchronized,so you see what it is doing.  I think this is a very handy feature when you make a temporary setup...

@McWaffel, @Q3671  The shipment cleared customs today, so 4DBrix Europe should have your motors by the end of the week...

On 2/14/2017 at 4:08 AM, skaako said:

Finally had the time to make a short video of my progress with a custom controller..

More to come... 

Thanks for sharing this.  You even managed to connect to the blinking functions of the lights!  Super cool!

Edited by Lowa

Share this post


Link to post
Share on other sites

Hi Tom, sounds excellent, I'll give the latest nControl a try later and no need to worry about colour tiles. I'm happy to have the bits shipped from the US, if you send me an invoice I'll get the payment over to you. Thanks for all your hard work

Share this post


Link to post
Share on other sites
19 hours ago, mattmarsden said:

Hi Tom, sounds excellent, I'll give the latest nControl a try later and no need to worry about colour tiles. I'm happy to have the bits shipped from the US, if you send me an invoice I'll get the payment over to you. Thanks for all your hard work

Ok, great!

Share this post


Link to post
Share on other sites
On 21.2.2017 at 7:02 AM, Q3671 said:

@McWaffel, @Q3671  The shipment cleared customs today, so 4DBrix Europe should have your motors by the end of the week...

 

that's good news.

Nice :D Looking forward to trying them out

Share this post


Link to post
Share on other sites

Hi Tom, the latest version of nControl works really well. I've got a dedicated intel atom pc to run nControl and run a remote desktop to it from an iPad so I can walk round with it and change the switches by tapping them on the iPad.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.