Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Gina's Observatory Roll-Off-Roof Automation


Gina

Recommended Posts

One lot of penny washers arrived today - SS ones from Amazon.  I reckon the others have gone astray.  Can attach the chain ends to their brackets now but there's still plenty to sort out before the automatic roof is working.  Need to see about the endstop switches and all the electronics.

Link to comment
Share on other sites

Time to look at the electronics...

To control the motor I have a Pololu Dual VNH5019 Motor Driver Shield which I bought several years ago when I was first looking into my observatory roof automation.  With hindsight I could have bought the single motor driver board as everything will work off the one motor but I've got the dual one now so I'll use it.  This is a proper H-Bridge DC motor driver will all sorts of protection and was recommended by the late Per Frejval who also kindly supplied me with the motor unit with clutch.

Testing of the motor driving the ROR has shown the current needed is just 1.4 to 2A and the full 13.8v observatory supply drives the roof at a reasonable rate, maybe a bit slower than optimum but quite adequate, so reduced current is not needed.  Also, with the chain slightly loose, no acceleration is needed on startup - straight to full speed is fine.  Also, no deceleration when stopping is needed.  All this means that only a simple logic system is needed.

A signal from either a remotely controlled Raspberry Pi or push button in the observatory will set the roof and window opening whilst similarly a signal from RPi or push button and also a signal from the rain sensor will set the roof/window closing.  Limit switches in the form of metal sensing proximity sensors will detect when the ROR is open or closed and these signals will stop the motor.

All this could be controlled directly by the RPi but the number of GPIO lines are limited and I find an Arduino slightly easier to program than the RPi plus I might as well make use of the motor current sensing to confirm that things are working as expected, so I think I'll use an Arduino to take care of the main logic.  It also means the roof can still be controlled locally should the RPi fail (I have found the failure rate of RPi higher than Arduino though I don't know why).  Another point is that I can get the basic motor control working with the Arduino and sort out the RPi later.  Arduino control alone will do most of what I want and I might decide not to bother with the RPi and remote control.  The main reason for a motorised roof is to close it automatically if rain is detected.

Edited by Gina
Link to comment
Share on other sites

Here are some photos of the window drive system.

Closed.
1917467705_WindowCordPulleySystem01.JPG.2f7cb1e2c93304bb546636eaf2f77a5e.JPG

Open.
523432803_WindowCordPulleySystem02.JPG.42118d8b384c10c9f4301fced422abd0.JPG

Half way shows a problem with the pulley block.  It still works but with added friction.  Think I'll replace this with a 3D printed version with wider cheeks and maybe bigger sheave.
1419814000_WindowCordPulleySystem03.JPG.693accd2e6f5e7341a8725c68d7dbd1a.JPG

Link to comment
Share on other sites

Hi Gina, could you not put a ring on the window rope and then attach the hook to that, keeping the block upright, so not allowing the rope to pull out sideways?

A more elaborate fix might be to fix the block to a track which kept it in the vertical plane but allowed it to move back and forth.

Link to comment
Share on other sites

4 hours ago, Stargazer33 said:

Hi Gina, could you not put a ring on the window rope and then attach the hook to that, keeping the block upright, so not allowing the rope to pull out sideways?

Possibly.

Link to comment
Share on other sites

12 hours ago, Gina said:

Time to look at the electronics...

To control the motor I have a Pololu Dual VNH5019 Motor Driver Shield which I bought several years ago when I was first looking into my observatory roof automation.  With hindsight I could have bought the single motor driver board as everything will work off the one motor but I've got the dual one now so I'll use it.  This is a proper H-Bridge DC motor driver will all sorts of protection and was recommended by the late Per Frejval who also kindly supplied me with the motor unit with clutch.

Testing of the motor driving the ROR has shown the current needed is just 1.4 to 2A and the full 13.8v observatory supply drives the roof at a reasonable rate, maybe a bit slower than optimum but quite adequate, so reduced current is not needed.  Also, with the chain slightly loose, no acceleration is needed on startup - straight to full speed is fine.  Also, no deceleration when stopping is needed.  All this means that only a simple logic system is needed.

A signal from either a remotely controlled Raspberry Pi or push button in the observatory will set the roof and window opening whilst similarly a signal from RPi or push button and also a signal from the rain sensor will set the roof/window closing.  Limit switches in the form of metal sensing proximity sensors will detect when the ROR is open or closed and these signals will stop the motor.

All this could be controlled directly by the RPi but the number of GPIO lines are limited and I find an Arduino slightly easier to program than the RPi plus I might as well make use of the motor current sensing to confirm that things are working as expected, so I think I'll use an Arduino to take care of the main logic.  It also means the roof can still be controlled locally should the RPi fail (I have found the failure rate of RPi higher than Arduino though I don't know why).  Another point is that I can get the basic motor control working with the Arduino and sort out the RPi later.  Arduino control alone will do most of what I want and I might decide not to bother with the RPi and remote control.  The main reason for a motorised roof is to close it automatically if rain is detected.

Hi Gina, I'm not a fan of proxy sensors, I would use mechanical actuated sensors. I've had failures with proxy sensors, but very rarely have I had failures with good old mechanical devices :)

Steve

  • Thanks 1
Link to comment
Share on other sites

Other options are Hall effect switch and magnet or opto sensor - I have both in stock.  I think I would prefer the latter for better positional accuracy.

I think for extra failsafe, I'll detect the motor current and stop if this exceeds a set value, indicating an obstruction on the roof or limit switch failure and roof at end of travel.  This is easily arranged in the Arduino sketch.

Edited by Gina
Link to comment
Share on other sites

3D printed pulley block with ball bearing printed, assembled and installed in the observatory.  This one works faultlessly 😀  I'll take and post a photo or two later.

Link to comment
Share on other sites

Forgot to take a photo - I'll do it tomorrow if it's fine (looks like it won't be). 

While discussing the window, I still need a bracket or something to pull the window open until its own weight takes over.  ATM it stays in the upright (closed) position if released.  It would be rather helpful if opening the roof pulled the window open (or pushed it) but an offset weight seems to be the standard way.

Link to comment
Share on other sites

Back to the electronics.  I have decided to use an Arduino for the main control but whether this is a Uno or Nano remains an option.  I could get some Arduino through feed sockets with pins for the motor shield to use with a Uno or just wire from a Nano to the edge connections on the motor shield.  I think the latter probably wins overall.

Link to comment
Share on other sites

Each half of the dual motor driver has 5 connections plus a common Vdd and Gnd.

  1. EN/DIAG - ENable or Diagnostics - logic 1 to enable motor
  2. INA - connect the A motor output to Gnd or Vin
  3. INB - connect the B motor output to Gnd or Vin
  4. PWM - Speed control - logic 1 for full speed (connect to Vdd)
  5. CS - Current Sense - Output giving the motor current - 140mv per Amp

1164136329_Screenshotfrom2019-07-2921-17-09.thumb.png.e6950f027de9e348d158d379f6987c1f.png

In the list above lines 1. and 4. can be connected to Vdd (logic 1) and lines 2. and 3. used to control the motor as shown in the truth table above.  Both logic 0 for OFF/STOP and one or other logic 1 to run the motor clockwise or anticlockwise.

From the above just two lines are needed to control the motor.  ie. 2 digital output pins on the Arduino.

Digital inputs required are :-

  1. OPEN - Push button
  2. CLOSE - Push button
  3. ABORT - Push button
  4. Rain Sensor (relay)
  5. OPEN limit switch
  6. CLOSED limit switch
  7. RPi Open
  8. RPi Close
  9. RPi Abort

Push buttons and relay need "debounce" logic.

An analog input comes from the CS (current sense).

Edited by Gina
Link to comment
Share on other sites

This application does not need a fast response from the logic and polling of the inputs will be quite adequate - interrupt mode is not needed though I might use interrupt for ABORT depending on how the coding goes.  I shall not be using the dedicated Arduino library for this motor driver but write my own code.

When I get to using the RPi for remote control I plan to return codes that show what is happening.  Three buttons will be provided on the user interface - OPEN, CLOSE and ABORT.  ABORT will almost instantly cut power to the motor.  The OPEN and CLOSE buttons will have an associated light to show the motor state and current, viz:-

  1. Off (Grey) indicates motor off
  2. Green - motor running and drawing current within normal range
  3. Amber - motor current excessive, indicating something preventing normal roof motion
  4. Red - may be used to indicate an error condition such as no motor current

I may use another light to indicate rain detected.

Link to comment
Share on other sites

Connecting the RPi means additional pins used on the Arduino for both input and output.  This may mean using some of the Analog pins as Digital I/O.  Motor current can have 3 states - none, normal operation and excessive and thus needs 2 pins.  With the 3 control lines from RPi to Arduino this means the RPi will use 5 separate pins on the Arduino.  I think the Nano with its extra Analog pins compared with the Uno may have sufficient I/O altogether but if not I can always use a Mega (I have several no longer used, from 3D printers). 

Since the RPi uses 3.3v logic and the Arduino 5v I shall have to convert the Arduino outputs to 3.3v logic to avoid destroying the RPi.  Opto-couplers are probably the best option for signals both ways to protect the ultra-sensitive RPi.

Link to comment
Share on other sites

With the inaccuracy of the ROR, I'm having a re-think on the limit switches.  I think I shall arrange levers to be operated by the roof that then operate limit switches.

Link to comment
Share on other sites

16 hours ago, Gina said:

Not well today so not doing anything on this.

I hope it is nothing serious !, get feeling well soon Gina.    xxxx

 

                                      Very best regards,        Tom.

  • Thanks 1
Link to comment
Share on other sites

Thank you very much, Tom.   I have had tests and awaiting the results when I see my doctor in a few day's time but I think if it was anything serious the surgery would have got back to me.

Edited by Gina
Link to comment
Share on other sites

Been out to the observatory and done a bit more.  Connected the chain ends to the brackets on the ROR framework using the 40mm diameter SS penny washers.
 
 
Edited by Gina
Link to comment
Share on other sites

Now the photos.

Firstly, the new pulley block for the window control.

876442697_WindowCordPulleySystem04.JPG.f83dc6c78526d9f050df01c8423b009f.JPG

1550217606_WindowCordPulleySystem05.JPG.80baa61610be96f9306564ffdb61233f.JPG

And then the ROR chain drive.

76541874_ChainDrive01.JPG.599ebad7b16bec27b2e8ad4e9cb9906c.JPG

419373058_ChainDrive02.JPG.8dc4425cd8aa65039be0e1d7fa5c6b9b.JPG

2130209576_ChainDrive04.JPG.b88c6b031f90eece4952f6f30e59b2ce.JPG

2002287097_ChainDrive05.JPG.8c852352a307331202696184de8fd1ae.JPG

128236541_ChainDrive06.JPG.8bcb1d6d683f9a3ae3e41b2dc6eeb037.JPG

 

Edited by Gina
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.