5 ms·
I made a cheap home motion sensor and controller
- pussinboots 11y agoexpounder's pretty neat, wish there was a way to click on the explanation after reading it to hide it tho
- StavrosK 11y agoI got that from other people as well. My rationale is that, once clicked, the explanation now becomes part of the text, so why would you want to hide it? You read it and move on, so there's no sense for the link staying there and cluttering the text. If there's significant demand, though, I can certainly make it an option. It sounds like leaving expanded stuff expanded bothers some people's OCD, which I can certainly understand :)
- hanniabu 11y agoI'm in agreeance with you here. I like how it becomes part of the text. It's not like your adding paragraphs and that make the page unruly longer and cause you to lose you place. I say leave it as is. I thought it was really nifty when I saw it too. :)
- StavrosK 11y agoYep, exactly. The idea is that you'd write the sentences being part of the text (as you would normally), and then just hide them behind an expounder link. You just need to take some minimal care for the next sentence to make sense, but other than that, it produces great results. For example, I like the effect it has on the "NodeMCU" link in the article, which you can click if you're unfamiliar with it and you'll get a fitting explanation. Another section I like is the "rather optional", which explains the rationale for people who may not be aware of it. An author should not fall into the trap of hiding information that's not strictly relevant to the link, though, because then they trap the user into a "okay I need to expand all the links because who knows where the author has hidden useful information" mentality, which kills its usefulness.
- mkj 11y agoMore circuit boards should have a label 'BRAINS'!
- girkyturkey 11y agoWow, I really liked this article. The entire process looked great and the explanation was rather simple.
- StavrosK 11y agoThank you! I was afraid it didn't contain enough code, or enough interesting bits. I'm glad you like it! You can take a look at the code on Github, hopefully it'll be easy enough to understand (it's a bit ad-hoc, so I don't know how much sense it will make to others).
- roymurdock 11y agoI liked the use of the Expounder tool as well. Less work than jumping up and down to read footnotes, the explanations were well-written and fit into the article flow, and the animation was quick but nice. Nicely done!
- StavrosK 11y agoThank you! I hate footnotes as well, so that's part of why I made Expounder.
- jeffwass 11y agoMissed this in the article, but how are you actually turning on/off the lights after this controller sends a "turn on" signal? Is this basically right : You have some separate receiver that the light or other accessory plugs into, which senses the MQTT signal sent from the controller unique for its channel, and turns on its connected accessory? Were those receivers custom designed as well?
- StavrosK 11y agoThe lights plug in to some cheap RF-controlled plugs, and the sensor board sends the signal with the RF transmitter to turn the plugs on and off. I reverse-engineered the timings in this post: https://www.stavros.io/posts/how-remote-control-rf-devices-raspberry-pi/ https://www.stavros.io/posts/how-remote-control-rf-devices-r... Also, I designed this PCB that's basically a wifi-enabled ESP8266 LED controller: http://dirtypcbs.com/view.php?share=16892&accesskey=996a11f93e9b6f833112ceedd77168f7 http://dirtypcbs.com/view.php?share=16892&accesskey=996a11f9... This allows you to control 5050 LEDs and change their color/intensity/etc over MQTT. I'm going to write a thing to slowly fade them to max as night falls, and make them progressively redder as I get nearer bed time. I'm just waiting for the PCBs to arrive, the prototype works fine. You can subscribe to my blog to be notified when I write that post up as well.
- alain94040 11y agoAt last year's Startup Conference, I really liked one of the pitches: Realiteer. It works with Google Cardboard, and it's the cheapest controller you'll ever see: 100% paper. And it worked really well, I tried it.
- saintfiends 11y agoThis is really cool. How does one print these PCB's after design, is there some consumer grade printer?
- StavrosK 11y agoI just send them off to dirtypcbs.com, and get 10 boards 2-4 weeks later. They're pretty cheap.
- ParanoidShroom 11y agoThat looks awesome! I made a similar thing: https://medium.com/@christophe.smet1/flux-irl-building-a-hue-clone-bd62df85a456 https://medium.com/@christophe.smet1/flux-irl-building-a-hue... Would you be interested in a collaboration ?
- StavrosK 11y agoDefinitely! Email is in my profile. I also made the same thing as you! Fits four boards per 5x5 panel, I'm going to write it up properly after it arrives. http://dirtypcbs.com/view.php?share=16892&accesskey=996a11f93e9b6f833112ceedd77168f7 http://dirtypcbs.com/view.php?share=16892&accesskey=996a11f9...
- csytan 11y agoI'm working on a project like this as well! Still in the early stages -- I just got my parts. I'm planning on using the ESP8266 chip + Arduino core (https://github.com/esp8266/Arduino https://github.com/esp8266/Arduino) controlled with a simple web-app. There's a handy library for doing the Chromecast style wifi setup here (https://github.com/tzapu/WiFiManager https://github.com/tzapu/WiFiManager).
- StavrosK 11y agoThe hardest part of the LED project for me was finding the right components (especially MOSFETs). Send me an email at hi at stavros dot io if you want to talk about it, I can also send you my KiCad files for the controller PCB (which I'll blog about after I get the fabricated PCBs).
- zyxley 11y agoFor people looking to do interesting things with MQTT messages passing between devices, take a look at Home Assistant. https://home-assistant.io https://home-assistant.io You can use it to integrate various 'smart home' devices, generic MQTT messaging, and a variety of web services.
- StavrosK 11y agoHome assistant looks great, I had installed it a while ago but didn't have time to really configure it. I should go back and devote some more time, thanks for the mention.
- gh02t 11y agoI've been using it for a while and quite like it. it isn't as flexible as OpenHAB, but I actually think that's a positive because it is a million times simpler to set up and tweak. Home Assistant really feels like the fully realized version of the various scripts and dashboards I had made myself before finding it.
- StavrosK 11y agoYep, I'm going to change all my embedded controllers to be compatible with it and blog about it. Home Assistant also led me to OwnTracks and I love that too.
- jonahx 11y agoHow hard would it be to add AI that could distinguish between human and dog/cat motion?
- StavrosK 11y agoImpossible right now, as the sensor just gives you motion/no motion readouts. I think it has a way to configure for mass, though, so it only considers large masses moving. If anyone has any information on that, please let me know, because my blind cat keeps making my lamp turn on :P
- jonahx 11y agoYeah, I think you'd have to have an actual camera image, and then you'd probably want a night vision lens of some sort... I'd imagine the logic for doing the detection might be available open-source somewhere...
- StavrosK 11y agoYeah, sounds like it. A much easier solution would be to adjust the sensitivity and put it somewhere your cat can't reach (like on a high shelf).
- squeaky-clean 11y agoI really don't know much, but was looking up exactly this because of your post. It seems like there are two ways. With a single device, you're limited to just smart placement (orienting it away from the floor or surfaces the animal climbs on) and adjusting the sensitivity of the detector, which will reduce the range and still trigger if the animal gets very close. The Adafruit PIRs come with a pot for this [0][1]. The other method, which most of the ones that seemed high quality used is a dual-sensor system, tuned for different ranges and sensitivity. Most of the commercial ones on Amazon seemed to use a combination of PIR and something else, like sonar or microwave detection. My idea for a quick "hacky" way to do it, would be double up on the sensors and place one 3-4 feet above the other and maybe use some tape on the lenses so the detection areas don't overlap. This way it would trigger for a person walking by, but not a cat walking on the ground, or jumping past a higher sensor. Awesome project by the way. I'm also working on my own home automation project as well, I'm mostly avoiding low-level hardware stuff for now, but definitely want to play with it in the future. Bookmarking this and your other posts for inspiration. [0] https://learn.adafruit.com/assets/13829 https://learn.adafruit.com/assets/13829 [1] https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor?view=all https://learn.adafruit.com/pir-passive-infrared-proximity-mo...