<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digits Domotica Blog &#187; Xbee</title>
	<atom:link href="http://blog.hekkers.net/tag/xbee/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hekkers.net</link>
	<description>My Weblog about Domotica and more</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:32:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>RF to Zigbee gateway</title>
		<link>http://blog.hekkers.net/2011/12/02/rf-to-zigbee-gateway/</link>
		<comments>http://blog.hekkers.net/2011/12/02/rf-to-zigbee-gateway/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 17:00:31 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[HVAC]]></category>
		<category><![CDATA[JeeNodes]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Xbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=2508</guid>
		<description><![CDATA[The last piece of missing hardware is finished. The picture below shows the 2nd RF to Zigbee gateway I had to make to be able to receive all the Hydronic balancing sensors I made earlier this week. One of those sensors just couldn&#8217;t make it through 3 walls all day long, so I created  a [...]]]></description>
			<content:encoded><![CDATA[<p>The last piece of <a href="http://blog.hekkers.net/2011/11/29/hb-sensors-finished-and-installed/">missing hardware</a> is finished. The picture below shows the 2nd RF to Zigbee gateway I had to make to be able to receive all the Hydronic balancing sensors I made earlier this week. One of those sensors just couldn&#8217;t make it through 3 walls all day long, so I created  a temporary solution on a breadboard to solve this.</p>
<p style="text-align: center;"><a href="http://blog.hekkers.net/wp-content/uploads/2011/12/DSC_6393_s.jpg"><img class="aligncenter size-full wp-image-2511" title="RF to Zigbee gateway" src="http://blog.hekkers.net/wp-content/uploads/2011/12/DSC_6393_p.jpg" alt="" width="600" height="399" /></a></p>
<p>A very simple yet effective way (for me) to get the sensor data where I want it (in my Domotica system) with minimal effort.</p>
<p>The <a href="http://jeelabs.net/projects/hardware/wiki/JeeNode">JeeNode</a> acts as a RF receiver and just echoes everything with a valid CRC to the <a href="http://www.digi.com/xbee/">Digi XBee</a>; from there it eventually arrives at my Zigbee Coordinator with which I can communicate over<a href="http://en.wikipedia.org/wiki/TCP/IP_model"> TCP/IP</a>.</p>
<p>The JeeNode runs a slightly modified version of the<a href="http://jeelabs.net/projects/cafe/wiki/RF12demo_sketch"> RF12Demo sketch</a> made by Jean-Claude Wippler. I used the <a href="http://arduiniana.org/libraries/newsoftserial/">NewSoftSerial</a> library to create an additional Serial port, and added a few <span style="color: #ff6600;">print</span> statements for the XBee port, right there where the RF12Demo<span style="color: #ff6600;"><strong> Serial</strong>.println</span>()&#8217;s the received RF data to the Serial port. Compile, Upload, setting the RF band,  group- and node ID and I&#8217;m done!</p>
<p>This JeeNode is powered by a 5V USB adapter and the XBee gets its power from the 3.3V JeeNode ports. The XBee uses a Zigbee End Device AT firmware (2864) with the Sleep Mode set to Pin Hibernate. But because pin 9 is wired to GND, this means that the XBee is permanently on.  Only 3 wires are needed to connect the XBee to the JeeNode: 3.3V, GND and a JeeNode digital pin to the XBee DOUT.</p>
<p>That&#8217;s it &#8211; moving on with where this all <a href="http://blog.hekkers.net/2011/11/12/controlling-the-radiators-is-not-enough/">started with</a>: <em>understanding the flow of  heating energy in our house</em>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2011/12/02/rf-to-zigbee-gateway/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Half-way there?</title>
		<link>http://blog.hekkers.net/2010/12/19/half-way-there/</link>
		<comments>http://blog.hekkers.net/2010/12/19/half-way-there/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 20:51:10 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Xbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1789</guid>
		<description><![CDATA[Today I changed some things on my previous setup, after testing &#38; concluding that XBee IO Change detection doesn&#8217;t work during sleep, which I already anticipated. I changed some settings in the XBee and I added a wire to Pin 9, the Pin Sleep Control Line. The XBee is now in Sleep Mode 5 (Cyclic [...]]]></description>
			<content:encoded><![CDATA[<p>Today I changed some things on my <a href="http://blog.hekkers.net/2010/12/16/mcu-less-experiments/" target="_self">previous setup</a>, after testing &amp; concluding that XBee IO Change detection doesn&#8217;t work during sleep, which I already anticipated.</p>
<p>I changed some settings in the XBee and I added a wire to Pin 9, the Pin Sleep Control Line. The XBee is now in Sleep Mode 5 (Cyclic Sleep Pin-Awake), which means the XBee wakes on timer expiration or when Pin 9 changes from high to low state. The latter (Pin 9 change) is what the extra wire is for; it connects the output of the <a href="http://blog.hekkers.net/2010/12/04/the-allegro-a3214-hall-effect-switch/" target="_self">Hall-effect sensor</a> to Pin 9, so that when the sensor output changes, the state of Pin 9 changes also.</p>
<p>Now the Xbee sends an IO Data Sample frame each 28 seconds based on the sleep settings, but also when the magnet is being moved towards the sensor &#8211; because the XBee Pin 9 becomes low, the XBee wakes up and starts to send an IO Data Sample Frame. Great! So now I know instantly when the magnet comes close to the sensor; exactly what I need.</p>
<p>But that&#8217;s only half of what I need of course, because when the magnet is being moved <em>away</em> from the sensor, the sensor output (and XBee pin 9) changes back to high, but that&#8217;s not triggering a wake up of the XBee&#8230; hmm.</p>
<p>So I started searching the net and read about all kinds of latches, NOT gates, flipflops, and saw more circuits than I&#8217;ve never seen before in my life. I haven&#8217;t found what I&#8217;m looking for yet &#8211; I don&#8217;t even know if it can be done &#8211; but I&#8217;ll continue my search for a way to shortly ground the XBee pin 9 whenever the sensor output changes from high to low or vice versa.</p>
<p>Yeah I know, an ATMega, duh.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/12/19/half-way-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MCU-less experiments</title>
		<link>http://blog.hekkers.net/2010/12/16/mcu-less-experiments/</link>
		<comments>http://blog.hekkers.net/2010/12/16/mcu-less-experiments/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 21:27:52 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Xbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1769</guid>
		<description><![CDATA[Some days ago I was reminded of the fact that the Hall-effect sensor I&#8217;m currently testing, could very well do without a JeeNode; a combination of this sensor with a XBee could maybe suffice as a wireless sensor. Right; so I made this breadboard setup: It looks like it&#8217;s working, although I haven&#8217;t spent that [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I was reminded of the fact that the <a href="http://blog.hekkers.net/2010/12/04/the-allegro-a3214-hall-effect-switch/" target="_self">Hall-effect sensor</a> I&#8217;m currently testing, could very well do without a JeeNode; a combination of this sensor with a XBee could maybe suffice as a wireless sensor. Right; so I made this breadboard setup:</p>
<p><a href="http://blog.hekkers.net/wp-content/uploads/2010/12/DSC_4807_resize.jpg"><img class="aligncenter size-full wp-image-1770" title="A3214 sensor with XBee" src="http://blog.hekkers.net/wp-content/uploads/2010/12/DSC_4807_resize.jpg" alt="A3214 sensor with XBee" width="400" height="266" /></a></p>
<p>It looks like it&#8217;s working, although I haven&#8217;t spent that much time on this yet. Yes, I do see incoming &#8220;IO Data Sample&#8221; packets, I see differences in the bits for &#8220;open&#8221; and &#8220;closed&#8221;, but I also see multiple packets (3, 5) where 1 packet would be perfect.</p>
<p>Another big issue is that in this setup the XBee is working in &#8220;No Sleep&#8221; mode, and that&#8217;s a no-go of course when this is going to be battery-powered. Do I want to use cyclic sleep and have IO samples sent at a regular interval? No!, that&#8217;s always too late&#8230;</p>
<p>Does the XBee Digital IO Change Detection work while it&#8217;s asleep? Probably not, although I haven&#8217;t tested that yet. But the manual doesn&#8217;t give any clue that this will work, so chances are small that it will.</p>
<p>Maybe I can do something with the &#8220;Cyclic Sleep Pin-Wake&#8221; Sleep mode? Never used that one before&#8230;</p>
<p>Or, use a different approach; use &#8220;a&#8221; circuit, triggered by the sensor, that will wake up the XBee, make the XBee send a IO Data Sample (this can be done with some specific XBee settings) and put it back to sleep after the XBee has finished sending the sample. That&#8217;s where I have used a JeeNode for so far .. <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ; but maybe there&#8217;s a simpler solution?</p>
<p>Time to find out!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/12/16/mcu-less-experiments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trying to get a date with Plugwise</title>
		<link>http://blog.hekkers.net/2010/08/12/trying-to-get-a-date-with-plugwise/</link>
		<comments>http://blog.hekkers.net/2010/08/12/trying-to-get-a-date-with-plugwise/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 20:46:52 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[Plugwise]]></category>
		<category><![CDATA[Xbee]]></category>
		<category><![CDATA[Zigbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1246</guid>
		<description><![CDATA[Having Plugwise in my house since December 2008, playing around with Digi Series 2 XBee modules for some time, knowing both are Ember EM250 based; nice ingredients for some fooling around with those two. I&#8217;ve already been asked a few times if I could &#8216;see&#8217; any Plugwise traffic or other signs of the Plugwise network. [...]]]></description>
			<content:encoded><![CDATA[<p>Having Plugwise in my house since December 2008, playing around with Digi Series 2 XBee modules for some time, knowing both are <a href="http://www.ember.com/products_zigbee_chips_e250.html" target="_blank">Ember EM250</a> based; nice ingredients for some fooling around with those two. I&#8217;ve already been asked a few times if I could &#8216;see&#8217; any Plugwise traffic or other signs of the Plugwise network. No, i did not. Cause that would be wrong, if those would interfere that easily. And to tell you the truth, i wasn&#8217;t really interested enough to spend much time on this.</p>
<p>But why not try it some time? It has been on the to-do list for some time, but never made it to the top-5. But when there was another question recently from someone for whom i gladly spend lots of time without any personal gain or interest, i decided to try some things to see if a first small step could be made. I put 1 of my spare XBee modules into a XBee adapter, loaded the firmware version 2864 (XB24-ZB End Device AT), set the preconfigured PAN id to 0 (which means the XBee will join any PAN it can find) and uploaded the new configuration.</p>
<p>Now there&#8217;s this small green LED on the adapter labeled as &#8216;ASC&#8217;, which tells you the associated state of the XBee. When it starts blinking rapidly, you know you&#8217;re going in the right direction &#8230; reading back the Operating PAN ID from the XBee showed me a value like D6F0000134567. Hey, where have i seen that value before? It looks like a Ember MAC address.. YES, it&#8217;s the MAC address of my Circle+ ! How odd&#8230; <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>OK, i know. This is just a very small step; i know the PAN ID of the Plugwise network now; duh. Next thing to figure out is the encryption key; it&#8217;s time to join forces on this project that is in the top-5 now and is there to stay!</p>
<p>Plugwise still sucks in <a href="http://blog.hekkers.net/2008/12/31/plugwise-makes-a-big-mistake/" target="_self">some perspectives</a>, but this is nice. And i have no idea if this will ever come to something useful. But that doesn&#8217;t matter, just as long as I&#8217;m having fun with what I&#8217;m doing <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/08/12/trying-to-get-a-date-with-plugwise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dropping fast&#8230;</title>
		<link>http://blog.hekkers.net/2010/07/24/dropping-fast/</link>
		<comments>http://blog.hekkers.net/2010/07/24/dropping-fast/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 23:01:13 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[JeeNodes]]></category>
		<category><![CDATA[motion sensor]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Xbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1142</guid>
		<description><![CDATA[Oops&#8230; the Supply Voltage on my motion sensor is already down to 3060 millivolts. Suddenly it&#8217;s dropping very fast; this sensor has been operational for more then 7 weeks now, with IIRC 2 new and 1 older rechargeable battery of a brand with which i&#8217;ve had bad experiences before. I hope that&#8217;s what is causing [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1143" class="wp-caption alignnone" style="width: 601px"><a href="http://blog.hekkers.net/wp-content/uploads/2010/07/SupVoltPic_000019.png"><img class="size-full wp-image-1143" title="XBee Supply Voltage dropping fast!" src="http://blog.hekkers.net/wp-content/uploads/2010/07/SupVoltPic_000019.png" alt="" width="591" height="150" /></a><p class="wp-caption-text">XBee Supply Voltage dropping fast!</p></div>
<p>Oops&#8230; the Supply Voltage on my motion sensor is already down to 3060 millivolts. Suddenly it&#8217;s dropping very fast; this sensor has been operational for more then 7 weeks now, with IIRC 2 new and 1 older rechargeable battery of a brand with which i&#8217;ve had bad experiences before. I hope that&#8217;s what is causing this, cause if not, i have some work to do <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>The other 2 battery powered sensors are still doing fine, BTW:</p>
<div id="attachment_1144" class="wp-caption alignnone" style="width: 838px"><a href="http://www.hekkers.net/domotica/devicestatus.aspx"><img class="size-full wp-image-1144 " title="Supply Voltages" src="http://blog.hekkers.net/wp-content/uploads/2010/07/Capture22-7-2010-22.10.58.png" alt="" width="828" height="66" /></a><p class="wp-caption-text">Supply Voltages (click to view the realtime values)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/07/24/dropping-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XBee Configuration</title>
		<link>http://blog.hekkers.net/2010/07/09/xbee-configuration/</link>
		<comments>http://blog.hekkers.net/2010/07/09/xbee-configuration/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 18:36:43 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[Xbee]]></category>
		<category><![CDATA[Zigbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1075</guid>
		<description><![CDATA[I have the feeling i&#8217;m getting somewhere I updated my ZigBee network webpage and added a configuration panel with which i can configure all the XBee radios in my WSN (well, it&#8217;s a WSAN actually). Since my Home Automation system doesn&#8217;t have a GUI of itself and configuring XBee radios from a touchscreen without keyboard [...]]]></description>
			<content:encoded><![CDATA[<p>I have the feeling i&#8217;m getting somewhere <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I updated my <a href="http://www.hekkers.net/domotica/ZigbeeNetwork.aspx" target="_blank">ZigBee network</a> webpage and added a configuration panel with which i can configure all the XBee radios in my WSN (well, it&#8217;s a WSAN actually).</p>
<div id="attachment_1076" class="wp-caption alignnone" style="width: 450px"><img class="size-full wp-image-1076" title="XBee config" src="http://blog.hekkers.net/wp-content/uploads/2010/07/capture9-7-2010-103555.png" alt="XBee config" width="440" height="224" /><p class="wp-caption-text">XBee config</p></div>
<p>Since my Home Automation system doesn&#8217;t have a GUI of itself and configuring XBee radios from a touchscreen without keyboard didn&#8217;t sound like a good idea either, i thought it would be best to create a web page for that. There&#8217;s still some work to be done in showing the XBee response on the page after the remote AT command has executed, but that&#8217;s a minor thing; &#8220;under water&#8221; i can see everything is working fine. With a click of the &#8216;Send&#8217; button the values entered on the page are concatenated into a single string with a special delimiter and then sent off to my system using XMLRPC. The ZigBee API interface will then construct 1 or more ZigBee frames based on the values, send those frames to the targeted XBee radio(s) and wait for the responses to arrive. That&#8217;s it, basically.</p>
<p>Being able to do all this, is what makes me feel i&#8217;m getting somewhere; now that i&#8217;m able to monitor and configure my XBee radios in a convenient way, it&#8217;s time to really move on and start &#8216;mass production&#8217; of all kinds of sensors and other stuff that are on my wish list.. starting with a bunch of motion detectors and a LED strip controller! After that, some room-oriented sensors (combining motion, temperature, light and perhaps humidity in one package) will be made. Can&#8217;t wait!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/07/09/xbee-configuration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ZigBee Network monitoring</title>
		<link>http://blog.hekkers.net/2010/07/05/zigbee-network-monitoring/</link>
		<comments>http://blog.hekkers.net/2010/07/05/zigbee-network-monitoring/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 17:07:02 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[Xbee]]></category>
		<category><![CDATA[Zigbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1063</guid>
		<description><![CDATA[With an increasing amount of XBee modules operational (6, at the time i write this)  and the nature of a ZigBee network, i felt the need to monitor some network related stuff; what&#8217;s going on in there?? Do my End Devices make use of a Router when i relocate them, further away from the Coordinator? [...]]]></description>
			<content:encoded><![CDATA[<p>With an increasing amount of XBee modules operational (6, at the time i write this)  and the nature of a ZigBee network, i felt the need to monitor some network related stuff; what&#8217;s going on in there?? Do my End Devices make use of a Router when i relocate them, further away from the Coordinator? What about signal strength? All those questions can be answered with the ZigBee Network monitor i created last weekend.</p>
<p>It&#8217;s totally integrated into my Domotica system of course, which takes care of 95% of all the work; what was left was parsing the Remote AT Command responses coming back from the XBees. For example, a response byte of 33 to the &#8216;DB&#8217; command means that the RSSI of the last received packet is -51 dBm.  Task scheduler, database storage, events being triggered on value changes, it&#8217;s all available. Want to create a chart of RSSI values? Easy. Receive SMS alert when a XBee is &#8216;lost&#8217;? Consider it done. <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I created a <a href="http://www.hekkers.net/domotica/ZigbeeNetwork.aspx" target="_blank">webpage</a> that shows the current values for some XBee configuration values, produced by this ZigBee Network monitor. No more X-CTU for me (OK, not completely: uploading the right firmware and changing some initial settings will still be done from behind the PC&#8230;) But once the right PAN ID has been set and the XBee has joined, local configuration isn&#8217;t needed anymore. This makes life a lot easier!</p>
<div id="attachment_1073" class="wp-caption alignnone" style="width: 350px"><img class="size-full wp-image-1073" title="X-CTU tool" src="http://blog.hekkers.net/wp-content/uploads/2010/07/capture5-7-2010_resize.png" alt="X-CTU tool" width="340" height="326" /><p class="wp-caption-text">X-CTU tool</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/07/05/zigbee-network-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XBee Supply Voltage monitoring (3)</title>
		<link>http://blog.hekkers.net/2010/06/26/xbee-supply-voltage-monitoring-3/</link>
		<comments>http://blog.hekkers.net/2010/06/26/xbee-supply-voltage-monitoring-3/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 21:45:28 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[JeeNodes]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Xbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1048</guid>
		<description><![CDATA[This is what you get when a battery powered XBee is struggling to stay alive cause the batteries aren&#8217;t supplying enough &#8216;juice&#8217; anymore: FF FF FF FF FF FD 7A 1F 33 40 00 A2 13 00 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [...]]]></description>
			<content:encoded><![CDATA[<p>This is what you get when a battery powered XBee is struggling to stay alive cause the batteries aren&#8217;t supplying enough &#8216;juice&#8217; anymore:</p>
<pre>FF FF FF FF FF FD 7A 1F 33 40 00 A2 13 00 01 FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 1D 00
01 53 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00
00 73 A0 73 B6 70 E0 73 CC 73 E2 06 40 75 5C 76 F0 76 3C 76 B4 76 3C
76 3C 73 F8 74 0E 74 22 75 1C 75 EC 75 60 74 2C 46 50 E6 00 01 02 00
00 00 00 E8 00 01 02 00 00 00 00 F3 E0 58 A0 FF FE 00 EC 30 BC 75 CA
A8 D8 B6 D5 9F FD 5A 7B FF FE 00 00 FF FE 00 00 FF FE 00 00 FF FE 00
00 FF FE 00 00 FF FE 00 00 FF FE FF FF 79 BE 01 4A 01 B0 01 62 01 4E
01 66 01 AC 01 60 01 82 01 9C 01 68 01 B2 01 94 08 1C 08 29 08 34 02
etc. etc. ...</pre>
<p>For those not really experienced in recognizing XBee API frames from a byte stream: there&#8217;s not a single valid frame to be found inside all those bytes. But this is what my Coordinator received today.</p>
<p>But that&#8217;s OK; i intentionally left the XBee running on low batteries; I wanted to see what would happen. My code that should recognize valid XBee API packets just got it&#8217;s ultimate real life test. Cause normally, the byte stream coming from the Zigbee Coordinator is so <em>clean</em> you can hardly test it without writing a special tool that creates a mix of garbage, valid and invalid frames. Now i know for sure my code works! <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Another good thing i saw, is that this &#8216;dying&#8217; XBee didn&#8217;t create that much traffic resulting in other XBee&#8217;s not being able to get their messages to the Coordinator anymore.</p>
<p>This is really important actually; imagine you&#8217;re on holiday and a sensor runs out of battery power; do you really want to monitor your Home Automation system for that kind of trouble while you&#8217;re at the other side of the world? Become a slave of your own system? And have to call your neighbor that feeds the cat to remove the batteries or worse ? (&#8220;I don&#8217;t care <em>how</em> you do it, just <span style="text-decoration: underline;">do it</span><em>.. Cut some red wires if you have to</em>!&#8221;) Just to keep the system running? Not me!</p>
<p>In the meantime, this really nice weather only makes you want to play outside; sitting behind a computer with an airco blowing cold air in your neck is not my favorite right now:</p>
<p><img class="alignnone size-full wp-image-1056" title="RC Cars" src="http://blog.hekkers.net/wp-content/uploads/2010/06/dsc_3081_resize.jpg" alt="RC Cars" width="350" height="232" /></p>
<p>Batteries are being charged! <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/06/26/xbee-supply-voltage-monitoring-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XBee Supply Voltage monitoring (2)</title>
		<link>http://blog.hekkers.net/2010/06/25/xbee-supply-voltage-monitoring-2/</link>
		<comments>http://blog.hekkers.net/2010/06/25/xbee-supply-voltage-monitoring-2/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 19:38:12 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[JeeNodes]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Xbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1042</guid>
		<description><![CDATA[Here are the results of the test i started 3 days ago. After 3 days of monitoring the XBee supply voltage the alkaline batteries were empty and with a bit of tweaking i got the data out of the logs and into an Excel sheet so i could create a chart: OK, this looks good [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the results of the <a href="http://blog.hekkers.net/2010/06/21/xbee-supply-voltage-monitoring/" target="_blank">test</a> i started 3 days ago. After 3 days of monitoring the XBee supply voltage the alkaline batteries were empty and with a bit of tweaking i got the data out of the logs and into an Excel sheet so i could create a chart:</p>
<div id="attachment_1043" class="wp-caption aligncenter" style="width: 596px"><img class="size-full wp-image-1043" title="XBee Supply Voltage" src="http://blog.hekkers.net/wp-content/uploads/2010/06/capture25-6-2010-210757.png" alt="XBee Supply Voltage" width="586" height="155" /><p class="wp-caption-text">XBee Supply Voltage</p></div>
<p>OK, this looks good and it&#8217;s easy to do; all you need are some changed settings on the XBee, a Domotica system that can fire the &#8216;IS&#8217; remote AT Command to your XBee and your done. Well, almost <img src='http://blog.hekkers.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The JeeNode has been running a small sketch that transmits a dummy string every 5 seconds; without any sleeping and also keeping the XBee on all the time:</p>
<pre>#include &lt;NewSoftSerial.h&gt;

#define SERDBG 1
NewSoftSerial XBSerial = NewSoftSerial(2, 3);

int CTSpin = 7;
int XBpin  = 6;

static void Send () {
  // send a dummy string
  XBSerial.print(millis());
  XBSerial.print(" ");
  XBSerial.println("XBeeaaaaaa");
#if SERDBG
  Serial.print(millis());
  Serial.print(" ");
  Serial.println("XBeeaaaaaa");
#endif
}

void setup() {
  // setup XBee
  pinMode(CTSpin,INPUT);
  pinMode(XBpin,OUTPUT);
  digitalWrite(XBpin,LOW);
  digitalWrite(CTSpin,LOW);
  delay(10);

  XBSerial.begin(9600);
#if SERDBG
  Serial.begin(9600);
#endif
  // give XBee some time to join PAN
  delay(5000);

  // let the world know we're here
  XBSerial.println("[XBeeVoltage]");
#if SERDBG
  Serial.println("[XBeeVoltage]");
#endif
}

void loop() {
  delay(5000);
  Send();
}</pre>
<p>The JeeNode stopped working at around 2/3 of the horizontal axis, so after 48 hours or so where the voltage had already dropped to 2,64 V. The XBee is still working as i write this, with a voltage of 2,3 V. I wonder how long it takes for the XBee to give up too&#8230;</p>
<p>Conclusion: this can definitely be used as a way to remotely monitor my battery powered sensors; Yippee!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/06/25/xbee-supply-voltage-monitoring-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XBee Supply Voltage monitoring</title>
		<link>http://blog.hekkers.net/2010/06/21/xbee-supply-voltage-monitoring/</link>
		<comments>http://blog.hekkers.net/2010/06/21/xbee-supply-voltage-monitoring/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 21:11:27 +0000</pubDate>
		<dc:creator>Robert Hekkers</dc:creator>
				<category><![CDATA[Domotica]]></category>
		<category><![CDATA[JeeNodes]]></category>
		<category><![CDATA[Xbee]]></category>
		<category><![CDATA[Zigbee]]></category>

		<guid isPermaLink="false">http://blog.hekkers.net/?p=1033</guid>
		<description><![CDATA[One thing i would really like, is being able to monitor the voltage the JeeNode and XBee are running on. Now the XBee has a %V command, specially for reading the voltage on the Vcc pin. So let&#8217;s see of i can use this. The first thing i noticed was that the XBee i configured [...]]]></description>
			<content:encoded><![CDATA[<p>One thing i would really like, is being able to monitor the voltage the JeeNode and XBee are running on. Now the XBee has a <strong>%V</strong> command, specially for reading the voltage on the Vcc pin. So let&#8217;s see of i can use this.</p>
<p>The first thing i noticed was that the XBee i configured with the AT End Device firmware, didn&#8217;t respond to the %V command. Hmm, correct; the manual was very clear about it: the %V command is only supported by a Router  and not by a Coordinator or an End Device. And it&#8217;s those End Devices  (which will run on batteries) that i want to monitor&#8230;</p>
<p>OK.. next command to have a look at was the &#8216;<strong>IS</strong>&#8216; command, which stands for <strong>Force Sample</strong>; this command forces a read of all enabled digital and analog input lines and a small comment told me it could also return the supply voltage: &#8220;Analog samples are ordered sequentially from AD0/DIO0 to AD3/DIO3, to the supply voltage.&#8221;  So lets try this one, shouldn&#8217;t be to hard i guess?</p>
<p>So i added support for this command to my API and started sending frames to the XBee:</p>
<pre>Sending frame:7E 00 0F 17 01 00 13 A2 00 40 33 1F 7A A2 ED 00 <span style="color: #ff0000;">49 53</span> FB</pre>
<p>I won&#8217;t go into detail of every byte in the frame above, but the 2 bytes marked in <span style="color: #ff0000;">red<span style="color: #000000;"> are the ASCII codes for &#8216;I&#8217; and &#8216;S&#8217;: yes, &#8216;IS&#8217;, the command we want to be executed on the remote XBee. The response that came back from the XBee was encouraging, however, no supply voltage was present, only the values of some random Analog input lines i enabled:</span></span></p>
<pre><span style="color: #ff0000;"><span style="color: #000000;">Rcvd Frame:97 <span style="color: #0000ff;">01</span> 00 13 A2 00 40 33 1F 7A A2 ED <span style="color: #ff0000;">49 53</span> <span style="color: #00ff00;">00</span> <span style="color: #ff00ff;">01 00 00 02 02 09</span>
FrameID=<span style="color: #0000ff;">1</span>, Command=<span style="color: #ff0000;">IS</span>, Status=<span style="color: #00ff00;">0</span>, Command Data size = 6 (<span style="color: #ff00ff;">01 00 00 02 02 09</span>)

</span></span></pre>
<p><span style="color: #ff0000;"><span style="color: #000000;">With the help of an example i found out the meaning of the Command data:<br />
</span></span></p>
<p><span style="color: #ff0000;"></span></p>
<div id="attachment_1037" class="wp-caption aligncenter" style="width: 444px"><img class="size-full wp-image-1037" title="IS response example" src="http://blog.hekkers.net/wp-content/uploads/2010/06/capture21-6-2010-200605.png" alt="IS response example" width="434" height="150" /><p class="wp-caption-text">IS response example</p></div>
<p><span style="color: #ff0000;"><span style="color: #000000;">OK&#8230; the frames that were being received looked nice, but it&#8217;s not what i want&#8230; where&#8217;s the supply voltage? The example above doesn&#8217;t show it either.. but it must be possible, right? </span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">After searching for more than an hour, i suddenly bumped upon a setting in the X-CTU tool (in the I/O Sampling section), that had the following description: </span></span></p>
<blockquote><p><span style="color: #ff0000;"><span style="color: #000000;">Configure the supply voltage high threshold.  If the supply voltage measurement equals or drops below this threshold, the supply voltage will be included in an IO sample transmission.  RANGE:0-0XFFFF</span></span></p></blockquote>
<p>Aahh, that must be it&#8230; this setting has a default of 0, causing the  supply voltage to never be included in an IO sample! I set the value to  FFFF, disabled all other I/O lines on the XBee et voila:</p>
<pre>Rcvd Frame:97 01 00 13 A2 00 40 33 1F 7A A2 ED 49 53 00 01 00 00 80 <span style="text-decoration: underline;">0A BC</span>
FrameID=1, Command=IS, Status=0, Command Data size = 6 (01 00 00 80 <span style="text-decoration: underline;">0A BC</span>)</pre>
<p>This means there is 1 sample set, containing the supply voltage, and the value is: <span style="text-decoration: underline;">0ABC</span>.</p>
<p>Multiply this with 1200/1024 and you get the supply voltage in mV:</p>
<p>($0ABC =) 2748 * 1200/1024 = 3220 mV. Great!</p>
<p>Tomorrow i&#8217;ll add some code to my HA system to periodically send an IS command to this XBee and store the results. And then just wait and see what happens when i let a JeeNode and XBee running on alkaline batteries 24/7&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hekkers.net/2010/06/21/xbee-supply-voltage-monitoring/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

