ZigBee Development Board


(Florian Z) #1


I want to share some details on a project that I have been working on: A ZigBee Development Board, which enables me to build devices that fully integrate with SmartThings. Think about this as essentially an Arduino combined with a ThingShield squeezed into small, low-cost package. I tentatively dubbed this thing ZBoard. I may come up with something more creative in the future :slight_smile:

Here is what my current prototype looks like:


There are a variety of Z-Wave and ZigBee devices out there, most of which are already fully compatible with SmartThings. However, sometimes I find that there simply isn’t an off-the-shelve solution to make specific aspects of my home smarter. Other times existing solutions just aren’t satisfactory: Door bells, in-wall scene controllers, remotes, specific lighting solutions that don’t require another hub, or simply making existing devices SmartThings compatible.
In those cases, an Arduino (or Arduino clone) coupled with the ThingShield is a fantastic way of making your own solution. However, the hardware can be bulky, tricky to run off batteries for prolonged periods of time, and too expensive to permanently deploy in the field.


To solve the problems with the Arduino + ThingShield, I set out to build a complete development board with the following set of requirements:

  1. Full integration with SmartThings
  2. Low-cost (ideally less than ThingShield)
  3. Ability to run off 2xAA batteries (or similar) for months
  4. Small form factor
  5. Ease of use (along the lines of Arduino)

I am pretty excited that my current prototype pretty much covers all, except for #5. Here is a brief video that demonstrates the most basic functionality: http://youtu.be/q6EpQRoWURg I apologize for the utterly crappy quality of the video.


My next step on this project is to address #5 on the list of requirements. As part of that effort I am exploring the option of updating the firmware via an over-the-air update method, where the Arduino IDE would interface with the ZBoard Connect SmartApp to wirelessly deploy new firmware to devices in the field. Currently, the only way of working with this thing is to physically attach a programmer / debugger. In order to save cost and complexity, I am not planning on having USB on-board.

The antenna and RF circuit also need tuning as range is currently poor (around 25 feet). The hardware is capable of much better range. This is just me not knowing what I am doing :wink: I need to make friends with someone who has access to a Network Analzyer and RF know-how.


I don’t want to bore you with the specifics here, although I am happy to answer any questions. However, I thought it might be helpful to mention that the MCU I am using is an ATmega256RFR2, which is an Atmel 8-bit micro controller with integrated 802.15.4 radio.
You are also invited to follow me on twitter @mpflorianz, if you are interested in updates on this project.

Shoutout to @urman for helping me figure out how to talk to ZigBee devices from a SmartThings device handler! Thank you!!!

Arduino Shield Suggestions?
Zigbee Irrigation Controller and Moisture Sensors - Eve is now Spruce
Options for Arduino > Smarthings
(Andrew Urman) #2

10/10 would buy!!!

(Jeremy) #3

Wow this pretty cool.
I’m looking forward to seeing more progress and information!

As for wireless programming, it would be cool, but definitely not a deal breaker.
Does the ATmega / your board have a dedicated Serial Port?
Thanks to wireless Bluetooth modules like the Adafruit Bluefruit EZ-Link its slightly easier to field debug and program devices. But a FTDI style pin headers on rev 2 of your PCB and your good to go.

My end goal for such a DIY device is one with several digital IO’s.

(Chrisb) #4

Looks cool. I’m not much of a maker, but I’d be mildly interested perhaps in playing with one. Depends on cost and documentation.

Oh, and I’m not a fan of Zboard for a couple of reasons…

First, there is Zboard that is a type of computer keyboard. Not that I think you’ll run into too many issues with patents/trademarks… these are definitely different products, but you never know. And if someone searches for Zboard in google they’ll probably find the keyboard first.

Second, if I saw a home automation product that was called Zboard I’d naturally assume z-wave: Zboard, Zwave… it’s too easy of a connection to make in my opinion.

I’d go for Zigboard… just my opinion of course.

(Andrew Urman) #5

How about BoardZies


(Florian Z) #6

Thanks for the great suggestions regarding the name. ZBoard is more of a working title, and settling on a real name is not a priority, yet :wink:

@mcotis: The ATmega256RFR2 has two hardware serial ports of which I broke out one. Technically, all the pins to connect a FTDI breakout board are available, but they are not in the proper 6-pin FTDI header format. I’ll break out the FTDI header (one way or another) with the next revision. So far, I haven’t been able to figure out how to fit another 6-pin header with the compact form factor.
It would be easy to make a “FTDI shield” available, but it would suck to have to buy yet another FTDI breakout, when most people probably already have a breakout board with the traditional 6-pin header.
A third option would be to simply re-arrange the pins on one side of the existing 16-pin header, so that the 6-pin FTDI breakout plugs straight into one of the “side headers”.

Having the FTDI header would make programming of this very similar to the Arduino Pro, which I would be totally okay with. The OTA programming could definitely lower the entry barrier, but requires some external memory to temporarily store the new firmware image. The added hardware would increase cost. I probably want to explore that option, anyways.

Underfloor Heating (UK) integration with SmartThings
(Dome) #7

I’d be very excited to see this in action. I’m working on a project called Smart Room Controller (I just started a new project thread) which is essentially an Arduino clone with built in LED controller, an IR remote interface, a siren, the ability to control relays, and a couple of sensors including a motion and water sensor. Right now it relies on a ThingShield, but it would be awesome to free the project from the shield and the Arduino form factor.

(Florian Z) #8

Cool! I am currently working on Arduino IDE integration, and I have a new hardware revision in the works with (hopefully) improved RF circuitry and DataFlash to experiment with over-the-air update functionality.

I am happy to send you one of my prototypes at some point in the future, if you want to play with it.

(Smart Rf) #9

Nice Project … What are your plans ? Do you plan to manufacture and sell your boards ? Do you intend to take this solution thru FCC certification process ? Or is this an open source hardware and software project where you will post design files and firmware/software projects somewhere ?

(Florian Z) #10

Hi @smartrf. Yes, I would like to make these available in one form or another.

The project grew from personal needs: I have ideas for integrating devices around the house, which would only be realizable with the ThingShield. However, in some instances the shield is not an ideal solution for reasons mentioned in my first comment.

I realize that others might be in a similar situation. The project has evolved with that in mind. There are currently three hurdles that I have identified:

  1. IEEE address block allocation
  2. FCC certification
  3. Assembly

I would be producing these in fairly limited quantities (frankly there isn’t a big market for this stuff), so I have to make sure that none of the above will make this endeavor cost-prohibitive.

At any rate, both the hardware and software will be open sourced.

(George Sudarkoff) #11

I’d love to get my hands on a handful of these for sure! I’ve made a few Arduino-compatible boards of my own in the past and now that I’m into ST, I’ve been playing with the idea of building something like this as well. But I’m very happy to see someone to be much further ahead!

I take it the chip you’re using doesn’t have the USB bits onboard? Otherwise something like a LeoStick would have been awesome!

(Hey, do you know Bobby Podesta, by any chance?)

(Florian Z) #12

Agreed, @sudarkoff! Unfortunately, the ATmega256RFR2 doesn’t have builtin USB, and I have been reluctant to add an FTDI or 32U4 just for that functionality. It would add cost and potentially affect size. USB would also be mostly useless once the device has been programmed and deployed in the field. I’ve been leaning to using a FTDI breakout or potentially doing over-the-air upgrades. It’s not out of the question though, if you feel like USB would be important.

I know Bobby only by name. He left for Toy Talk before I got a chance to meet him.

(George Sudarkoff) #13

USB is not important. I don’t think even OTA update is all that important. Maybe later for a PRO version? :slight_smile: I usually just break out the FTDI header on my boards.

OTA might be great for large installations or installs in hard to reach places. I did it for my attic fan thermostat, but I’ve never actually used it (and the thermostat has been working without a reboot for over four years now.) As long as you can control a handful of strategically chosen parameters via ZigBee, you’re good. Though I totally understand you wanting to play with it :smile:

(Smart Rf) #14

@florianz you seem to have a good grasp of the hurdles involved in trying to create an RF wireless product.
FCC or other governmental regulations will always take longer and cost more than you planned for, and unfortunately it always occurs when you think you are finally completing the project.
When you were looking for solutions did you happen to look at the Atmel ATZB-S1-256-3-0-C/U modules that use the same SOC that you have selected ? Maybe form factor or cost led you away from that solution ?
This module is FCC/IC/CE certified and has an on board chip antenna or has a version with u.FL connector for external antenna, and has an evaluation board for experimenting until you decide on a target board form factor of your own.
by the way it comes with a pre loaded IEEE MAC address unique world wide using the Atmel company ID, so no worries there either. I would imagine your firmware should run on this board quite easily.
If you are looking for some ideas regarding, the RFR2 device and Arduino, you might want to take a look at spaces.atmel.com and look for the recent RFR2 Arduino project. this will not help with ZHA and connecting to the SmartThings Hub but would let one experiment with this SOC device using the Arduino IDE and Arduino bootloader by using the Atmel Lwmesh proprietary mesh networking stack that comes with this project.

I look forward to following the progress of your project.

(Florian Z) #15

Thanks for the great info, @smartrf. Sounds like you have done this before… maybe I can bug you with some questions :wink:

Yes, I did look at the Atmel ZigBit modules. They are great, but more expensive than what I am doing now. It costs me about US$ 25 to build one of my prototypes. That includes the cost of the components at quantities of one, as well as the PCB (OSHPark makes quantities of 3). The equivalent ZigBit module goes for just under $29 at quantities of one, and it doesn’t include the power supply. The boost converter is pretty pricey, and I already picked one of the cheaper ones that still fits my requirements. I’ll have to do the math at bigger quantities, but while the ZigBit module gets cheaper, so do the components I am buying.

My cost calculations obviously don’t include my time to assemble the prototype, and maybe I am being naive about how much FCC certification and possibly MAC address allocation would cost. Obviously, those costs are already absorbed in the price of the ZigBit module.

I am guessing that I could get around paying full-price for the MAC addresses, if I could partner (or lease a small sub-range) with another organization that already has an allocation. There is no (legal ;-)) way around the government certification, though.

Maybe I should get a better idea of the costs involved and compare those against using the ZigBit module. From the firmware side of things, you are right, what I am doing now is totally compatible.

Arduino integration is what I am working on, right now. I actually have that working to some degree, already. One complication is that I have to use Atmel’s BitCloud framework, because it needs a full ZigBee stack to work with SmartThings. It’s has proven a bit tricky to get that all working in the Arduino IDE, but I am making progress.

I’ve heard of LWMesh. Is that proprietary or Atmel’s implementation of 6LoWPAN? I am a bit supporter of 6LoWPAN :wink:

Bonus picture of what I currently have:

(Smart Rf) #16

@florianz Yes, your requirement to support 5 volts does add complexity. But your reasons for this are certainly understandable. Also,as you probably know, if you just wanted to build a few boards for your own use, at home, then you would not need to worry about certification, or MAC address’s. The issues occur when you want to sell a wireless product. And then you also would have to consider becoming a member of the Zigbee Alliance if you want to promote or advertise your product as “Zigbee” anything. As you have suggested, you should decide how you will want to sell/market/deliver your solution and then get a quote on what it will cost to achieve your goal. You may not like what you find out.

Lwmesh is a very simple proprietary 15.4 wireless mesh networking solution. It is not inter-operable with Zigbee or 6lowpan solutions. It would require yet another gateway/hub interface to connect to SmartThings.

The nice thing about the 802.15.4 devices like the one you are working with, is that there are a growing number of wireless protocols that can be supported on the same device, with just a firmware change.
Zigbee,6lowpan,Lwmesh, Openwsn, etc and a growing number of these are open source solutions. Unfortunately it would be quite difficult or impossible to support them all at the same time on the SmartThings Hub without multiple 15.4 radios inside, thus the need for either external gateways, or plug in network co processor radios that would handle each 15.4 stack separately.

As they say, the possibilities are endless.

(Andrew Urman) #17

I love the dirty talk

(Florian Z) #18

I did some research into getting a MAC address block, and thought I would summarize my findings here. Just in case someone else is interested in this:

The only official way of getting an address block is through the IEEE Registration Authority. They manage a database of allocated blocks. These entries are publicly listed, unless the organization pays an annual fee to have the listing removed.

There are three options:

  • MA-L (MAC Adress Block - Large), formerly OUI (Organizationally Unique Identifier) for $2,500: You get to assign 24 bits, so up to 16,777,216 unique devices
  • MA-M (MAC Address Block - Medium) for $1,500: You get to assign 20 bits, so up to 1,048,576 unique devices
  • MA-S (MAC Address Block - Small) for $625: You get to assign 12 bits, so up to 4,096 unique devices

The market for a product like this would be pretty small. In my case, assume a production run of 200 units. It would be optimistic to assume that I would be selling all of those. At any rate, even the cheapest option would be adding about $3.13 to the price of every board.

There is another option: Microchip sells a little flash IC, which can be incorporated into the hardware design. It contains a unique MAC address on it, which you are basically buying as part of the package. The IC goes for around $0.28 each. This is much more viable for a project like this.

I looked into FCC certifcation for “intentional radiators” a bit. I have not requested a quote from a lab, yet, but just from anecdotal evidence it looks like that can cost anywhere from $5,000 - $15,000 depending on how much of the process you can do yourself, and if you pass on the first time or not. Even at half the cost, this whole process seems completely cost prohibitive. Suddenly, the ZigBit module doesn’t look so expensive anymore. I’ll ask around for a more accurate price on the FCC certification.

(George Sudarkoff) #19

Do you need FCC certification for a development board?

(Florian Z) #20

Yes, unfortunately “development” boards are not excluded from requiring FCC certification.

I could sell this as a kit, but the SMD components (especially the QFN package) are a bitch to solder if you don’t have enough practice with hot air or a hot plate. Even then you are technically only allowed to build 5 of those for yourself, until you need to go and get FCC certification.

There is really no way around FCC certification, unless I were to use an RF module that has already been certified.