Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CQC controlling Model Railroad???
#21
(01-12-2017, 07:14 AM)Deane Johnson Wrote: 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.
first off,seems to me you are going about it backwards...
would it not be better to:
  1. figure out what is needed and then implement motors/lights/etc.
  2. figure out what is needed and then implement direct control of above (ie relays, sensors, motor drivers, etc)
  3. implement control with arduino/ESP8266/PIC/rPI/whatever you end up using as the embedded controller over the above.
  4. and then finally implement remote control of the embedded controller (aka CQC control of Arduino for example)
also, a couple questions...
the big one being, why do you even want to use the CQC Arduino driver?, if you otherwise have no need for Ethernet, and the CQC driver needs Ethernet, then it seems like a fairly good sign that it is not the correct driver for you to be using?
is your only reason for wanting to use the generic Arduino driver (that appears to require Ethernet) simply because it has the word Arduino in the name?
does it have some "must have feature" that can not be accomplished in any other way?

the HS Arduino "plug in" that I found with a quick google search is not at all the same as what I believe the CQC driver is, the HS plug in appears to include code for the arduino... more of a pre-programmed type deal... just turns it into a bunch of preset I/O's ( I am over simplifying it a bit, but that is the general gist of it)

the CQC driver I believe is just more of a generic send/receiver, You have to create your own Arduino program to actually talk to CQC... (as far as I can tell thanks to Dean completely trashing all the arduino threads in the move Angel )
so kind of a completely different philosophy really...

that said, assuming you don't want to, or cant write your own simple PDL driver, why not just use the generic serial driver to talk to the arduino over the existing USB? (you will still need to create and then program the arduino first, until you do that the Arduino is just a brick/nothing to talk too)
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
#22
USB is OK for simple stuff, but for more complex communications it would be a bit limiting, because you would be limited to the HID version of USB. That's pretty basic.

The deal with a driver is that you would just write whatever software you want on the Arduino side, that does whatever you want, and just talk to that with a CQC driver. The existing Arduino would probably not be appropriate for your needs. It's for basically just generically getting information. It's not a full featured driver. That would require more application specific code.

So you'd almost certainly need to write a driver specifically for this, with accompanying software on the Arduino side designed together with it. The Arduino would be the server, and wait for connections from the driver.
Dean Roddey
Explorans limites defectum
Reply
#23
as a side note, that HS plugin, does make a good point, somebody should create a semi generic Arduino code/CQC driver bundle that essentially just turns the arduinio into a bunch of seririal/IP/whatever connected I/O...
might be useful? that is where I could also see MQTT coming into play...
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
#24
I won't take time at the moment to answer all of the specific questions and challenges in the above two posts, as they take some thinking and study.  I appreciate them, because they generate the research issues.

First of all, Arduino is totally new to myself and my son.  He's an electronic person, having been chief engineer of several radio stations in his career.  He's a programmer and works with servos in his RC hobby.  However, Arduino and model railroad requirements are new to him, so he's also feeling his way.  I depend on him for any coding that needs to be figured out.  Now you know who's who.

We've been attracted to the Arduino because it appears to have a good capability for controlling servos.  We're attracted to servos because they can do an excellent job moving switch points and are very low in cost which is essential when we'll be X50+.  They are also expandable to use in opening engine house doors, lowering crossing gates, etc.

We're trying to learn the best way to use CQC with Arduino.  It's very easy for us to get on the wrong track (pardon the pun), because we're in territory we have never been in, like not even knowing how to connect it up.

Why do we want to hook it up first?  It just seems like the thing to do like all of our other peripherals are done.  Perhaps this needs a new line of thinking, which is why the above posts are appreciated.  It's open mind time.
Reply
#25
The existing generic driver could certainly be used as the basis for something more specific. So it wouldn't require starting from scratch necessarily.
Dean Roddey
Explorans limites defectum
Reply
#26
Given the growing popularity of Arduino as a springboard to other capabilities, it might be good for CQC to consider looking into expanding the driver's capability.  What does that mean?  I have no idea at this point.  The beauty of the Arduino in addition to it's broad based function is the cost.  Mine cost $16 shipped.  I just ordered some relays from China claimed to be for the Arduino.  I ordered 3 sets, a 1, a 4, and an 8.  Cost was $8 and change for all of them combined, shipped.

Our sticky wicket at the moment is getting the driver to talk to, or listen to Arduino.  I can't even get it on the network.  Why? The default address of the Arduino is 192.168.240.1  My network is 192.168.1.xx  As a result, I can't get it on the network.   If I could get a browser connected to the .240 address, I think I might be able to change its address to one that would work on my network.
Reply
#27
(01-12-2017, 11:45 AM)Deane Johnson Wrote: I won't take time at the moment to answer all of the specific questions and challenges in the above two posts, as they take some thinking and study.  I appreciate them, because they generate the research issues.

my only real challenge to you is to post lots of pictures and keep this thread updated...
while I am not that into trains or model building per se, I do find following along with the progress of these sorts of things interesting and sometimes enlightening... and when you add HA into the mix it becomes exponentially more fun... Big Grin

document everything... good and bad...

still think you should add some air solenoid thingies somewhere... can't go wrong...
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
#28
"the CQC driver I believe is just more of a generic send/receiver, You have to create your own Arduino program to actually talk to CQC"

I'm beginning to believe this statement is correct. I'm believing the Arduino has no software capability installed. It needs a "sketch" (program) uploaded to tell if what to do. It's an empty box waiting for something to be tossed in it.

I can access it from the Arduino software through the USB connection which would allow the uploading of a "sketch" if one new what the "sketch" should say.

We're still in learning mode on this end.

(01-12-2017, 01:32 PM)SomeWhatLost Wrote:
(01-12-2017, 11:45 AM)Deane Johnson Wrote: I won't take time at the moment to answer all of the specific questions and challenges in the above two posts, as they take some thinking and study.  I appreciate them, because they generate the research issues.

my only real challenge to you is to post lots of pictures and keep this thread updated...
while I am not that into trains or model building per se, I do find following along with the progress of these sorts of things interesting and sometimes enlightening... and when you add HA into the mix it becomes exponentially more fun... Big Grin

document everything... good and bad...

still think you should add some air solenoid thingies somewhere... can't go wrong...
The pneumatics would create a couple of issues.  One is that the switch points are intended to move slowly as they do on the prototype, then be held constantly against the appropriate thru rail.  And, can you imagine the mass of tubing under a layout with 50 plus pneumatic switches.
Reply
#29
(01-12-2017, 01:36 PM)Deane Johnson Wrote: The pneumatics would create a couple of issues.  One is that the switch points are intended to move slowly as they do on the prototype, then be held constantly against the appropriate thru rail.  And, can you imagine the mass of tubing under a layout with 50 plus pneumatic switches.

that's ok, it just adds to the "fun" Smile
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
#30
(01-12-2017, 01:30 PM)Deane Johnson Wrote: Our sticky wicket at the moment is getting the driver to talk to, or listen to Arduino.  I can't even get it on the network.  Why? The default address of the Arduino is 192.168.240.1  My network is 192.168.1.xx  As a result, I can't get it on the network.   If I could get a browser connected to the .240 address, I think I might be able to change its address to one that would work on my network.

For a regular standalone device, you generally would use a crossover cable and connect directly to it with a laptop or tablet, or plug them both into a separate network switch. Then set the laptop to have a fixed address on that sub-net. Then you can talk to it and set its address to something else. Then put your laptop back to normal.

But it's a little computer, right? So I'd think you would log into it and set up the network there locally on it.
Dean Roddey
Explorans limites defectum
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)