Show HN: Raspberry Pi garage door opener(github.com) |
Show HN: Raspberry Pi garage door opener(github.com) |
Here's the CPSC page on garage door openers: https://www.cpsc.gov/Regulations-Laws--Standards/Voluntary-S...
The pdf "Update of Automatic Garage Door and Garage Door Openers Entrapment Incidents. October 7, 2003" is a good introduction to the real, not internet-smart-guy-hypothetical, hazards of automatic door operation. It includes a summary of every entrapment incident found by the CPSC from 1982-2003.
The UL standard for openers UL325 is incorporated more or less verbatim into the mandatory standard 16 CFR Part 1211: https://www.law.cornell.edu/cfr/text/16/part-1211/subpart-A Have fun. This is the standard that an opener that retails for $99 on sale in the US has been engineered to meet. European and other international standards differ in particulars but are quite similar.
No, you will not accidentally meet real-world safety standards with your project by dint of your sterling virtue, high intelligence, wisdom in the ways of the world, and impeccable engineering skills. Nor will you do so by adding a couple more features. Safety is the result of deliberate processes.
This is project taking complete control over the motor that opens and closes the door and NOT using the simple "throw a relay on the door opener" trick that you usually see (ex: https://cdn.instructables.com/F9V/T9JH/I9YBZHM7/F9VT9JHI9YBZ...).
This project is unnecessarily dangerous for such a simple application.
Would you feel encouraged or inspired if someone said this to you?
For example, instead of saying the quote above, you could have as easily said “I think this garage door opener project has a lot of opportunity for improvement”.
Mindset goes a long way, and it might just help make a friend or two along the way.
This is nuts.
This is unnecessary condescending snark that I hope we see less of on HN. Everyone should be open to criticism, but how does that encourage the inventor?
What makes you so sure?? I see people using such "experimental" devices all the time. Unless you tell someone explicitly why it's a bad idea they won't know.
For people that are interested in raspberry pi projects. I compiled a list, mostly for myself, but if it is semi-useful for anyone else, I'd consider that a win. I scoured HN and searched on YouTube, Google and thought of my own ideas to find the rpi projects that fascinated me.
https://docs.google.com/document/d/1xT6-vN4sFnRLMOdj9wC4_ESW...
I'll put this project on there as well under the category "smart home". While the concerns are justified, such as insurance issues and fire hazards, I find it a cool use of what one can do with cheap hardware.
Although I've grown cautious of products like Shelly which use Wifi as they will become obsolete once their Wifi security protocol becomes broken (like WEP en WPA). But then again the same probably goes for more expensive Zigbee and Zwave devices.
I'm a big fan of IOT and home automation, with one exception: door locks. I wouldn't trust any electronic device with my door lock. There's just so much more that can go wrong, both from a technical and a security standpoint. Also, electronic door locks aren't THAT more convenient than my physical house key.
I can almost guarantee you that you will sit in your car and scream bloody murder because the WIFI ist not connecting.
My products had to work with a lot of other networks around and were built on a Model 3 B, maybe it has improved since then.
Sadly I can't point you into the direction of solutions because we just switched to Ethernet.
I.e. clone an additional remote, then integrate with the buttons from a micro-controller to open/close. In addition, have some kind of way of detecting whether the door is open or closed, so I suppose the remote can be placed near the motor.
That way you can also easily integrate into your house's alarm system later on if need be, as it's most likely linked to your remote.
https://www.heyraviteja.com/post/weekend-projects/open-garag...
I did a similar solution a while ago, documented all the steps to replicate such setup: https://www.sascha-curth.de/projekte/004_Garagentor.html
I wrote it in german, but chrome/google translate is tested for English, Spanish and Portuguese. And comments/remarks are welcome via github issues.
ETA: by push buttons, I mean the "normal" garage door buttons that would open and close the door (typically on a wall in the garage.) these typically use some low power, e.g. 12-20V. And the safeties the manufacturer would have built in would still work as it'd be as if you were pressing the manufacturer's open/close button, but remotely.
Features:
- Web interface with multiple user accounts. - React/Material UI front end. - NodeJS backend with registration/login flows.
A friend works at an oil company, and they have dozens of rpis deployed on offshore rigs, and in land rigs in the middle east. They are working in pretty harsh conditions, with high salinity, sand in the air, high vibrations, very low temps, very high temps... and yet over the 6 years they have been running, not 1 has had a fault.
All use SD cards, and they haven't been glued in or secured in any way.
At this point, the RPi SD-card fault thing is becoming a meme.
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.
I mainly wanted to focus on turning my AC units on and off. I assume I'll need some sort of IR transmitter, and possibly a receiver to understand the signals the remote is sending.
Then it's just a matter of capturing the remote codes and setting up a way to remotely command a given Pi to send that pattern of pulses out of its IR emitter.
edit: I just did a quick search and Sparkfun sell WiFi IR blaster boards for $20. I'd imagine you could find cheaper ones on Aliexpress or other places where you typically find cheap electronics. This would probably be simpler to set up versus a Pi with less things to break since it's not booting a "full" general purpose OS.
That said, I do love adafruit and sparkfun for most purchases. My bank account doesn't, but I certainly do.
I've previously written a Telegram bot, so was thinking to reuse some of that.
Do you have a repo to share?
Absolutely there is. You and I both agree we should encourage them to learn properly, experiment responsibly and proceed with safety in mind.
> There is no invention
I regret that you ever saw the word "inventor" and couldn't think past it. {Creator, engineer, maker, hacker, killer} Pick whatever word it takes for you to ignore the noun and focus on the idea and better way forward.
But of course that doesn't mean you can't use it that way.
I'm thinking of building a elektronic lock solution myself because it would actually increase security for me. As currently I often neglect to lock the doors when going to the back of the yard. Mostly because I don't have the key on me. And my kids are at an age that they will still neglect it for many years. A quick drive-by thief could be in and out in no time. An electric lock with a rfid and keypad would be a proper solution as it always locks when you close the door and are never locked out (unless the power fails but then you use a backup key stored somewhere safe).
So my solution was to buy an electromagnetic lock, which also could be opened by key in case of power outage. And I did exactly this - an RPi was in charge of opening the door via my private WiFi network so when my daughter was coming home, she was connecting her smartphone to my WiFi, launch an app I also wrote and used that to open the door.
Now the funny thing is that the electromagnetic lock was so sensitive that it required a lot less power to open it via its mechanical key so she ended using that most of the time, only in rare occasions of a new friend she was showing off that she is able to open the door via phone.
> Works locally only, via WLAN (it's a feature, not a bug!)
I am the same with Adafruit et al. Their stuff is tested, easier to exchange/return if broken, often ship quickly since it's domestic to the US, etc. But when I need a bunch of something I tend to order more direct/bulk. My early LED strip projects were fine with a meter or two of "Neopixels" but when I wanted many many meters for bigger stuff, it was time to order reels from Ali Express. Shipping was slower, but even if I paid an extra $20 for fast shipping, it was much, much less than ordering from Adafruit. I just had to be aware that some of this stuff may not work and returning will be next to impossible. Luckily I had no issues.
Everything I've been doing is stepper motor related, and I didn't know what else I'd even use 3/4 of those sensors on, but for 25$ or whatever I figured I could buy them, try them, and see what comes out of it. They're like a flight of microbrews or something; just enough to tease me and get me started so I know what I actually want :D
The best you can do is apply voltage to the contacts (which might be workable, depending on how the remote is designed).
To short the contacts you need either a relay or a transistor.
Also I used this remote control only because one of the switches was broken, I didn't have a spare one so I couldn't afford breaking it.
An optocoupler would be better but I figured maybe one day I will repurpose the relay shields for something else, or unsolder the relays. Actually my next project involves both optocouplers (for efficient 12V->3.3V conversion) and relays to drive AC but I will probably have a PCB manufactured for that one!
I think very few people plan to open their garage door from across the continent with these projects
Just bought industrial grade SD cards for Siemens PLCs the other day, almost $2k for 32 gig and due to certification for safety only good for ten years regardless of condition/use.
Equivelents spec cards without the magic S word on them are still around $800.
They are actually a different kind of memory used, so I guess not manufactured in same consumer number quantities.
I always liked the look of something like puppy Linux that loaded to ram, pretty sure most Linux variants allow this as an option, that would potentially make use of consumer grade palletable.
1. Buy high quality SD cards
2. Remove as much disk-IO as possible, using an external USB stick for raw data storage, logs, swap, etc
3. If you really need to make it stable, make the OS read-only
Aside from USB sticks, any ideas on alternative storage suitable for RPis (something small)? I know you can get eMMC modules that fit into the SD card slot, but I would have guessed they'd have the same issue with writes.
They are indeed using UPS', and the workloads naturally have a low write load.
I decided to do this with RPi and went through several revisions as I learned/relearned a lot about Linux. The first version was built on full Raspbian and added a basic server listening on some port or another so I could remotely reboot the things by clicking links on a simple website I put together. That build would usually crap out after a few months and the Pis would stop booting fully from the Sandisk MicroSD cards.
Most recent rev was built from the "Lite" version of Raspbian as I was looking to stay slim and have less stuff to update/run in the background/cause issues with the basic operation of a device that only needed to boot, load Chromium, and open a webpage defined in the startup script.
Those have been a lot more stable (no more reimaging a card here and there every month or two) but they still occasionally crap out and a reimage is the only option (maybe once every 6-8 months). This is in an air conditioned building with stable power, wired LAN connection, and fast SD cards. I can't imagine they would be even this reliable running all the time in any sort of "hostile" environment or even using wireless networking.
I looked into network boot but didn't really have the time or resources to set it all up on the school's network.
The default rpi os writes to disk all the time, there is even syslog with periodic messages. I bet your oil company uses read-only root, or at least a customized os which does not log things unless it has to.
I mentioned in another comment though, that the particular workload doesn't result in many writes.
The standards that require MyQ to make earsplitting noises for seconds before moving just cause headaches.
Remotes also operate differently than your wall button. Did you know that?
The project above is an open source prototype and by no means a product that consumers are expected to buy/use as is.
DIY projects get a load of leeway but this one is actively dangerous and missing really important safety features outside of the remote operation stuff in this thread. If OP is lucky it'll be the garage door instead of an arm or their car because there's no break beam or current monitoring so the motor will happily pin and crush someone unless it stalls out.
The current disclaimer in the readme just points to electric shock. Not to the wealth of known hazards from malfunctioning electric garage openers, referenced further up in the thread.