Go Back   IceInSpace > Equipment > ATM and DIY Projects

Reply
 
Thread Tools Rate Thread
  #1  
Old 24-10-2020, 07:16 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
new project - obs automation

Now that the Brisbane summer is kicking in, with rain and cloud for the foreseeable future, I'm thinking a new project might be just the thing. I'd like to do some more Arduino tinkering and also get back into some Visual Studio programming so I'm thinking a remote power switching unit might be a good challenge.

My current obs does not have roof automation and it is not remote so I don't really need anything super sophisticated but it would be nice to be able to power everything down from within the house when the camera warming cycle is complete. Likewise it would be nice to hold off powering up everything until just before twilight, with control from the Voyager script. My future obs is more likely to have additional automation so I'm factoring that into my build decisions.

I've discovered an Arduino relay shield that has four relays, each capable of switching 240VAC. This unit utilises four of the Arduino digital I/O pins (user selectable) leaving 10 including 6 PWM for other stuff.

https://core-electronics.com.au/rela...uino-v2-1.html

The Arduino Uno also has 6 analogue inputs that could be used for position switches or other sensors.

I've figured out that Voyager can execute an external script from within its DragScript language and this can pass parameters as well as receive return values and assign these to internal DragScript variables for further decision making.

I need to give some thought as to whether I want the device to be completely stand alone from the PC that Voyager is running on. It is much simpler if they are connected as I won't need to worry about WIFI/Ethernet capability for the Arduino and I think the Voyager script commands will be simpler to implement. The downside of this approach is the computer power will not be remotely controllable. This is not an issue for power down as Voyager can shut down the PC from within the DragScript directly.

Keen to hear if anyone has already been this path...any learnings?

Reply With Quote
  #2  
Old 24-10-2020, 09:56 PM
DavidTrap's Avatar
DavidTrap (David)
Really just a beginner

DavidTrap is offline
 
Join Date: Jun 2009
Location: Brisbane
Posts: 3,032
IP addressable powerboard (digital loggers has an ASCOM driver) would be an alternative. Set the PC to automatically startup when the power to that circuit is switched on.

I realise Arduino would be a DIY solution. Could you put an Ethernet Shield on top of the relay shield? You might be able to make it remotely addressable???

DT
Reply With Quote
  #3  
Old 24-10-2020, 10:07 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Hi David,

I have seen there are quite a few off the shelf options however this is more about the challenge of figuring it out for me.

From what I've managed to figure out so far I think an Ethernet shield or WIFI module is possible to allow it to be remote addressable however the coms protocol with Voyager is hardware specific from what I can gather so it would then require Leo add the protocol to Voyager/Viking.

I'm thinking the generic scripting language might offer a completely user configurable solution. I think I've already worked out a very easy way for Voyager to invoke a command through execution of a .bat file. I'm still trying to work through how it can receive feedback from an external script however I know it can - just a limitation of my knowledge atm.
Reply With Quote
  #4  
Old 24-10-2020, 10:23 PM
DavidTrap's Avatar
DavidTrap (David)
Really just a beginner

DavidTrap is offline
 
Join Date: Jun 2009
Location: Brisbane
Posts: 3,032
Digital Loggers has an executable file that you can run from the command prompt. ACP can work out the state of the switches, so feedback is possible.

DT
Reply With Quote
  #5  
Old 29-10-2020, 10:40 AM
turbo_pascale's Avatar
turbo_pascale (Rob)
Registered User

turbo_pascale is offline
 
Join Date: Apr 2006
Location: Melbourne, Australia
Posts: 478
I built something similar, and it supports the ASCOM Switch capability.
With some modification, you could make this fit for your purpose.

https://www.youtube.com/watch?v=SEDUN2QxzrE

NOTE: I don't love the board I used because it requires 12V on the switching side (which is just annoying) - If you could find one that could work straight up off 5V so you could switch it from the Arduino, that would be better.

Check the description on the video for links to various software you can use. It's all pretty generic stuff.
-----------
As for powering 240v programatically, I used to have one of the older Digital Loggers power strips (they do not have australian plugs, but can run off 240V). They are expensive for what they do.

There are a number of WiFi controllable power boards you can get that use ESP chips and can be flashed so they can operate locally (rather than using cloud providers). They typically use SONOFF or TUYA firmware. I have a backburner project (so many of these backburner projects!!!) that I was going to use ARLEC GRIDCONNECT powerboards (or single plugs) and flash them. Instructions on this here:
https://drive.google.com/file/d/1sUa...koWnsWB-7/view

I have a bunch of home automation gear that allows me to interface with this stuff easily, but that's an entire rabbithole to go down.
Reply With Quote
  #6  
Old 31-10-2020, 05:24 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
I've been making steady progress on this over the past week. I've got a pretty good Arduino base code done and I've been playing with the PC interface. There is quite a bit to consider as there are multiple potential inputs and logic to decide what to do with the outputs. I'm trying to write the code in a way it can be quite flexible and able to be configured for the specific application.

Here's how the PC interface is shaping up and an attempt to map out the data moving around between the various layers (in my case Voyager, the PC app and the controller).

I need to give some thought to the logic and how best to do this while maintaining a degree of flexibility/individual configuration. That's next!

In keeping with my previous Arduino project, I'm calling it RelayBox however I might need to get Troy in the marketing department to come up with something clever
Attached Thumbnails
Click for full-size image (P1.JPG)
25.3 KB45 views
Click for full-size image (P2.JPG)
26.5 KB51 views
Click for full-size image (P3.JPG)
22.4 KB37 views
Click for full-size image (P4.JPG)
30.7 KB72 views
Click for full-size image (Data_Flow.jpg)
147.1 KB52 views
Reply With Quote
  #7  
Old 01-11-2020, 05:34 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Bit of a re-work and some more progress today. I've worked out a way to allow logic to be defined in the interface. At the moment it is limited to the three digital inputs however I've made room for 6 logic tests from those three inputs. I've also change the manual input to radio buttons as this allows three states - on/off/let the program decide. The logic has the next priority followed by the script input.

Next step is to test the Voyager integration - ie sent a command from the DragScript and see if it successfully switches a relay.

Here are some updated screenshots
Attached Thumbnails
Click for full-size image (P1a.JPG)
25.0 KB32 views
Click for full-size image (P2a.JPG)
29.1 KB29 views
Click for full-size image (P3a.JPG)
22.9 KB26 views
Click for full-size image (P4a.JPG)
30.4 KB30 views
Click for full-size image (P5a.JPG)
22.9 KB31 views
Reply With Quote
  #8  
Old 05-11-2020, 07:17 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
First integration test tonight - compiled the VB code, moved it to the obs pc, set up the Voyager script interface directory and tested the script inputs from Voyager...success

Next step is to improve the scripts to provide confirmation the script was run and create some new ones to read and provide feedback of the digital and analog input variable status to Voyager.

This weekend I'll get a box and some connectors to mount the electronics in and hopefully put it all together.
Reply With Quote
  #9  
Old 07-11-2020, 06:18 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Made a bit of progress on the hardware front today. A trip to Jaycar proved fruitful and after a bit of marking out and drilling, the relay box is starting to take shape. It is slow going on the soldering with my 55 yo eyes but the end is in sight

I wanted to avoid the terminal block connections a lot of the commercial units employ because my existing power cables already have the screw-retained 2 pole connections. I also wanted to replicate the individual fused and LED indication for each output that I have on my existing power distribution box.

Here's how it is looking at end of play today.
Attached Thumbnails
Click for full-size image (20201107_181140_1604736819078_resized.jpg)
185.2 KB37 views
Click for full-size image (20201107_181254_1604736818210_resized.jpg)
161.5 KB53 views
Click for full-size image (20201107_181309_1604736817398_resized.jpg)
158.5 KB51 views

Last edited by peter_4059; 07-11-2020 at 07:03 PM.
Reply With Quote
  #10  
Old 08-11-2020, 05:45 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Got all the soldering done today. Quite a fiddly job and it would have been easier if I had gone for a slightly bigger enclosure but it all came together in the end.

Powered it up, no blue smoke.

For now I haven't included any connections for the inputs because my current setup doesn't need them however they have been included in the code should my needs change in the future.
Attached Thumbnails
Click for full-size image (20201108_173617_1604821141819_resized.jpg)
90.6 KB60 views
Click for full-size image (20201108_173637_1604821141077_resized.jpg)
91.7 KB61 views
Reply With Quote
  #11  
Old 15-11-2020, 05:18 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
Got everything wired up this weekend and put some finishing touches to my scrips and to the Voyager dragscrip. Gave it a test last night and everything worked as planned so now, apart from the roof still being a manual activity, everything else can be automated.
Reply With Quote
  #12  
Old 15-11-2020, 07:32 PM
DavidTrap's Avatar
DavidTrap (David)
Really just a beginner

DavidTrap is offline
 
Join Date: Jun 2009
Location: Brisbane
Posts: 3,032
Quote:
Originally Posted by peter_4059 View Post
Got everything wired up this weekend and put some finishing touches to my scrips and to the Voyager dragscrip. Gave it a test last night and everything worked as planned so now, apart from the roof still being a manual activity, everything else can be automated.
Good to hear.

I'm liking Voyager more and more each time I use it!

DT
Reply With Quote
  #13  
Old 16-11-2020, 05:51 PM
peter_4059's Avatar
peter_4059 (Peter)
Big Scopes are Cool

peter_4059 is offline
 
Join Date: Jun 2007
Location: SE Tasmania
Posts: 4,532
I'm the same. Decided to purchase license having been on the trial for the past 45 days. I've just fired up the script so will see how it goes tonight with everything on autopilot.
Reply With Quote
Reply

Bookmarks

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 09:22 PM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Advertisement
Testar
Advertisement
Bintel
Advertisement