Connecting multiple Arduinos/stepper motors to rain sensor(s) - concept design

Can anyone help me keep our bedrooms cool on long hot summer nights, while avoiding wet carpets?

I have made a prototype window auto-close unit that combines a rain sensor, an Elegoo Uno R3, a Pololu high-power 36v4 motor controller and a 24v/4.2A stepper motor into a single unit - all powered by a 24v/5A mains (240v UK) adapter. The unit is completely portable and self-contained - there is no data or power connection to a laptop, PC or similar device.

It performs a very simple, one-off operation. Whenever it starts to rain, the motor is activated, turning a pulley that reels in a wire cable that closes a top-hung Velux window from near-horizontal (open) to 45 degrees (closed). That's it. The window stays shut until you wake up, check that it has stopped raining, and then re-set it as needed.

Everything else is manual - attaching the unit to the bottom of the window frame, plugging in the power supply, opening the window, reeling out and attaching the cable to the bottom of the window, and placing the rain sensor outside the window.

I would like to be able to simultaneously auto-close up to three identical windows in this way, so it would be great to have people's thoughts on how I could approach this at a conceptual level. The windows in question fall within a linear footprint of about six metres, and running cables between them would be possible but a fair amount of work. There is a reasonable WiFi network in that part of the house, but I would prefer to keep things hard-wired for reliability and because of my limited Arduino expertise. My thoughts so far:

  • Build two more self-contained units like the one I have, and deploy them as needed. This would give maximum flexibility but wouldn't be very user-friendly. (BTW I do not want them to be permanently attached to the window frames, and I'm not happy relying on cheapo rain sensors remaining permanently in the open air)
  • Place a single permanent rain sensor outside, and plug each unit into it via a socket in each window frame. This avoids having to fiddle about with installing and removing a dedicated sensor every time I set up each window. I would probably have to use a more durable (gold-plated?) sensor if it was to be placed outside permanently.
  • As for 2. above, but also have single central Uno, which would send an activation code to a motor driver in any units that were connected (again, via a plug in the window frame). This would have the limited advantage of making each unit a bit smaller and cheaper, and would mean I only need to update a single Uno if I tweak the code (eg motor speed, rain sensitivity) - but these are not major considerations.

Cost is not really an issue (for comparison, it would cost over £1,000 to retro-fit a single new auto-close Velux), and I would have no problem scrapping some of the work I have done to date. My mechanical and general DIY skill levels are very high; my electronics skills those of a competent hobbyist; and my Arduino programming skills are cheerfully amateur.

Any comments/suggestions on the overall concept design, anyone? Feel free to be creative - I'm looking for user-friendly, practical ideas rather than detailed technical/coding solutions at this stage.

Thanks!

Get a normal DC motor, not a stepper. Cheaper, easier to control, more efficient. Add a limit switch so you can detect when the window is closed (or closed enough - depending on your needs).

Alternatively: move your bed so the missus gets wet when it rains and goes to close the windows.

wvmarle:
Alternatively: move your bed so the missus gets wet when it rains and goes to close the windows.

Unfortunately the windows are spaced more than a bed's length apart.
Having said that, if I rigged up some internal guttering...

How about this for a sensor?

Connect to an input with pullup resistor enabled, look for a LOW input to signal it is raining.

Similar concept can be used to tell other connected Arduinos it is raining. Central Arduino connects to others with an Output signal and Gnd, passes on its LOW input to the others to let them know to close up.

Stepper motor control seems okay to me. Program it to close plus a few steps more in case there are some missed steps along the way. I expect the stepper will just slip and go clunk clunk once the window is fully closed; that's what I've seen smaller steppers do anyway.

Then I imagine a simple push button to an input, again with pullup resistor enabled, to connect a pin to Gnd to tell the Uno to open the windows back down. Another button to tell them to close in case there was big dust storm heading your way or something.

"Pololu high-power 36v4 motor controller" which one? 3 inputs: enable, step speed, direction? Arduino can handle those.

I'd build a little weather station outside even if it only detects rainfall and have it send data to the other units via WiFi.

To get around your lack of experience with wireless, take a look at MQTT - there are libraries for it.

tlentifini:
Unfortunately the windows are spaced more than a bed's length apart.

What's the problem? If it rains at one window, chances are it's raining at all windows. Or at least it won't take long for that to be the case.

wvmarle:
What's the problem? If it rains at one window, chances are it's raining at all windows. Or at least it won't take long for that to be the case.

D'oh!
You make a very fair and obvious point.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.