Need some direction on relays and limit switches for greenhouse roof window control

Thread Starter

bastoe

Joined Mar 27, 2017
12
We have an up/down roof vent/window control I put together in our greenhouse to help keep things cool in there. Currently I put the windows up in the morning, and then later at night, I put the windows down (all 4 windows are driven with a gearbox and rack system at the same time via a up/down switch and motor). Right now to stop the motor (ether direction), I have to watch closely and move the switch to "off".

Our main problem is wind and rain: if it gets really windy or it starts raining, there may be some damage caused which we want to avoid so we'd like to tie in sensors to automate closing the windows if either of those two things happen. We would also like to automate the windows to open at daybreak (maybe with delay, but not if it's raining or too windy), and close at night (also with delay).

While this project has many similarities with chicken coop doors (which kept coming up when I searched and searched), I have yet to find one with all the moving parts and to be honest I'm just not up to speed on these types of controls to just add stuff in. I do have one of the night watchman day/night sensors ready to be hooked up. I have no relays, limit switches (for stopping the windows), or diodes.

I'm pretty good at figuring out mechanical hookups, soldering, and following schematics. I just need some direction on parts and wiring them into what we have (to maintain manual control as well as automate)

Because of the environment of the greenhouse, we would need to keep it to as few hearty parts as we can, it's usually 100+ in there with 80% or better humidity. I can order online etc...and this may take a week or so to get the parts.

I've included an attachment with details, thanks in advance for any assistance. I can try to take a video tomorrow.

Mike
 

Attachments

Sensacell

Joined Jun 19, 2012
3,432
On the basic mechanical side, be sure to consider that the spinning motor stores considerable energy, be sure to allow for "over travel" as the motor stops. The moving parts may come to rest significantly beyond the switch point.

Make sure the parts cannot move PAST the limit switches, nor crush them before stopping.

The simplest circuit is a DPDT relay used to reverse polarity, and heavy current diodes across the limit switches.
The diodes allow the motor to move off an open limit switch when the polarity reverses.
Wire the limit switches in series with of the motor, with diodes back-to-back across the switches.

Your controller merely needs to send an on - off signal to the relay to open or close the window.
 

#12

Joined Nov 30, 2010
18,224
The first goal is to find sensors. Rainbird makes a rain sensor for a reasonable price, but the awning type of wind sensors are labeled at $140+ each.:( Another way is to design and build your own anemometer and rain detector, but I don't feel that ambitious right now.
 
If you do it right and use electric braking, stops will be vary fast and nearly instantaneous.

You do need to add limit switches, but they don't have to be rated for the motor current.

There is the automotive relay route or the solid state H-bridge route.

Some H-bridge drivers implement open, close, coast, brake and enable.

Initially (relay based) you would end up with an OPEN and a CLOSE relay where the truth table of up/down at the same time also means BRAKE/STOP.

You can turn that into a single relay when energized is OPEN and unenergized is CLOSED.

There is an astronomic timer that calculates sunrise and sunset. I have one that turns a lamp on 1 hour after sunset and off at 11:30.

There are "smart relays" or mini PLC's that have this functionality built in, so temperature, rain and wind could be inputs.

A weather station might work with a better controller (PLC).

I gave ideas without an exact solution.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
Wow, thanks for the replies. One thing that may make a difference is that there is only 12v dc power out there, I have a solar panel and charge controller hooked to 3 batteries providing @100ah of juice. I'm currently running three 2watt lights, a water pump, and the window motor, at various times. I was able to make a video and uploaded it if time permits and you're curious, though you may hear some tiny birds calling for food in the background (I didn't have the heart to take out the nest before I screened off those prime nesting spots).

https://drive.google.com/file/d/0BzFWcttH4FdkNnphdWVCSGdEelk/view?usp=sharing

So finding the sensors is the current task. It may take awhile, and I'll post more.

Thanks again!

Mike
 
The 12 V only power makes things challenging, but using this http://www.studebaker-info.org/acdcpdf.pdf#page=5 it's the basic car door lock schematic.

You have to decide whether grounding a relay activates it or putting +12 to the relay activates it. It's easier for a computer to ground a lead.
Some of the automotive relays have different pin outs.

The motor is connected to ground on both sides when the relays are not activated, so the motor operates a a generator into a short briefly when you stop it, so it stops fast.

A limit switch is inserted in series to the respective coil such that the say CLOSED control signal is removed when the CLOSE limit switch is activated. This method would work with momentary or an SPDT on-off-on switch and would not consume power. You could have full UP/full DOWN and OFF, so you still would have partial open/close control if you wanted.

If you use DPDT relays, you can have an input where a controller could know if the window is full open or full closed.

I don't know if a MOVING signal would be worthwhile, but I did use one in a system I built before.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
The 12 V only power makes things challenging, but using this http://www.studebaker-info.org/acdcpdf.pdf#page=5 it's the basic car door lock schematic.

You have to decide whether grounding a relay activates it or putting +12 to the relay activates it. It's easier for a computer to ground a lead.
Some of the automotive relays have different pin outs.

The motor is connected to ground on both sides when the relays are not activated, so the motor operates a a generator into a short briefly when you stop it, so it stops fast.

A limit switch is inserted in series to the respective coil such that the say CLOSED control signal is removed when the CLOSE limit switch is activated. This method would work with momentary or an SPDT on-off-on switch and would not consume power. You could have full UP/full DOWN and OFF, so you still would have partial open/close control if you wanted.

If you use DPDT relays, you can have an input where a controller could know if the window is full open or full closed.

I don't know if a MOVING signal would be worthwhile, but I did use one in a system I built before.
thanks for the info-will be helpful once i digest it :)
 

MaxHeadRoom

Joined Jul 18, 2013
28,618
For the window travel sensors you could use the sealed reed and magnet pairs similar to alarm systems used, Hamlin make a compact matched pairs.
Max.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
Thanks Max, seem those would work, I used similar types when i installed alarms etc...

I had planned on using the "arm" type and set up triggering to avoid hurting them. Reading their site it seems those are reliable and weather proof enough.

Really hoping these rain and wind sensors will work. I think we aren't planning on running current through them, just using them to trigger the relays;
Wind:
http://www.sprinklerwarehouse.com/Hunter-Irrigation-Wind-Sensors-p/wind-clik.htm
Rain:
http://www.sprinklerwarehouse.com/Hunter-Irrigation-Sprinkler-Rain-Sensors-p/mini-clik.htm

Also found this one for rain: http://rainsensors.com/how-it-works/
the manual has the specs (attached)

I do worry a little about power consumption, however if push comes to shove, I'll throw up another solar panel.

Thanks and awaiting instruction :)
 

Attachments

Digest some more. Here's http://us.idec.com/CMSContent/SmartRelay/index.html a "smart relay" or basically a very small PLC that handles a few inputs and outputs. I see the just added web server capabilities and an astronomical timer. They do have a simulator without buying the package. You do need a "starter kit" of some sort usually unless they fixed that.

The 12V version says somewhere between 30 and 100 mA,You just have to work on keeping the power consumption low by design.

"Rain" and "Wind" will need some sort of algorithm.

Taking a peek at your rain sensor, The contacts have only an 24 VAC rating. The DC rating would be useful to obtain.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
Thanks! I have an email to the hunter sensor folks to get more specifics on 12vdc operation. As far as the PLC thing- I'm worried about the water/condensation/humidity which is mostly 90+. At $175, that would be an expensive lesson, and it does warn to keep it free of condensation. Hoping to really keep it simple and low cost so I can build a spare. If there is no other way than a PLC, I'll have to solve those issues.

Hunter opens again tomorrow and I should have more info then.

Cheers,
Mike
 
Non-condensing is pretty much a universal electronics requirement. Even your ECM in your car should work at high temperatures, but water on it is not a good idea. You have a lot of stuff going on and I pulled something out of my hat.

There is a dew point sensor, e.g.http://www.emersonclimate.com/en-us..._and_transducers/Pages/Dew_Point_Sensors.aspx but it looks like you would need to measure temperature too. Hot and humid generally means no condensation. When the surface is cold and the air is moist, then you get condensation.

One way of making a PCB more hardened is to put a conformal coating on it.

With the controller, it looks as if you might be able to have WIFI access to the greenhouse and keep tabs on it. WIFI could be a line of sight link.
You can go Ethernet to wifi and wifi to ethernet as a bridge.

It has the astronomical timer which would be useful for you too.

Electrical enclosures have IP ratings: https://en.wikipedia.org/wiki/IP_Code The ways of cooling an enclosure are power hungry: vortec cooler, and thermoelectric.

There's the option of putting the enclosure outside too or even pumping in outside air to cool the enclosure with the primary purpose of dewpoint control.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
Good news on the two sensors, they are just used for triggering relays and can work with 12vdc systems.
Wind:
http://www.sprinklerwarehouse.com/Hunter-Irrigation-Wind-Sensors-p/wind-clik.htm
Rain:
http://www.sprinklerwarehouse.com/Hunter-Irrigation-Sprinkler-Rain-Sensors-p/mini-clik.htm

Together with the day/night sensor, I think I have the triggering devices. Unless yall see an issue I will order them tomorrow.

Night Watchman day/night sensor (already have it):
http://www.flexcharge.com/NWHC-Night-Watchman.html

As far as a PLC, if one had wifi built in, it would be worth it. Otherwise I just need to keep this really simple and robust.

The condensation happens at night and in the morning before the temp rises.

The window open/shut sensors, would anyone suggest the exact model I would need to get?

Much appreciated!
 
I have a migraine now, so I can't comment further on the other stuff, but it's NOT that the smart relay has WIFI built in, BUT if you can receive WIFI in the greenhouse, you can add an external access point to your network in the greenhouse. This ftp://ftp2.dlink.com/PRODUCTS/DAP-1650/REVA/DAP-1650_REVA_MANUAL_1.00_EN.PDF (I'm not suggesting this product though) you can connect the Ethernet wired device (e.g. Smart Relay) to WIFI. This manual calls it a Media Bridge mode. The smart relay has a web server. So, it's an option.

I have used D-link repeaters/AP products for a long time. A 802.11b version and a 802.11 b/g/n version. In my case, the range extender has 4 Ethernet ports on it that I could use. My AP runs off of 5 V wall-wart.

If the WIFI is weak, you may be able to use a directed antenna. I have an app on my phone that does signal levels etc.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
Yes, I understand how it works, but is there a DC version? I don't have A/C out there, nor an inverter :)
 
Back to the limit switches. You have that greenhouse thing again and the no or low power thing too.

An SPDT micro switch is only a few dollars. These http://static6.arrow.com/aropdfconversion/ddba595775ff08a145b78d677b288f9f22af1eea/pgurl_1.pdf however aren't even close to a few dollars, but they are sealed, somewhat anyway.

How you activate the window matters too. The design I would have in mind would require that the controller uses a contact to ground. The smart relay has relay outputs (good) or active high transistor outputs (bad, somewhat), but we can switch that,

So, the idea as before is to use two automotive relays close to the motor, some nice SPDT sealed limit switches and when the window is fully closed or fully open no power would be drawn.

The signal OPEN or CLOSE can be momentary or permanent, so partial opening is possible if timed.

If necessary a MOVING signal can be generated by putting a full wave rectifier across the motor.

Furthermore, relay coils always need a reverse biased diode across the coils, A 1n4001 would be fine.

This https://www.parts-express.com/12-vd...socket-for-door-lock-unlock-circuits--330-078 is a relay socket that is wired for two Bosch style automotive relays. There are two different pin outs, so be careful.

So picture a drive circuit (e.g. OPEN) being a contact closure to ground *** which would activate the Open automotive relay. The limit switch COMMON would go to +12 (low power ~100 ish mA), the NC (Normally Closed) contact would go to the other end of the OPEN coil.

For status, the (NO) Normally Open contact would go to +12 V (low current). Thus when the window is OPEN, +12 (low current) would be signal that the relay is OPEN. That signal would be OFF if it was somewhere in the middle.

That *** contact closure to ground can be from a relay output (certain smart relay models). The +12 transistor output from the smart relay would have to be inverted. It's doable in a number of ways. Low power would be with an OPTOMOS relay (an IC that uses a 2 mA LED) or a MOSFET and a few resistors.

Having a "MOVING" signal allows one to possibly save power and turn off the drive when the desired position is reached.

In any event, manual control like you have momentary can still exist with limits being observed with auto-cut off.

www.polycase.com has a lot of sealed enclosures where the relays, MOVING can be developed and the limit switches can be wired. Your manual switch can be wired to that box too.

Sealtite flex conduit can be used for the limit switches.

So, you have at least:

+12 and GND for fused power for the motor.
Two leads (possible current limited) for Motor running

OPEN WINDOW (contact closure to ground)
CLOSE WINDOW (contact closure to ground)
WINDOW OPEN (+12 (possibly current limited) when OPEN and infinity)
WINDOW CLOSED (+12 (possibly current limited when CLOSED, and infinity)
These four can be referenced to the controller ground.

If you decide to run the manual switch to the box at the window, you may want to run a ground to the controller, so it goes from the controller to the box in the ceiling and back down to the manual switch. This just keeps the reference in one place.
 

Thread Starter

bastoe

Joined Mar 27, 2017
12
Wow, lots of info there, will have to take it bite by bite. Just now ordered the wind sensor and rain sensor (opted for a different rain sensor since I want faster control of reactivation after rain, since it rains everyday at some times of the year, but not all day)

So here's what I have:
Rain- http://store.hydreon.com/shop/rain-sensor/RG-11.html (this may have the ability of day/night lol)
Wind- https://www.amazon.com/gp/product/B00FYRW3PO/ref=ox_sc_act_title_2?ie=UTF8&psc=1&smid=ACR5CS8C4ZH0Y
Day/night- http://www.flexcharge.com/NWHC-Night-Watchman.html
Some of the 1n4001 diodes (ordered a variety pack)

So I know it looks like a lot of $ so far, so I need to keep the rest of the budget low, much lower. Would like to do this without a $$$ controller if it's cheaper. Since adding the controller requires, the PCB controller, and wireless hub (and a battery backup), and me running cat6 from my shop (where i'd have to put the wireless hub due to distance) to the greenhouse and the controller.

What I figure is needed:
2ea. limit switches for the window low stop/high stop: still looking (low cost) - do they need to be snap action, momentary, or ???
A bosch relay or two to control those. -how many and what type to go with the socket below please
Sockets for the limit switch relays: https://www.parts-express.com/12-vd...socket-for-door-lock-unlock-circuits--330-078
A relay or two to control how the rain/wind/day-night control the motor. Advice needed please.
a container or two for all the parts including my manual switch (once I get all the parts I can go get one).

Thanks!!
 
Top