"Smart" IoT Garage Door Opener (Belt or Chain Driven) Project

This type of project has probably been beaten like a dead horse to a pulp, but here it is (sorry, my forum search skills suck but my google search is great. Haven't quite figured out why yet...)

Project:
A "Smart" IoT Garage Door Opener that not only does standard garage door opener stuff, but uses Bluetooth to interact with the "Clickers and Key fobs", smartphone interaction, battery backup, and an optional solar panel connection (Yes, big project). It will be a part of a closed network connected to a development board (RaspPi, Beagle, Edison, C.H.I.P. or the new Pine A64 that will (hopefully) be coming out in spring if someone wants overkill) that runs automation software (Like OpenHAB) and act as a gateway to the net. Besides the standard sensors, it will also have a notification system to alert the homeowner (me) if the door is opened or closed or left open for an extended period of time and also blink (if opened) at the button panel. (deciding if this will be hardwired like normal or wireless with button cell power or both; hardwired inside the garage and wireless in the house.

Now that is out, only getting it to work by itself is a concern right now. The other bells and whistles should be easy to add later once it is up and running. (full project will be posted here when figured out with sources, schematics, and acknowledgments after the problems are sorted out for ease of building if someone doesn't what to understand the process of how this came together. I give credit where credit is due.)

What I know so far:

  • The operator (brains) uses a 24VDC 1/2hp (or higher) 6A bidirectional motor. A worm gear is attached to the motor at a 78:1 gear ratio. That is attached to a small rod and gear that feeds the chain/belt.
  • Power is fed from 120VAC (or 240VAC depending on country) to an inverter. This will convert to 9-12VDC 6-7A (whichever is better for this system) to power the arduino and pass through the amperage needed for motor. 24VDC relays are attached to the analog pins which are attached to the motor. A backup battery supply is attached and discharged when AC power is out and recharged when power comes back.
  • The rest consists of the drive guide (or T-rail), sensors (beam?) (to tell the arduino to stop and reverse the door if a cat or a kid gets in the way), height adjustment (looks like two potentiometers), and 1 or 2 torsion springs (some sites say one, a few show two; one left wound and one right wound. My personal one only has one and it’s on the right) The rest, I'm assuming, comes with the door itself, so wouldn't be pertinent other than the weight of the door. (Roughly 150lbs. and 8.2 ft. or 68kg and 2.5m for engineers and everyone else in the world.)

Problems:

  • Obstacle detection: For the entry way, I've seen on here about using IR transmissions to a sensor using pulses. When it is not received after X ms time, it stops and opens. Is this method truly feasible and secure? Seems logical to me, but then there may be a situation this may not be and cause the system to fail in security. (Gotta stop those pesky burglars, but then this project might tell them how to bypass it anyways.) Also, if something is in the way, but the beam doesn't catch it (bicycle tire sit happened to me) it recognizes the resistance and reverses or stops the motor (reverses going down, stops going up like something falls or obstructs the tract, preventing it from opening.) Code probably will tell the direction and what to do, but there has to be something physical to tell it, "Hey! Something is here making the motor stall!" so the arduino can make the decision. I saw a sponge or spring letting the motor move and trigger a micro switch idea on the forum, but I started thinking that it wouldn't be feasible. Wouldn't the torque from the motor just starting trigger the switch? What makes it go back once it is running? I'm thinking helicopter: if the tail rotor is not working, the body is just going to spin because there is nothing stopping it from doing so. Same with a "floating" motor. a spring or sponge wouldn't stabilize it and if it does, what would make it give when it is blocked? Am I really overthinking this sit?

  • Height adjustment: I personally haven’t seen pictures or broke open my opener. (The wife would kill me and the kids would morn their poor father until she marries Daniel Radcliff and they get everything they want. Hey, marrying older chicks is in!) I figure it is controlled by two potentiometers, it seems logical, but it could be a different method. I think it would be nice to be able to set it up through a smartphone, but it would need a manual adjustment method for those old school people. (Or, at this time, those that don’t need a smartphone right now. A rare breed.) I was thinking of designing a system using one or more SICK DS40s and adding a target plate to point it/them at, but again, feasibility. Need to weigh cheaper, better, and securer for the best outcome.
    -Finally, Security: I know nothing about this and with all these radio waves flying all over to the device (Bluetooth, smartphones, its own network, connection to a WAN network, etc.) there needs to be a way to prevent risk of property and life. Not just anyone can just walk-in, only authorized users.

Do you have a working door opener. ?

They tend to care of the safety stuff for you..

They also have a press to open/ close switch to operate , they are relativley easy to interface to.

Have you been drinking ? :slight_smile:

I do have one, very basic one. I'm planning on moving later this year and it has to stay with the house. (or I'd mod the heck at it; it would be easier.) I'm a DIYer and love working with wood and electronics, plus I have a load of time on my hands (disabled vet) and love learning and solving problems. If I learn to build it from scratch, I learn how to repair it later if it breaks. Plus I'm a lazy techy American and if I don't want to do it, then why should I? I'd just build a simple 1950's garage door opener operated by key or just walk to the door and open it manually. his is a challange to keep me busy and from being bored. Plus I'm sure I'm not the only one that thought "Maybe I could do it better."

And I wish I was drinking with dealing with girls age 2 and 7 fighting in the back seat. Calgon can't take that away. :stuck_out_tongue:

Thank y’all ahead of time for the help here. It is and will be most appreciated. Two of my sources are attached (actually the same college project) with the other at Garage Door Opener 101 - How a Garage Door Works

Edit: One of the PDFs was too large. The link to the page is in this attachment.

HWG2.GarageDoorOpener.pdf (1.04 MB)

SDWHWK:
I do have one, very basic one. I'm planning on moving later this year and it has to stay with the house. (or I'd mod the heck at it; it would be easier.) I'm a DIYer and love working with wood and electronics, plus I

Arduino is really good for controlling stuff but when it comes to mechanical stuff it really what you can get and bodge cheaply.

Mechanical questions come up here frequently.

SDWHWK:
And I wish I was drinking with dealing with girls age 2 and 7 fighting in the back seat. Calgon can't take that away
. :stuck_out_tongue:

Over here calgon is a washing machine water softener, try alocohol !!

Boardburner2:
Over here calgon is a washing machine water softener, try alcohol !!

Bathing in alcohol? Isn't that alcohol abuse? Spilling is one thing, but out right contaminating it? That's just wrong and an out right crime against humanity, mister!!! :stuck_out_tongue:

Boardburner2:
Arduino is really good for controlling stuff but when it comes to mechanical stuff it really what you can get and bodge cheaply.

Mechanical questions come up here frequently.

The mechanical I have down pat. It is the communicating with the arduino to make stuff happen and finding the appropriate sensors for the job. It will be the brain of the operator. Inverters are easy. I could make it easier with a 12vdc, but since the pin outs are 5v, I'd have to up convert anyways, so go with the industry standards. Arduinos communicate with motors everyday. Heck, that is probably the most talked about and questioned subject here. To tell the arduino a certain distance has been reached will require a sensor to talk to the arduino (this went x distance, tell the motor to stop.) Same if a beam is broken (something just walked through my path, tell the motor to stop and reverse.) same with if the motor stalls (hey, the motor seems to be having trouble moving, what do you think it should do?) All the other stuff described is basically connecting radio receivers like Bluetooth to provide a wireless way to communicate with the controller to open and close and it to tell you "I did it" or "Something's wrong."

Problem is, what appropriate components or sensors to use? That is what I'm trying to figure out. For distance, would a sonar, laser pointing to a plate, or a sensor that counts revolutions (forgot what those are called) or some other way be appropriate (heck, I've even thought just mounting two momentary switches at both ends of the track, but how to protect the wires from the chain/belt?) That takes care of the "height adjustment".

The beam: same type laser or IR or some other way? Which one would be more fail safe?

And what could detect the motor getting resistance? There is the sponge method above, which is questionable,and another method I found, a resistor and the arduino monitoring the current. Is there another way and how would the resistor method be implemented?

Motorised garage doors tend to use dc motors of 24V or 36 V if unsmoothed or thereabouts dc motors either smoothed or not.

They detect obstructions from the rise in motor current when obstructed.

IR and other can of course be used but the mass market stuff needs to be cheap.

So motor stops, current rises. The arduino itself then should be able to detect that by itself and decide through script, right? 24vdc is common, so that's used. Now stepping up voltage I know how, but what about amperage? I know the arduino doesn't produce anywhere near the 6+ amps needed in any of the pins, so a circuit would have to be added to boost it, if possible. I'd have to research that.

I'm seriously leaning towards the switch idea. If switch 1 or 2 is triggered, the motor stops. If switch 1 did the stopping, it logs that event so the next command (button or signal) opens it. If switch 2 is triggered, same thing but closes. If in motion, the command will stop. Next command would reverse it. Seems the simplest way.

The beam though, is the interesting choice though. Using a laser like the DS40 sounds cool, but what about safety? Don't want to burn a cat's eyes out, so if this would do that, it's out. But the IR could be cheaper and pulsing prevents false flags, but ambient heat could be a problem. What if the IR from the garage itself during a 102 deg F day makes the receiver think the IR transmitter isn't sending the signal and the door never closes? I know nothing about IR technology, so I'm not sure if that will really be an issue. And could there be another way all together?

And how to secure the radio signals? What would prevent someone with a Bluetooth or a 433Mhz - 2.4Ghz transmitter just walking up to it and opening it?

I have a commercial device which does not have any sensors.
It has a learn button to determine the end stop positions.
It uses a pic which has a d to a converter which may be significant or not.

Whatever frequency of control the signal is coded so only you can operate it.

SDWHWK:
an optional solar panel connection (Yes, big project).

For pure solar use a totally different design needs to be considered without any bells or whistles.

SDWHWK:
. My personal one only has one and it’s on the right) The rest, I'm assuming, comes with the door itself, so wouldn't be pertinent other than the weight of the door. (Roughly 150lbs. and 8.2 ft. or 68kg and 2.5m for engineers and everyone else in the world.)

The springs normally come with the rail/operator equipment you use as many as needed to balance the door.

Its possible to retrofit an operator to an existing spring balanced door but the existing spring is normally removed.

Remote doors do not use much force and thats related to obstacle detection, its important though to have the door properly weight balanced for its entire travel for that to work, the hardware/ hinges supplied are designed to take care of that for you

Boardburner2:
I have a commercial device which does not have any sensors.

Ours here does. There are two boxes on either side of the opening that detects anything crossing them. The first has a green led and the other has a red. When you walk across it and stop ( or just walk past it), the green blinks, but the red stays steady. Now I hate assuming, but one of those is a transmitter (most likely the red) and the other a receiver (green). If the sensor in the green doesn't detect the emitter in the red, it blinks the light and sends a signal to reverse the door. From what I've been reading, it probably is a IR emitter shooting a beam to the IR sensor. But I also read that people have trouble repurposing these devices for similar use outside of a garage (I've seen pet doors and auto doors projects as an example.) those that respond to "why this ain't working?" mentioned something about tamper proof. they are the ones who also suspect that it's possibly an IR system.

Boardburner2:
It has a learn button to determine the end stop positions.
It uses a pic which has a d to a converter which may be significant or not.

The one I have, and some of the pics I've seen, are screw like heads, (again I assume are attached to pots, but your's sounds easier), that "teach" it the distance. Whether pots or button, something tells the microcontroller inside that "close is x and y is open" or "go z distance/revolutions/etc. back or forth" or something similar. That's what I am trying to find out. My switch idea is simple, but not fail safe. if either or both fails, you have an expensive piece of trash from a very cheap part failure.

Boardburner2:
Whatever frequency of control the signal is coded so only you can operate it.

I understand that, but my knowledge of encryption deals with the net and wifi networks. AES and WPA works with those, but how is bluetooth and 433Mhz radio encrypted, exactly? These are very standard wireless devices for consumer microcontrollers like RasPi and Arduino, and since the introduction to IoT, security is a big concern (If it's been mentioned and described, it might be a very good sticky for here and other microcontroller forums). How would these communications be coded or encrypted?

I do not know.

my door uses a simple remote control.

Once you get the basic door working i would suggest asking th question in th programming conference.

SDWHWK:
The one I have, and some of the pics I've seen, are screw like heads, (again I assume are attached to pots,

By pics i mean PIC controllers similar to arduino.
Sorry if i was not clear.

That sentence wasn't for that, But I did question about the PIC. Rare time miscommunication helped :p. It was more the "d" part. We're you meaning a diode for the "d" or something else?That was the part I wasn't clear about and I miscommunicated.

Thanks for helping me sort this out. You're helping the gears smoke in my head from lack of use and being generally useful. I understand there are a lot of types of programmable controllers and ICs, just "microcontroller" seems most commonly used now. If I throw that around, I'm mostly talking about a development board with some form of PIC on it. I remember the days we programmed ICs with hex, binary, or basic. Now there's all sorts of IDEs to play with. Off subject...

Again, Thank you.

Digital to analogue convertor ?

Arduinos do not have them .

SDWHWK:

Ours here does. There are two boxes on either side of the opening that detects anything crossing them. The first

If it is an old one thats possible.

Implementing a force detector with older tech, would probably be rather expensive

didn't get the full post.

More research turned up the motor starts with a cap (53-64 seems common) and the operator uses an R.P.M. sensor. What would that be used for? I know for computers it's to monitor how efficient our cooling systems are. (high rpm, hot as hell) or fan efficiency. maybe as a governor to keep the motor from going to fast? (Hey, it's going to fast, turn down the juice!)

It may count the turns for position information.

That's what I'm thinking. x revolutions = y distance.

Found the patent on the safety sensors. Now to translate from legalese Techy talk to layman's.

U.S. Patent US5465033 A

Shifting the safety controller from the operator to the sensor box so all you have to do is plug and program into the Arduino or other microcontroller could make someone like sparkfun a little cash. I've seen some people wanting this type of sensor on the forums. This could even be used as a cheap parking assist. Have to way out the pros and cons between this and the popular ultrasonic method. Just an idea floating in my head. But definitely a use for those who want an open-source, home automated garage door opener, like me.

Problem i found was i could not get the hardware,I had to buy a complete package as they do not sell seperatly