Sunday, September 7, 2014

Wireless Connectivity for Smart-ish Home

There is a practical reason for my interest in Internet of Things, a personal itch that I'd like to scratch.  In the next year or so, I'll be moving to a completely off-grid house - not a single wire or pipe connects the house to rest of civilization.  Electricity comes from Solar with battery system, heating with firewood and propane, and water from a spring.  The house is in a dead zone as far as cellular service goes, so the only link out is through a Satellite internet connection.  It's little amazing that you could be less than 25 miles from the heart of Silicon Valley and be so isolated, but isolated it is.

There's a lot of little things to check to ensure that everything's running smoothly - when power or water goes out, you have no one to blame but yourself.  Right now, all the checks are done manually, but my plan is to automate as much of the monitoring as possible before the move-in date to make it easier to live there.

There's a lot of different random things to check spread over a decent area, and most of the places do not have power source, so ideal sensor network will be very low power, workable over longer distances (100+ meters) or at least mesh capable.  I still haven't figured out how to measure certain things either - it may require a camera pointing at a gauge in the worst case scenario, so even the required data rates aren't clear to me yet.

There is one system, however, that I think will be crucial to automate as soon as possible, and will be easy to do so.  The electrical system runs off of a bank of lead acid batteries at 48V, and there is a battery monitor installed within the house.  The monitor has a serial output at 5V signalling that can be used to get the various real time data including things like pack voltage, current / power being used, and battery state of charge.  As far as I can tell, the battery monitor is not independently powered, and runs from the 48V supplied directly from the batteries.  Since this battery monitor is located within the house, it should be within the range of the wifi router or a computer with a Bluetooth enabled.  Basically, what I need is the ability to wirelessly transmit the serial port contents to a computer somewhere.

On the bluetooth side, something like this will do the job, though it'll require a host computer to pull the data.  With Bluetooth Low Energy, it might be possible to get to much lower power levels, but I don't see an accessible and affordable development platform yet.  Broadcam has announced a low cost development kit that includes whole bunch of sensors that seems very interesting, but the documentation isn't quite there and I'm not certain if it's possible to crack one open to bring out the serial connections out.  But at $19.99, I figured I'd take a gamble. :-)  Once the part is here, I'll be able to open it up and see how extensible the fob is.  Even if it's not useful for this purpose, it might be interesting to have a battery powered Bluetooth Low Energy device with lots of sensors attached.

Going the wireless route seems to make more sense - having some sort of processing and computing ability at the battery monitor itself will help in dealing with things like buffering data in case of network outages and eventually being able to make decisions there.  Looking around for a wifi enabled development options, it seems like Spark Core would fit the need the best.  There's enough processing capacity and memory to do something interesting, and data can be sent directly to a server out on the internet to be stored and analyzed.  Unfortunately, it seems like the Spark Core's uart pins are not 5V tolerant, so I'll have to do something there.

But before I spend more time, money, and effort down the path, next time I head down to the house, I'll take the battery monitor apart to see exactly how the things are wired and use a computer to talk to the serial port on the battery monitor.  From the documentation, it's not clear if 5V rail is available on the header on the battery monitor, and whether there's enough current to drive a Wifi board on top.  If not, I'll have to find a DC-DC converter to bring the 48V pack voltage down to 5V.  Hrm, and that reminds me, I also need to figure out how the grounding is done in relation to the battery pack...  So many little details to figure out!

No comments:

Post a Comment