Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CQC controlling Model Railroad???
#11
The design has to be that you don't have to reach more than about 2 feet to reach any location.  The benchwork at the end of a dogbone needs a pop-up hatch in the center.  Other areas need either no more than 2 feet of thickness, or access from two sides.

They make special ladders for model railroads on wheels that project under the layout, then you can hang over the layout on your stomach with your feet on a step.  I'd prefer being able to reach from the floor, which is the 2 foot limit.

Wiring is not affected as you can just roll under the layout to any location on an office chair, if the layout is in the 50" plus in height.
Reply
#12
so, in the spirit oh being "helpful"
and in the spirit of over complicating things... Tongue

so... I have been thinking...

the end goal would be to have 50+ outputs controlled by a single arduino...

those little relay boards are neat and cheap, but they only have 8 relays, and I believe they are tied to actual output pins on the arduino board, which has a limited quantity of pins... (like 17 I think?) so that somewhat limits their usefulness. and they are rather large 10A 30Vdc/250Vac relays...

the Tortise thingies are only ~16mA, LED's are generally ~20mA, so for a large quantity of your outputs, the relays are a huge overkill...
still should have a couple big relays, could use one as the main power switch, maybe another to power a miniature sun, a fog machine, etc...
so, first part of the problem, how to get 50+ I/O's out of an arduino that only has 17(I think?) I/O's?
found it! NXP 9506 I2C port expander doohicky(uses 2 pins on arduino) provides 40 I/O pins... and can be daisy chained, so lets use 2, 80 I/O's should be good...

set like 24 of the I/O's to be inputs... not sure what they would sense, but someone will think of something...
we can also use the (6 I think?) Analog in's on the arduino as analog sensors for something also?

anyway, of the remaining 56 pins that will be outputs, use 8 of them to drive big relays (maybe just drive one of those ebay relay boards?)
and for the remaining 48, use them to drive a fairly small transistor, like a NZT651, that can switch 4A, still way overkill, but fairly small in a SOT223 package... easy to fit a lot of them on a fairly small PCB...

maybe use a PWM on the arduino to actually run the train? need to build a driver for that, but control of speed/direction should be simple enough...

could also use some of the now free Arduino pins to drive some stepper motors... raise & lower a bridge or something?
NOTE: As one wise professional something once stated, I am ignorant & childish, with a mindset comparable to 9/11 troofers and wackjob conspiracy theorists. so don't take anything I say as advice...
Reply
#13
If there is no logic being done and you only need slave outputs because the user is selecting the switch to change then the Arduino is a good fit.  Also the ESP8266 (originally used with the arduino to give it Wifi can do logic and be configured in the same IDE).

If you go with the arduino  then the MQTT protocol would be fairly simple to use with it and there are many examples.  CQC does not have a MQTT driver yet but one could be done.

If you need to do automation then a PLC would work nicely, but the cost would go up - look at the Click PLC as there is a driver already for this PLC.

There is also the D1 mini that can be used.  A few of these around the table for a distributed system.

A bus exists (i²C) so you can get all 50 I/O on one Arduino. e.g. 32 Relay I²C board. 

Daisy chain the relay boards to get to the number that you need
[url=https://www.controlanything.com/product/i2c_devices/Relay-Controller?sku=MCP23017_I2CR32G5LE_10A][/url]
Mykel Koblenz
Illawarra Smart Home
Reply
#14
Here's an update on where this is going at the moment.  The thinking at this time is that Tortoise switch machines are too expensive in mass.  Servos look far more promising cost wise and seem to be practical physically.  The goal remains to control the switches/servos with CQC.  At this time, it's the gap between the tablet screen and the servo we're working on.

I'm preparing to set up a test system, that is, one switch (turnout) mounted on a 1 x 4 to be used on the workbench to physically operate various concepts, both electrically and physically.

I tried to mate the Arduino to CQC last night, but discovered the CQC driver requires an IP address, so I had to order a Shield for the Ardunio to even get the driver connected.  Everything about this venture is new, uncharted territory.

There are a ton of unanswered questions at this point, and the suggestions offered in earlier posts are all very welcome.  Keep tossing in any ideas you may have.  They are appreciated.  Due to the quantity of required circuits or channels (50+), it's essential to work towards low cost on the repetitive components.

There's much more that CQC can contribute, such as control of mood lighting, servos to operate doors on models, and other devices on the layout, even thunderstorms.  Broadway Limited, a top of the line MR equipment vendor has a new Thunder and Lighting system out using LED lighting and a subwoofer to create a significant storm.  Just a small part of recreating reality in miniature.

http://www.broadway-limited.com/1598ligh...ayout.aspx

Thanks for your interest and help. The difference between men and boys is the price of their toys.

Deane
Reply
#15
1st off, thanks a lot znelbok for ruining a perfect opportunity to do a DiY PCB with your fancy pants already made I2C 32 relay boards Tongue Big Grin
that would be easier... less fun from a DiY stance, possibly cheaper over all? but less fun Wink


anyway, so, switching to servo's... while it might seem cheaper up front... how will you drive them? what sort of feedback will you use to determine how far to go/when to stop? what will the feedback & logic to handle it add to the base cost of of the servo's? you may also want to consider small stepper motors, they are nice because you can repeatedly turn the X amount of steps in one direction, and the Y amount of steps in the other direction and still know exactly where you are...
but of course stepper motors need drivers too... adds to $$..

as far as the arduino CQC driver...
I haven't actually looked at the existing driver, but I would guess it is fairly "generic"

you may be better off, starting with the plan to create your own dedicated simple PDL driver,
1st, you can just use the existing USB as arduino just uses that as a simple serial port I think?
2nd, as you (or someone Cool ) will be writing your specific arduino code, you can just build in stuff to pump out to the serial port, and what you expect to receive from CQC into your code, and then on the CQC side, you can easily create a PDL driver to match... ie, you have a situation where you control both sides of the equation, take advantage of that!... I would imaging there are plenty of times, Dean or one of the other people who write drives just wished they could tweak the device side to do something better... you actually can!
NOTE: As one wise professional something once stated, I am ignorant & childish, with a mindset comparable to 9/11 troofers and wackjob conspiracy theorists. so don't take anything I say as advice...
Reply
#16
Stepper motors can be driven directly from an ESP8266 and thus I would assume that the Arduino would also drive them directly. (maybe a mosfet or something similar required only).

i would rather see a driver that uses something standardised - hence the reference to MQTT which there are libraries for in the IDE. A broker would be required and then a CQC driver to talk to the broker. This would probably give more device a gateway to CQC in the future. I'm only just starting to dabble in the MQTT side of things with my test ESP8266, but it all looks promising. Its going to be a great way to do a roll your own IoT (washer, dryer, etc)
Mykel Koblenz
Illawarra Smart Home
Reply
#17
I'm with Mykel on this one, especially if MQTT can do guaranteed delivery and provide feedback; something like MQ Series (use this professionally.) Anything that we can do to put a broker in the middle for this type of thing will give much greater flexibility with this type of need! I use EventGhost for the same reason, it's messaging middleware that removes the need for each end to know the other.

Edit: okay so MQTT is IBM MQ Series, cool.
Reply
#18
I should mention that most switch machines use a piano wire sticking up through the benchwork to throw the switch points.  Thus, the switch machine actually travels further than would be basic for the throw so as to maintain considerable pressure on the points to keep them firmly against the proper rail.

Here's a rather definitive blog on the use of servos to move switch points.  Some good photos in it help with a good vision of the physical setup.

http://model-railroad-hobbyist.com/node/25958

All of the discussion in the posts above does not fall on deaf ears.  It's very useful and we're taking it all in.

Deane
Reply
#19
I really don't see how MQTT fits in this specific case?
seems to me all that is really needed is a way to open a relay, close a relay feed back that info to CQC, what gain would adding yet another messaging transport scheme in the middle have over a simple PDL protocol?

I can see how the pro's like znelbok, etc would prefer MQTT in the "Grand Scheme of Things"  but I just don't see the need for this specific case? other than possibly a sneaky way to get it implanted so that it was available for their evil "Grand Scheme of Things"  plans? Big Grin  of course I may be missing something...



seems unlikely an ESP8266 could drive a stepper, even a very small one directly, lacks an H bridge, or anything to simulate one, along with the power handling needed... I am sure it can control a driver board/motor controller, just like arduino (or anything that can toggle a direction pin and a step pin)

besides steppers or servo's, just tossing out some more random thoughts...
don't underestimate the usefulness and simplicity of solenoids
or pneumatic plungers & such, if you have a air source...
there is something satisfying about the nice little pop/thunk they make... may have some use, maybe cheaper in some cases? probably not, but they do make a nice thunk noise... anyway, just tossing them out there...

and linear actuators... can't go wrong with a linear actuator... every project needs one for some reason...
NOTE: As one wise professional something once stated, I am ignorant & childish, with a mindset comparable to 9/11 troofers and wackjob conspiracy theorists. so don't take anything I say as advice...
Reply
#20
The hangup at the moment is getting the Arduino connected to CQC.  Without any knowledge of what the driver is all about and what it does makes it almost impossible to move ahead.  All of the links to the old posts on the subject appear to have been broken by the update to the new forum software.

I hate giving up at this point on using CQC, but without being able to implement the driver, we're at a halt.  I'm still not clear why it needs Ethernet to communicate and not USB which the Arduino comes with built in.

HomeSeer appears to have a fairly robust Arduino driver, but I'm not sure.  Obviously, it goes through my mind to ask myself if I need to move my model railroad project to HomeSeer on a separate computer, or perhaps JMRI, or something else.  Nothing will move forward until I get past this hurdle.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Controlling Insteon Scene Controller buttons ellisr63 8 5,864 10-14-2014, 11:38 AM
Last Post: SomeWhatLost
  Android Widgets directly controlling CQC! IVB 39 14,676 12-08-2013, 12:24 PM
Last Post: Dean Roddey
  Controlling ZigBee (or Z-Wave) on HAI anogee 2 2,458 12-18-2012, 12:06 PM
Last Post: Dean Roddey
  Controlling an onscreen GUI cavalier240 10 4,465 03-20-2012, 09:40 AM
Last Post: standon
  Onkyo TX NR708 Driver Model Choice jmwhooper 2 2,456 05-19-2011, 02:01 PM
Last Post: wdill
  Need help with controlling an app simon 26 10,417 11-28-2009, 01:42 PM
Last Post: sic0048
  Controlling devices that use HDMI-CEC cavalier240 4 3,227 09-26-2008, 05:25 AM
Last Post: sic0048
  CQC controlling VLC or MPlayer on Windows or Linux dkemme 2 2,280 02-25-2008, 09:49 AM
Last Post: dcpete
  Is 4s lag normal for CQC controlling CQS Audio player? Sendero 11 4,953 01-04-2008, 11:55 PM
Last Post: Dean Roddey
  controlling autopatch via rf? Providince 8 4,106 06-01-2007, 09:56 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)