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

Vernal Equinox Observatory needing to be motorized

  • Please log in to reply
29 replies to this topic

#1 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 27 February 2020 - 02:32 PM

I have been searching and thinking and searching and too much thinking, to motorize my roof. I really like the Aleko AR900 at $200.00. I like the soft start and soft stop, remotes and sensors. The unit can be installed inside or outside and center or to one side. Seen quite a few ROR with these systems and most used Aleko.

 

Aleko slinging gate opener are available in a track or chain model.

 

But and there is always one, should I go with a chain or track? 

Jess

 

 

 



#2 lvzyla

lvzyla

    Lift Off

  • *****
  • Posts: 3
  • Joined: 11 Nov 2005
  • Loc: Wimberley,Texas,USA

Posted 29 February 2020 - 10:43 AM

That is a good price for a motorized system.  I tried to implement a motorized system using a cheap truck winch and discovered that initial startup jerk was starting to skew my roof. I am real tall so when I built my roof I went with a cathedral style framing on the inside to give me more headroom. If you went with trusses your roof construction is probably sturdier. The Aleko has a soft start feature which I think is important.

I would vote for the steel chain. Plastic always lets me down in the sun. The chain has a lower profile if you need to send it through a wall too. A lower profile means it might be easier to locate in your building. One disadvantage with the chain is if you have steel support beams you would have to do some welding. Aleko provides you with a chain end bolt which attaches to the last link and is a  threaded bolt to adjust chain tension.

 

Lou


  • GrandadCast likes this

#3 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 29 February 2020 - 02:27 PM

Thanks for the input Lou. 

That is why the soft start and soft stop is so important for me.

 

I could not find any information about the soft start and soft end with the chain system on their site. They just stated soft start and soft stop on the track system. So I contact Aleko about their chain system and was informed it has soft start and soft stop. I would also think a heavy spring could be use to soften the starts.

 

Also been over thinking it again. If using a chain system, what happens if a limit switch goes bad. Would the chain keep running till something gets damage. If track, it would just stop moving when the track has end, no track no movement.

 

Jess

 



#4 kathyastro

kathyastro

    Soyuz

  • *****
  • Posts: 3,535
  • Joined: 23 Dec 2016
  • Loc: Nova Scotia

Posted 29 February 2020 - 03:14 PM


Also been over thinking it again. If using a chain system, what happens if a limit switch goes bad. Would the chain keep running till something gets damage. If track, it would just stop moving when the track has end, no track no movement.

 

Use redundant switches: two in place of one.  If they are normally-open, wire them in parallel.  If they are normally-closed, wire them in series.  As long as one of the pair works, they will do their job.

 

You definitely don't want a powerful motor pulling on a strong chain with nothing to stop it.  In fact, in addition to the redundant limit switches, you might want to install a shear pin somewhere in the mechanism.  You can buy shear pins that are intended for snowblowers and similar equipment.  The shear pin is a bolt that is deliberately made with a weak spot, so it will break under excessive load.  Ensuring that the weak link in the system is something non-critical and replaceable will ease your mind.

 

I have had failures of my dome shutter mechanism.  I was relieved to discover that the weak link in my system is the steel cable.  It breaks at 95 lbs load, well before any structural damage occurs, and costs less than $20 to replace.


  • brave_ulysses, Raginar, GrandadCast and 2 others like this

#5 lvzyla

lvzyla

    Lift Off

  • *****
  • Posts: 3
  • Joined: 11 Nov 2005
  • Loc: Wimberley,Texas,USA

Posted 01 March 2020 - 08:48 AM

one of rhe big advantages of going with an established gate opener company is they have thought long and hard about safety. The last think they want is to be sued by some distraught parent whose child was killed by a gate opener. That would probably put them out of business. I am sure there is over current protection in case your motor tried to pull your roof over a hard welded stop on your rail. I wouldn’t add too many of your own safety features as they too might fail and they require testing.

Lou


  • GrandadCast likes this

#6 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 02 March 2020 - 12:10 PM

Good idea Kathyastro regarding redundant switches.  

 

I ordered the Aleko AR1450 with nylon track. I think this is my best fit. There's currently a couple code for 15% off when ordering directly from Aleko too.

 

Jarret (Heaven's View Observatories  https://hvobservator...quarespace.com/) uses I-Beams for the rail instead of wood. So I can add a metal plate to the bottom of the large I-Beam to hold the motor box and keep the motor box in its correct vertical position. Just need to either weld or bolt a plate. He also lined up the gable to not interfere with Polaris. Because the gable is east-west, the west gable will be used and it is very flush with the building lending itself to mounting an aluminum square (hollow) beam along the roof to hold the track. 

Jess

 



#7 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 01 April 2021 - 12:06 PM

Been awhile since I posted on this project. I have been slowly working on getting the motor system install over a 12 month period. When COVID hit, getting the 14 foot 1" x 4" and other aluminum parts was a bit delayed. Anyway, even then I can only work on this about an hour then rest for three days due back issues. It is my new lifetime limit I guess - anyone with Doctor Frankenstein number, I will bring the brain.

 

So I went with an outdoor sliding gate opener and I figure since it is made for outside I will keep it outside. I have metal I-Beams for the roll off roof system, so I am sticking with metal to prevent warping.

 

Its August, so here is the gear teeth installed on the 1" x 4" aluminum tube that will makeup the track that will bolt to the roof. 

 

InstallTeethOn1by4tube_Web.jpg

 

Its November and I had gotten the track installed on the roof. I said I took my time and drove my local astronomy friend crazy as he keeps offered to help get it done. Not in any hurry. 

 

SideShowing14footTrackWeb.jpg

 

 

Continues... 

 



#8 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 01 April 2021 - 12:14 PM

Its the being of March of 2021, a year later and I gotten to the platform which is mostly assembled here. I can adjust the height to align the teeth very easy now and precise. The double hole is where the conduit will pass through and then mount to the motor bottom plate. There are five bolts, which you can see the heads, these bolt will adjust the height for the motor.

 

PlatformGettingDone Web.jpg

 

 

 



#9 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 01 April 2021 - 12:24 PM

Sometime this week I will bolt the platform to the I-Beam and that assembly will be finished. Next the conduit and wiring which will go a bit faster, maybe. These photo show where the finished platform will go.

 

PlateformLocaiton Web.jpg

 

 

UnderPlatform Web.jpg

 

Since these photos, I did add another angle brace under the center of the platform making up three support braces allowing six 3/8" bolts holes for bolting to the I-Beam. 

 

Jess

 

 



#10 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 09 April 2021 - 12:44 PM

Motor is installed. The gear mesh done and is very smooth. Using a 14 foot 1"x4" aluminum tube really paid off here.

 

I was worried that when using the disengaged key system; even though the motor gear and rack is still meshed, that it would make the roof hard to manually open and close however it acts like Aleko is not even there smile.gif . 

 

Motor mounted Gear Mesh.jpg

 

Jess


  • Raginar and torsinadoc like this

#11 sberrada

sberrada

    Mariner 2

  • -----
  • Posts: 231
  • Joined: 28 Aug 2011
  • Loc: Montreal, Quebec

Posted 02 May 2021 - 10:23 PM

Hi Jess,

 

Beautifully engineered - well done !

i like the fine adjustment to properly mesh the gear with the track.

 

As well, Keep us posted on your arduino project .

 

cheers

Sam 



#12 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 11 May 2021 - 05:50 PM

Gotten the AC power and PVC pipes ran and now my roof is operational with Aleko key fob. I was able to use the key fob from inside my house which is a good 300 feet to the observatory.

 

Meanwhile I have been working on getting ASCOM control for SGPRO and building a box to hold the Arduino and relays. Revision 1.0 of the schematic is below.

 

Thanks Chuck Faranda, his post: https://www.cloudyni...oller/?hl=+rrci

 

I design the Arduino and relay system to operate both single button operation (O/S/C) for the Aleko or garage door type system and simultaneous direct motor control without changing hardware or software.

 

Attached File  Arudino ROR Schematic.pdf   252.17KB   17 downloads

 

The front panel. Tried to press Open on SGPro and take a picture at the same time, but I don't have three hands. 

 

CN_IMG_1062.jpg

 

I used SGPro to open the roof, although its just sitting on my desk. The white LED (direct motor control relay is close in order to power the motor in the open direction) is indicating the roof is opening and the yellow LED was on for 500 msec. acts as a push button for the Aleko or garage door opener. Once the magnet get close to the Open sensor, the motor will stop and SGPro will show that the roof is open and the white LED goes off. When SGPro close is pushed then the blue LED will light, the yellow LED triggers closing the Aleko or direct motor till the Close sensor is reached and the blue LED will go off.

 

When the green LED is on and the red LED is off, then the scope is safe. The reflect sensor (Taiss 2m Sensing Feedback Reflex photoelectric Switch Sensor E3F-R2NK 6-36VDC NPN NO), is indicating that the mount is park or in a safe position to open or close the roof. If 'Scope is Unsafe', the green LED is off and the red LED will be on, the roof will not open or close.

 

Jess


Edited by GrandadCast, 12 May 2021 - 09:48 AM.

  • rgsalinger and dmdouglass like this

#13 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 11 May 2021 - 06:19 PM

What some of the parts look like:

Terminal and case that snaps over the Arduino:

CN_UNO Screw Terminal Block Breakout Module with Aluminum Enclosure.jpg

 

The relays:

CN_ELEGOO 4 Channel DC 5V Relay Module with Optocoupler Compatible with Arduino UNO R3.jpg

 

The Reflex sensor:

CN _Taiss 2m Sensing Feedback Reflex photoelectric Switch Sensor E3F-R2NK 6-36VDC NPN NO.jpg

 

Jess



#14 sberrada

sberrada

    Mariner 2

  • -----
  • Posts: 231
  • Joined: 28 Aug 2011
  • Loc: Montreal, Quebec

Posted 11 May 2021 - 06:25 PM

Amazing design - I will definitely try to replicate.

This is Huge step forward 

Thank you Jess 



#15 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 11 May 2021 - 06:44 PM

Magnetic Sensor:

 

CN_SM-226L-3Q Seco-Larm Overhead Door Mount Magnetic Contact.jpg

 

The Arduino software version 1.0:  Copy and then create a new text file called RRCI_sketch.ino and paste the text into the new file then save it. When you run Arduino IDE and open this file, it will likely give an error wanting to move and create a new folder under "Documents", say OK to allow this. Next pick Arduino Nano in the pull down list, then verify and last connect to the COM1 port. I will look for a way to change that but so far I haven't looked very long and I just moved my ports around to accommodate the Arduino using "Device Manage" serial ports setup. Once you are connected "upload" and you should have a programmed Arudino. 

 

 

 

/*
Modified by Jessie G. April 5, 2021

Version 1.1

Some variables naming which caused a bit of confusion from the previous version of the Arduino sketch that I started with.

Note A: The command 'stop' is not from the RRCI ASCOM driver GUI "Stop" button, but 'stop' is sent when the RCCI is disconnected from the API program such as SGPRO.
When the RRCI ASCOM driver GUI "Stop" button is pushed, the RRCI ASCOM driver will send a 'x' command and then a seperate 'y' command.
 
Note B: The orginal code had a "#define sensor 5" which defines a relay however, it’s not a sensor or any thing related to any sensor. Its original use was a momentary Open and Close function.
I change this to relay_OSCMomentary which better describes this relay function.

Working method:
1. Aleko or garage door opener with the Arduino acting like a push button.
2. Arduino directly controls the power to the open or close motor till it reaches the close or open sensors.

I have added coding to allow the Aleko to operate just like it is designed to as if the Arduino is not there.
The Arduino will control through its momentary relay the open, stop, and close. Just like a gate opener or garage door
momentary button (Aleko push button LM147) or key fob remotes.  Or the Arduino will control the motor directly there
by bypassing how the Aleko normally works. Where the motor runs in the open or close direction till the open or close senor is reached.
No changes to the software is require, it will do both function simultaneously, just depends how you wire into the Aleko.
However, by having the Arduino take total control (method 2) the key fob remote will no longer operate the Aleko.

The scope-park safe sensor will not allow the opening or closing regardless of what method is used.
The Arduino has the control of the scope-park safe sensor.  This allows both method (1 or 2) to work with a scope-park safe sensor operations.
The Arduino scope-park safe sensor relay connects to the Aleko where the Photocell (Aleko LM102) beam sensor normally connects to.
Again, both methods will operate with no software changes to enable scope park safe function.
There is a momentary push button which is controlled by the Arduino. The Arduino will then relay, if all is safe, to the Aleko.
Since there are two methods of operations, it makes more sense to go through the Arduino just like the scope-park safe sensor.
If the Arduino is not power up or bad, these relay are not going to engage so the roof will not open or close.

I am wiring method 1 because I like the key fob remote. Also, since the Arduino controls the scope-park safe sensor,
if it’s not safe to open then key fob will not function. I like this because if my astro computer is not running (SGPRO etc.)
I can still open and close by the key fob remote.

Removed the LED output pin from the Arduino and move the LEDs to each of the function relay pins instead, saves pin on the Arduino and better to
the LED truly follow the relay operation.

NOTE ************* Select the 2 button option in the ASCOM RRCI setup interface and com1 must be used.

 
*/

String serialin; //incoming serial data
String str; //store the state of opened/closed/safe pins

#define PANEL_OSC_BUTTON 2         // Momentary push button used with Aleko and garagedoor opener systems and using three button its the STOP button
#define PANEL_OPEN_BUTTON 3
#define PANEL_CLOSE_BUTTON 4

 

//relays
#define relay_ParkSafe 7   // scope safe for Aleko acting like LM102 or gragedoor beam
#define relay_Open 8
#define relay_Close 9
#define relay_OCSMomentary 10 // toggleS like a momentary push button to be used with Aleko or garagedoor opener systems

//input sensors
#define sensor_Opened 11  // roof open sensor
#define sensor_Closed 12  // roof closed sensor
#define sensor_ParkSafe 13   // scope safety Park Sensor also Arduino built in LED

unsigned long toggleLength = 750;      // how long to keep the momentary OSC relay down for
unsigned long endTime_MomentaryRelay;  // counter for the momentary OSC relay stays to say closed to act like a push button for AleKo
bool isMomentaryRelayEngaged = false;

unsigned long endTime_LostRoof;
bool lost = false;          //roof not reporting state

bool enableParkSafe = true;
bool isPanelOSCButtonEngaged = false;

bool debugEnable = false;

void setup() {
 

  // Reset values to default startup
  isMomentaryRelayEngaged = false;
  enableParkSafe = true;
  isPanelOSCButtonEngaged = false;
  endTime_LostRoof = 0;
  lost = false;

  endTime_MomentaryRelay = millis() + toggleLength;  // momentary button held down for x seconds
  endTime_LostRoof = millis() + 60000; //roof lost reset timer ~60 seconds  change to suit your rquirments to determine if roof is lost

  //Begin Serial Comunication(configured for 9600baud)
  Serial.begin(9600);

  // asign ping PANEL_OSC_BUTTON as INPUT
  pinMode(PANEL_OSC_BUTTON, INPUT);
  pinMode(PANEL_OPEN_BUTTON, INPUT);
  pinMode(PANEL_CLOSE_BUTTON, INPUT);

 
  //pin relay as OUTPUT
  pinMode(relay_Open, OUTPUT);
  pinMode(relay_Close, OUTPUT);
  pinMode(relay_OCSMomentary, OUTPUT);
  pinMode(relay_ParkSafe, OUTPUT);
 
  //pins as INPUT
  pinMode(sensor_Closed, INPUT_PULLUP);
  pinMode(sensor_Opened, INPUT_PULLUP);
  pinMode(sensor_ParkSafe, INPUT_PULLUP);

  digitalWrite(PANEL_OSC_BUTTON, HIGH);
  digitalWrite(PANEL_OPEN_BUTTON, HIGH);
  digitalWrite(PANEL_CLOSE_BUTTON, HIGH);

  //Relay state NOTE HIGH turns off the relay as its a pull down to engage so LOW will turn relay on
  digitalWrite(relay_Open, HIGH);
  digitalWrite(relay_Close, HIGH);
  digitalWrite(relay_OCSMomentary, HIGH);
  digitalWrite(relay_ParkSafe, HIGH);

  //init string
  Serial.write("RRCI#");
  if( debugEnable ) Serial.print("\n\r");
  
}

void loop() {
 
  LostRoof_Timer();
  MomentaryRelay_Timer();

  isScopeParkSafe();

  // Check the OSC Button

  if( !isMomentaryRelayEngaged ) {
    if(digitalRead(PANEL_OSC_BUTTON) == HIGH ) {
      if( debugEnable ) Serial.print("Panel OSC Button is pushed so its Engaged ON\n\r");
      isMomentaryRelayEngaged = true;
      controlRelay_Open(false);
      controlRelay_Close(false);
      controlRelay_OCSMomentary(true);
    }
    else {
      if( false ) Serial.print("Panel OSC Button is Engaged OFF\n\r");     
    }
  }
 
  // Check the OPEN Button

  if( !isMomentaryRelayEngaged ) {
    if(digitalRead(PANEL_OPEN_BUTTON) == HIGH ) {
      if( debugEnable ) Serial.print("Panel OPEN Button is pushed so its Engaged ON\n\r");
      if (digitalRead(sensor_Closed) == LOW || digitalRead(sensor_Closed) == HIGH && digitalRead(sensor_Opened) == HIGH  ) {
        isMomentaryRelayEngaged = true;
        controlRelay_Open(true);
        controlRelay_OCSMomentary(true);
      }
    }
    else {
      if( false ) Serial.print("Panel OPEN Button is Engaged OFF\n\r");     
    }
  }

  // Check the CLOSE Button

  if( !isMomentaryRelayEngaged ) {
    if(digitalRead(PANEL_CLOSE_BUTTON) == HIGH ) {
      if( debugEnable ) Serial.print("Panel CLOSE Button is pushed so its Engaged ON\n\r");
      if (digitalRead(sensor_Opened) == LOW || digitalRead(sensor_Closed) == HIGH && digitalRead(sensor_Opened) == HIGH ) {
        isMomentaryRelayEngaged = true;
        controlRelay_Close(true);
        controlRelay_OCSMomentary(true);
      }
    }
    else {
      if( false ) Serial.print("Panel CLOSE Button is Engaged OFF\n\r");     
    }
  }

  if(isMomentaryRelayEngaged) {
    MomentaryRelay_Timer();
  }

  //Verify connection by serial
  while (Serial.available()>0) {
    //Read Serial data and alocate on serialin

    serialin = Serial.readStringUntil('#');
    if( debugEnable ) Serial.print("receive:      " + serialin + "\n\r");

    if (serialin == "on") { // turn sensor on
      if( debugEnable ) Serial.print("received on - turn ParkSafe on\n\r");
      enableParkSafe = true;
      isScopeParkSafe(); 
    }
    else if (serialin == "off") { // turn sensor off
    if( debugEnable ) Serial.print("received off - turn ParkSafe off\n\r");
      enableParkSafe = false;
      isScopeParkSafe();
    }
    else if (serialin == "x") {
      if( debugEnable ) Serial.print("received x - stop the opening roof motor\n\r");
      if( digitalRead(relay_Open) == LOW && digitalRead(relay_Close) == HIGH && digitalRead(sensor_Closed) == HIGH && digitalRead(sensor_Opened) == HIGH ) {
        controlRelay_Open(false);
        controlRelay_OCSMomentary(true);
      }
    }
    else if (serialin == "open" ) {
      if( debugEnable ) Serial.print("received open - start the opening roof motor\n\r");
      if (digitalRead(sensor_Closed) == LOW || digitalRead(sensor_Closed) == HIGH && digitalRead(sensor_Opened) == HIGH  ) {
        controlRelay_Open(true);
        controlRelay_OCSMomentary(true);
      }
    }
    else if (serialin == "y") {
      if( debugEnable ) Serial.print("received y - stop the closing motor\n\r");
      if(digitalRead(relay_Close) == LOW && digitalRead(relay_Open) == HIGH && digitalRead(sensor_Closed) == HIGH && digitalRead(sensor_Opened) == HIGH ) {
        controlRelay_Close(false) ;
        controlRelay_OCSMomentary(true);
      }
    }
    else if (serialin == "close" ) {
      if( debugEnable ) Serial.print("received close - start the closing roof roof motor\n\r");
      if (digitalRead(sensor_Opened) == LOW || digitalRead(sensor_Closed) == HIGH && digitalRead(sensor_Opened) == HIGH ) {
        controlRelay_Close(true);
        controlRelay_OCSMomentary(true);
      }
    }
  } 

  if (digitalRead(sensor_Closed) == LOW) { //stop relays when 'closed' reached
    if (digitalRead(relay_Close) == LOW) {
      controlRelay_Close(false);
    }
  }

  if (digitalRead(sensor_Opened) == LOW) {  //stop relays when 'opened' reached
    if (digitalRead(relay_Open) == LOW) {
      controlRelay_Open(false);
    }
  }

  if (serialin == "Parkstatus"){ // exteranl query command to fetch RRCI data
    Serial.println("0#");
    serialin = "";
  }

  if (serialin == "get"){ // exteranl query command to fetch RRCI data - Two Pipelines(||) to make a boolean OR Comparission
    if (digitalRead(sensor_Opened) == LOW){
      str += "opened,";
    }
    else if (digitalRead(sensor_Closed) == LOW){
      str += "closed,";
    }
    if ((digitalRead(sensor_Closed) == HIGH) && (digitalRead(sensor_Opened) == HIGH)){
      str += "unknown,";
    }
    if (digitalRead(sensor_ParkSafe) == HIGH){
      str += "safe,";
    }
    else if (digitalRead(sensor_ParkSafe) == LOW){
      str += "unsafe,";
    }
    if ((digitalRead(sensor_Closed) == HIGH) && (digitalRead(sensor_Opened) == LOW) && (lost == false)){
      str += "not_moving_o#";
      endTime_LostRoof=millis()+60000; //reset the LostRoof_Timer
    }
    if ((digitalRead(sensor_Closed) == LOW) && (digitalRead(sensor_Opened) == HIGH) && (lost == false)){
      str += "not_moving_c#";
      endTime_LostRoof=millis()+60000; //reset the LostRoof_Timer
    }
    if ((digitalRead(sensor_Closed) == HIGH) && (digitalRead(sensor_Opened) == HIGH) && (lost == false)){
      str += "moving#";
    }    
    else if ((digitalRead(sensor_Closed) == HIGH) && (digitalRead(sensor_Opened) == HIGH) && (lost == true)){  
      str += "unknown#";
    }
    if (str.endsWith(","))  {
      str += "unknown#";
    }
    Serial.println(str);  //send serial data
    serialin = ""; 
    str = "";
    //delay(100);
  }
  if (serialin == "Status"){
    Serial.println("RoofOpen#");
  }
  serialin = ""; 
  //str = "";
}

void LostRoof_Timer(){ // detect roof lost
  if(millis() >= endTime_LostRoof) {
    //60 s have passed!!
    if ((digitalRead(sensor_Closed) == HIGH) && (digitalRead(sensor_Opened)) == HIGH) {
      lost = true; //where the heck is the roof position?
    }
  }
  if ((digitalRead(sensor_Closed) == LOW) or (digitalRead(sensor_Opened)) == LOW) {
    lost = false; //roof state is known
    endTime_LostRoof = millis()+60000; //reset the timer 
  }
}

void MomentaryRelay_Timer() {
  if( millis() >= endTime_MomentaryRelay ){
    controlRelay_OCSMomentary(false);
  }
}

void controlRelay_OCSMomentary(bool aCloseRelay ) {
  if( isScopeParkSafe() ){
    if( aCloseRelay ) {   // Close relay
      if (digitalRead(relay_OCSMomentary) == HIGH) {
        digitalWrite(relay_OCSMomentary, LOW);    // turn on the momentary button relay to act like the Aleko remote or Aleko button
      }
      isMomentaryRelayEngaged = true;
      endTime_MomentaryRelay = millis() + toggleLength;  // reset timer and start counting down
    }
    else {   // Open relay
      digitalWrite(relay_OCSMomentary, HIGH);    // turn off the momentary button relay to act like the Aleko remote or Aleko button
      isMomentaryRelayEngaged = false;
      endTime_MomentaryRelay = millis() + toggleLength;  // reset
    }
  }
}

void controlRelay_Open(bool aCloseRelay ) {
  if( isScopeParkSafe() ){
    if(aCloseRelay) {      // close relay to the open motor
      if (digitalRead(relay_Open) == HIGH) {
        if( debugEnable ) Serial.print("controlRelay_Open() start the opening roof motor\n\r");  
          digitalWrite(relay_Open, LOW);
        }
      }
    else {               // open relay will stop the motor
      if (digitalRead(relay_Open) == LOW) {
        if( debugEnable ) Serial.print("controlRelay_Open() stop the opening roof motor\n\r");   
        digitalWrite(relay_Open, HIGH);
      }
    }
  }
}

void controlRelay_Close(bool aCloseRelay) {
  if( isScopeParkSafe() ){
    if(aCloseRelay) {      // close relay to the start closing roof
      if (digitalRead(relay_Close) == HIGH) {  
        if( debugEnable ) Serial.print("controlRelay_Close() start the closing roof motor\n\r");
        digitalWrite(relay_Close, LOW);
      }
    }
    else {               // open relay will stop the close motor
      if (digitalRead(relay_Close) == LOW) { 
        if( debugEnable ) Serial.print("controlRelay_Close() stop the closing roof motor\n\r");
        digitalWrite(relay_Close, HIGH);
      }
    }
  }
}

bool isScopeParkSafe() {
  bool returnValue = false;
  if( enableParkSafe ) {  // this bool is set with the 'on' or 'off' command.
    if (digitalRead(sensor_ParkSafe) == HIGH) {  // Turn ON Safe
      digitalWrite(relay_ParkSafe, LOW);
      returnValue = true;
    }
    else {
      digitalWrite(relay_ParkSafe, HIGH);   // Turn the LED off NOT safe
      returnValue = false;
    }
  }
  if( !enableParkSafe ) {  // Park Safe can be disable is set false. Its a master enable or disable boolean and set by the on or off command from ASCOM
    digitalWrite(relay_ParkSafe, HIGH);  // Turn the LED off NOT safe
    returnValue = false;
  }
  return returnValue;
}


Edited by GrandadCast, 12 May 2021 - 09:58 AM.


#16 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 11 May 2021 - 06:50 PM

Inside the front panel:

CN_IMG_1055.jpg

 

I added the Open and Close wiring so that I can later if I want, add the two buttons. Once done, it will match the SGPro RRCI ASCOM panel and work the same way. BTW I modified the software so the STOP button works with either the Aleko or direct motor control. Delay in Arduino is a killer way of doing a delay which is need for the momentary functions so that issues is fixed, works really good. 

 

Jess

 



#17 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 11 May 2021 - 07:17 PM

My test setup. The two magnetic sensor are on the left and right. Just out of sight is the beam sensor for scope park safe. The photo is a bit old as the breadboard is no longer there and its the actual front panel show in an above posting.

 

Pressing the green button is like having a Aleko or garage door opener button for open/stop/close, however the button goes through the Arduino system and not directly connect to the Aleko. I did this to keep everything running through the Arduino and if the Open, Stop, and Close button is used, there is no software or hardware changes other than just adding the push buttons. The momentary O/S/C will automatically become the STOP button. In addition the Open and Close will also trigger the momentary relay for the Aleko or garage door opener so that operation will mirror the SGPro RRCI ASCOM panel buttons.  

 

CN_Desktop.jpg

 

So lets say I am testing using SGPro, pressing open, the yellow and white LEDs light up and the relay closes, the yellow LED and it's relay will close but for only 500 msec, its the push button action for Aleko or garage door openers. I move the magnet seen on the Open sensor in this photo, mimicking the roof rolling open, towards the open sensor. The white LED goes off and SGPro will show the roof as opened. Same for closing. Now in SGPro, if its opening or closing and you press the Stop in SGPro, then the opening or closing LED will go off along with its relay and the yellow LED and its relay (momentary for the Aleko) will pulse for 500 msec acting like the Aleko key fob or button where if the gate (roof) was in the process of opening or closing, it will stop. Just like the key fob - Open, Stop, and Close operations. 

 

Anyway I posted way to quickly and likely will be editing something but I am way behind getting this out. 

Jess

 



#18 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 12 May 2021 - 09:47 AM

Parts from Amazon

 

22AWG 2 Conductor Wire - runs to the scope park beam sensor:

https://www.amazon.c...op_mob_ap_share

 

Case Enclosure (10"x 6"x 4") - to house the Arduino boards, LEDs and Button.

https://www.amazon.c...op_mob_ap_share

 

USB B Printer Extension Cable - This is a panel mount USB so that the PC's USB can connect to the Arduino that is inside.

https://www.amazon.c...D729QQP8XJ88B7M

 

Overhead Door Mount N.C. Magnetic Contact - two of these for Open and Close location.

https://www.amazon.c...op_mob_ap_share

 

uxcell Push Button Switch Green Momentary - big push button. Comes with two and if going with three button, get some plastic spray paint to color them correctly.

https://www.amazon.c...op_mob_ap_share

 

 

20 gauge 6 conductor wire Audio Power Cable Speaker Wire - use to go from the Arduino box to the Aleko motor.

https://www.amazon.c...op_mob_ap_share

 

ELEGOO 4 Channel DC 5V Relay Module

https://www.amazon.c...op_mob_ap_share

 

UNO Screw Terminal Block Breakout Module with Aluminum Enclosure, for UNO R3.

https://www.amazon.c...op_mob_ap_share

 

ELEGOO UNO R3 Board ATmega328P ATMEGA16U2 - Arduino

https://www.amazon.c...op_mob_ap_share

 

Taiss/ 2m Sensing Feedback Reflex photoelectric Switch Sensor E3F-R2NK 6-36VDC

https://www.amazon.c...op_mob_ap_share

 

ELEGOO Electronic Fun Kit Bundle with Breadboard Cable Resistor - I just got a kit with lots of parts (LEDs and 10K resistor) which I used for the panel and it comes with the breadboard for testing.

https://www.amazon.c...op_mob_ap_share

 

On my observatory I ran 110 into another box (Home Depot) so I can mount a main power switch next to the Arduino box and where all my cable go out and in to the outdoors. From there there is non conductive PVC electrical piping, lots of this going to the front and rear of the roof travel for the open and close sensors, the Aleko motor case and out towards the main entry panel. There is a small PVC run from this AC box with switch to the Arduino box so that I can pass wires between them.

ON-Off 4 Pin Rocker Boat Switch,30A Welder Welding Machine 4-Pin Boat Type ON/Off Rocker Switch,IP65 Waterproof - the switch on the AC power box.

https://www.amazon.c...op_mob_ap_share

 

 

I know that the Aleko has a Open and Close sensor panel inside that would work just as well as the external Open and Close sensor. I gotten the external ones so I am going to use them as I had already ran the PVC. If I where to do this again, I would just use the Aleko since there are only three cables coming from the built in sensor panel inside of the Aleko, likely ground, Open, and Close and now I know.

 

I will likely use the Aleko power to run the Arduino box. The Aleko supplies 24 volts AC to other devices which I can tap off of and inside the Arduino add a power supply to convert that to 5 volts DC. 

 

KNACRO AC-DC to DC Converter AC 16-28V DC 9V 12V 24V 36V 8-40V Step Down to 5V 3A 15W Power Supply Module.

https://www.amazon.c...0?ie=UTF8&psc=1

 

 

 

Jess

 


  • rpineau likes this

#19 sberrada

sberrada

    Mariner 2

  • -----
  • Posts: 231
  • Joined: 28 Aug 2011
  • Loc: Montreal, Quebec

Posted 12 May 2021 - 11:07 PM

Hi Jess,

 

my appreciation for all the hard work you have put into this - it will help many (including me).

the detailed information will be super valuable 

 

cheers

sam 


  • PrestonE likes this

#20 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 13 May 2021 - 01:44 PM

Fabricated from 6"x18" aluminum sheet a 122mm x 222mm bottom plate for the case. There are two holes for mounting; 61mm which is center and 6 mm from the edges. I then mounted with screws the Arduino terminal box. Used standoff to mount the relay module. Since the LEDs and push Buttons are optional, I did add them for myself, some of the wiring from the Arduino to the relay module will need to be splice with two lead or pig tails. One for connecting to the Arduino and the other to the relay. One can use crimping splice connections or solder them. 

 

Wiring details:

Attached File  Arduino Panel Wiring.pdf   184.16KB   9 downloads

 

Enclosure progress:

 

CN_IMG_1064.jpg

 

Drill a square hole for the USB panel jack:

CN_IMG_1065.jpg

 

The large hole will allow a 3/4" electrical PVC pipe coming from another electrical box that contains the AC power switch and all the wires coming from outside. 

 

Jess



#21 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 14 May 2021 - 07:24 AM

Note Correction - The wire runs to the scope park beam sensor: 22 AWG 5 conductor wire:

https://www.amazon.c...0?ie=UTF8&psc=1

 

Jess



#22 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 14 May 2021 - 09:35 AM

Here is the Arduino link to the ASCOM RRCI driver. There are two programs required, the RRCI Arduino code which I modified and posted above and the ASCOM driver which can be located here. After downloading, install the RRCI Setup.exe, just the driver. When running select COM1 and the two button operations. 

 

https://create.ardui...ace-rrci-fb851f

 

Jess



#23 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 15 May 2021 - 08:57 AM

Rev 1.1 of schematic. Mislabeled the Closed and Opened sensor labels (I had them backwards).

 

There will be one more update and should be the final revision once I receive the 24AC to 5DC converter to power the Arduino box and the USB panel jack I added. As it is now, Rev1.1, the USB will power the box. I have been running it that way full time for two-three weeks on the bench. The reason for the power converter is to use the Aleko power source and not rely on a long USB cable run for powering the Arduino. I also post the schematics now encase someone may want to start their build.

 

Attached File  Arudino ROR Schematic.pdf   252.14KB   11 downloads

 

Jess

 

 

 

 



#24 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 25 May 2021 - 09:53 AM

ROR controller mounted on the wall.

 

All the modules mounted on the plate ready for installing into the observatory. 

CN_IMG_1073.jpg

 

Wires from outside which includes the 120 voltage GFI lines for the Aleko, the open and close magnetic sensor wires, and two cables from the Aleko. The main power switch is AC so it's needs to be in a separate enclosure. 

CN_IMG_1079.jpg

 

Lots of wires, just looking at it then its a jumble mess, however by just taking each wire and focusing on where that one will attach makes it easy.  I did solder the wires going to the relay module pins and did not use a header plug. 

CN_IMG_1083.jpg

 

My soldering included, the LEDS and wires to the front PCB board, four wires which required splicing that are going to the front LED panels and six wires going to the header pins on the relay board. All the other wires are using screw terminals. NOTE: If going with no LED and buttons, then its possible to get a six pin header with wires and then nothing will require any soldering. 

 

As of 5/24/2021, the reflector sensor is now integrated to the Aleko and the momentary relay (acting like a momentary gate push button) does work. I was able to use the front panel button to open, stop, and close the roof. So next step is to mount the close and open magnets (PVC sensor pipes are already installed), then run the beam Scope Park Safe sensor where I can get the best park location, and a long USB cable to allow the computer to run the controller. The Arduino software posted above works with either setup without modifcations.

 

Getting close to finishing, except one major undertaking, clamp down of the roof for wind. Currently I use four corner latches but that will have to changes, no use having remote control but still have to go unlatch the roof first. 

 

I will be posting two schematic for the project. The basic ROR controller without the front LEDs and button(s) and another with the front panel LEDs and button(s). I like the button and LEDs for my observatory.  NOTE: If going with no LED and buttons front panel PCB board, then its possible to get a six pin header with wires and then nothing will require any soldering and still have ASCOM control of the roof. So the indicators and button is not require to have an automatic PC control roll off roof. 

 

Anyway, yesterday watch the button and park scope safe working was a good stopping point - for now.

Jess

 


  • dmdouglass likes this

#25 GrandadCast

GrandadCast

    Apollo

  • *****
  • topic starter
  • Posts: 1,073
  • Joined: 23 Jan 2011
  • Loc: Hill Country, Texas

Posted 05 June 2021 - 07:59 AM

Added the close and open sensor for the Arduino. Because I want to be able to still use the Aleko key fob and have Scope Park Safe still control if the roof can operate, I cut into the Aleko pad which supplies the low voltage side to the two motor relays on the circuit board and route that through the Arduino. 

 

Open sensor:

 

CN_IMG_1085.jpg

 

Close sensor:

 

CN_IMG_1084.jpg

 

Cut the Aleko pad and added two wires which go to the Arduino Scope Park Safe relay.

 

CN_Cut Aleko Pad Relay.jpg

 

 

I was able to run a few SGPro simulation of open and closing the roof. Nothing blew up and/or smoked and it looks ready to go but.

 

I position the scope park safe reflex beam sensor which works well but I order a magnetic sensor. I do not like having a beam shinning during imaging. This has been bothering me for quite some time and since the wires are at the mount, it will be quick to switch out. 

 

 

I had to stop posting and progress for a little due to company, finally family after almost two years of not seeing them. 

 

Jess

 




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






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics