Hacker News new | ask | show | jobs
by gruturo 2228 days ago
Cool project. I built a couple myself (albeit not with a Pi, but with some Wemos D1) and can share a few lessons learned.

First of all, safeties. I was lucky to add my work to existing motorized garage doors - which already came with enough sensors, but since you are providing everything including the motor, these should be in from the very start, or in any accident you'd be held liable. Actually you may even be held liable if someone implements it from your github repo and then has an accident. I know you have a disclaimer, but I wouldn't rule out being sued.

You want a sensor which detects any anomalous power draw in the motor and immediately cuts off power. Something as simple as an ACS712 (follow guides for reading an inductive load though!) which is a couple bucks (or less if you buy a bucket from China). The motor may come with built in safeties if it's meant for a garage, but this is something I'd still consider.

You will want not only a sensor but also a couple emergency buttons on both sides of the door which instantly stop all movement. While you're there, activating a couple very visible flashing LEDs for a few seconds before you start any movement is also a good safety precaution. You have 2 relays which could due to a bug or other unexpected circumstance be energized at the same time - Depending on the motor this could cause a fire, or fry your relay board/Pi. I would use one relay with its NO contact going to the DOWN motor pin, and the NC going to the UP motor pin, and connect it in series with the other relay which cuts all power. This way it's not possible to energize both in any case (beware: even abruptly switching directions may ruin a motor - always cut power first, THEN toggle direction, THEN provide power again)

Happy to discuss a few more points if you feel like.

1 comments

As someone who owns a normal Liftmaster garage door opener that malfunctioned last week and destroyed the door because it didn't adequately sense that the door was blocked, I have to say I don't think I'd want to homebrew my own opener. Especially not with kids in the house.