Hi, a short story about my home automation adventure with my son


I'm Trev and I'm 46, from Australia but I live in Argentina with my wife and kids.
I've been an electronics and engineering enthusiast for the best part of my life and love building and hacking gadgets. My son who is only 5 loves electronics and gadgets too so we make a terrible team who spend time bugging my wife with our latest invention or gizmo. She doesn't fully understand the thrill we get from building something new but she tolerates and humours us. :)
I got into home automation about 20 years ago and have been continually frustrated by the complexity and cost needed to automate a home. It's terribly expensive, especially if you have a family to support like i do. What to do? Build your own and that's exactly what we did.
Over the last 6 months my son and I have built an entire home automation ecosystem from scratch (spent less $$ too) so that we can control the TV, lights and everything else in the home. When I say from scratch, I mean just that. We designed every closure and printed them on our Makerbot 3D printer. We didn't buy a single pre-built sensor or switch. Not one commercial item. Instead, we went back to first principles and designed every circuit, the RF transceiver, the battery management and AC power interfaces. We even built our own gateway so that the entire thing can be controlled if needed from the cloud. I personally think connecting everything to the cloud is a bit of an overkill when things can function just perfectly without internet access but the wife wanted to see when the kids got home from her mobile so we added that too.
It's not perfect and was really hard to get every device working together perfectly. Living in Argentina also presents challenges for hi-tech innovation. The country is extremely corrupt and it was impossible to import the components I needed to build prototypes without paying hefty bribes. At one point I was asked to bribe an official so that PCB's I had manufactured in China would be let in. I refused and the PCB's are still sitting in the customs warehouse somewhere. Fedex wouldn't even help get them through so for a while I thought the project was over and was really disheartend. Eventually we got around this problem by having components and PCB's shipped to Australia where I would collect them on my way through for business.
Assembly was really challenging too and all the family pitched in to help me place tiny 0204 components onto tiny boards under high powered USB 2 magnification, all by hand!!! They're so small they're like little ants (2thou by 4 thou).
I wanted low power and I wanted every device LiPo and USB chargeable. We were lucky to find a really good range of low power micro-controllers that are so efficient a single sensor should (if the estimates are correct) run for 1-4 years without a recharge. uA of current consumption per node.
I didn't want ZigBee nor did I want IP6 but I wanted the controller to translate node address into the IP6 address space so that from the internet, every node appeared like it had its own unique IP6 address. Neither protocol are low power enough and the network frame sizes are just too big to be truly energy efficient so i didn't even bother with that. Also, We live in an apartment block on the 9th floor and I wanted my UV sensor and temp sensor on the roof of the building so there was no way I'd get Zigbee to transmit through heavy concrete walls down to the basement. In the end, I chose 915 mhz radios (also designed from scratch by me). The other day we wen't for a walk and place a small mesh of 10 nodes in a 8km ring around Belgrano, the suburb in which I live to see if I could get data from every point. We were blown away!! Not only did we get data from the nearest nodes, but the mesh worked perfectly and I was able to control an actuator several kilometres away from my phone without using the internet!!! 
In the beginning of the software design stage, I thought the controller should be the brains but then I realised that with the current technology and the CPU power I had in each node, there was no longer the need to centrally control anything so I designed each node to work independently and to share information with other nodes. This means that if the internet is down or if the controller is switched off, the home automation system keeps working, like T2000, and the home stays smart. It still has a few kinks but but with unreliability of the internet over here in Argentina, I couldn't depend on the cloud or even the gateway to keep running (during power cuts) so wanted nodes to be autonomous. The design worked so now I can control lights and my HiFi system even when the node is switched off. The only thing we need the controller for is to download programs to the nodes and to control the system over the internet.
So, what devices did we design and build from scratch? Here's the inventory:
- Automation gateway\controller
- Temperature\humidity\barometric sensor
- LED bulb, multi colour
- A wall mounted switch - touch for on\off and swipe to dim (it can control anything actually)
- IR repeater controller to control our HiFi and TV
- RFID access control
- Soil moisture sensor - 5 functions soil moisture, soil temp, air humidity , air temp and ambient light (this was built for my brother in law who has a farm so that he could get readings from kms away while sipping tea in comfort in his kitchen)
- AC power adaptor with motion sensor and baby light - controls some lights and the oil heater.
- Door access control
- Pool temperature sensor - it floats
- Tilt\Contact\motion sensor
- A smoke detector
- Low power relay to turn the heating on and off. I think we'll use it for the curtains too.
- An airconditioner thermostat - a simple touch device to (no LCD) to control heating.
So, why did I build it and not just buy a commercial product? To show that it can be done by people like you and I without deep pockets and to give my son a sense of satisfaction that we built something important together. I also want to inspire my son to realise his passion and to give it a go as every journey begins with the first step. Even if the outcome is uncertain, give it a go. Failure is not doing anything at all.
Anyway, that's a little about me and my son and what we've been doing over the last few months. I hope you enjoyed reading about our adventure. If you're interested in photos or design details then feel free to ask. i'm happy to share for free what I've learned with others.