Maker Pro
Maker Pro

Retractable Roof for Swimming Pool

TheRoofGuy

Nov 29, 2021
2
Joined
Nov 29, 2021
Messages
2
Hey everyone! New member here, have gotten some great info from this forum before, now registered to make some questions of my own.

I'm working on a project to automate a retractable roof for a swimming pool. The roof is already built and can be opened and closed manually. It is divided in 3 parts, 1 fixed and 2 movable. I did some math and figured out I should be able to push/pull the 2 mobile parts using 2x 24V 350W DC MY1016z3 Motors, typically used for eBikes, using a chain and some sprockets to reduce its speed to a manageable level. I have already bought all of the before mentioned parts and have an idea of how I will mount the mechanical parts.

Next up is electronics: I am using 2 12V car batteries connected in series to provide the needed 24 V for the motors, hooked up to 2 old solar panels I had laying around through a Victron MPPT Charger that is already hooked up and working fine.

Here is where it gets a bit complicated for my knowledge level and I have some questions.

I got some buck converters (https://www.amazon.com/gp/product/B079N9BFZC/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1) to step down the 24V from the batteries to 5V to power an ESP32 which will be my brain.

1st question: is this an acceptable way to power a micro controller? These batteries will be at 100% charge almost always since the roof will only occasionally be closed/opened so I assume the output voltage of the buck converters should be pretty constant.

Next up is my circuit to be able to run the motors in both directions to open and close the roof. My plan is to use a Dual Relay H-Bridge for each motor, sharing a single output from the ESP32 to make both motors start and stop at the same time. At 350W and 24V the rated amperage of my motors is about 14,6 A, however I know that inrush current and a possible stall current are much higher. The biggest logic level relays I could find are rated up to 30A at 30VDC.

2nd question: is it ok to use these relays with the motors I am planning on using, even if inrush current and stall current may exceed the relays rated capacity for a short while?

3rd question: is it ok to connect the motors directly to the battery through the relay h-bridge or should I connect something else in between to soften the inrush spike? Or maybe something else to avoid back-current to the ESP32 when shutting the motor down?

To make sure the motors don't stall for a long while should the roof become stuck somehow, I ordered some ACS758 50A bidirectional current sensors. I plan on monitoring each motors current using these sensors and the ESP32, and have the circuit shut itself down if the current stays above 30 A for more than 1 or 2 seconds. I figured this is the best way to do it, since a fuse will blow every time during motor startup. If there's a better way, please let me know.

Here's some pictures of the ro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YIgReMq43okGDO_4CWbiqgjHW1Wy2LSIVAHj2pxADGy2I0HHW2e-rEXgTvlrcRFNdkjmfLiJmbr0Mo56_ssChJrBS5XQ0epvfPaLz7Y3YJSpo5BdIOTB9Q8oghkVKGwSqrpJ-P8rDBqH4MGISWumLFzRTKE9SIR86t77DbdCZDQI0sQtpHT0a1QbI62k7Vrb1ZcoDkZCmYyZmfHjlXY32_zRKN2-7YsMIN6InUnB2ZLqsLCgQkrlejw-gtPBrzh72o9s9pSnpt0dQ_-bS_xJCA1mhSJT3Q3dY03W43yB51fSXLdBvTFbbUdoaLhuYMxZ7q7_-sLqTPr2ZNpXTzrJRI9JOFAYxkBgoGo6WWb9RCRh_FS8oabpXS2icvulM83sSY7TZFRu9ziw=w836-h627-no


I'm pretty sure I had some more questions but can't think of them right now o_O I'll update if I remember some more.

Thanks for your attention!
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
All sound feasible although you may run into some teething troubles during construction and testing.
You could for example, run a 12v supply from one battery to a down converter to say 9V and then feed the raw terminal of the micro.
This could help isolate the noise from the motors.
Micro could even be an Arduino Uno or promini as there is not much to control and would hardly need the high mhz of the ESP32.

Another thought was you could use an electric gate opener as they have all the necessary things you need already installed, tested and running.
Just install 2 magnets, slip on the chain drive and you are away.
Reason I mentioned these was they are relatively cheap considering what is included.
Mains drive may even be less hastle. No solar, no batteries etc. etc. and with the added remote control key fob.
Most mains units are around the AUD$200 to $300 these days.
 

TheRoofGuy

Nov 29, 2021
2
Joined
Nov 29, 2021
Messages
2
All sound feasible although you may run into some teething troubles during construction and testing.
You could for example, run a 12v supply from one battery to a down converter to say 9V and then feed the raw terminal of the micro.
This could help isolate the noise from the motors.
Micro could even be an Arduino Uno or promini as there is not much to control and would hardly need the high mhz of the ESP32.

Another thought was you could use an electric gate opener as they have all the necessary things you need already installed, tested and running.
Just install 2 magnets, slip on the chain drive and you are away.
Reason I mentioned these was they are relatively cheap considering what is included.
Mains drive may even be less hastle. No solar, no batteries etc. etc. and with the added remote control key fob.
Most mains units are around the AUD$200 to $300 these days.

True, the ESP32 might be kind of overkill, however I chose it because I want to control this roof from my cell phone through wifi or Bluetooth.

Another thing I thought of implementing is a slider through which I can open/close the roof to a certain percentage, say 34% or whatever I want. Maybe even have it automatically adjust the shade in such a way that the pool temperature stays within certain limits reacting to a temperature sensor in the water.

Regarding the mains electric gate option, I considered this at first but could not figure out a way to open the roof entirely because of my 2 pane mobile roof design. I cannot think of a position where I can mount a fixed motor that will pull out roof number 1 and then roof number 2. It's easier with a motor that is mounted fixed to roof number 1 and crawls along the wall, dragging roof number 2 with it once it closes completely. This means the motor is mounted to the moving roof and therefore complicates wiring to mains. With solar + battery I can have the whole thing on roof #1 which makes wiring much easier.

Maybe there is a very obvious way to mount the fixed mains motor but I just fail to see it. :D
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Gate motor is fixed at one end and has a gear which locates in a rack mounted on the moving section. Rack would only need to be on panel one, the other would free wheel so to speak.
Many micros have the wireless units as part of the micro. Arduino rf_nano being one.
You have a LOT of systems to consider in your proposal ,any of which can cause a design headache. Best is to start simple and when that works, expand on that.
 
Top