Jump to content

Remote Control / User Interfaces?


Macavity

Recommended Posts

As the hardware construction of my observatory draws to a close (Hurrah!) my mind is turning to the possibilities for adding remote interfaces for simple control functions. Nothing exotic, merely the ability e.g. to control lighting via micro relays etc. In essence, remote ON-OFF switches! :p

But maybe something a little more FUN (flexible) than another 30m multi-core "alarm" cable? :)

Granted the Arduino (plus Ethernet Shield etc.), but just wondering about possible alternatives... 

On a (windows) PC, something (FREE!) to create a simple graphical interface? Maybe to make "library calls" to a custom .dll package associated with a "USB to parallel interface"? Nominally a Physicist-programmer, press-ganged "system manager" [lol] here. In the more recent past (2008!), I have done stuff with Visual Studio Express in C# etc. Not sure of the latest "word on the street" though. :D
I have LONG Ethernet and USB cables links to the observatory, but trying not to get involved with
(laudable) ASCOM or re-writing low-level Ethernet comms or USB drivers - If they exist already.  ;)
Link to comment
Share on other sites

If you want to go down a more industrial control route, I recently used one of the Moxa IO Logic units to provide remote control for a helipad lighting control and access system.    The E2214 unit is gives quite a good mix with LAN control, SCADA, 6 digital inputs and 6 programable relay outputs - http://www.moxa.com/product/ioLogik_E2214.htm

It runs on 12-24V DC, and the relays can switch 240AC loads to 1A inductive and 3A resistive, though in our case we used it to switch bigger contact breakers for heavier loads.

It runs a very simple to configure logic and can be easilly controlled remotely via web access or SCADA application.

Link to comment
Share on other sites

Turns out that the simple application I have in mind is indeed a possibility for the ubiquitous Arduino. It just so happens I have an Arduino Uno lying around doing (absolutely) nothing. The Windows interface can be written in C# under (downloadable) Microsoft Visual Studio Express. Wrote a few "Mickey Mouse" C# programs with that a few years ago. So... Simples. :)

http://www.technicana.com/physical-computing/73-connect-to-the-arduino-with-c-.html

Of course nothing guaranteed - I am assuming the (FREE!) VSE for "Windows Desktop" will support serial IO calls. ;)

http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop

Thanks for all suggestions.

Link to comment
Share on other sites

Turns out that the simple application I have in mind is indeed a possibility for the ubiquitous Arduino. It just so happens I have an Arduino Uno lying around doing (absolutely) nothing. The Windows interface can be written in C# under (downloadable) Microsoft Visual Studio Express. Wrote a few "Mickey Mouse" C# programs with that a few years ago. So... Simples. :)

http://www.technicana.com/physical-computing/73-connect-to-the-arduino-with-c-.html

Of course nothing guaranteed - I am assuming the (FREE!) VSE for "Windows Desktop" will support serial IO calls. ;)

http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop

Thanks for all suggestions.

I want to provide a computer user interface to control some of my Arduino projects and already planned to look into it.  Your links provide exactly what I want - thank you :)

I've written applications in Microsoft Visual Basic in the past - a very quick and simple development environment.  This seems a better, updated similar thing :)  So now I'm back with Windows this seems ideal. 

Link to comment
Share on other sites

The SerialPort class has been part of the .net framework since .NET 2.0, the core documentation is here: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx.  I haven't used this class but used the old class from 1.1 which was simple enough to use and I doubt this is much harder.

If you wanted to be really fancy you could create a web site (still in c#) and then use this to control the Ardiuno via serial.  The fun part here is you could expose the site to the world (carefully you don't want ) and control the setup from anywhere with an internet connection.

Link to comment
Share on other sites

  • 7 months later...

Finally got down to a bit o' programming! Still "Windoze XP" here,

but downloaded M$ Visual Studio Express 2010 (for C-Sharp). 

Bought a (pre-built) Velleman Shield for (Observatory 12V) I/O:

http://www.velleman.co.uk/contents/en-uk/p626_vma05.html

This has 6 digital (relay) OPs, 6 digital IPs, 6 analog IPs etc.  

Here we have the rudiments of my <drumroll> PC-interface: :)

(OK, OK, the "detailed aesthetics" need some work but...)

post-539-0-83081800-1402832292.jpg

Writing stuff to the Arduino is just a case of "Serialport.write" etc.

You can e.g. "branch on the character received" in Arduino code.

Receiving data via C#, more challenging? A few hours on Google

reveals that this has seemingly exercised other "great minds"! lol  ;)

(In my rudimentary understanding) Received Serial Data from the 

Arduino raises an Event Flag in separate C# thread.. You are then

able to share this "asynchronously" ... You can INVOKE the display

(data use!) via event hander... (Nothing ever easy in M$ world?)!  :p

But Eventually I found some practical examples on how to do this:

http://csharp.simpleserial.com (Checkout the listing notably) Yay! :cool:

Easy to display Arduino data now (comma separated values etc.)

APPENDED to the Text Box! But sadly, you never quite know where

your data starts / finishes. So, either you PARSE it all properly... :o

THEN I replaced "Serialport.ReadExisting" by "Serialport.ReadLine"

and things looked a lot easier! The first data buffer can contain

part (broken) data (I have to work out how to handle this neatly!),

but then things seem to "lock in" via the "end of line" character? :)

Irrelevant / obscure to most SGLers? But collaborators welcome!

If I get *really stuck*, I'm banking on fellow nerds programmers?  :D

Link to comment
Share on other sites

Thank you Chris :)  This is something I want to look into soon.  At present I can't seem to get my mind working well enough to sort out anything the least bit complicated.  I'm still recovering (if that's the word) from what happened a month ago.

(For anyone who doesn't know what I'm talking about, see Another bereavement thread in The Lounge.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.