Remote power on/off via USB relay Arduino CH340. Maybe add it to APCC?


Micheal Fields Jr
 

Looking for a way to restart the mount I ventured onto Amazon and found this little USB relay device https://www.amazon.com/gp/product/B01CN7E0RQ

After poking around trying to figure out how to use it easily I found that documentation was limited and so was software.  I found a helpful youtube video https://www.youtube.com/watch?v=26XHb_cpiAA and the youtuber also provided example power shell scripts and a link to a piece of software that sends hex commands to the device to toggle on / off.

I found the power shell scripts more useful.  Here is an example to turn on/off

ON:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one     <---- Note the com port must match what your windows sets for this device.
$robojax.Open()
$robojax.Write($powerOn, 0, $powerOn.Count)
$robojax.Close()

OFF:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one
$robojax.Open()
$robojax.Write($powerOff, 0, $powerOff.Count)
$robojax.Close()


So it occurs to me that this device is a nifty and inexpensive way to toggle your mount on and off as opposed to the more expensive remote power strips, it would be nice to have this somehow added to APCC where we can slide a switch on  or off and send these commands to the relay board and perhaps as an added bonus be able to specify a delay in seconds.  Eg, turn off for 10 seconds and then turn back on again.

And again yes I am familiar with remote controllable power strips where you can turn on and off certain devices. These are great for remote observatories for sure.  If you are going to spend this much on equipment you probably should go that route anyways.   

If it isn't a big deal to add this to APCC though, that would be wonderful to have.  Hi Ray!


M. Collins
 

On Thu, Feb 4, 2021 at 02:10 PM, Micheal Fields Jr wrote:
Looking for a way to restart the mount I ventured onto Amazon and found this little USB relay device https://www.amazon.com/gp/product/B01CN7E0RQ
  Yikes! Up to 250 VAC on the relay pins and no housing? That's a potentially lethal hazard just waiting for someone to grab as though it were any other USB device.

  Use with extreme caution.


Dale Ghent
 

An ASCOM Switch driver would be a better solution here, as you can then control it from any ASCOM client application that can grok ASCOM Switch drivers.

On Feb 4, 2021, at 16:10, Micheal Fields Jr via groups.io <mpfjr=yahoo.com@groups.io> wrote:

Looking for a way to restart the mount I ventured onto Amazon and found this little USB relay device https://www.amazon.com/gp/product/B01CN7E0RQ

After poking around trying to figure out how to use it easily I found that documentation was limited and so was software. I found a helpful youtube video https://www.youtube.com/watch?v=26XHb_cpiAA and the youtuber also provided example power shell scripts and a link to a piece of software that sends hex commands to the device to toggle on / off.

I found the power shell scripts more useful. Here is an example to turn on/off

ON:
[Byte[]] $powerOn = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one <---- Note the com port must match what your windows sets for this device.
$robojax.Open()
$robojax.Write($powerOn, 0, $powerOn.Count)
$robojax.Close()

OFF:
[Byte[]] $powerOn = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one
$robojax.Open()
$robojax.Write($powerOff, 0, $powerOff.Count)
$robojax.Close()


So it occurs to me that this device is a nifty and inexpensive way to toggle your mount on and off as opposed to the more expensive remote power strips, it would be nice to have this somehow added to APCC where we can slide a switch on or off and send these commands to the relay board and perhaps as an added bonus be able to specify a delay in seconds. Eg, turn off for 10 seconds and then turn back on again.

And again yes I am familiar with remote controllable power strips where you can turn on and off certain devices. These are great for remote observatories for sure. If you are going to spend this much on equipment you probably should go that route anyways.

If it isn't a big deal to add this to APCC though, that would be wonderful to have. Hi Ray!


Allen Ruckle
 

Do you still need a device like this?



On Feb 4, 2021, at 1:15 PM, Micheal Fields Jr via groups.io <mpfjr@...> wrote:

Looking for a way to restart the mount I ventured onto Amazon and found this little USB relay device https://www.amazon.com/gp/product/B01CN7E0RQ

After poking around trying to figure out how to use it easily I found that documentation was limited and so was software.  I found a helpful youtube video https://www.youtube.com/watch?v=26XHb_cpiAA and the youtuber also provided example power shell scripts and a link to a piece of software that sends hex commands to the device to toggle on / off.

I found the power shell scripts more useful.  Here is an example to turn on/off

ON:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one     <---- Note the com port must match what your windows sets for this device.
$robojax.Open()
$robojax.Write($powerOn, 0, $powerOn.Count)
$robojax.Close()

OFF:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one
$robojax.Open()
$robojax.Write($powerOff, 0, $powerOff.Count)
$robojax.Close()


So it occurs to me that this device is a nifty and inexpensive way to toggle your mount on and off as opposed to the more expensive remote power strips, it would be nice to have this somehow added to APCC where we can slide a switch on  or off and send these commands to the relay board and perhaps as an added bonus be able to specify a delay in seconds.  Eg, turn off for 10 seconds and then turn back on again.

And again yes I am familiar with remote controllable power strips where you can turn on and off certain devices. These are great for remote observatories for sure.  If you are going to spend this much on equipment you probably should go that route anyways.   

If it isn't a big deal to add this to APCC though, that would be wonderful to have.  Hi Ray!


Frank Widmann
 

Check out RelayPros. They have am easily configurable software control tool.

https://relaypros.com/Relay/Relay/USB_Relay_Controller

For a more packaged solution check out Kmtronic. They have a nice control package.

On Feb 4, 2021, at 1:10 PM, Micheal Fields Jr via groups.io <mpfjr@...> wrote:

Looking for a way to restart the mount I ventured onto Amazon and found this little USB relay device https://www.amazon.com/gp/product/B01CN7E0RQ

After poking around trying to figure out how to use it easily I found that documentation was limited and so was software.  I found a helpful youtube video https://www.youtube.com/watch?v=26XHb_cpiAA and the youtuber also provided example power shell scripts and a link to a piece of software that sends hex commands to the device to toggle on / off.

I found the power shell scripts more useful.  Here is an example to turn on/off

ON:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one     <---- Note the com port must match what your windows sets for this device.
$robojax.Open()
$robojax.Write($powerOn, 0, $powerOn.Count)
$robojax.Close()

OFF:
[Byte[]] $powerOn  = 0xA0, 0x01, 0x01, 0xA2
[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1
$robojax = new-Object System.IO.Ports.SerialPort COM7,9600,None,8,one
$robojax.Open()
$robojax.Write($powerOff, 0, $powerOff.Count)
$robojax.Close()


So it occurs to me that this device is a nifty and inexpensive way to toggle your mount on and off as opposed to the more expensive remote power strips, it would be nice to have this somehow added to APCC where we can slide a switch on  or off and send these commands to the relay board and perhaps as an added bonus be able to specify a delay in seconds.  Eg, turn off for 10 seconds and then turn back on again.

And again yes I am familiar with remote controllable power strips where you can turn on and off certain devices. These are great for remote observatories for sure.  If you are going to spend this much on equipment you probably should go that route anyways.   

If it isn't a big deal to add this to APCC though, that would be wonderful to have.  Hi Ray!


Micheal Fields Jr
 

You are supposed to put it in your own housing.  Also for this purpose it is between the power supply and the mount.  24v


Micheal Fields Jr
 

Sure but for my purposes I just want to turn the mount off and on. Or on and off.  You change something and need to reboot the mount for the change to take effect how do you do that without going out there and unplugging it?  You can spend a lot on expensive stuff or not.  I picked "not".


Micheal Fields Jr
 

Looks like the same exact device with a different USB connection.  


Mike Dodd
 

On 2/4/2021 9:15 PM, Micheal Fields Jr via groups.io wrote:
Sure but for my purposes I just want to turn the mount off and on. Or on
and off. You change something and need to reboot the mount for the
change to take effect how do you do that without going out there and
unplugging it? You can spend a lot on expensive stuff or not. I picked
"not".
For safety's sake, you could switch the 12VDC from your power supply to the mount. I assume you have a way to switch the AC to your power supply, so why not leave that alone and just switch the low-voltage DC?


Micheal Fields Jr
 

Isn't that exactly what I said I was doing? Only it is 24v DC which is the supplied power supply.


Christopher Erickson
 

There is an ASCOM driver for the Digital Loggers web power switches.

The Digital Loggers devices are great and very economical. I have installed them in many observatories. 

Check them out. 


-Christopher Erickson
Observatory engineer
Waikoloa, HI 96738
www.summitkinetics.com
   


On Thu, Feb 4, 2021, 5:40 PM Micheal Fields Jr via groups.io <mpfjr=yahoo.com@groups.io> wrote:
Isn't that exactly what I said I was doing? Only it is 24v DC which is the supplied power supply.