For someone self taught in electronics this is seriously impressive and this is coming from someone who went through the whole electronics engineering degree and decades in industry. Everything looks very professionally done, well thought out and even creating custom enclosures for it all, just excellent.
Thanks! I managed to learn only a pretty narrow path to get specifically what I need done. I like designing electronics a lot though, so I hope to do increasingly more complex projects. The mics and speaker are pretty complex and I'm not finished with those yet. After that I'm thinking about a device that decodes audio over the network and outputs 5 audio zones (amplification will be external). Audio in general is harder than simple I2C sensors!
@@NathanSweet Stick at it, you obviously have the ability and enjoy it. I would suggest for your audio project streaming over ethernet and decoding using ethernet connected audio amplifier modules that can be purchased pretty inexpensively. To build it all from scratch would be a very serious undertaking even for someone with plenty of experience who knows how the protocols, encoders and decoders work. Plus building a decent amp is quite a project in its own right. Even using pre built modules it will be an interesting and challenging project and you will learn a lot. Plenty of people on YT have done this and there are lots of tutorial videos to get you started.
Custom PCB's, going diy instead of home assistant....you've truly gone deep down the rabbit hole of home automation. Would love to see the end results as well as the how-to's
Very well done Nate, hope you eventually go into production and sell these units. This is true smart home automation like it used to be. Not all this crap these days that require an internet connection in order to “think”.
Thanks! I don't think I'll make a product out of any of this though. My boards are very specific for what I need in each location. Also, mass producing boards is pretty different, a major goal is making them as cheap as possible. When I only need one board, it doesn't matter much if it's $5 or $25. I agree, the cloud stuff isn't the way to go. Open hardware, similar to what I'm doing but more generic, is possible and there are a few people doing it, eg see "KinCony IoT" and others. The market is small for this though because most people are retrofitting and can't run wires easily, or don't want to. Retrofit is much harder to integrate well. Lastly, the software running the house is crucial. Many people want it simpler even than Home Assistant, and that's why they end up stuck with some very easy to use but cloud-based junk, like Hue. To keep it simple it can't do everything, and quickly you have 5 different apps and nothing works together.
@@NathanSweet I created my own language and compiler to do the control logic. At the moment I'm upgrading it to run on a network, as in one program running on many ESP32s networked together in a multiprocessor configuration.
@@Andrew-rc3vh I am now your first subscriber. Please consider making content about your language, compiler, and solutions! I once wrote an automation language that Microsoft now owns.
What a project! Awesome job with the POE and wall mounts! We have had a lot of success with the ESP32-C3-mini and the SCD40, so good component choices!
Thanks! I think there will be essentially no end to working on this. In the beginning there will surely be lots of bugs to keep me busy! I'm already thinking about new projects, like building some hardware to play audio on the in-ceiling speakers. I have 5 audio zones, so it'd need to be able to read audio over the network, decode, and then play on any or all of the zones at once. I think this is relatively difficult compared to watching a reed switch and the other simpler home automation tasks.
Yes, when you go with your own code, things become demanding real fast. There is all kind of work with codecs, protocols like bl if you want the wireless and multi input setup, but for easy setup, maybe using speaker switch will do, for simple control over single audio input.
@@NathanSweetI’m going to give you a huge head start on audio: One of the best things Apple ever did for syncing multiple outputs with Airplay (1) was to add a 2 second buffer on-device with precise timing info (PTP would be a modern upgrade here). They also sent volume controls separately allowing for the perception of instant response. With hardwiring it’s unlikely you need 2 seconds, but even 400ms would smooth out almost all possibility of congestion artifacts.
This video is next level. Have subscribed and would love to watch a whole bunch of different videos to learn more about your system, specifically: - How you designed these and why you designed them the way you did - What you've used previously and what you've been able to learn from that (ie assuming this isn't your first automation project given the scale) - How you plan on installing these around your house - just heaps of conduits or lots of pre-run RJ45? - Your software, how it works, how/why you built it the way you did (eg instead of Home Assistant, Homekit etc.) - House tour when all done showing all your automations - Sell these $$$! Very impressive
Thanks! Those are great ideas! I never really considered being a "content creator", but I do have lots of ideas on how home automation should work and I'm happy to blah blah about it. The wife is surely tired of hearing about it! I'll give it some thought, maybe I can show the schematics and how the software works next. Making (good) videos is surprisingly hard. I'll need to figure out a better mic, screen capture, etc. I wanted lots of conduit, but apparently it's a pain to run. I ended up running less than planned, just between major areas. Everywhere else just gets CAT6A ethernet. I'm doing new construction, so running wires is (relatively) cheap and very easy. I hope to answer everything else in a future video!
@@NathanSweet Do it! I personally would love a deep dive into how you got control of various devices, specifically anything that didn't have any sort of native integration support etc. Like how you connected to your oven and vent and reverse engineered communication sounds like it could be really interesting.
I just subscribed too. I too am hoping for my videos. Maybe a beginner's guide to how to build PCBs. He mentioned that he learned from scratch. And then maybe taking each topic and going in-depth.
Thanks! The speakers have wires attached at least, so if I drop it I can pull it out and try again. It'll be some time until the house is done, but I'll make videos of it for sure!
4:52 - I think your components & traces are quite too close to boards edge. It may cause a bit of EMI inside your house (due to edge fired emissions), a good practice is to place them about 2-3mm away from edge and place guard ring around PCB perimeter (on each single layer) sitched by densely spaced vias (depending on max frequency in your project). This does not apply to connectors. And as I don't see if that's 2L or 4L boards - never route over split in reference plane. This wrecks signal impedance and integrity heavily. If you really need to cross another trace (which is on your reference plane, mostly due to 2L design) - always do it at right angle (to minimize cross-talk). Don't route parallel traces if you don't really need to (eg. differential pairs). Especially above 10MHz frequencies it starts to cross-talk like crazy (not speaking about signals like USB HS+). (This is mostly due to YT having bad bitrate, but also useful for readers): always have GND via near PWR/SIG via (really near, as close as DRC allows). This improves signal integrity and reduces power delivery impedance which is really important, especially with high-frequency MCUs, SOCs ora FPGAs.
I'm a noob, but I've put a lot of effort into learning PCB design. Happy to have more eyes on it! You're right that board has one trace close to the edge. I can't make the board bigger in that direction, else it would hit stuff on the wESP32. I could make the whole board bigger, but then I'd also have to remake the box and lid. The 0.6mm trace is normally pulled up (weakly by internal pullups in the IO expander) and is grounded when a reed switch is closed. It so rarely changes that I don't think it's an issue being close to the edge, plus it's just the one trace for ~18mm. I've read copper fills next to traces do very little and can even be detrimental, so much that it's recommended to not use copper fills on signal layers at all. I've since modified all my designs to use more fill clearance on signal layers and mostly only fill around the edges. It's not worth redoing all the boards just for that, but the chances are high most get redone yet again for some dumb reason! All the boards are 4 layers, except the mic boards (faceplate and daughterboard) which are 6. The 4 layer boards all use an SGGS stackup,with no traces on GND layers, as you mentioned. They have 0.0994mm between SG and 1.265mm between GG. The impedance control isn't necessary but I like the idea of having signals so tight with GND. I have very few HF signals. I run I2C at 50kHz when speed isn't important. A few boards use SPI for an ADC, but I run it slowly too (78kHz) just because it doesn't need to be faster. Those are my fastest signals, except for the mic boards. Those have a lot more going on: I2S with 2 mics, DAC, Xmos w/ 24MHz oscillator, SPI for LEDs and Xmos, I2C for a bunch of sensors.
Thanks! I'll make some new videos when I finally get to install and play with everything. It's looking like that won't be until April 2024. The wait is brutal!
Thanks! I hope you make some videos when you get a chance! There's a lot of retrofitting, throwing around some Hue bulbs, and robot vacuum videos but very little showing custom PCBs.
I restarted this one a couple times, almost gave up, then tried again and did the whole take, then posted! I never imagined it would get so many views, so I kind of wish I had spent a little more time on it. I missed a couple cool things! I'll try my hand at making some more videos soon and see how it goes.
Nate, I can't wait to see more of this stuff. I've been starting to do something like this, so it is very encouraging to see somebody else doing it so well. I hope to see this stuff in action sometime!
The wires from the faceplate to the microcontroller need to be pretty short for some relatively high speed signals: SPI for LEDs, I2S for mics, and I2C for sensors. The rest of the connections are power (1.8V, 3.3V, 5V), sensor interrupts, and lots of GND. Those are mostly OK for longer wires, but the higher speed signals are best kept short. I think jamming it all through the wall mount will work!
Well done Nate. Good stuff. I've subscribed and find this very interesting. Am about 2/3 of the way through the same sort of process for my farm as you are for your place.. Sooo many decisions to make as to what works best / what works easiest / which has the easiest development / how to incorporate expandability / which is easier to build ... etc. So I doff my hat to you sir.
Nate, you are my new hero. I’ve been tinkering with home automation for at least 20 years. When I started there were a lot fewer options for putting the processors close to the signals and I/O. Everything I’ve done is hard wired as well. Basically I had to bring all signals to one location, then processed with OPTO22 I/O analog and digital input modules. Obviously I had to incorporate lots of signal conditioning like converting analog temperature sensors to 24v pulses using pulse width modulation. You are truly in the next generation of brilliance. If you are interested in marketing your inventions, I’m interested in helping, (I’m close to retirement age) but if that’s not your objective, why not consider open sourcing your system. What a wonderful thing that would be for thousands of like minded individuals. Your engineering sounds spot on, imagine how quickly improvements would come about with hundreds or even thousands of smart individuals working on it all the time. Just a thought thanks so much for sharing your incredible system with us.
Thanks! Your system sounds cool! I looked at Groov briefly in the past, but it didn't seem approachable enough for me at the time. Opto 22 does hardcore industrial applications. I don't have plans to sell things, too much work. I'm happy to share designs in future videos though! It's all relatively simple stuff, just sensors here and there, a little code to send it to a central computer. Lots of pieces but individually none of them are terribly hard.
Very impressive. As someone that dreams of doing this, this is very impressive. This is your first video i have watched. Looking forward to more. Hopefully you do a video on the implementation on this.
Really impressive! WIsh you the very best and be sure that I'll watch more content from you if you continue making videos. As someone mentioned, it would be very interesting to know your trajectory to be able to build this, specially since you are self taught! Also I imagine hearing about the software side of things would be incredible
Thanks! I made a video after this one about how to get started doing similar projects. I'll make more videos after the holidays, first to show using a reflow oven and then some details about the boards and the software that orchestrates everything.
That's some amazing work, Nate, thanks for sharing! I particularly approve the use of RS-485, the I/O expanders (PCA8575, maybe?) and the optocouplers!
Thanks! IO expanders are MCP23018. RS-485 is great! Though I realized in retrospect I could have used CANbus for the laser sensors, since that's where I have multiple sensors on one RS-485 network. Theoretically if they talk at the same time, both communications would get corrupt. However, in practice I blocked 2 sensors at the exact same time and never got messages to collide. I think the MAX13487E RS-485 IC might be helping. It's half duplex with auto direction. Maybe the auto dir has an advantage in that it sees another device is communicating and buffers for a short time? CANbus has collisions, error correction, and other things built in. It seems great and this would have been a chance to try it out. On the other hand, those features would take some time on the bus, slowing down the sensor reaction, unless I increase the bus speed. I run it slow at 9600 baud 7E1 so there's some headroom. Not worth redoing the 14 (!) sensors though, so I'll keep CAN in mind for next time.
Outstanding work!! 🤩 I’m designing a 3DCP self build and this video is extremely useful for automating the home when complete. Thank you, just stunning work!
Absolutely incredible! This is precisely what I am looking to build. I don’t like the idea of home automation being connected to the cloud and ultimately controlled by a company! I am a qualified electrician and passionate C programmer so the idea of marrying the two has been a dream for a while! Thank you for the inspiration, I very much look forward to your future videos
Thanks! You're way ahead with your electrical and programming knowledge. All you need to do is design a circuit, learn DipTrace or similar software, order some boards from JLCPCB or PcbWay, and solder them. I use a modified toaster oven (see Controleo3) to do reflow soldering. That's waaaay easier than an iron, 5 minutes and the whole board is soldered.
looks about right. It's amazing what we're capable of today with relative ease (imo) thanks jlcpcb for opening the gate to allowing nobodies to make their own PCBs without having to carve out their own copper etc..
It's too much work to make products and I think would rob some of the fun. I'm just doing this for fun, so I'm happy to share the designs and maybe they inspire others. I probably won't share the software itself, as it's pretty specific to my house, but I'll show how it works in future videos!
Awesome project!! All of your boards and designs are extremely clean and impressive, and you use a ton of different MCUs which I love. Do you mostly use software packages or have you written a lot of the sensor reading and automation yourself? I’d love to see a walkthrough of it
Thanks! I try to use an existing library to talk to a sensor, but sometimes they aren't great and I cut them down or re-implement them to just do what I need. Most of them are pretty simple but it helps a lot to start from working code. I'll do some videos of the software in the future!
Amazing the thought and time you put into this. Changing the subject: I want a setworks for a sawmill. Possibly point me in the right direction. I have no idea where to start. Setworks tell where you started the cut on the log so when you raise the sawmill head to return to make the next cut you can start right where the blade was when you started the cut. Then push a few programmable buttons to let the head move down to say cut a 2x4 , and then the next cut might be a 2x6 or even a 4x4 and so forth. It would require a waterproof screen that could you could read in the sun. These can be bought ready made ,but start at about $2,000 so that’s out of the question for me. Thanks and again you are a very dedicated guy that doesn’t stop till you get what you want.
That's an interesting problem to solve. I don't know how the blade moves, so it's hard for me to say. I would guess copying what the expensive solutions do would be your best bet. They analyzed it with a lot of domain knowledge and that's what they came up with. I wonder if a physical solution can be done? Maybe it doesn't have to be electronics. Keep it simple if possible!
I don’t mind studying your lessons to learn which way to go. Whether raspberry pi or whatever. Whether it be python or what. The horizontal travel is a thing that is adjusted with a variable pot as you see fit as far as the hardness of the log or how dull the bandsaw blade may be. The up and down is where I can’t guess how to control. There is a 12 volt motor that controls up and down that is controlled by a reed switch for a manual up and down. That’s what I want to mechanize.
I envy you! Home automation on a plain field. I do some in an old house in Spain, no way for new wires, have to disentangle the old wires. One advice, document everything, in case you have to make adjustments years later. (I'm 70 now, trust me.)
Retrofit is harder! Wireless is usually the only option. Solid walls make it harder still, as you can't run wires easily AND it reduces wireless range significantly. Definitely! I have pics of all the walls and ceilings before drywall.
All these comments and you're the first to consider how cool the DMX part will be! All the can lights and LED strips in the house are DMX, and all the landscape lighting too. The can lights are special 5 LED lights (red-orange, green, blue, mint, lime). The LED strips are RGBW -- over 800' of LED strips. The landscape lights are RGB. There are DMX to 0-10V dimmers for a few non-DMX fixtures. I'm super excited to be have so much control over every light! Definitely will make a video, but it'll be a few months before the house is done.
This is a great project. I'd make sure to fuse the irrigation system if you haven't... pretty common failure is the solenoids wear out in the sprinkler valves and short to ground.
Thanks! That is a great idea! I don't have a fuse, but made a note and I'll add it if I do another revision on the board. Or I could put it inline, before the board, but it'll make my install uglier. I have an R100 and C0.1 snubber for noise from the solenoid's inductive load, but it would only help a short slightly. I also have a TMCS1101A4 current sensor. The valve is 350mA max inrush. I watch for current > 400mA and turn off the SSR to cut power to the valve. The SSR is rated at 1.6A and the 24VAC transform 1.8A (a big sucker). I collect current data for ~12 60Hz AC cycles (~200ms) before shutting down because the current sensor is a little noisy I want to be sure it's a real overcurrent event. That's quite long and while the transformer and SSR might survive, it's not good. A fuse is a good idea!
Well done! Looking forward to see how all of those compute devices work out. I hope you have backups for power outages and lightening strikes. Definitely giving me motivation to follow a similar path.
Thanks! I have a whole home surge protector (Siemens FS140, 140k amps). It may help from a nearby strike or similar, but just about nothing can survive a direct lightning strike. I have Enphase photovoltaic and batteries (4x IQ10, 40kWh). The roof panels should be able to run the house without mains power, with enough to storage to last overnight, but can't power ACs. I'll have the PoE switch on a UPS, so when the mains goes out the switch and all the PoE devices will stay powered until Enphase kicks in, a second later. It's a fun project, but only if you enjoy the tinkering and are willing to accept some down times when bugs inevitably strike.
That's an amazing amount of good job you've done there. My only concern after building custom stuff myself is how on earth anyone would ever be able to replace it when it breaks. But I guess that goes for everything electronic, also commercial stuff.
Thanks! For me to replace something is very easy: order a new PCB (or use a spare, as they come in quantities of 5) and solder parts on. It's actually nice knowing that if anything goes wrong I can easily replace a board. If I'm gone and it's someone else who needs to replace a board, yeah that is trickier. If they have my design files they could do the same as I would with a little effort. I just posted a new video of the process!
Well done! Perhaps have the speaker installed, but wrapped in cellophane and then remove that after mudding and painting. That might be easier for you - remember wiring the leads too.
Thanks! I wanted the speaker (and electronics) to be serviceable without breaking the drywall. The drywall mounts are already installed and the parts _should_ fit through the hole. The speaker has wires attached, so there's less chance I drop it in the wall. The main thing is some locations don't have a lot of depth and it'll be a tight fit.
Very impressive. Any pointers on how you learned multi-layer PCB design on your own? Would love to see some tutorials on your self-learning of electronics as well as enclosure designs- these are fantastic looking enclosures and PCBs. Great work.
Thanks! You're in luck, I just posted that video! It's pretty high level, but it covers roughly how I got here. Also it's unscripted, I hope the rambling format is OK. If I read a script then I sound like a robot, so it's the only way I can make videos.
I've been working on my own home automation electronics as well, and since I'm doing an old house (1972), retrofitting is extremely difficult (as you mentioned in an earlier comment). I've been trying to rewire a lot of the house, but that causes it's own issues. I'm a big fan of Home Assistant and my current project is trying to automate my HVAC setup, which is currently a 4 zone, damper controlled system. These systems are not cheap, and have very little programmability, so I want to create my own so I have much more control over it. I was planning on doing some videos on my design and work, and you have encouraged me to do so. Maybe we can do some collab in the future.
Yes, please! I've subscribed in anticipation! I want motorized dampers, but I haven't been able to get any info from the HVAC sub on how they would be controlled. They aren't on/off, so it must be more complex than a relay. Maybe multiple relays to reach various opening presets.
@@NathanSweetThe motorized dampers I have are all PWM, so that's pretty simple. I'm using Nest thermostats, but want it to basically be able to use any (4 to 6 wire) thermostat and control a central HVAC setup. Maybe even smarter and go as low as 2 wire for furnace only or 3 wire for boilers/water heat. I definitely like your idea of RS-485 for communications to sensors and such. This would allow up to 256 devices on the network. Now I have to go and do some design :)
Oh, BTW, the channel that I will be doing this on is my Hippie Redneck Geek Builds Stuff ( ruclips.net/channel/UCzs1vC0CCknCEEzFag4sb_A ), not this account :)
Simple on/off to call for heat or cooling is easy without needing a thermostat. All you need is temp sensors (eg ZigBee or hardwired) and something central for the logic (eg a PC running Home Assistant) to control relays or optocouplers to close the contacts. My inverter type HVAC is a little more complex because it's not a simple on/off. I have to set the target temp and let the Mitsubishi HVAC controller do the rest. Then since I don't have thermostats, I use temp sensors and tell it the current room temp. The number of devices on RS-485 can be pretty high. I wouldn't try to push the limits. 6 is the most devices I have on a single network, but 32 or more should be no problem. I see your channel, subbed!
Awesome work! I am going to dive into pcb design soon. Your video is very inspiring. Was hoping to find some tutorials on your channel. Maybe in the future??
this is really cool stuff.. you should get in touch with lock picking lawyer and see if he can infiltrate your system.. could be entertaining and informative for everyone involved! thanks for sharing!
Thanks! Oh yeah, I have piles of boards that have some tiny error here or there. It has to be exactly right or it's time to make yet another board. I should make a video showing my early abominations and how they evolved into these beauts. I learned a lot since I started 2 years ago, but I am still finding new ways to make mistakes!
what lasers are you using? it would be cool to see everything working! Are you sharing any code or planning on making "how to" videos. this is soooo cool!
The lasers are AFBR-S50MV85G. I would love to see everything installed and working too! It's been sooo long. It'll be ~4 more months until the house is done and I can show the finished projects, but I'll make some more videos in the meantime about how the things were built.
Thanks! It will still be 4+ months before the house is done and I can show the final installs. I'll be sure to make videos of that, plus some videos in the meantime showing how these were built.
Amazing job, looking forward to see more videos where you could share with us more in details how was the process and when it is all installed. You have now a new subscriber
Very cool. I'd love to get more details on your sprinkler board, I'm more of a software guy, but I dabble in hardware. I'd be interested to see exactly how you measured the current on the sprinkler solenoids to help tell if there's a bad one. What part did you use to measure that, how it's hooked up. Thanks! I'm using Home Assistant, but am making some custom PCB's with esp32's on them.
Thanks! The current detection was a real pain. It's not actually a required feature for irrigation to work, but I wanted it because it's neat. It uses a TMCS1101A4B current sensor. The output is an analog voltage centered in the supply voltage, so 1.65V for my 3.3V supply. It measures AC, so the output swings up and down at the AC frequency. I had trouble getting a good signal into the ADC, first with no RC filter, then I screwed up the RC filter. See here: bit.ly/TMCS1101-output Next I got a decent signal, but it wasn't 1.65V with no load. It was offset from the center, and it shifts over time. That fun is here: bit.ly/TMCS1101-accuracy TI recommended using a voltage divider, then later said that probably causes the offset. Nice. In the end I measure peak to peak, so I don't need the offset to be stable. It's 60Hz AC so I collect min and max values for ~3 AC cycles before checking the current. If I see the current high 4 times, irrigation shuts down. That means there is ~200ms delay before shutdown if a valve fails by shorting out. As someone here pointed out, I should have a fuse for that case. In the end the current sensor works OK, but there's enough noise that I get false positives under 20mA. The irrigation valves are 190mA typical and 350mA max, so that's acceptable. In addition to detecting valve under and over current, the flow sensor let's me detect too much and too little flow. It makes for a pretty fancy error detection system! I'll do new videos and eventually cover every board, so I can show more details then.
@@NathanSweet Wow, thanks for the great explanation. I'll await your video on this board. The sprinklers is a lower priority project for me, so there's no hurry. I also like that you are checking for solenoid problems. Not being much of a hardware guy, I look over the data sheets and try to figure parts out that way, as well as look over schematics others have done to get ideas.
Amazing. Would love to do something similar if I had the time and energy. But considering that I used mostly off-the-shelf parts, I’m pretty happy with what I’ve put together. Would, however, love to make a wired version of my smart mailbox video with a mains powered lock.
Your mailbox looks really cool! I'm envious, that's one thing I don't have. Unfortunately my mailbox is about 2 blocks away from the house -- a big block of mailboxes for the whole area. I'd need something wireless that could also get the message very far. Seems hard. It'd need to be something like a cell phone. Getting power out to your mailbox is the hard part. Code for mains power is something like 18" deep in metal conduit -- that's a lot of trenching. You'd probably want to use low voltage with ~18AWG wires, conduit is still nice. Voltage drop won't matter since you'd regulate it down to what the device(s) need anyway. I think you'd make a board that regulates the voltage to what the devices want, then hack the devices to use that instead of a battery. That's pretty easy to do, a good first PCB project if you've not done it before!
I've never installed or even used KNX. I've only read a little about it and my impression is that it's very complex to install and configure. It reminds me of "enterprise" software solutions. Given it's so hard for me to understand, I think it's overkill for my simple residential usage. It is interesting you learn it in school, I assume for working in commercial/industriual settings. For lights, dimmers, and relays I use DMX512. I'll make a video showing that when the house is done. DMX is reliable (wired, differential signaling) and I love how simple it is (each device gets an address up to 512) and very easy to integrate (send 512 bytes at 40Hz). DMX is one-way though, so doesn't work for sensors or many other situations where KNX would. I have my custom electronics (in this video) for sensors/etc. It's unusual to see DMX in residential, but I think it's going to be amazing!
@@NathanSweet every "normal" electrician in germany learns it in school. it is for big and small. in our company we build it in normal one-family-homes as well as in bigger comercial buildings (not so in industry). it is not even programming... it is more like "linking" stuff together. i like it because the stuff u build in lasts forever (25 years no problem). and when something breaks you can choose from about 500 brands because knx is not proprietary. my boss made a lot of knx in his youth (~25years ago) and sometime i have to replace defective parts you wont get anymore but no problem - just choose a similar part of any brand and it will work. and every electrician could fix it not just us.... this is what i like: longlivity, easy acces for everybody, no brand limitation
Interesting, that does sound pretty nice! Maybe I should have looked into it more closely. Does the logic get built into the nodes? I like having my computer for central control, so it makes all the decisions about what happens in the house. Having the state and logic all in one place in nice.
@@NathanSweet for using logic you need locig modules... but the better was is to use a "GIRA Server". In knx you normaly dont have a central logic unit but with the gira server (smal mimi pc) you can handle all the logic you want... but it is kind of expensive...
I see, thanks for the hint! It looks like there are many Gira products even beside the server/controller: switches, screens, etc. To use a Gira server for KNX I'd still not want it to be the central controller, rather I'd interface with it from my own software. The reason is that there bound to be other systems that Gira can't control: ZigBee, Pentair pool equipment, Spotify, my own sensors, and others. Maybe that makes Gira not a good fit and KNX integration would be better at a lower level. Many systems want to be the central controller and don't provide good integration options. That's the main problem for home automation: bringing together disparate systems so they can work together.
Impressive work, i had the same idea some time ago but ended up in nothing. At that time i was mostly worried about maintenance, in the form of lack of time to do it when needed or lack of replacement parts when needed. How do you intend to manage it?
The nice part about making the PCBs yourself is that you can easily replace one if it breaks or otherwise needs to be fixed. I plan to spend a lot of time making the software good and ironing out any problems. That's a big part of the fun!
Very nice adventure. The speaker/mic combo for in wall mounting is interesting. Hope you have done some prototyping phase during which you pre-tested that mounting. Same for the 'rock' sensor. Else you might have some 'design' surprises.
This looks awesome!! Hopefully one day I can take on a project like this. Also do you plan on making any tutorials, because I would be really interested in the design process and than how you made it all connected and coded.
Thanks! Check out my new video about how to learn to do it yourself. It's not a tutorial but I hope helps you understand what's involved and what to learn next. For some reason the new video doesn't get as many views.
@@NathanSweet Yeah I saw it after I wrote my comment oops. I thought it was great! Definitely gave me an idea of how the process looks like and how I can approach something like this. I went to learn about circuit design and electronics immediately after watching it 😅
This is a cool design! I can appreciate the attention to detail on all of this. Curious if you'd ever take a crack at trying this out inside of ESPHome with Home Assistant. It would allow you to program a lot of this stuff over the air and might make managing the automations easier?
Thanks! I have my own equivalent of Home Assistant, though it's to solve my specific home automation needs rather than be something useful to everyone. That makes it a lot easier to build, and lets me customize it to work exactly how I want. Similarly, I don't use ESPHome, instead I just write the code for each board. I can send new firmware to my ESP32 boards via ethernet. For the STM32 boards that are connected to the ESP32 boards, I can send firmware to an ESP32 via ethernet and it forwards it via RS-485 to the STM32 to update its firmware. This lets me update ALL the boards in the house remotely, so I don't have to dig around in the attic and whatnot.
This looks amazing. I'm working on my own new house build and will be following closely to see how the implementation looks. Super interested in the radar, driveway sensor, stair sensors and hood vent. Although, I think I'd like to run everything through home assistant instead of a custom implementation, simply due to laziness, haha.
Man I am blown away! This is something! Excited to see the follow up and would be very interested in how you connected them all throughout the house and especially the brains of your system! What made you decide to build your own system? Do you have any technical background or all self thought? Either way, amazing project looking forward to your update!
Thanks! I've always liked home automation and have done a few retrofit systems. In particular circadian lighting is important to me. I got the chance to build a new house, so naturally had ideas. I started wanting force sensors in each stair, so learned to build the circuitry for that, (poorly) using through hole components. Building my own PCB unlocked all kinds of ideas! I eventually learned to make proper schematics and PCB layouts, and to solder with a reflow oven (which is much easier). I didn't have experience building electronics before starting, so I've rebuilt some of these boards many times. Any little mistake and the board is ruined! ChatGPT is a great tool for learning electronics, designing your circuits, and researching which parts to use.
Nice project and a lot of work invested. The only issue I noticed is the speaker willl buzz if it is not firmly supported in the mounting frame. I am interested in the software side as wel and am particularly curious about your text to speech and voice recognition and how you are accomplishimg these without web services.
The speaker has a rubber surround and the 3D print is such that it is a tight fit. Eg, it stays in firmly enough to hold it upside down without risk of it falling. The speaker doesn't sound great, but it's the best I could find meeting the requirements. The other speakers I tested were much worse. There's no replacement for displacement, as they say about speakers, but I just can't fit a larger or thicker speaker. I'll mostly use it for beeps/boops, though I also plan on making an intercom or voice broadcast system (dinner time!). The speaker is made for use in an intercom. Music on it doesn't sound good at all. For voice recognition check out OpenAI's Whisper project. They even have a command based setup, where you list commands in a text file, it listens, then reports the most likely command with a confidence percentage. It's great! Much relies on the mic pickup and background noise though.
Can you share your roadmap of learning electronics and circuits design? What books/courses if any you picked or which forums/sites were the most efficient for you to gather knowledge?
I've posted lots of it in comments on this video. Basically you start out getting an LED to blink, then move to more complex circuits. Then you design a PCB in DipTrace or similar, have it made, and learn how to solder it. You'll also need to learn a little bit about programming the devices. After doing it a few times you get the hang of it and can make more and more complex devices! I'll make some new videos covering my journey into this hobby.
Really nice setup. I am in the process of customizing my home automation. Also learned electronics and pcb design from scratch myself, with a lot if reverse engineering of some other designs too. I am a Linux software engineer, with some arduino and stm32 and esp32 experience (as hobby, and very little, but i am good at assembly, c, servers and other languages), so will make my own system because really all commercial stuff i tested, used or seen is total crap, including professional stuff like knx. Also ovwr 2 years in preparation, but i maybe sit one weekend once a month to progress a project a bit. Will be using a mix of esp32 and stm32f3 mosly with ethernet, or wired stuff using optoisolated rs485. Have prototypes of some simple sensors and relay boards (with power measurements), but still some to go, including protocols and autodiscovery, etc. This laser sensors are cool. I want to use PIR sensor, but i think i will try that tof sensor, as it could have interesting applications. Ps. It is not ethernet or ethernet cablr. Ethernet is protocol, could run on many types of media, and i standarized. What you do is use copper twisted pair cat5 cable, with rj45 jacks. I prefer to use smaller 6p jacks and cables for lowish speed serial protocols, as they are more flexible and smaller, and makes it harder to plug things incorrectly. Cheers.
Thanks! Your plan sounds very similar. I agree, KNX seems overly complex. There is one standard that is quite good: DMX512. It's one-way, but it's simple, reliable, and there are a good number of devices that support it. Using DMX for lighting, dimmers, 0-10V dimming, and relays simplifies a lot of things for me and means I don't have to deal with mains voltage. It's easy to control via a USB gateway like the Enttec USB Pro MkII. That one is sadly discontinued but can be found on Ebay. The lasers are neat, but the detection beam is very narrow so doesn't obviate the need for motion sensors or similar. I use them like a break beam sensor. It's nice that they don't need a reflector. Oh well, I will likely continue to call it ethernet cable, like everyone else. :D "I'm using cable designed to carry the ethernet protocol for my RS-485 communication", it's just unnecessary.
It's written in Java. It runs on Windows and Linux (I detest Apple as a company). I develop on Windows but the server in the house will be Linux for stability. I posted a little about it in this other comment on this same video: ruclips.net/video/pS5DQIiOTp8/видео.html&lc=UgydZs5qYLH4dy0DYLp4AaABAg.9xTKK2bOCot9xUklMRVwep To show the software (and later the house) I have to get over making the floor plan public. I guess it's not a big deal, but it feels a little private. I'll likely make a video later, sub so you don't miss it!
I see you used an XMOS module; they actually have a great Ethernet AVB implementation which you could use for precisely synchronized multi-zone audio. The full AVB implementation may be a bit overkill for home use, but at least when I was working with them the implementations were all open source and fairly modular.
This is amazing. You must have learnt so much from all this, hope you keep going. I'm starting to think about home automation as I'll be doing some major work on my house in 15-18 months. I completely agree with the wired approach. What concerns do you have if any in terms of power efficiency with long wires and POE and what not. I'm sorry I know exactly sure how to articulate my concerns, lack of knowledge mostly. I was thinking of getting large 4, 8, 16 relay units and wiring them up as needed. I love the way you've built the reed switches, how are you going to wire them to the reed switch sensor itself, is it just a pair of twisted cable to the door etc, are you going to build them into the doors so it's not visible, etc? One last question since you've gone through this whole path, where would you recommend to start from to learn electronics? Any does and don't to watch out for?
Thanks! Long wires can cause voltage drop, add capacitance, and have reflections. I use 18AWG for some of my runs and that's plenty fine for my distances. You can look up voltage drop calculators, else just use larger diameter conductors. Some runs I use 23AWG CAT6A, but I often have unused twisted pairs so I use those as additional power and GND wires. If you are just giving power then voltage drop is probably all you care about. If you are sending signals over long wires, you need something like RS-485 or CANbus to do it properly. The reed switches have 18-2 cables run to them, that's 18AWG with 2 conductors. The switch is just wired between the 2 conductors and I'm sending 24V through it. When the reed switch is closed, it turns on an optocoupler and that lets my 3.3V microcontroller know it's closed. The optocoupler isolates my lower voltage microcontroller from the 24V. A relay board can be useful for many things. You might want to consider if on/off is sufficient. For lighting you might want dimming and color control. There are a few ways to achieve that. Hue bulbs are the easiest and can be retrofit. As for learning, choose a simple goal, read a lot, implement the goal, and repeat with a new, more complex goal. Eg, blink an LED, then use a switch to turn an LED on/off, have your microcontroller turn a relay on/off, using I2C to talk to a sensor, etc. There's no one source to learn from. It could be books, but the internet is more convenient and faster. Definitely use ChatGPT, it helps a LOT. As for things to watch out for, mostly read the datasheets. That includes for your microcontroller! ESP32 has some gotchas on which pins you can't pull up or output, I mentioned them in the video. Use 10K or 4.7K pullups on both SDA and SCL lines for I2C -- that isn't always mentioned because people assume you know.
Thanks so much, I have some CAN bus boards to mess around with my car, so I think I’ll play around with that and see how I get on. Thanks for all the advice.
1) Reed sensors: what cabling are you using to the reed sensors? It's pretty standard to cable up CAT5 to doors etc., but then you're left having to somehow patch the individual cores within the carrier cable to the input terminals on your board. How do you achieve that tidily? I'm looking at a great system called OXRS Rack32 which basically provides a rackmount IO with CAT5 jacks that you can patch straight in, but your board is really nice and small. 2) Re the pressure sensors (bed and stair) what actual sensors are you using? 3) Re the bathroom sensor, it's a sensible design, but given its position in the bathroom how do you plan to prevent corrosion from humidity? It's a lovely project and I wonder if you have the bandwidth to publish docs / BOMs / schematics etc for the community? I'm really interested in that audio sensor device. Could it be adapted for use as an audio presence sensor?
1) I used 18-2 cable for the reed switches and I'm sending 24VDC through it. I use nice (if stupidly expensive) Phoenix Combicon DFMC connectors to connect to the board. I considered having just 1 common plus 21 connections for the sensors, but decided it's cleaner for both wires to go to the connector instead of joining 21 common wires externally. Using ethernet, likely 4 23AWG wires twisted together would fit in each connector position. It accepts up to 16AWG. Rack32 is interesting, I hadn't seen that one before. This is roughly equivalent to the wESP32 in my projects, though at first glance it seems to have fewer features (fewer GPIOs exposed, lacking 5V/12V output from PoE). I don't think you'd want an ESP32 per reed switch, but you could make a daughterboard pretty easily, just like I did. 2) The force sensors are Tekscan Flexiforce A201 for the stairs. The bed is A401 (the same but larger sensing area). The stairs are designed with Z-clips to attach the treads. It's too early to see how well the sensor placement will work. It seems like a good plan but worst case it'll need to be revised a little. 3) I forgot to mention in the video, but the bathroom PCBs and any PCBs exposed to outside air (it's a coastal environment) have a conformal coating. I used MG Chemicals 422B, which is a silicone/acrylic hybrid. Nasty carcinogenic stuff! Honestly that is probably overkill. The bathroom sensors will turn on the fan when humidity is high, so while they will be exposed to humidity, they also ensure it's not for long. I'll likely do another video to cover some of the schematics and other aspects. I'll post the design files there! The mic boards are the least fleshed out of them all. While the Xmos microcontroller does beamforming and other fancy processing, I hope to stream the audio continuously to a computer for processing with OpenAI Whisper. I haven't gotten that far, so we'll see if I need multiple computers running Whisper since I'll have 7 mics. All that said, it should be easy to detect the volume level and use it for presence. That's somewhat limiting, since TV or music would keep it triggered, but it could still make sense for some uses (maybe as part of the house alarm system).
@@NathanSweet Thanks for the detail. I've seen audio sensors used for presence detection, more for keeping lights on as opposed to turning them on - Loxone is a company that produce an audio presence sensor if I recall correctly. Perhaps mmWave is better but I've not personally had a lot of success, I guess it depends on the type of room / location / noise from other sources. Regarding cable management, I guess you will have those 18-2 cables (I think we call them "bell cable" here) just coming out of the wall in a central location? Or will you adopt some kind of patching arrangement? (Sorry it's a dull question but I was just interested!) Looking forward to following along with these projects!
@@MatSmithLondon Some people leave their TV on all day, but I guess keeping the lights on when TV or music is on makes sense. I might incorporate that for presence! Re: mmWave, indeed, I tried the Aqara FP2 and it was really poor, ghost detections all over the place. Yep, the 21 reed switch cables go to a closet where the box/PCB will be. That hasn't been made tidy yet, but you can see them here in the back: n4te.com/x/8763-kBDF.imb
Sure! I'm using Lutron LOS C motion (occupancy) sensors. These are hardwired and use both IR and US (ultrasound). US gives them higher sensitivity, which I'm hoping will better help detect occupancy when there is little movement versus just IR. US can be turned off if it proves problematic, eg outside maybe it's too sensitive and detects lizards or grass moving in the wind. There is very little information about these particular sensors. I sure hope they work well! I'll have 30 of them carefully positioned throughout the house, mostly inside but a few outside. There are none in the bedrooms. I don't actually like Lutron as a company, as they are closed/proprietary and difficult to integrate with. I have Lutron only because I want to use their shades and keypads. I couldn't find many options for high quality motion sensors and I already had Lutron, so I figured I'd also use their motion sensors. Ironically I don't use Lutron for lighting at all. All the lighting is DMX, which is not usually done in residential. That should be interesting!
I've been eyeing Go for a long time, but haven't actually tried a project with it. I'm using Java as I know it well and the tooling is great. I use libgdx for my UI, so it's also Java but can run on the desktop or mobile and renders using OpenGL. It's client/server and the whole state of the house gets sent to the UI if it changes. The UI uses Spine for animations of doors opening and other events.
Thanks! But not really! I just focused on each part and learned what was needed for that. There is a lot more to learn! I had to rebuild these boards many times to learn how to make all the mistakes so I could finally make them without the mistakes.
For someone self taught in electronics this is seriously impressive and this is coming from someone who went through the whole electronics engineering degree and decades in industry. Everything looks very professionally done, well thought out and even creating custom enclosures for it all, just excellent.
Thanks! I managed to learn only a pretty narrow path to get specifically what I need done. I like designing electronics a lot though, so I hope to do increasingly more complex projects. The mics and speaker are pretty complex and I'm not finished with those yet. After that I'm thinking about a device that decodes audio over the network and outputs 5 audio zones (amplification will be external). Audio in general is harder than simple I2C sensors!
@@NathanSweet Stick at it, you obviously have the ability and enjoy it. I would suggest for your audio project streaming over ethernet and decoding using ethernet connected audio amplifier modules that can be purchased pretty inexpensively. To build it all from scratch would be a very serious undertaking even for someone with plenty of experience who knows how the protocols, encoders and decoders work. Plus building a decent amp is quite a project in its own right. Even using pre built modules it will be an interesting and challenging project and you will learn a lot. Plenty of people on YT have done this and there are lots of tutorial videos to get you started.
Very inspiring! Wish to see more videos on your channel. I've also recommended your channel to many of my like minded friends.
Custom PCB's, going diy instead of home assistant....you've truly gone deep down the rabbit hole of home automation. Would love to see the end results as well as the how-to's
Very well done Nate, hope you eventually go into production and sell these units. This is true smart home automation like it used to be. Not all this crap these days that require an internet connection in order to “think”.
Thanks! I don't think I'll make a product out of any of this though. My boards are very specific for what I need in each location. Also, mass producing boards is pretty different, a major goal is making them as cheap as possible. When I only need one board, it doesn't matter much if it's $5 or $25.
I agree, the cloud stuff isn't the way to go. Open hardware, similar to what I'm doing but more generic, is possible and there are a few people doing it, eg see "KinCony IoT" and others. The market is small for this though because most people are retrofitting and can't run wires easily, or don't want to. Retrofit is much harder to integrate well. Lastly, the software running the house is crucial. Many people want it simpler even than Home Assistant, and that's why they end up stuck with some very easy to use but cloud-based junk, like Hue. To keep it simple it can't do everything, and quickly you have 5 different apps and nothing works together.
@@NathanSweet I created my own language and compiler to do the control logic. At the moment I'm upgrading it to run on a network, as in one program running on many ESP32s networked together in a multiprocessor configuration.
@@Andrew-rc3vh I am now your first subscriber. Please consider making content about your language, compiler, and solutions! I once wrote an automation language that Microsoft now owns.
@@NathanSweet If you don't want to sell them, would you consider going open source for the hardware and software?
What a project! Awesome job with the POE and wall mounts! We have had a lot of success with the ESP32-C3-mini and the SCD40, so good component choices!
This is next level Nate. Imagine how amazing this can become if you keep learning and tweaking for 1 - 2 more years.
Thanks! I think there will be essentially no end to working on this. In the beginning there will surely be lots of bugs to keep me busy!
I'm already thinking about new projects, like building some hardware to play audio on the in-ceiling speakers. I have 5 audio zones, so it'd need to be able to read audio over the network, decode, and then play on any or all of the zones at once. I think this is relatively difficult compared to watching a reed switch and the other simpler home automation tasks.
Yes, when you go with your own code, things become demanding real fast. There is all kind of work with codecs, protocols like bl if you want the wireless and multi input setup, but for easy setup, maybe using speaker switch will do, for simple control over single audio input.
@@NathanSweet take me along
@@NathanSweetI’m going to give you a huge head start on audio: One of the best things Apple ever did for syncing multiple outputs with Airplay (1) was to add a 2 second buffer on-device with precise timing info (PTP would be a modern upgrade here). They also sent volume controls separately allowing for the perception of instant response. With hardwiring it’s unlikely you need 2 seconds, but even 400ms would smooth out almost all possibility of congestion artifacts.
This video is next level. Have subscribed and would love to watch a whole bunch of different videos to learn more about your system, specifically:
- How you designed these and why you designed them the way you did
- What you've used previously and what you've been able to learn from that (ie assuming this isn't your first automation project given the scale)
- How you plan on installing these around your house - just heaps of conduits or lots of pre-run RJ45?
- Your software, how it works, how/why you built it the way you did (eg instead of Home Assistant, Homekit etc.)
- House tour when all done showing all your automations
- Sell these $$$!
Very impressive
Thanks! Those are great ideas! I never really considered being a "content creator", but I do have lots of ideas on how home automation should work and I'm happy to blah blah about it. The wife is surely tired of hearing about it! I'll give it some thought, maybe I can show the schematics and how the software works next. Making (good) videos is surprisingly hard. I'll need to figure out a better mic, screen capture, etc.
I wanted lots of conduit, but apparently it's a pain to run. I ended up running less than planned, just between major areas. Everywhere else just gets CAT6A ethernet. I'm doing new construction, so running wires is (relatively) cheap and very easy.
I hope to answer everything else in a future video!
@@NathanSweet Do it! I personally would love a deep dive into how you got control of various devices, specifically anything that didn't have any sort of native integration support etc. Like how you connected to your oven and vent and reverse engineered communication sounds like it could be really interesting.
I just subscribed too. I too am hoping for my videos. Maybe a beginner's guide to how to build PCBs. He mentioned that he learned from scratch. And then maybe taking each topic and going in-depth.
Agree with OP. I would really enjoy a thorough deep dive. We are here for it. Very complex system that is well thought out!!!
Thanks for sharing! It's good to know that others are interested in keeping it wired and cloudless!
would love a tour showing off everyting in action
God speed (when you’re sliding those speakers into their slots). Btw, I’m very excited to hear more about how the system came together.
Thanks! The speakers have wires attached at least, so if I drop it I can pull it out and try again. It'll be some time until the house is done, but I'll make videos of it for sure!
4:52 - I think your components & traces are quite too close to boards edge. It may cause a bit of EMI inside your house (due to edge fired emissions), a good practice is to place them about 2-3mm away from edge and place guard ring around PCB perimeter (on each single layer) sitched by densely spaced vias (depending on max frequency in your project). This does not apply to connectors.
And as I don't see if that's 2L or 4L boards - never route over split in reference plane. This wrecks signal impedance and integrity heavily. If you really need to cross another trace (which is on your reference plane, mostly due to 2L design) - always do it at right angle (to minimize cross-talk). Don't route parallel traces if you don't really need to (eg. differential pairs). Especially above 10MHz frequencies it starts to cross-talk like crazy (not speaking about signals like USB HS+).
(This is mostly due to YT having bad bitrate, but also useful for readers): always have GND via near PWR/SIG via (really near, as close as DRC allows). This improves signal integrity and reduces power delivery impedance which is really important, especially with high-frequency MCUs, SOCs ora FPGAs.
I'm a noob, but I've put a lot of effort into learning PCB design. Happy to have more eyes on it!
You're right that board has one trace close to the edge. I can't make the board bigger in that direction, else it would hit stuff on the wESP32. I could make the whole board bigger, but then I'd also have to remake the box and lid. The 0.6mm trace is normally pulled up (weakly by internal pullups in the IO expander) and is grounded when a reed switch is closed. It so rarely changes that I don't think it's an issue being close to the edge, plus it's just the one trace for ~18mm.
I've read copper fills next to traces do very little and can even be detrimental, so much that it's recommended to not use copper fills on signal layers at all. I've since modified all my designs to use more fill clearance on signal layers and mostly only fill around the edges. It's not worth redoing all the boards just for that, but the chances are high most get redone yet again for some dumb reason!
All the boards are 4 layers, except the mic boards (faceplate and daughterboard) which are 6. The 4 layer boards all use an SGGS stackup,with no traces on GND layers, as you mentioned. They have 0.0994mm between SG and 1.265mm between GG. The impedance control isn't necessary but I like the idea of having signals so tight with GND.
I have very few HF signals. I run I2C at 50kHz when speed isn't important. A few boards use SPI for an ADC, but I run it slowly too (78kHz) just because it doesn't need to be faster. Those are my fastest signals, except for the mic boards. Those have a lot more going on: I2S with 2 mics, DAC, Xmos w/ 24MHz oscillator, SPI for LEDs and Xmos, I2C for a bunch of sensors.
can't wait to see how you plan to automate the decompression chamber and holodeck
My guy, extremely clean and impressive, would love to see your install and some guides on the projects you did
Thanks! I'll make some new videos when I finally get to install and play with everything. It's looking like that won't be until April 2024. The wait is brutal!
Wow! I am going to get into this in 2024. The lasers with gestures intrigue me.
This is awesome. Can't wait to see installs and all the boards in action!! Please update!!
Will do!
I am also busy building my own wired smart home. Your project is inspiring. Well done mate.
Thanks! I hope you make some videos when you get a chance! There's a lot of retrofitting, throwing around some Hue bulbs, and robot vacuum videos but very little showing custom PCBs.
please do make a video some time. no worries about video quality. mine are all single take, throw it online, I'm done.
I restarted this one a couple times, almost gave up, then tried again and did the whole take, then posted! I never imagined it would get so many views, so I kind of wish I had spent a little more time on it. I missed a couple cool things! I'll try my hand at making some more videos soon and see how it goes.
Nate, I can't wait to see more of this stuff. I've been starting to do something like this, so it is very encouraging to see somebody else doing it so well. I hope to see this stuff in action sometime!
Perhaps for the wall microphones, you can do a box at electric plug level to put your Ethernet unit in, so it can be easily serviceable.
The wires from the faceplate to the microcontroller need to be pretty short for some relatively high speed signals: SPI for LEDs, I2S for mics, and I2C for sensors. The rest of the connections are power (1.8V, 3.3V, 5V), sensor interrupts, and lots of GND. Those are mostly OK for longer wires, but the higher speed signals are best kept short. I think jamming it all through the wall mount will work!
Well done Nate. Good stuff. I've subscribed and find this very interesting. Am about 2/3 of the way through the same sort of process for my farm as you are for your place.. Sooo many decisions to make as to what works best / what works easiest / which has the easiest development / how to incorporate expandability / which is easier to build ... etc. So I doff my hat to you sir.
What a project! Extremely impressive
Nate, you are my new hero. I’ve been tinkering with home automation for at least 20 years. When I started there were a lot fewer options for putting the processors close to the signals and I/O. Everything I’ve done is hard wired as well. Basically I had to bring all signals to one location, then processed with OPTO22 I/O analog and digital input modules. Obviously I had to incorporate lots of signal conditioning like converting analog temperature sensors to 24v pulses using pulse width modulation. You are truly in the next generation of brilliance. If you are interested in marketing your inventions, I’m interested in helping, (I’m close to retirement age) but if that’s not your objective, why not consider open sourcing your system. What a wonderful thing that would be for thousands of like minded individuals. Your engineering sounds spot on, imagine how quickly improvements would come about with hundreds or even thousands of smart individuals working on it all the time. Just a thought thanks so much for sharing your incredible system with us.
Thanks! Your system sounds cool! I looked at Groov briefly in the past, but it didn't seem approachable enough for me at the time. Opto 22 does hardcore industrial applications.
I don't have plans to sell things, too much work. I'm happy to share designs in future videos though! It's all relatively simple stuff, just sensors here and there, a little code to send it to a central computer. Lots of pieces but individually none of them are terribly hard.
Very impressive. As someone that dreams of doing this, this is very impressive. This is your first video i have watched. Looking forward to more.
Hopefully you do a video on the implementation on this.
Thanks! I made a high level video about how I did it: ruclips.net/video/_ucQQH_xFH0/видео.html
I really want to do something similar. I share the same sentiment about having wired smart home automation solutions.
Really impressive! WIsh you the very best and be sure that I'll watch more content from you if you continue making videos. As someone mentioned, it would be very interesting to know your trajectory to be able to build this, specially since you are self taught! Also I imagine hearing about the software side of things would be incredible
Thanks! I made a video after this one about how to get started doing similar projects. I'll make more videos after the holidays, first to show using a reflow oven and then some details about the boards and the software that orchestrates everything.
@@NathanSweet Happy holidays!
This is literally my dream project mate! I'd love to see this all connected and assembled.
That's some amazing work, Nate, thanks for sharing! I particularly approve the use of RS-485, the I/O expanders (PCA8575, maybe?) and the optocouplers!
Thanks! IO expanders are MCP23018. RS-485 is great! Though I realized in retrospect I could have used CANbus for the laser sensors, since that's where I have multiple sensors on one RS-485 network. Theoretically if they talk at the same time, both communications would get corrupt. However, in practice I blocked 2 sensors at the exact same time and never got messages to collide. I think the MAX13487E RS-485 IC might be helping. It's half duplex with auto direction. Maybe the auto dir has an advantage in that it sees another device is communicating and buffers for a short time?
CANbus has collisions, error correction, and other things built in. It seems great and this would have been a chance to try it out. On the other hand, those features would take some time on the bus, slowing down the sensor reaction, unless I increase the bus speed. I run it slow at 9600 baud 7E1 so there's some headroom. Not worth redoing the 14 (!) sensors though, so I'll keep CAN in mind for next time.
Outstanding work!! 🤩 I’m designing a 3DCP self build and this video is extremely useful for automating the home when complete. Thank you, just stunning work!
Thanks! Your own 3DCP build sounds awesome! Especially with lots of planning on the home automation part.
Absolutely incredible! This is precisely what I am looking to build. I don’t like the idea of home automation being connected to the cloud and ultimately controlled by a company! I am a qualified electrician and passionate C programmer so the idea of marrying the two has been a dream for a while! Thank you for the inspiration, I very much look forward to your future videos
Thanks! You're way ahead with your electrical and programming knowledge. All you need to do is design a circuit, learn DipTrace or similar software, order some boards from JLCPCB or PcbWay, and solder them. I use a modified toaster oven (see Controleo3) to do reflow soldering. That's waaaay easier than an iron, 5 minutes and the whole board is soldered.
You have earned my subscription. Look forward to updates as you roll it out.
You earned my subscription...Please post more videos step by step(module by module)......I would like to replicate all your work at my end....
Will do! I actually setup today to do it, but my mic is not great. A new arrives in 2 days, so it'd be better to wait a little.
This is very impressive. Glad you shared this video!
You are out of your mind! But I love this :)
Very keen to see what you will do with all this. I've been trying to make an irrigation controller. Nice work man!
looks about right. It's amazing what we're capable of today with relative ease (imo) thanks jlcpcb for opening the gate to allowing nobodies to make their own PCBs without having to carve out their own copper etc..
Definitely, being able to make low cost PCBs is amazing.
This is beautiful. Love the hard wired aspect to this project
Thank you! For new construction wiring is so easy, got to take advantage!
@@NathanSweet Its also more secure :) Are you planning on open sourcing or producing products?
It's too much work to make products and I think would rob some of the fun. I'm just doing this for fun, so I'm happy to share the designs and maybe they inspire others. I probably won't share the software itself, as it's pretty specific to my house, but I'll show how it works in future videos!
@@NathanSweet looking forward to your progress.
Ur boards are flawless, my god u got skills.
unreal. very inspiring. i also love the healthy use of RS485 Can’t wait to see it all in place. Software walkthrough would be very fun to see as well
same, that rs485 grabbed my heart. can't wait to see the software. any guess what language? maybe c, more likely python?
I subscribed just hearing that you're self taught. This is the first video I've seen but I'd love to see how you approached learning electronics.
THIS! Yes!!! This is *exactly* how I would like my home automation to be done!
Awesome project!! All of your boards and designs are extremely clean and impressive, and you use a ton of different MCUs which I love. Do you mostly use software packages or have you written a lot of the sensor reading and automation yourself? I’d love to see a walkthrough of it
Thanks! I try to use an existing library to talk to a sensor, but sometimes they aren't great and I cut them down or re-implement them to just do what I need. Most of them are pretty simple but it helps a lot to start from working code. I'll do some videos of the software in the future!
Why did you develop your own software? Are there things it can do that Home Assistant lacks?
Amazing the thought and time you put into this.
Changing the subject:
I want a setworks for a sawmill. Possibly point me in the right direction. I have no idea where to start. Setworks tell where you started the cut on the log so when you raise the sawmill head to return to make the next cut you can start right where the blade was when you started the cut. Then push a few programmable buttons to let the head move down to say cut a 2x4 , and then the next cut might be a 2x6 or even a 4x4 and so forth. It would require a waterproof screen that could you could read in the sun. These can be bought ready made ,but start at about $2,000 so that’s out of the question for me.
Thanks and again you are a very dedicated guy that doesn’t stop till you get what you want.
I did subscribed.
That's an interesting problem to solve. I don't know how the blade moves, so it's hard for me to say. I would guess copying what the expensive solutions do would be your best bet. They analyzed it with a lot of domain knowledge and that's what they came up with. I wonder if a physical solution can be done? Maybe it doesn't have to be electronics. Keep it simple if possible!
I don’t mind studying your lessons to learn which way to go. Whether raspberry pi or whatever. Whether it be python or what. The horizontal travel is a thing that is adjusted with a variable pot as you see fit as far as the hardness of the log or how dull the bandsaw blade may be. The up and down is where I can’t guess how to control. There is a 12 volt motor that controls up and down that is controlled by a reed switch for a manual up and down. That’s what I want to mechanize.
I envy you! Home automation on a plain field. I do some in an old house in Spain, no way for new wires, have to disentangle the old wires. One advice, document everything, in case you have to make adjustments years later. (I'm 70 now, trust me.)
Retrofit is harder! Wireless is usually the only option. Solid walls make it harder still, as you can't run wires easily AND it reduces wireless range significantly. Definitely! I have pics of all the walls and ceilings before drywall.
Would love to hear more about your DMX setup as well. Something tells me its not the out of the box setup :) Make a video of the end result!
All these comments and you're the first to consider how cool the DMX part will be! All the can lights and LED strips in the house are DMX, and all the landscape lighting too. The can lights are special 5 LED lights (red-orange, green, blue, mint, lime). The LED strips are RGBW -- over 800' of LED strips. The landscape lights are RGB. There are DMX to 0-10V dimmers for a few non-DMX fixtures. I'm super excited to be have so much control over every light! Definitely will make a video, but it'll be a few months before the house is done.
Wow that is awsome. I really love some of your desgin desisions.
This is a great project. I'd make sure to fuse the irrigation system if you haven't... pretty common failure is the solenoids wear out in the sprinkler valves and short to ground.
Thanks! That is a great idea! I don't have a fuse, but made a note and I'll add it if I do another revision on the board. Or I could put it inline, before the board, but it'll make my install uglier.
I have an R100 and C0.1 snubber for noise from the solenoid's inductive load, but it would only help a short slightly. I also have a TMCS1101A4 current sensor. The valve is 350mA max inrush. I watch for current > 400mA and turn off the SSR to cut power to the valve. The SSR is rated at 1.6A and the 24VAC transform 1.8A (a big sucker). I collect current data for ~12 60Hz AC cycles (~200ms) before shutting down because the current sensor is a little noisy I want to be sure it's a real overcurrent event. That's quite long and while the transformer and SSR might survive, it's not good. A fuse is a good idea!
You’re awesome my friend! Always dreamed to have the time to build something like these.
Well done! Looking forward to see how all of those compute devices work out. I hope you have backups for power outages and lightening strikes. Definitely giving me motivation to follow a similar path.
Thanks! I have a whole home surge protector (Siemens FS140, 140k amps). It may help from a nearby strike or similar, but just about nothing can survive a direct lightning strike. I have Enphase photovoltaic and batteries (4x IQ10, 40kWh). The roof panels should be able to run the house without mains power, with enough to storage to last overnight, but can't power ACs. I'll have the PoE switch on a UPS, so when the mains goes out the switch and all the PoE devices will stay powered until Enphase kicks in, a second later.
It's a fun project, but only if you enjoy the tinkering and are willing to accept some down times when bugs inevitably strike.
Sounds like you are sorted! I'll be following your lead next year. Looking forward to watching your progress! @@NathanSweet
Looks amazing, I’m def interested in watching a whole series of videos of your setup and all of this in action.
We're gonna need to see a couple demos!
Whoa! That's some quality stuff! 🧐
That's an amazing amount of good job you've done there. My only concern after building custom stuff myself is how on earth anyone would ever be able to replace it when it breaks. But I guess that goes for everything electronic, also commercial stuff.
Thanks! For me to replace something is very easy: order a new PCB (or use a spare, as they come in quantities of 5) and solder parts on. It's actually nice knowing that if anything goes wrong I can easily replace a board.
If I'm gone and it's someone else who needs to replace a board, yeah that is trickier. If they have my design files they could do the same as I would with a little effort. I just posted a new video of the process!
great job
Can't wait for more videos. This is an awesome project! :D
Well done! Perhaps have the speaker installed, but wrapped in cellophane and then remove that after mudding and painting. That might be easier for you - remember wiring the leads too.
Thanks! I wanted the speaker (and electronics) to be serviceable without breaking the drywall. The drywall mounts are already installed and the parts _should_ fit through the hole. The speaker has wires attached, so there's less chance I drop it in the wall. The main thing is some locations don't have a lot of depth and it'll be a tight fit.
Mind blown! I need to rethink my home automation
Very impressive. Any pointers on how you learned multi-layer PCB design on your own? Would love to see some tutorials on your self-learning of electronics as well as enclosure designs- these are fantastic looking enclosures and PCBs. Great work.
Thanks! You're in luck, I just posted that video! It's pretty high level, but it covers roughly how I got here. Also it's unscripted, I hope the rambling format is OK. If I read a script then I sound like a robot, so it's the only way I can make videos.
@@NathanSweet I am on it right now and posted the first comment. Came back here to check if you answered my question and indeed you did.
I've been working on my own home automation electronics as well, and since I'm doing an old house (1972), retrofitting is extremely difficult (as you mentioned in an earlier comment). I've been trying to rewire a lot of the house, but that causes it's own issues. I'm a big fan of Home Assistant and my current project is trying to automate my HVAC setup, which is currently a 4 zone, damper controlled system. These systems are not cheap, and have very little programmability, so I want to create my own so I have much more control over it. I was planning on doing some videos on my design and work, and you have encouraged me to do so. Maybe we can do some collab in the future.
Yes, please! I've subscribed in anticipation!
I want motorized dampers, but I haven't been able to get any info from the HVAC sub on how they would be controlled. They aren't on/off, so it must be more complex than a relay. Maybe multiple relays to reach various opening presets.
@@NathanSweetThe motorized dampers I have are all PWM, so that's pretty simple. I'm using Nest thermostats, but want it to basically be able to use any (4 to 6 wire) thermostat and control a central HVAC setup. Maybe even smarter and go as low as 2 wire for furnace only or 3 wire for boilers/water heat. I definitely like your idea of RS-485 for communications to sensors and such. This would allow up to 256 devices on the network. Now I have to go and do some design :)
Oh, BTW, the channel that I will be doing this on is my Hippie Redneck Geek Builds Stuff ( ruclips.net/channel/UCzs1vC0CCknCEEzFag4sb_A ), not this account :)
Simple on/off to call for heat or cooling is easy without needing a thermostat. All you need is temp sensors (eg ZigBee or hardwired) and something central for the logic (eg a PC running Home Assistant) to control relays or optocouplers to close the contacts.
My inverter type HVAC is a little more complex because it's not a simple on/off. I have to set the target temp and let the Mitsubishi HVAC controller do the rest. Then since I don't have thermostats, I use temp sensors and tell it the current room temp.
The number of devices on RS-485 can be pretty high. I wouldn't try to push the limits. 6 is the most devices I have on a single network, but 32 or more should be no problem.
I see your channel, subbed!
Subscribed with the hope you post more home automation videos and eventually show some data collection info as well.
Definitely will do, cheers!
Awesome work! I am going to dive into pcb design soon. Your video is very inspiring. Was hoping to find some tutorials on your channel. Maybe in the future??
Yes! I didn't expect such a response, else I would have put more effort into the video. I'll make some more videos soon!
I'm interested to see the beam forming / voice control. Cool project!
this is really cool stuff.. you should get in touch with lock picking lawyer and see if he can infiltrate your system.. could be entertaining and informative for everyone involved! thanks for sharing!
Excellent, many clever ideas and very refined. It looks like it took some time to build all of these, and I imagine it was not on firs attempt.
Thanks! Oh yeah, I have piles of boards that have some tiny error here or there. It has to be exactly right or it's time to make yet another board. I should make a video showing my early abominations and how they evolved into these beauts. I learned a lot since I started 2 years ago, but I am still finding new ways to make mistakes!
I'm pursuing my own smart home too. Your project is really amazing!
what lasers are you using? it would be cool to see everything working! Are you sharing any code or planning on making "how to" videos. this is soooo cool!
The lasers are AFBR-S50MV85G. I would love to see everything installed and working too! It's been sooo long. It'll be ~4 more months until the house is done and I can show the finished projects, but I'll make some more videos in the meantime about how the things were built.
looking nice, would nice to see the realworld implementation in your home.
Thanks! It will still be 4+ months before the house is done and I can show the final installs. I'll be sure to make videos of that, plus some videos in the meantime showing how these were built.
Impressive!
This is really impressive and inspiring! Could you share the resources you used to learn electronics from scratch in two years?
Amazing job, looking forward to see more videos where you could share with us more in details how was the process and when it is all installed. You have now a new subscriber
Thanks! I'll work on new videos this weekend! Won't be able to show the house for a while (4+ months), but I can show it in 3D and the software.
Very cool. I'd love to get more details on your sprinkler board, I'm more of a software guy, but I dabble in hardware. I'd be interested to see exactly how you measured the current on the sprinkler solenoids to help tell if there's a bad one. What part did you use to measure that, how it's hooked up. Thanks! I'm using Home Assistant, but am making some custom PCB's with esp32's on them.
Thanks! The current detection was a real pain. It's not actually a required feature for irrigation to work, but I wanted it because it's neat. It uses a TMCS1101A4B current sensor. The output is an analog voltage centered in the supply voltage, so 1.65V for my 3.3V supply. It measures AC, so the output swings up and down at the AC frequency.
I had trouble getting a good signal into the ADC, first with no RC filter, then I screwed up the RC filter. See here: bit.ly/TMCS1101-output
Next I got a decent signal, but it wasn't 1.65V with no load. It was offset from the center, and it shifts over time. That fun is here: bit.ly/TMCS1101-accuracy
TI recommended using a voltage divider, then later said that probably causes the offset. Nice. In the end I measure peak to peak, so I don't need the offset to be stable. It's 60Hz AC so I collect min and max values for ~3 AC cycles before checking the current. If I see the current high 4 times, irrigation shuts down. That means there is ~200ms delay before shutdown if a valve fails by shorting out. As someone here pointed out, I should have a fuse for that case.
In the end the current sensor works OK, but there's enough noise that I get false positives under 20mA. The irrigation valves are 190mA typical and 350mA max, so that's acceptable.
In addition to detecting valve under and over current, the flow sensor let's me detect too much and too little flow. It makes for a pretty fancy error detection system! I'll do new videos and eventually cover every board, so I can show more details then.
@@NathanSweet Wow, thanks for the great explanation. I'll await your video on this board. The sprinklers is a lower priority project for me, so there's no hurry. I also like that you are checking for solenoid problems. Not being much of a hardware guy, I look over the data sheets and try to figure parts out that way, as well as look over schematics others have done to get ideas.
Amazing. Would love to do something similar if I had the time and energy. But considering that I used mostly off-the-shelf parts, I’m pretty happy with what I’ve put together. Would, however, love to make a wired version of my smart mailbox video with a mains powered lock.
Your mailbox looks really cool! I'm envious, that's one thing I don't have. Unfortunately my mailbox is about 2 blocks away from the house -- a big block of mailboxes for the whole area. I'd need something wireless that could also get the message very far. Seems hard. It'd need to be something like a cell phone.
Getting power out to your mailbox is the hard part. Code for mains power is something like 18" deep in metal conduit -- that's a lot of trenching. You'd probably want to use low voltage with ~18AWG wires, conduit is still nice. Voltage drop won't matter since you'd regulate it down to what the device(s) need anyway. I think you'd make a board that regulates the voltage to what the devices want, then hack the devices to use that instead of a battery. That's pretty easy to do, a good first PCB project if you've not done it before!
i love KNX - it just works and every electrician can program it (here we learn it in school)...
I've never installed or even used KNX. I've only read a little about it and my impression is that it's very complex to install and configure. It reminds me of "enterprise" software solutions. Given it's so hard for me to understand, I think it's overkill for my simple residential usage. It is interesting you learn it in school, I assume for working in commercial/industriual settings.
For lights, dimmers, and relays I use DMX512. I'll make a video showing that when the house is done. DMX is reliable (wired, differential signaling) and I love how simple it is (each device gets an address up to 512) and very easy to integrate (send 512 bytes at 40Hz). DMX is one-way though, so doesn't work for sensors or many other situations where KNX would. I have my custom electronics (in this video) for sensors/etc.
It's unusual to see DMX in residential, but I think it's going to be amazing!
@@NathanSweet every "normal" electrician in germany learns it in school. it is for big and small. in our company we build it in normal one-family-homes as well as in bigger comercial buildings (not so in industry). it is not even programming... it is more like "linking" stuff together. i like it because the stuff u build in lasts forever (25 years no problem). and when something breaks you can choose from about 500 brands because knx is not proprietary. my boss made a lot of knx in his youth (~25years ago) and sometime i have to replace defective parts you wont get anymore but no problem - just choose a similar part of any brand and it will work. and every electrician could fix it not just us.... this is what i like: longlivity, easy acces for everybody, no brand limitation
Interesting, that does sound pretty nice! Maybe I should have looked into it more closely. Does the logic get built into the nodes? I like having my computer for central control, so it makes all the decisions about what happens in the house. Having the state and logic all in one place in nice.
@@NathanSweet for using logic you need locig modules... but the better was is to use a "GIRA Server". In knx you normaly dont have a central logic unit but with the gira server (smal mimi pc) you can handle all the logic you want... but it is kind of expensive...
I see, thanks for the hint! It looks like there are many Gira products even beside the server/controller: switches, screens, etc. To use a Gira server for KNX I'd still not want it to be the central controller, rather I'd interface with it from my own software. The reason is that there bound to be other systems that Gira can't control: ZigBee, Pentair pool equipment, Spotify, my own sensors, and others. Maybe that makes Gira not a good fit and KNX integration would be better at a lower level.
Many systems want to be the central controller and don't provide good integration options. That's the main problem for home automation: bringing together disparate systems so they can work together.
Whoa, thats awesome
Wow, very impressive
Looking forward to see the rest
This is awesome!!!!
Impressive work, i had the same idea some time ago but ended up in nothing. At that time i was mostly worried about maintenance, in the form of lack of time to do it when needed or lack of replacement parts when needed.
How do you intend to manage it?
The nice part about making the PCBs yourself is that you can easily replace one if it breaks or otherwise needs to be fixed. I plan to spend a lot of time making the software good and ironing out any problems. That's a big part of the fun!
I love your voice!!!
Haha, thanks! New video I just posted has better audio -- I got a new mic.
Crazy things dude!
Very inspirational Nate, Subscribed! Thank you for sharing
Very nice adventure. The speaker/mic combo for in wall mounting is interesting. Hope you have done some prototyping phase during which you pre-tested that mounting. Same for the 'rock' sensor. Else you might have some 'design' surprises.
This looks awesome!! Hopefully one day I can take on a project like this. Also do you plan on making any tutorials, because I would be really interested in the design process and than how you made it all connected and coded.
Thanks! Check out my new video about how to learn to do it yourself. It's not a tutorial but I hope helps you understand what's involved and what to learn next. For some reason the new video doesn't get as many views.
@@NathanSweet Yeah I saw it after I wrote my comment oops. I thought it was great! Definitely gave me an idea of how the process looks like and how I can approach something like this. I went to learn about circuit design and electronics immediately after watching it 😅
Excellent work 👏👏👏👏👏👏👏👏👏👏👏. I really enjoyed the video
This is a cool design! I can appreciate the attention to detail on all of this. Curious if you'd ever take a crack at trying this out inside of ESPHome with Home Assistant. It would allow you to program a lot of this stuff over the air and might make managing the automations easier?
Thanks! I have my own equivalent of Home Assistant, though it's to solve my specific home automation needs rather than be something useful to everyone. That makes it a lot easier to build, and lets me customize it to work exactly how I want. Similarly, I don't use ESPHome, instead I just write the code for each board.
I can send new firmware to my ESP32 boards via ethernet. For the STM32 boards that are connected to the ESP32 boards, I can send firmware to an ESP32 via ethernet and it forwards it via RS-485 to the STM32 to update its firmware. This lets me update ALL the boards in the house remotely, so I don't have to dig around in the attic and whatnot.
Cant wait to see it in action! so cool please share more
This is amazing work!
This looks amazing. I'm working on my own new house build and will be following closely to see how the implementation looks. Super interested in the radar, driveway sensor, stair sensors and hood vent. Although, I think I'd like to run everything through home assistant instead of a custom implementation, simply due to laziness, haha.
That's totally fair, Home Assistant is probably the right answer for most people. I think any of these things can be made to work with HA.
wow that's pretty impressive...what is even more impressive is that you also use your own software to run everything! any more details on the sw side?
Thanks! The software is actually not so hard, depending on what you're integrating with. I'll show the software in a new video, hopefully soon!
Man I am blown away! This is something! Excited to see the follow up and would be very interested in how you connected them all throughout the house and especially the brains of your system!
What made you decide to build your own system? Do you have any technical background or all self thought?
Either way, amazing project looking forward to your update!
Thanks! I've always liked home automation and have done a few retrofit systems. In particular circadian lighting is important to me. I got the chance to build a new house, so naturally had ideas. I started wanting force sensors in each stair, so learned to build the circuitry for that, (poorly) using through hole components. Building my own PCB unlocked all kinds of ideas! I eventually learned to make proper schematics and PCB layouts, and to solder with a reflow oven (which is much easier). I didn't have experience building electronics before starting, so I've rebuilt some of these boards many times. Any little mistake and the board is ruined! ChatGPT is a great tool for learning electronics, designing your circuits, and researching which parts to use.
Nice project and a lot of work invested. The only issue I noticed is the speaker willl buzz if it is not firmly supported in the mounting frame.
I am interested in the software side as wel and am particularly curious about your text to speech and voice recognition and how you are accomplishimg these without web services.
The speaker has a rubber surround and the 3D print is such that it is a tight fit. Eg, it stays in firmly enough to hold it upside down without risk of it falling.
The speaker doesn't sound great, but it's the best I could find meeting the requirements. The other speakers I tested were much worse. There's no replacement for displacement, as they say about speakers, but I just can't fit a larger or thicker speaker. I'll mostly use it for beeps/boops, though I also plan on making an intercom or voice broadcast system (dinner time!). The speaker is made for use in an intercom. Music on it doesn't sound good at all.
For voice recognition check out OpenAI's Whisper project. They even have a command based setup, where you list commands in a text file, it listens, then reports the most likely command with a confidence percentage. It's great! Much relies on the mic pickup and background noise though.
Mad respect
Can you share your roadmap of learning electronics and circuits design? What books/courses if any you picked or which forums/sites were the most efficient for you to gather knowledge?
I've posted lots of it in comments on this video. Basically you start out getting an LED to blink, then move to more complex circuits. Then you design a PCB in DipTrace or similar, have it made, and learn how to solder it. You'll also need to learn a little bit about programming the devices. After doing it a few times you get the hang of it and can make more and more complex devices! I'll make some new videos covering my journey into this hobby.
Really nice setup. I am in the process of customizing my home automation. Also learned electronics and pcb design from scratch myself, with a lot if reverse engineering of some other designs too. I am a Linux software engineer, with some arduino and stm32 and esp32 experience (as hobby, and very little, but i am good at assembly, c, servers and other languages), so will make my own system because really all commercial stuff i tested, used or seen is total crap, including professional stuff like knx. Also ovwr 2 years in preparation, but i maybe sit one weekend once a month to progress a project a bit.
Will be using a mix of esp32 and stm32f3 mosly with ethernet, or wired stuff using optoisolated rs485. Have prototypes of some simple sensors and relay boards (with power measurements), but still some to go, including protocols and autodiscovery, etc.
This laser sensors are cool. I want to use PIR sensor, but i think i will try that tof sensor, as it could have interesting applications.
Ps. It is not ethernet or ethernet cablr. Ethernet is protocol, could run on many types of media, and i standarized. What you do is use copper twisted pair cat5 cable, with rj45 jacks. I prefer to use smaller 6p jacks and cables for lowish speed serial protocols, as they are more flexible and smaller, and makes it harder to plug things incorrectly.
Cheers.
Thanks! Your plan sounds very similar. I agree, KNX seems overly complex. There is one standard that is quite good: DMX512. It's one-way, but it's simple, reliable, and there are a good number of devices that support it. Using DMX for lighting, dimmers, 0-10V dimming, and relays simplifies a lot of things for me and means I don't have to deal with mains voltage. It's easy to control via a USB gateway like the Enttec USB Pro MkII. That one is sadly discontinued but can be found on Ebay.
The lasers are neat, but the detection beam is very narrow so doesn't obviate the need for motion sensors or similar. I use them like a break beam sensor. It's nice that they don't need a reflector.
Oh well, I will likely continue to call it ethernet cable, like everyone else. :D "I'm using cable designed to carry the ethernet protocol for my RS-485 communication", it's just unnecessary.
It's cool stuff, but how usable is all this stuff for other members in your family? Also what about power outages, especially for door control.?
It would be interesting to see your control software PC or MAC ? What language did you write your code?
It's written in Java. It runs on Windows and Linux (I detest Apple as a company). I develop on Windows but the server in the house will be Linux for stability. I posted a little about it in this other comment on this same video:
ruclips.net/video/pS5DQIiOTp8/видео.html&lc=UgydZs5qYLH4dy0DYLp4AaABAg.9xTKK2bOCot9xUklMRVwep
To show the software (and later the house) I have to get over making the floor plan public. I guess it's not a big deal, but it feels a little private. I'll likely make a video later, sub so you don't miss it!
I see you used an XMOS module; they actually have a great Ethernet AVB implementation which you could use for precisely synchronized multi-zone audio. The full AVB implementation may be a bit overkill for home use, but at least when I was working with them the implementations were all open source and fairly modular.
This is amazing. You must have learnt so much from all this, hope you keep going.
I'm starting to think about home automation as I'll be doing some major work on my house in 15-18 months. I completely agree with the wired approach. What concerns do you have if any in terms of power efficiency with long wires and POE and what not. I'm sorry I know exactly sure how to articulate my concerns, lack of knowledge mostly.
I was thinking of getting large 4, 8, 16 relay units and wiring them up as needed. I love the way you've built the reed switches, how are you going to wire them to the reed switch sensor itself, is it just a pair of twisted cable to the door etc, are you going to build them into the doors so it's not visible, etc?
One last question since you've gone through this whole path, where would you recommend to start from to learn electronics? Any does and don't to watch out for?
Thanks! Long wires can cause voltage drop, add capacitance, and have reflections. I use 18AWG for some of my runs and that's plenty fine for my distances. You can look up voltage drop calculators, else just use larger diameter conductors. Some runs I use 23AWG CAT6A, but I often have unused twisted pairs so I use those as additional power and GND wires.
If you are just giving power then voltage drop is probably all you care about. If you are sending signals over long wires, you need something like RS-485 or CANbus to do it properly.
The reed switches have 18-2 cables run to them, that's 18AWG with 2 conductors. The switch is just wired between the 2 conductors and I'm sending 24V through it. When the reed switch is closed, it turns on an optocoupler and that lets my 3.3V microcontroller know it's closed. The optocoupler isolates my lower voltage microcontroller from the 24V.
A relay board can be useful for many things. You might want to consider if on/off is sufficient. For lighting you might want dimming and color control. There are a few ways to achieve that. Hue bulbs are the easiest and can be retrofit.
As for learning, choose a simple goal, read a lot, implement the goal, and repeat with a new, more complex goal. Eg, blink an LED, then use a switch to turn an LED on/off, have your microcontroller turn a relay on/off, using I2C to talk to a sensor, etc. There's no one source to learn from. It could be books, but the internet is more convenient and faster. Definitely use ChatGPT, it helps a LOT.
As for things to watch out for, mostly read the datasheets. That includes for your microcontroller! ESP32 has some gotchas on which pins you can't pull up or output, I mentioned them in the video. Use 10K or 4.7K pullups on both SDA and SCL lines for I2C -- that isn't always mentioned because people assume you know.
Thanks so much, I have some CAN bus boards to mess around with my car, so I think I’ll play around with that and see how I get on.
Thanks for all the advice.
1) Reed sensors: what cabling are you using to the reed sensors? It's pretty standard to cable up CAT5 to doors etc., but then you're left having to somehow patch the individual cores within the carrier cable to the input terminals on your board. How do you achieve that tidily? I'm looking at a great system called OXRS Rack32 which basically provides a rackmount IO with CAT5 jacks that you can patch straight in, but your board is really nice and small. 2) Re the pressure sensors (bed and stair) what actual sensors are you using? 3) Re the bathroom sensor, it's a sensible design, but given its position in the bathroom how do you plan to prevent corrosion from humidity? It's a lovely project and I wonder if you have the bandwidth to publish docs / BOMs / schematics etc for the community? I'm really interested in that audio sensor device. Could it be adapted for use as an audio presence sensor?
1) I used 18-2 cable for the reed switches and I'm sending 24VDC through it. I use nice (if stupidly expensive) Phoenix Combicon DFMC connectors to connect to the board. I considered having just 1 common plus 21 connections for the sensors, but decided it's cleaner for both wires to go to the connector instead of joining 21 common wires externally. Using ethernet, likely 4 23AWG wires twisted together would fit in each connector position. It accepts up to 16AWG.
Rack32 is interesting, I hadn't seen that one before. This is roughly equivalent to the wESP32 in my projects, though at first glance it seems to have fewer features (fewer GPIOs exposed, lacking 5V/12V output from PoE). I don't think you'd want an ESP32 per reed switch, but you could make a daughterboard pretty easily, just like I did.
2) The force sensors are Tekscan Flexiforce A201 for the stairs. The bed is A401 (the same but larger sensing area). The stairs are designed with Z-clips to attach the treads. It's too early to see how well the sensor placement will work. It seems like a good plan but worst case it'll need to be revised a little.
3) I forgot to mention in the video, but the bathroom PCBs and any PCBs exposed to outside air (it's a coastal environment) have a conformal coating. I used MG Chemicals 422B, which is a silicone/acrylic hybrid. Nasty carcinogenic stuff! Honestly that is probably overkill. The bathroom sensors will turn on the fan when humidity is high, so while they will be exposed to humidity, they also ensure it's not for long.
I'll likely do another video to cover some of the schematics and other aspects. I'll post the design files there!
The mic boards are the least fleshed out of them all. While the Xmos microcontroller does beamforming and other fancy processing, I hope to stream the audio continuously to a computer for processing with OpenAI Whisper. I haven't gotten that far, so we'll see if I need multiple computers running Whisper since I'll have 7 mics. All that said, it should be easy to detect the volume level and use it for presence. That's somewhat limiting, since TV or music would keep it triggered, but it could still make sense for some uses (maybe as part of the house alarm system).
@@NathanSweet Thanks for the detail. I've seen audio sensors used for presence detection, more for keeping lights on as opposed to turning them on - Loxone is a company that produce an audio presence sensor if I recall correctly. Perhaps mmWave is better but I've not personally had a lot of success, I guess it depends on the type of room / location / noise from other sources.
Regarding cable management, I guess you will have those 18-2 cables (I think we call them "bell cable" here) just coming out of the wall in a central location? Or will you adopt some kind of patching arrangement? (Sorry it's a dull question but I was just interested!)
Looking forward to following along with these projects!
@@MatSmithLondon Some people leave their TV on all day, but I guess keeping the lights on when TV or music is on makes sense. I might incorporate that for presence!
Re: mmWave, indeed, I tried the Aqara FP2 and it was really poor, ghost detections all over the place.
Yep, the 21 reed switch cables go to a closet where the box/PCB will be. That hasn't been made tidy yet, but you can see them here in the back: n4te.com/x/8763-kBDF.imb
Awesome.
Impressive!!! I’d love to know more on the motion sensors you are using.
Any links/refs? Thank you!!!!
Sure! I'm using Lutron LOS C motion (occupancy) sensors. These are hardwired and use both IR and US (ultrasound). US gives them higher sensitivity, which I'm hoping will better help detect occupancy when there is little movement versus just IR. US can be turned off if it proves problematic, eg outside maybe it's too sensitive and detects lizards or grass moving in the wind.
There is very little information about these particular sensors. I sure hope they work well! I'll have 30 of them carefully positioned throughout the house, mostly inside but a few outside. There are none in the bedrooms.
I don't actually like Lutron as a company, as they are closed/proprietary and difficult to integrate with. I have Lutron only because I want to use their shades and keypads. I couldn't find many options for high quality motion sensors and I already had Lutron, so I figured I'd also use their motion sensors. Ironically I don't use Lutron for lighting at all. All the lighting is DMX, which is not usually done in residential. That should be interesting!
Very coll, I also like writing my own server code for home automation. I am using GO for the backend and React Native for the mobile app.
I've been eyeing Go for a long time, but haven't actually tried a project with it. I'm using Java as I know it well and the tooling is great. I use libgdx for my UI, so it's also Java but can run on the desktop or mobile and renders using OpenGL. It's client/server and the whole state of the house gets sent to the UI if it changes. The UI uses Spine for animations of doors opening and other events.
i love it so much thanks.
So cool... You are an expert!
Thanks! But not really! I just focused on each part and learned what was needed for that. There is a lot more to learn! I had to rebuild these boards many times to learn how to make all the mistakes so I could finally make them without the mistakes.