Anyone interested in discussing building DIY Home Automation software and hardware?

Thanks NeverDie. The Si4468 is the better chip from the specs perspective however the better software support of the RFM69xW is a definite advantage. Agree that a better radio avoiding meshing is a good idea (although I think tattema had fun with his mesh implementation....). I have a software framework for the PIC micros (eg. SPI support) that I can easily reuse so the relative lack of community software / chatter for the Si4468 isn't a big problem for me.
 
RFM69HW specs comparison (although hardware looks similar to the Si4468)
Rx Sensitivity: -120dBm 16mA
Tx Sensitivity: +20dBm 130mA (+10dBm 33mA)
Sleep: 100nA
 
Have started on the Kicad PCB layout for the Si4468, will need to pay attention to the front end RF.
 
deandob said:
Thanks NeverDie. The Si4468 is the better chip from the specs perspective however the better software support of the RFM69xW is a definite advantage. Agree that a better radio avoiding meshing is a good idea (although I think tattema had fun with his mesh implementation....). I have a software framework for the PIC micros (eg. SPI support) that I can easily reuse so the relative lack of community software / chatter for the Si4468 isn't a big problem for me.
 
RFM69HW specs comparison (although hardware looks similar to the Si4468)
Rx Sensitivity: -120dBm 16mA
Tx Sensitivity: +20dBm 130mA (+10dBm 33mA)
Sleep: 100nA
 
Have started on the Kicad PCB layout for the Si4468, will need to pay attention to the front end RF.
I'm rooting for you!   :)  Please do post a follow-up on this thread and let us know how it's going or how it went.   
 
FWIW, here's some feedback.  At the time of your writing, I didn't know enough to really comment.  
 
tattema said:
I'm surprised that HopeRF don't supply these libraries :-(
In terms of setting expectations, I now think of HopeRF as taking the Semtech chip and making a module out of it.  Period.  At the end of the day, it's cheap enough and it does seem to work well.  If you're vertically integrated, maybe you can do it better and/or make it cheaper.  If so, then great, but at the moment they're the only ones actually selling such a thing that I'm aware of.
tattema said:
Implementation tips:
- In addition to the MISO, MOSI, CS, CLK pins for SPI, you'll need to map 5 INT pins to IO pins and a reset pin to the device. The implementation is such that it polls the pins rather than waits for interrupts so the INT pins can be wired to any available GPIO.
The conclusion I draw from reading various threads is that only one interrupt pin is typically needed.   Generally, DIO0 is wired to D2 on the ATMEGA328P.  That leaves one  remaining external interrupt pin (D3)  to be wired to whatever you want (e.g. a motion sensor or a leak detector) to wake a sleeping ATMEGA328P.  If needed, you can remap the DIO pins using software.  So, a total of 5 wires is all that's typically needed (not counting the antenna wire).
tattema said:
You'll notice a huge difference in performance. Firstly, you'll be able to sent huge packets without the 63/4 byte limitation (encryption engine limits still apply) imposed by the current JeeLAB and Motino implementations.
 
 
Secondly, the driver doesn't try to handle receive from within an interrupt.... once again poor design by Motino/JeeLABs. The detection of a preamble means you can reduce packet collisions. 
 
Enjoy :)
There's been some recent discussion that long packets are more prone to getting lost.  I'd be curious to know what the optimal length is if you have a lot of data to move (e.g. if you were doing OTA programming).  For simple sensor stuff, I don't see a need for long packets.  Do you?
 
I also think packet collisions are likely to be extremely rare.  That's because with listen-mode in effect, your gateway can choose when to wake up a sensor using address select and request its output.  So, the only possibility of a collision is with a sensor going off spontaneously, like a motion sensor or a leak sensor.  The vast majority of the sensors (like temperature sensors, soil moisture sensors, light sensors, actuators, etc.) can be time multiplexed by the gateway, so it's only the spontaneous packets flying around that might collide.  And for unplanned (spontaneously generated) packets, a mote can simply wait for an ACK and then re-transmit with a random Fibonacci  backoff if it doesn't get the ACK.   If you wanted to be extra conservative, you could also sample RSSI to check for clear air before starting Tx, and I imagine that would knock down the odds of collision even further.  For packets requested by the gateway, if the gateway doesn't receive it, it will just re-request it.  On top of all that, at 200kbps at 915Mhz (for example) you've got around 50 or so non-overlapping channels to choose from, so if collisions ever did become problematic, just use more channels!  It would cost me only about $6 in parts to have a dedicated gateway fully monitor any given channel.  I think I can afford that.   Divide and conquer!  In reality, I expect one channel will be all that's ever really needed for my simple needs, but it's nice to know that I have 50 additional channels available should I ever need them.  
 
Yes the hopeRF modules will be a little easier to use and also cheap. It uses similar silicon to the Silicon Labs chip although there does seem to be some functional and performance differences (eg. Si4486 has a really nice automatic antenna diversity option which is a good advantage for a hub radio). Its a bit more of a challenge and more flexible to implement the chip and the firmware directly (to a certain extent because I can :lol:) although in doing the PCB layout for the QFN20 chip the small chip size is going to be a challenge (I struggled soldering another Si Labs QFN chip with my power over Ethernet solution and this chip has tighter tolerances, 0.5mm between pins :eek:​). I may provision the PCB so that I can add a module after if my soldering skills fail me....
 
Long packets won't be needed for sensors, especially as you want to keep battery power low (longer packets = longer transmit time = more battery used). However shorter packets have higher protocol overheads so aren't as efficient. Long packets statistically will be more prone to error noise so there are compromises no matter which way. I recall doing the maths while at Engineering college but that was long time back. Keep the packets as short as needed.
 
Also I would have the sensor decide when to send back to the hub, not have the hub poll the sensor. This way the micro on the sensor can stay asleep and the radio powered down until it is time to transmit rather than always listening. Much better for battery, and besides the sensor knows best when to send back data. The collision problem isn't so much collisions from other radios but general interference. There are several algorithms that can be used for retiming, I like using the lower 8 bits of the system clock which as noise is usually random is a simple way to calculate packet resend delay.
 
Sounds like you are having fun thinking up the protocol scheme for your wireless solution! I'll likely reuse the DIY protocol I developed a couple of years back for my old RS485 multi-drop network as I have the microchip code for it. Not as sophisticated as tattema's mesh network protocol but it gets the job done.
 
I just had another look at what  particle photon is doing. It's not that any one aspect is unique, but on its face it looks like they've packaged up a nice overall system and have made it look very inviting, especially to newcomers.  If it's as easy to use as they make it look, you could get quick leverage and a fast running start on projects.
 
Anyone here using it or have experience with it?
 
Apologies for being away from this forum for a while. Have been playing with the Si4468 radio chip but also busy with work so progress has been slow. I have a USB IO board designed and assembled that includes a Si4468 master radio with working software but waiting on parts to complete the sensor radio using the lower power Si4467.
 
However I have just come across a integrated MCU and radio recently released from TI - the CC1310 for the 900Mhz band which boasts some fantastic specs, receiver sensitivity almost as good as the Si446x, considerably lower power receive and Tx modes and a powerful integrated M3 Cortex processor and lots of peripherals on chip and also very low power. Ti are quoting Kms of range with 10+ years of life on a coin cell, and reading the design notes they breakdown how to assemble a variety of sensors with long battery life and highlight the engineering to back up the long battery life claims. Seems to be the holy grail for IoT style sensors, a device that basically never needs batteries changed, excellent range, tiny size and powerful processing. I'm thinking 6loWpan on contiki would be a very flexible solution and no need for mesh given the range and listen before send for collision avoidance. Only turnoff for me is the difficulty (or cost) in setting up the toolchain however I got the Si446x platform up and running albeit with a bit of work & swearing. I see the CC12xx chips can be programmed with gcc which will help (ideally using gcc from Visual Studio) unlike some of the older Ti radio chipsets that need the arcane and expensive IAR toolchain.
 
I'm tempted to build a tiny coin cell sensor platform to reuse for a variety of sensors (light sensors, motion sensor etc.). Would likely do well as a kickstarter project. In 802.15.4 mode the CC1310 as a remote sensor should interoperate with my Si4468 IO hub that has antenna diversity and better receiver sensitivity. Anyone else looked into this new MCU/radio platform from TI and have any thoughts on how to apply it?
 
Thanks for your post!  I really like this thread.
 
I have played with the LoRa radios, and for range, I think you may be better off with those.  The LoRa link budget is much  higher than the TI  radio you referenced.  It also has an FSK transceiver that, IIRC, may have similar specs to the TI FSK radio you're referring to.  Loosely speaking, it's FSK transceiver (completely different from the LoRa by the way, but on the same chip) seems to be a next generation SX1231h (used in the RFM69), and so it's similar to that.  Anyhow, my takeway is: FSK for speed, LoRa for range.  Maybe that's why it has both.
 
One caveat/impression: getting maximum performance out of any of these radio's often takes some hard won knowledge of their details, and it generally takes time (perhaps a year or two) for a community of users to develop that.  What on the surface looks like solid documentation may actually be rather sketchy in ways that matter when you drill down into it.
 
Agree LoRa is cool - however for 99% of home automation use cases you don't need the range (& higher link budget) that you get with LoRa.
 
Definitely agree with you about the complexity for fine tuning these digital radios, the SiLabs options configurator tool for the chipset I'm using has a bewildering number of options (and I studied this stuff at college albeit years ago), and I'm still at the stage of setting up the chipset in software and haven't run any live tests yet. I'm struggling with MCU to chipset protocol which I think is a problem with my soldering, the SiLabs chips are QFN which are really hard to solder DIY. I have the radio on my IO hub working but can't get the sensor radio to respond (yet).
 
On another topic - the new Raspberry Pi comes with a faster processor and built-in WiFi/BLE. This would be a quicker option for hub radio hardware but not as much of a challenge as trying to get it working at the radio chipset level.
 
Not much activity in this thread anymore - I see most folks on this forum prefer working with the older hardware controllers.
 
Here I use my Leviton OmniPro 2 controller do it's thing while concurrently use Homeseer software to add some stuff to it. 
 
I am running one Homeseer 3 box on the RPi2 and Cumulus Weather software (Davis weather station) on another RPi2.
 
I have been tinkering a bit here with microrouters updating them with OpenWRT.  Not much play space and a bit slower CPU than the RPi2.
 
Started here originally with a:
 
1 - TP-Link with a SoC Atheros AR9331 - It is slow at 400Mhz with 8Mb of flash and 32Mb of RAM
2 - Gli.Net with a SoC Atheros AR9331 - with same but 64Mb of RAM.  This one has a set of GPIO pins on it that are easy to access so I added an RTC and 1-wire temperature sensor on it.
Changed SoC chipset on next experiment. 
3 - Nexx WT3020F with a SoC MT7620 - bit faster at 580Mhz with 8Mb of Flash and 64Mb of RAM.  Much smaller and a bit faster.
 
I am trying to automate some stuff with the above 3 devices.  Next looking to play with a customized MT board with a built in RTC and and microSD slot  on it and some GPIO pins.  The new board is the size of my thumb and as wide as a NIC port (it'll have two NIC ports).
 
Just a drawing and it's been changing.  It will be an MT7620 or MT7688
 
It is bigger than originally planned.   It has a radio on it now (not sure about this yet).
 
board.jpg
 
board2.jpg
 
The above started here..
 
linkit.jpgboard-2.jpg
 
Pretty decent for the price, wasn't aware of this (there are so many SBC coming out now at very cheap pricepoints that we used to pay for much dumber microcontroller devices like Pic, Arduino etc. 2 years back). Competes with the ESP boards but cheaper than the new RPI 3. I assume dual NIC because of its router roots?
 
I assume dual NIC because of its router roots?
 
Yes along with the wireless adds.
 
Here using both NICs and serial communications to do some basics.
 
Just recently added an RTC (smallest one I could find which is still too big) and a 1-Wire temperature sensor to a few of the GPIO ports on one microrouter.
 
The bit banging of the GPIO ports is well documented these days. 
 
What I like about LoRa and its big link budget is that "when your data absolutely, positively has to get there" (somewhat paraphrasing an old FedEx commercial), it's a good choice.  Even if it's overkill, it's still better to overkill than underkill, especially when it comes to wireless.
 
Anyhow, I don't know of any other game changers of similar magnitude on the horizon.  As the price continues to drop, I think it will become more pervasive.  On the other hand, I expect the FSK stuff will continue to make incremental improvements, and some of it, like the Si4468 that you mentioned, is already pretty darn good wrt to most IoT applications in a home environment.
 
NeverDie said:
It could be that, and/or it could be cutting corners at the manufacturing stage and/or using junk components.  Consider:
 
1436978544939-nrf24.jpg

On first glance, the two PCB's look quite similar, except the one on the left (what I've been calling the blob module), appears to be missing components, which immediately looks suspect.  Yet, my own testing has convinced me that it easily outperforms the module on the right on range and packet loss.  If I look more closely at the module on the left, I see what might be test points as well as  through holes that really do go all the way through to the other side (if I hold them up to a light, there's unimpeded light coming through those holes.  I don't know what the function of those holes is (is it for proper registration of the bonding machine that wire bonded the chip-on-board), or is it there for some other reason.  Somebody or something went to the expense of making those holes exactly where they were, and doing that isn't free.  The board on the right doesn't have those features visible.  So, does that imply it wasn't tested?  Also, why was such a dark, opaque material chosen?  Is there something there that they don't want you to see, or possibly something missing that they don't want you to see is missing (like, maybe evidence of  a ground plane, for instance)?
 
Just reading through this thread, and while this is old, had a couple comments...  I spent some years in electronic manufacturing a while back, and we went through some PCB failure analysis while we had trouble with boards.
 
Those through holes you see light through just look like normal vias to me.  The board manufacturer normally drills them out with a diameter large enough that they can be plated through afterwards to the desired thickness.  For some boards they will be left that way, and you'll see through the board.  Some boards are 'tented', having the vias filled or covered on the board surface.  Actually, having said that I stopped and looked up a reference.  This http://www.pcbuniverse.com/pcbu-tech-tips.php?a=5  is very descriptive and has more options than I was familiar with.
 
Back in the day we had a batch of boards that weren't plated to the proper via thickness.  This lead to via failures due to thermal changes cracking the vias.  Just another PCB failure mechanism that can be caused by a manufacturing error.
 
Back
Top