Type of Roof motor


Laurent HOUSSAYE
 

Hello,
I am new in this group and I want first to warmfully thank Howard Dutton for his generosity.
I am planning to build a Rolling roof observatory and would like to use this OCS system, at least as a basis.
The problem for me is that I plan to use a different motor : it is a sliding gate motor that has his proper control board, closed and open positions switches, and only requires a momentary pulse command for closing or opening.
Has anyone adapted Howard's software in order to cope with such a motor ?
If not, what part of the code I would need to modify in order to adapt it to this type of motor ?
Any help is welcome.
Best regards,
Laurent HOUSSAYE


Howard Dutton
 

On Fri, Mar 27, 2020 at 11:42 AM, <laurent.houssaye@...> wrote:
The problem for me is that I plan to use a different motor : it is a sliding gate motor that has his proper control board, closed and open positions switches, and only requires a momentary pulse command for closing or opening.

Has anyone adapted Howard's software in order to cope with such a motor ?
Never implemented to my knowledge but support for this exists in the OCS (as a modification of the DC motor control my obs uses) at the request of another user who I assume is still working on his build.

I recommend devising a test setup for any OCS to carefully verify proper operation w/ "burn in" and lots of up-time.  These are typically somewhat complex systems that you want to work 100% of the time and it's a lot easier to get it right working on a bench at home well before installation in an actual observatory.

For the garage door support I bench tested with relays and limit switches (which I manually actuated to simulate the door open/close events.)

You can read more about the design here:
https://onstep.groups.io/g/onstep-ocs/topic/new_ocs_developments/69193065


Laurent HOUSSAYE
 
Edited

hello Howard,
I have started to imagine a way of handling my sliding door motor who has 3 commands : 
* momentary switch A (pulse) causes roof to open completely
* momentary switch B (pulse) causes roof to close completely
* momentary switch C (pulse) causes roof to stop
These are below the modifications I think suitable in the config.h file (highlighted in yellow). Next step is to start modifying roof.ino accordingly.
Am I going in the right direction ?
Best regards,

// ROLL-OFF ROOF CONTROL PANEL -----------------------------------------------------------------------------------------------------
#define ROR                           OFF //    OFF, ON to enable the OCS website roll-off roof panel display.                Option
#define ROR_USER_SAFETY_OVERRIDE      OFF //    OFF, ON displays safety override button.                                      Option
#define ROR_AUTOCLOSE_DAWN            OFF //    OFF, ON displays option to automatically close roof at dawn.                  Option
#define ROR_AUTOCLOSE_DAWN_DEFAULT    OFF //    OFF, ON enables AUTOCLOSE_DAWN option at startup, disabled otherwise.         Option
#define ROR_AUTOCLOSE_SAFETY          OFF //    OFF, ON closes the roof automatically if an UNSAFE condition is detected.     Option
#define ROR_DC_MOTOR_RELAY_A          OFF //    OFF, n. Where n=1..14 (Relay#) Sets relay (momentary ~1 second) to cause roof to open. Modify roof.ino accodingly.    Option 
#define ROR_DC_MOTOR_RELAY_B          OFF //    OFF, n. Where n=1..14 (Relay#) Sets relay (momentary ~1 second) to cause roof to close.  modify roof.ino accodingly.  A=HIGH/B=LOW to OPEN, A=LOW/B=HIGH to CLOSE.   Option//         Default state both A and B LOW stops the DC roof motor (for example.)
#define ROR_DC_MOTOR_RELAY_STOP  n. sets relay to cause roof motor to stop immediately (when ON). Modify roof.ino accordingly. 
#define ROR_OPEN_CLOSE_MOMENTARY      OFF //    OFF, n. Where n=1..14 (Relay#) A momentary switch closure (~1.5 seconds.)     Option KEEP OFF
                                          //         To trigger a garage door opener (for example) to either open or close. KEEP OFF
#define ROR_POWER_RELAY               OFF //    OFF, n. Where n=1..14 (Relay#) This controls roof motor pwr. For DC motor.    Option KEEP OFF
                                          //         SSR/MOSFET PWM controls speed. For garage door openers, SW on/off only.
#define ROR_PWM_SPEED_HZ              OFF //    OFF, n. Where n=1..100 (Hz) PWM frequency for roof motor DC control.          Option KEEP OFF
#define ROR_PWM_POWER_PERCENT         OFF //    OFF, n. Where n=10..100 (%) PWM power level for roof motor DC control.        Option
#define ROR_PWM_SOFTSTART             OFF //    OFF, ON For PWM soft start, start 0% adds 5%/sec until ROR_PWM_POWER_PERCENT. Option KEEP OFF
#define ROR_CLOSE_INTERLOCK           OFF //    OFF, n. Where n=1..6 (Sense#) Roof safety interlock, close allowed when ON.   Option MY MOTOR HAS ITS OWN SECURITY STOP BUT I WILL WIRE HERE A SECOND REDUNDANT SECURITY SYSTEM TO PREVENT ROOF CLOSURE IF THE TELESCOPE MOUNT IS NOT PARKED
#define ROR_LIMIT_SENSE_CLOSED        OFF //    OFF, n. Where n=1..6 (Sense#) Roof closed switch (CLOSED when ON.)            Option
#define ROR_LIMIT_SENSE_OPENED        OFF //    OFF, n. Where n=1..6 (Sense#) Roof open switch (OPEN when ON.)                Option
#define ROR_TIME_AVG                  300 //    300, n. Where n=30..1200 (seconds) Average time to open or close roof.        Adjust
#define ROR_TIME_TOL                   30 //     30, n. Where n=0..120 (seconds) Additional time before stop & error thrown.  Adjust
#define ROR_TIME_LIMIT_SENSE_FAIL       6 //      6, n. Where n=1..60 (seconds) Time for limit switch fail to disengage error Adjust


Howard Dutton
 

The master branch OCS has support for this type of opener (as I understand it.)  I forked a beta branch before making this rather adventurous change so it's still there for those who want newer features but more stability.

I did some brief testing of all three modes, seemed to work.  As always be careful with testing and have a planned strategy to stop the motion if something goes wrong:

1. DC motor with two relays, an open and close.
2. Door opener with one relay, assigned to both open and close functions. These use an option that tells the OCS to momentarily close the relays to initiate the automatic action.
2. Door opener with two relays, one assigned to open and another assigned to close function.  Optional third relay to stop.  These use an option that tells the OCS to momentarily close the relays to initiate the automatic action.


Laurent HOUSSAYE
 

Great !
I have already started to modify roof.ino but it would be better to use your already designed and tested code for sure !
Where can I find this code with this 3rd mode ?
Regards,


Howard Dutton
 

On Tue, Mar 31, 2020 at 03:09 AM, <laurent.houssaye@...> wrote:
Where can I find this code with this 3rd mode ?
https://github.com/hjd1964/OCS


Laurent HOUSSAYE
 

Fantastic ! 
I was simply not using the last version of OCS, that's corrected now. You go faster than my dreams !
Thanks a lot  Howard.