Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Yet another RoR Arduino Controller

observatory
  • Please log in to reply
12 replies to this topic

#1 Chuck Faranda

Chuck Faranda

    Viking 1

  • *****
  • topic starter
  • Posts: 584
  • Joined: 31 Mar 2007
  • Loc: Florida

Posted 11 October 2020 - 01:10 PM

I'm building another small roll-of roof observatory, so, I cobbled together a very simple Arduino based controller.  The hardware consists of an Arduino Uno, relay shield, and some magnetic sensors (open, closed, scope safe).  The relays can be used to activate motor contactors for a wide range of possibilities including simple garage opens and gate motors.  There is an ASCOM driver, and TheSkyX plugin (written by Rodolphe Pineau see here).  Everyone is welcome to use/modify/etc. to suit your own needs. You can download the Arduino sketch and ASCOM driver here


  • R Botero, hongming and garnerb like this

#2 ssagerian

ssagerian

    Maker Uranographer

  • *****
  • Posts: 649
  • Joined: 30 Nov 2013
  • Loc: Chicago Suburbs, USA

Posted 11 October 2020 - 01:54 PM

Hi Chuck,

great to be an DIYer.

Do you have any schematics of your setup, what motor did you use?

There is also a DIY group Observatory Control Systems that uses an Arduino you might check out onstep-ocs@onstep.groups.io

any pictures?


Edited by ssagerian, 11 October 2020 - 02:02 PM.


#3 Chuck Faranda

Chuck Faranda

    Viking 1

  • *****
  • topic starter
  • Posts: 584
  • Joined: 31 Mar 2007
  • Loc: Florida

Posted 11 October 2020 - 05:07 PM

Thanks for the link. 

 

The motor I will be using is the Aleko gate opener with.  Pretty simple setup (see pic).  wiring4.jpg



#4 Gary.McK

Gary.McK

    Viking 1

  • -----
  • Posts: 576
  • Joined: 29 Jan 2009
  • Loc: Geelong, Australia

Posted 19 October 2020 - 10:04 PM

Hi,

this is just what I need, thankyou for making it available.

 

One query, the RCC1 doc says that it requires a 12v power supply? Yet the relay shields are 5 volt? Does this matter?

 

I presume that both the usb and the power supply are plugged in to the UNO......

 

Sorry for the basic questions, but whilst I am good at "monkey see, monkey do" I'm pretty electronically illiterate :-)

 

cheers

Gary



#5 Edward Nash

Edward Nash

    Explorer 1

  • *****
  • Posts: 90
  • Joined: 06 Mar 2011
  • Loc: SW Michigan

Posted 13 December 2020 - 04:41 PM

I just built this to work with my RoR Observatory.   I ran into a couple issues maybe the OP can help resolve?

 

Using Win10 and both SGP and N.I.N.A.

 

For some reason the com port is not saved.  I have to setup each time to correct com port.  If I turn off program it reverts to COM1, mine happens to be on COM4.

 

I am using a Aleko AR1450 Gate Motor and I just need a momentary connection to get the roof to move. I currently use a simple door bell push button.

In the program I hit O/C/S button and activates relay, only when I hit STOP does it seem to close the relay and the roof moves.    To stop roof I need to press STOP - O/C/S - STOP , I have one button selected in settings.

Odd..any way to just have relay close for 1 second?



#6 nthoward41

nthoward41

    Sputnik

  • -----
  • Posts: 26
  • Joined: 09 Sep 2020

Posted 14 December 2020 - 08:18 PM

I haven’t seen the arduino sketch yet but you should be able to find the logic that triggers the relay (probably a line that sets the appropriate pin to “High” or something, then just add two lines after it that are something like:

delay(1000); // wait for 1000ms
digitalWrite(13,Low); // set pin 13 (or whatever the correct pin is) to low (or high depending on logic in the original code)

Essentially you just wait one second then set the state back to whatever it was prior to triggering the relay.

#7 Edward Nash

Edward Nash

    Explorer 1

  • *****
  • Posts: 90
  • Joined: 06 Mar 2011
  • Loc: SW Michigan

Posted 14 December 2020 - 09:51 PM

I haven’t seen the arduino sketch yet but you should be able to find the logic that triggers the relay (probably a line that sets the appropriate pin to “High” or something, then just add two lines after it that are something like:

delay(1000); // wait for 1000ms
digitalWrite(13,Low); // set pin 13 (or whatever the correct pin is) to low (or high depending on logic in the original code)

Essentially you just wait one second then set the state back to whatever it was prior to triggering the relay.

Thanks for the feedback.  I took a look at the sketch and did not see anything obvious.  I am not a coder but trying to learn Arduino for other projects.  



#8 ccrunner84

ccrunner84

    Explorer 1

  • *****
  • Posts: 69
  • Joined: 24 Sep 2014

Posted 20 December 2020 - 11:34 PM

The sketch is disabling the output once an input is set, one for when the roof is at the open position, the other at the closed position.

 

If you want to change the sketch, you need to search for 

 

digitalWrite(open,HIGH);

 

and change it to 

 

digitalWrite(open,HIGH);

delay(1000);

digitalWrite(open,LOW);

 

You'd also need to do this for the close command too.

 

digitalWrite(close,HIGH);

 

to 

 

digitalWrite(close,HIGH);

delay(1000);

digitalWrite(close,LOW);

 

Hope that helps.



#9 Edward Nash

Edward Nash

    Explorer 1

  • *****
  • Posts: 90
  • Joined: 06 Mar 2011
  • Loc: SW Michigan

Posted 21 December 2020 - 08:09 PM

The sketch is disabling the output once an input is set, one for when the roof is at the open position, the other at the closed position.

 

If you want to change the sketch, you need to search for 

 

digitalWrite(open,HIGH);

 

and change it to 

 

digitalWrite(open,HIGH);

delay(1000);

digitalWrite(open,LOW);

 

You'd also need to do this for the close command too.

 

digitalWrite(close,HIGH);

 

to 

 

digitalWrite(close,HIGH);

delay(1000);

digitalWrite(close,LOW);

 

Hope that helps.

The sketch that was downloaded from the link in this thread is different than the sketch provided on the your Arduino site.  Once I installed that sketch then everything started working.  But a couple things.

 

 

I have an Aleko AR1450 and to open or close the roof all i need to do is temporarily connect two wires connected to the Aleko control board (using a push button) the board also provides 5V signal.  Push once to open, again to stop, and again to reverse direction(close). I also do not have a IR or photocell on my gate motor.

 

Going through the code I see it looks like you are using all four relays.    I only need one relay to momentarily make a connection.  I changed the relay define pins to all 4s except sensor I left at 5.

 

So now the roof will open when push OPEN button but pressing STOP does not seem to activate the relay and I can not see a call out in the sketch doing so.  Am I missing something?


Edited by Edward Nash, 21 December 2020 - 08:12 PM.


#10 ccrunner84

ccrunner84

    Explorer 1

  • *****
  • Posts: 69
  • Joined: 24 Sep 2014

Posted 21 December 2020 - 10:34 PM

Stop is using a different output most likely, so for the digital write commands that reference open/close you may need to change them all to open or close depending on what output you are using.



#11 garnerb

garnerb

    Lift Off

  • -----
  • Posts: 5
  • Joined: 27 Jun 2020
  • Loc: Anderson, SC

Posted 26 June 2021 - 11:44 AM

Hey thanks for making this available.  I just finished setting this up in my observatory using a GT Master opener from Amazon and N.I.N.A.

 

I have a short demo of it here.  https://www.youtube....h?v=Hy6vS_7JmOk


  • Greg M likes this

#12 Greg M

Greg M

    Ranger 4

  • *****
  • Posts: 367
  • Joined: 03 Sep 2007
  • Loc: Henderson, NV

Posted 29 June 2021 - 02:19 PM

Hey thanks for making this available.  I just finished setting this up in my observatory using a GT Master opener from Amazon and N.I.N.A.

 

I have a short demo of it here.  https://www.youtube....h?v=Hy6vS_7JmOk

That's an awesome setup you have there. Congrats!

I'm just in the dreaming stages of a similar setup but mine will be at a remote location approx. 3 hours drive from my home.


  • garnerb likes this

#13 Chippy10

Chippy10

    Lift Off

  • -----
  • Posts: 18
  • Joined: 10 Sep 2016

Posted 04 September 2021 - 09:13 AM

Hi Bruce,

I believe your using one relay to open and close…is that correct ?
I’m using a hoist motor on the roof and I think I’d need to utilise two relays …1 open and 1 close.
Wondering would the same sketch code work.
Any ideas would be very appreciated

Padraig

Edited by Chippy10, 04 September 2021 - 09:15 AM.



CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics





Also tagged with one or more of these keywords: observatory



Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics