<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8559533432966670190</id><updated>2012-02-20T00:31:03.228+01:00</updated><category term='panstamp wireless swap packet'/><category term='pantastic swap opnode xap'/><category term='panstamp swap wireless protocol xml'/><category term='panstamp wiki documentation'/><category term='panstamp wireless transmission length'/><category term='panstamp wireless stack protocol'/><category term='panstamp wireless schematics'/><category term='lagarto swap python zeromq http get post'/><category term='panstamp solar cell wireless'/><category term='panstamp wireless arduino library size'/><category term='panstamp wireless power current consumption'/><category term='panstamp'/><category term='swap protocol'/><category term='dht11 temperature humidity'/><category term='panstamp wireless protocol swap'/><category term='panstamp wireless'/><category term='panstamp ez430-chronos watch cc430 cc1101 openchronos simpliciti swap current consumption power'/><category term='panstamp wireless ez430 chronos'/><category term='panstamp wireless collision cca'/><category term='panstamp wireless arduino cc1101'/><category term='panstamp wireless arduino'/><category term='panstamp wireless SWAP gateway modem'/><category term='panstamp jswap jcc11xx java opnode'/><category term='panstamp cc1101 swap wireless arduino'/><category term='panstamp ez430-chronos watch cc430 cc1101 openchronos'/><category term='panstamp wireless prototype'/><category term='panstamp wireless swap endpoints'/><category term='google speech voice recognition pantastic home automation'/><category term='panstamp wireless cc1101'/><title type='text'>panstamp weblog</title><subtitle type='html'>Development of a low-power wireless stamp for M2M applications. Project weblog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Daniel Berenguer</name><uri>http://www.blogger.com/profile/06307170851512483561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/-s7hconc_dzM/TlVjc70t5VI/AAAAAAAAAAY/2iWuJ8_mEwE/s220/H%2526D1.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-3619295919360307178</id><published>2012-02-19T17:56:00.004+01:00</published><updated>2012-02-20T00:29:56.655+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lagarto swap python zeromq http get post'/><title type='text'>Lagarto connects SWAP networks to the IP world</title><content type='html'>Whilst beta-tests follow their own progresses, I've been working on a piece of software that will be the master key for bringing panStamps to the IP world. &lt;a href="http://code.google.com/p/panstamp/wiki/lagarto?ts=1329693278&amp;amp;updated=lagarto"&gt;Lagarto&lt;/a&gt; is a lightweight software solution designed to run in low-power computer platforms like PlugComputers and RaspberryPI's.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-8P1_7FhVg-M/T0EkElm04XI/AAAAAAAAAKA/JB-ytn3w4Pg/s211/lagarto.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 211px; height: 138px;" src="https://lh4.googleusercontent.com/-8P1_7FhVg-M/T0EkElm04XI/AAAAAAAAAKA/JB-ytn3w4Pg/s211/lagarto.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Figure 1: Lagarto logo&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;This solution introduces a simple but powerful architecture where no central process is needed. Just servers and clients run autonomously whilst communicating among them via simple cross-platform mechanisms:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;HTTP GET/POST for reading and writing physical values&lt;/li&gt;&lt;li&gt;ZeroMQ for notifying events occurred from the physical networks&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://code.google.com/p/panstamp/wiki/lagarto?ts=1329693278&amp;amp;updated=lagarto"&gt;Lagarto&lt;/a&gt; is a multi-process platform. This platform consists of one or multiple Lagarto servers and none, one or multiple Lagarto clients. Lagarto servers provide their own embedded web server (WSGI) so that configuration and basic control/monitoring of the physical networks can be accomplished via Web and HTTP GET/POST requests. No need to pass through a different service or process to do the basic stuff.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-qqvlaJqjOJw/T0F9OJOZZuI/AAAAAAAAAMA/g3mNrfDfFO8/s512/Lagarto_arch.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 478px; height: 512px;" src="https://lh3.googleusercontent.com/-qqvlaJqjOJw/T0F9OJOZZuI/AAAAAAAAAMA/g3mNrfDfFO8/s512/Lagarto_arch.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Figure 2: Lagarto basic architecture&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Lagarto introduces a simple JSON-based protocol, used in both HTTP and ZeroMQ communication channels. Since ZeroMQ and HTTP are multi-platform, Lagarto servers and clients can be developed using almost any programming language, on any OS. At the moment of writing this blog entry, only a Lagarto server has been developed. It's obviously Lagarto-SWAP, the process charged to interface SWAP networks (and hence panStamps) with future Lagarto clients. For the moment, Lagarto-SWAP provides a nice way to read and write SWAP values from any HTTP client- I'll try to describe some examples about possible HTTP integrations of Lagarto-SWAP with third-party applications in future posts.&lt;br /&gt;&lt;br /&gt;And finally, some screenshots:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-RuXgt1GFqQc/T0EnK7uOLHI/AAAAAAAAALM/khH86oZHl08/s591/lagarto_web_2.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 514px; height: 440px;" src="https://lh3.googleusercontent.com/-RuXgt1GFqQc/T0EnK7uOLHI/AAAAAAAAALM/khH86oZHl08/s591/lagarto_web_2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Figure 3: Lagarto-SWAP general settings page&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-gbXrbZaYKuE/T0Elh3N7VPI/AAAAAAAAAKU/FswIVwaZJ_w/s571/lagarto_web_1.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 511px; height: 335px;" src="https://lh4.googleusercontent.com/-gbXrbZaYKuE/T0Elh3N7VPI/AAAAAAAAAKU/FswIVwaZJ_w/s571/lagarto_web_1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Figure 4: Lagarto-SWAP endpoint panel&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-3619295919360307178?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/3619295919360307178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2012/02/lagarto-connects-swap-networks-to-ip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3619295919360307178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3619295919360307178'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2012/02/lagarto-connects-swap-networks-to-ip.html' title='Lagarto connects SWAP networks to the IP world'/><author><name>Daniel Berenguer</name><uri>http://www.blogger.com/profile/06307170851512483561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/-s7hconc_dzM/TlVjc70t5VI/AAAAAAAAAAY/2iWuJ8_mEwE/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh4.googleusercontent.com/-8P1_7FhVg-M/T0EkElm04XI/AAAAAAAAAKA/JB-ytn3w4Pg/s72-c/lagarto.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-1249383663081554922</id><published>2012-01-06T23:16:00.002+01:00</published><updated>2012-01-06T23:39:10.177+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wiki documentation'/><title type='text'>Wiki documents</title><content type='html'>&lt;a href="http://code.google.com/p/panstamp/"&gt;The wiki pages&lt;/a&gt; have been updated with new contents. &lt;a href="http://code.google.com/p/panstamp/"&gt;This wiki&lt;/a&gt; is now our documentation platform and should become the main reference when working with panStamps. Beta-testers may take these documentary base to start learning concepts and procedures, but please bear in mind that this is just a starting point. &lt;a href="http://code.google.com/p/panstamp/"&gt;The wiki&lt;/a&gt; will need to be improved, enriched and re-structured in order to face real questions  and help our future community. Thanks in advance for your feedback!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-1249383663081554922?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/1249383663081554922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2012/01/wiki-documents.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/1249383663081554922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/1249383663081554922'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2012/01/wiki-documents.html' title='Wiki documents'/><author><name>Daniel Berenguer</name><uri>http://www.blogger.com/profile/06307170851512483561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/-s7hconc_dzM/TlVjc70t5VI/AAAAAAAAAAY/2iWuJ8_mEwE/s220/H%2526D1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-822234149693677455</id><published>2011-12-18T17:58:00.006+01:00</published><updated>2011-12-18T19:04:53.736+01:00</updated><title type='text'>Ready to start the game</title><content type='html'>Months of work are close to give the expected results. Beta-tests will finally start in January 2012 so I'll still have some weeks to finish software tools, documentation and templates. I admit being a bit impatient for getting practical feedback from testers, each one with different expectations, skills and application fields. By the way, sorry for those still wanting to join the beta-test program but, unfortunately, the list is closed. Thanks to everyone for your support and ideas or simply for following this humble blog.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-r3PXps3XMxI/Tu4nNCYct_I/AAAAAAAAACg/w4ECRZQ15Kk/s1600/IMGP2772.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 350px;" src="http://1.bp.blogspot.com/-r3PXps3XMxI/Tu4nNCYct_I/AAAAAAAAACg/w4ECRZQ15Kk/s400/IMGP2772.JPG" alt="" id="BLOGGER_PHOTO_ID_5687526484346714098" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Figure 1: Battery-powered sensor board&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The above is a battery-operated board, ready to connect to different ambient sensors like the TMP36 temperature sensor or a DHT11/DHT22 dual temperature-humidity sensor. This board is powered from a single AA battery and the boost regulation is accomplished by a MAX1724. I must say that I hoped to hook this board to a solar cell but results have not been as good as expected. MAX1724 is not very well suited for this kind of application. My next attempt will use the BQ25504 from Texas Instruments, and some solar cells specially designed for indoor applications. I'm pretty sure that this will be a winner combination&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-ECA_DYB6E58/Tu4p_JJOukI/AAAAAAAAACs/x3btEVRl4bY/s1600/IMGP2770.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 222px;" src="http://3.bp.blogspot.com/-ECA_DYB6E58/Tu4p_JJOukI/AAAAAAAAACs/x3btEVRl4bY/s400/IMGP2770.JPG" alt="" id="BLOGGER_PHOTO_ID_5687529544178645570" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Figure 2: Sensor board and panStick&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;I'm receiving a lot of e-mails asking about a date for the commercial release. Well, it's maybe a bit soon for giving a precise date although May 2012 is what I've always had in mind. Meanwhile, I'll be updating this blog with the latest news regarding this project, including the progresses done during the beta-tests.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-822234149693677455?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/822234149693677455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/12/ready-to-start-game.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/822234149693677455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/822234149693677455'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/12/ready-to-start-game.html' title='Ready to start the game'/><author><name>Daniel Berenguer</name><uri>http://www.blogger.com/profile/06307170851512483561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/-s7hconc_dzM/TlVjc70t5VI/AAAAAAAAAAY/2iWuJ8_mEwE/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-r3PXps3XMxI/Tu4nNCYct_I/AAAAAAAAACg/w4ECRZQ15Kk/s72-c/IMGP2772.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-1364078607562386339</id><published>2011-11-22T17:19:00.012+01:00</published><updated>2011-11-23T07:10:41.211+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp cc1101 swap wireless arduino'/><title type='text'>New panStamps</title><content type='html'>&lt;span style="font-family:arial;"&gt;After a long period of time, new prototypes are here! Production has taken almost four weeks given that I've had to coordinate very different actors in this process: PCB manufacturer and assembler, two different part suppliers, international duties and finally shipping companies. Next time, and for regular productions, I hope to reduce the necessary times since mechanisms have already been set up.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-family: arial;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-F27BH-wOxpw/TsvOcMrg-PI/AAAAAAAAABY/BMH3I4flJEI/s1600/panstamp_1.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 200px;" src="http://2.bp.blogspot.com/-F27BH-wOxpw/TsvOcMrg-PI/AAAAAAAAABY/BMH3I4flJEI/s320/panstamp_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5677858739066042610" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Picture 1: new panStamps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:arial;"&gt;I was hopping the yellow silkscreen to provide a better contrast when printed over the black solder mask. However, the yellow ink seems to be a bit transparent so I'm finally getting something closer to a light gold color. Not bad once I got used to although next production run will probably use white silkscreen.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Now it's time program boards and run some basic tests before sending boards to beta-testers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-family: arial;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/--6DOQmv9Um4/TsvXN7XV7OI/AAAAAAAAABk/XYZfr60tnvU/s1600/panstamp_2.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 238px;" src="http://2.bp.blogspot.com/--6DOQmv9Um4/TsvXN7XV7OI/AAAAAAAAABk/XYZfr60tnvU/s320/panstamp_2.JPG" alt="" id="BLOGGER_PHOTO_ID_5677868389504511202" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Picture 2: new panStamps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:arial;"&gt;New DIP-24 format has &lt;/span&gt;&lt;span style="font-family:arial;"&gt;considerably &lt;/span&gt;&lt;span style="font-family:arial;"&gt;reduced the size of panStamps (new dimensions = 30.5 x 18 mm). On the other hand, the unsoldered 5-pin row still gives access to the SPI port, used to program the Arduino bootloader.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-family: arial;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-PkLF0tFErAA/TsvaAK_1S7I/AAAAAAAAAB8/ZHGb2Y652Xw/s1600/panstick_1.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 208px;" src="http://3.bp.blogspot.com/-PkLF0tFErAA/TsvaAK_1S7I/AAAAAAAAAB8/ZHGb2Y652Xw/s320/panstick_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5677871451717585842" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Picture 3: panSticks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:arial;"&gt;panSticks are just USB boards where to plug the panStamps onto. These boards can be used to program panStamps serially from the Arduino IDE and also interface wireless networks from computers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-family: arial;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-rU2VZNkk-EE/TsveEMRlpyI/AAAAAAAAACI/PMi8Hi8cYHc/s1600/pcb_1.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 282px;" src="http://3.bp.blogspot.com/-rU2VZNkk-EE/TsveEMRlpyI/AAAAAAAAACI/PMi8Hi8cYHc/s320/pcb_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5677875918826481442" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Picture 4: Bare PCB's - Top layer&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-ZH96PXj_Nk4/Tsvg_GzeKHI/AAAAAAAAACU/LbJ-zwLxEt4/s1600/pcb_2.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 290px;" src="http://4.bp.blogspot.com/-ZH96PXj_Nk4/Tsvg_GzeKHI/AAAAAAAAACU/LbJ-zwLxEt4/s320/pcb_2.JPG" alt="" id="BLOGGER_PHOTO_ID_5677879129993521266" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;Picture 5: Bare PCB's - Bottom layer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-1364078607562386339?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/1364078607562386339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/11/after-long-period-of-time-new.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/1364078607562386339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/1364078607562386339'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/11/after-long-period-of-time-new.html' title='New panStamps'/><author><name>Daniel Berenguer</name><uri>http://www.blogger.com/profile/06307170851512483561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/-s7hconc_dzM/TlVjc70t5VI/AAAAAAAAAAY/2iWuJ8_mEwE/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-F27BH-wOxpw/TsvOcMrg-PI/AAAAAAAAABY/BMH3I4flJEI/s72-c/panstamp_1.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-8721576876944147196</id><published>2011-10-17T08:31:00.000+02:00</published><updated>2011-10-17T22:15:27.966+02:00</updated><title type='text'>HouseAgent, a promising open door to the "Internet of Things"</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: left;"&gt;First of all, please sorry for the long delay since my last post. I've been busy with different tasks within this project, including production, logistics and commercial plannings. New prototypes are coming in two or three weeks, already soldered and checked from factory. I've also ordered some base boards for testing new concepts and use cases but I'll be soldering those boards by myself until I decide which of them go for regular production.&lt;/div&gt;&lt;br /&gt;But I don't want to bore you more. Instead, I prefer to let you know about my progresses in the technical area. Those of you usually following my blog probably know that I was planning to start a computer-based development, a new application to connect SWAP networks to the IP world. In a few words, bring the "Internet Of Things" concept to the panStamp project. This was not a simple task since a lot of work was involved, even if the concept behind it was quite simple. I initially called this new application "&lt;a href="http://panstamp.blogspot.com/2011/04/opnode-pantastic-architecture-of-new.html"&gt;panTastic&lt;/a&gt;". However, a few months later, Paolo Di prodi, from &lt;a href="http://www.robomotic.com/"&gt;Robomotic&lt;/a&gt;, let me know about &lt;a href="http://www.houseagent.nl/forum/"&gt;HouseAgent&lt;/a&gt;, a very promising open source project developed and maintained by Maarten Damen.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.houseagent.nl/forum/"&gt;HouseAgent&lt;/a&gt; is an open Home Automation software, maybe similar in concept to other well-known applications (ex: HomeSeer, Mr. House, HAL, etc) but with some particularities that will probably let it find a privileged position in the open source home automation area: very good architecture ready to face nowadays' cloud computing challenges, a simple plugin interface to make the creation of new communication plugins a simple task, multi-platform (&lt;a href="http://www.houseagent.nl/forum/"&gt;HouseAgent&lt;/a&gt; is 100% Python), and the requirement for a very low memory footprint are some of HouseAgent's main strengths. From my very personal point of view, HouseAgent, once finished and released, will be perfect for all those new Home Automation projects requiring to work on very low-power computers (ex: ShevaPlug, Pogoplug, etc).&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-uxjE8KWwZ6M/TpvJtCggX1I/AAAAAAAAABA/btx_SJhdwqI/s1600/houseagent01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-uxjE8KWwZ6M/TpvJtCggX1I/AAAAAAAAABA/btx_SJhdwqI/s400/houseagent01.png" width="392" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: View of a SWAP custom page within HouseAgent&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;The good and bad thing about &lt;a href="http://www.houseagent.nl/forum/"&gt;HouseAgent&lt;/a&gt; is that it's still under development. Thus, if you want to use this software in real projects you will probably need to wait some months before its release. On the other hand, if you are a developer and want to contribute to the project with your ideas and work, then Maarten and the rest of the HouseAgent team will certainly welcome you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-8721576876944147196?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/8721576876944147196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/10/houseagent-open-door-to-internet-of.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8721576876944147196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8721576876944147196'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/10/houseagent-open-door-to-internet-of.html' title='HouseAgent, a promising open door to the &quot;Internet of Things&quot;'/><author><name>Daniel Berenguer</name><uri>http://www.blogger.com/profile/06307170851512483561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://4.bp.blogspot.com/-s7hconc_dzM/TlVjc70t5VI/AAAAAAAAAAY/2iWuJ8_mEwE/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-uxjE8KWwZ6M/TpvJtCggX1I/AAAAAAAAABA/btx_SJhdwqI/s72-c/houseagent01.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-8917038616372168352</id><published>2011-08-18T19:44:00.002+02:00</published><updated>2011-08-18T19:48:19.404+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless arduino cc1101'/><title type='text'>New PCB design - V.1.0</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;The board design goes as expected. The new panStamp PCB design is finished so it's now time to work on the mother boards. &lt;i&gt;PanStick&lt;/i&gt;, the USB board where panStamp sits on is closed to completion too. On the other hand, I've started some other developments, most of them aimed to act as proof of concept:&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;b&gt;Solar harvester&lt;/b&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;This board is a milestone in the panStamp project. Finding a good compromise between solar cell, step-up PSU and storage device will bring us the product we are looking for: a mother board for ambient measurements capable to work even under poor light conditions.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;b&gt;Basic energy meter&lt;/b&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;I want to test the performance of the Atmega at 8MHz in direct AC measurements, including power factor and active/reactive readings.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;b&gt;RGB strip driver board&lt;/b&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;This is just a toy for controlling RGB strips and creating coloured ambiances.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;b&gt;Ethernet board&lt;/b&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;A simple way to interface SWAP networks from the IP world without having to use a computer as gateway. This is more or less an extension of the &lt;a href="http://www.opnode.com/"&gt;opnode&lt;/a&gt; project although I've not decided yet whether this board will go for regular production or not.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Back to the panStamp design, I've not uploaded the &lt;a href="http://www.lis.inpg.fr/realise_au_lis/kicad/"&gt;KiCad&lt;/a&gt; files to the &lt;a href="http://code.google.com/p/panstamp/"&gt;wiki&lt;/a&gt; yet since I want to test some prototypes first. Instead, I'm posting here some pictures about the board.  The circuit is surely quite definitive as I don't expect to do any major change on it, but the PCB will probably suffer some changes, once I have the opportunity to test the RF performance.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ORBEcKLbIE8/Tk1KXAEVFtI/AAAAAAAABFY/NXJhAlqqHG8/s1600/panstamp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="287" src="http://2.bp.blogspot.com/-ORBEcKLbIE8/Tk1KXAEVFtI/AAAAAAAABFY/NXJhAlqqHG8/s400/panstamp.png" width="400" /&gt;&lt;/a&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1 : Schematics of the panStamp V.1.0 board&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;MCU and external pinout &lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;One interesting thing is that the new board will include a three-pin footprint for an external resonator. Using Atmega's internal 8 MHz oscillator will be the default option but sometimes a faster clock may be needed. I'm also searching a 32.768 KHz (RTC) cristal that fits on the &lt;span id="ctl00_ContentMain_dlspec_ctl08_lblName"&gt;1.3 mm x 3.2 mm footprint. This would let us save a couple of microamps in periodic sleeping applications.&lt;/span&gt; &lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-fb3-sCvb6jI/Tk1KrwZ1G8I/AAAAAAAABFc/yX3WqvSvGuQ/s1600/panstamp-RF+Circuit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="161" src="http://4.bp.blogspot.com/-fb3-sCvb6jI/Tk1KrwZ1G8I/AAAAAAAABFc/yX3WqvSvGuQ/s400/panstamp-RF+Circuit.png" width="400" /&gt;&lt;/a&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2 : Schematics of the panStamp V.1.0 board&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;RF front-end&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_TnCQzZIi5E/Tk1K99lOClI/AAAAAAAABFg/gUfWEh5kq14/s1600/panstamp_pcb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://3.bp.blogspot.com/-_TnCQzZIi5E/Tk1K99lOClI/AAAAAAAABFg/gUfWEh5kq14/s400/panstamp_pcb.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: 4-layer panStamp board&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-8917038616372168352?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/8917038616372168352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/08/p-margin-bottom-0.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8917038616372168352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8917038616372168352'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/08/p-margin-bottom-0.html' title='New PCB design - V.1.0'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-ORBEcKLbIE8/Tk1KXAEVFtI/AAAAAAAABFY/NXJhAlqqHG8/s72-c/panstamp.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-7235239158600863422</id><published>2011-07-28T13:05:00.000+02:00</published><updated>2011-07-28T13:05:05.979+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp'/><title type='text'>New panStamp PCB taking shape</title><content type='html'>We've got to a point where we need to make new boards and start beta-testing the panStamp concept. New boards have to solve the only issue detected so far, that's the intermittent problem when programming the panStamps from the Arduino IDE via USB. Apart from that, there are some technical improvements that will bring us new possibilities:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;New boards are 24-DIP (0.6 inches) instead of 28-DIP.&lt;/li&gt;&lt;li&gt;SPI pins appear in a supplementary row, still accessible from the panStamp. This action has let us switch to the mentioned 24-DIP package.&lt;/li&gt;&lt;li&gt;Resonator footprint added. XTAL1 (PB6) and XTAL2 (PB7) pins are then removed.&lt;/li&gt;&lt;li&gt;All Atmega's IO pins are now available except INT0 (PD2) and the CC1101 chip select pin (PB2) that are exclusively dedicated to the communications with the RF front-end. &lt;/li&gt;&lt;li&gt;The Atmega328P will have a 32-MLF package instead of the 32-TQFP. We save a lot of space on the board doing this.&lt;/li&gt;&lt;li&gt;New boards have  four layers instead of two, improving performance and allowing reasonable microstrip widths.&lt;/li&gt;&lt;li&gt;Passive components are now SM0402 packages instead of SM0603. SM0402 is the recommended package for any RF device emitting near the 1-GHz band.&lt;/li&gt;&lt;li&gt;New SMA connector footprint added into the board. We'll then have two possibilities: wire stub antenna for the cheapest designs and whip antenna for those special nodes needing greater communication ranges.&lt;/li&gt;&lt;/ul&gt;Besides working in a new hardware version of the panStamp, I'm also designing some specific mother boards, some of them being of great importance for the project:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;USB board for programming panStamps and interfacing PC-based applications. The whole USB board and panStamp will fit into a conventional USB-stick enclosure.&lt;/li&gt;&lt;li&gt;New solar-harvester board for indoor applications. The NCP1400 approach will be abandoned and will surely use a MAX1722 instead, with lower quiescent current. For the solar part, we'll switch to a silicone amorphous panel, with greater sensibility under poor light conditions. On the accumulator side, different options will be available: NiMh AAA battery or super-capacitor.&lt;/li&gt;&lt;/ul&gt;And some other boards for internal evaluation. We'd see later whether these boards would see the light commercially or not. This will surely depend on the practical results and degree of interest from the community:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;RGB-Strip controller.&lt;/li&gt;&lt;li&gt;Energy meter to be used with external current transformer clamps.&lt;/li&gt;&lt;/ul&gt;If everything goes as expected, new boards should be ready at the end of September. Those having transmitted their interest in participating in the beta-tests will be then contacted. Thanks everyone for your interest in the panStamp project!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-7235239158600863422?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/7235239158600863422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/07/new-panstamp-pcb-taking-shape.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7235239158600863422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7235239158600863422'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/07/new-panstamp-pcb-taking-shape.html' title='New panStamp PCB taking shape'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-3450108073943491642</id><published>2011-07-07T16:18:00.001+02:00</published><updated>2011-07-07T17:04:43.501+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp swap wireless protocol xml'/><title type='text'>Static XML data for abstract M2M protocols</title><content type='html'>Abstract protocols are usually a good option when transporting information from a device to another without much complication. Simplicity, flexibility and quick adoption are the main strengths of abstract protocols and abstract data schemas. These strengths have doubtless led JSON, Soap, HTTP and Modbus to a priviledged place within the Automation Industry.&lt;br /&gt;&lt;br /&gt;However, abstract protocols lack a certain degree of interoperability in some situations; additional application layers on top of the existing protocols. In a common peer-to-peer application, both peers have to share a given convention in order to understand what is communicating each other. An actuator may be waiting for an alert sent from multiple sensors. Thus, our actuator must know how alerts are coded into the incoming communication frames. In this example both ends (sensors and actuator) are specialized nodes. Each one concentrates into running a simple task (sensing alerts and hearing them) so programming the data-coding convention into the actuator is the simplest way to let it know about incoming alerts.&lt;br /&gt;&lt;br /&gt;However, more capable devices, like coordinators, masters, gateways or data concentrators usually need to decode data received from many nodes so hard-coding data conventions into these devices (as opposite to incorporating these conventions into the communication frames themselves) is not a good idea. These devices are not specialized ones; since they may accept a variable amount of data types, another approach must be considered.&lt;br /&gt;&lt;br /&gt;For those high-end devices needing complete information about the data being exchanged, it would be possible to maintain local or remote repositories of device descriptions. Since XML is an extended language with numerous parsers for any programming language, why re-inventing the wheel. The following example is a first attempt to create static device definitions to complement SWAP in high-end devices. For the &lt;a href="http://panstamp.blogspot.com/2011/04/humidity-temperature-wireless-mote.html"&gt;Dual Temperature and Humidity mote&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;device&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;manufacturer&amp;gt;panStamp&amp;lt;/manufacturer&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;product&amp;gt;Dual Temperature/Humidity sensor&amp;lt;/product&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;pwrdownmode&amp;gt;true&amp;lt;/pwrdownmode&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;registers&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;reg id="11"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endpoint type="analog" dir="input"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;voltage supply&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/reg&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;reg id="12"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endpoint type="analog" dir="input"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;humidity&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;position&amp;gt;0&amp;lt;/position&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;size&amp;gt;1&amp;lt;/size&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endpoint type="analog" dir="input"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;temperature&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;position&amp;gt;1&amp;lt;/position&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;size&amp;gt;1&amp;lt;/size&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/endpoint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/reg&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/registers&amp;gt;&lt;br /&gt;&amp;lt;/device&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The above schema mainly consists of registers and endpoints. Registers are SWAP's natural data containers whilst endpoints are what really matter to end-user applications. Thus, registers are divided into one or multiple endpoints in a simple way. In the above example, register with ID=11 has only one associated endpoint (voltage supply) so this endpoint will take its value from the complete register. On the other hand, register with ID=12 consists of two endpoints. "Humidity" takes the first byte (position = 0, size = 1) from the register value. "Temperature" takes the second byte (position = 0, size = 1).&lt;br /&gt;&lt;br /&gt;Finally, device definition files like the above one would be indexed by their product code, which uniquely identifies manufacturer and product type over the air.&lt;br /&gt;&lt;br /&gt;I may still add some additional fields to the above schema but this will be pretty much the system used by &lt;a href="http://panstamp.blogspot.com/2011/03/swap-device-management-tool.html"&gt;SWAPdmt&lt;/a&gt;, &lt;a href="http://panstamp.blogspot.com/2011/04/opnode-pantastic-architecture-of-new.html"&gt;panTastic&lt;/a&gt; and any other high-end device or application wanting to identify wireless motes and their resources.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-3450108073943491642?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/3450108073943491642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/07/static-xml-data-for-abstract-m2m.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3450108073943491642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3450108073943491642'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/07/static-xml-data-for-abstract-m2m.html' title='Static XML data for abstract M2M protocols'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-2380213830363036145</id><published>2011-06-29T00:38:00.002+02:00</published><updated>2011-06-30T10:33:42.013+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp ez430-chronos watch cc430 cc1101 openchronos simpliciti swap current consumption power'/><title type='text'>OpenChronos is finally SWAP-enabled</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Endless weeks of work, porting &lt;a href="http://code.google.com/p/panstamp/wiki/SWAP"&gt;SWAP&lt;/a&gt; to the standard &lt;a href="https://github.com/poelzi/OpenChronos/"&gt;Open Chronos&lt;/a&gt; firmware, adding new functionalities and debugging all this... Longer than I initially expected but it was worth the work. I'm now able to do what I planned to do with my Chronos: browsing and controlling external SWAP endpoints, transmitting data from the internal sensors, configuring the watch and still keep most of the functionality provided by the &lt;a href="https://github.com/poelzi/OpenChronos/"&gt;Open Chronos&lt;/a&gt; firmware.&lt;br /&gt;&lt;br /&gt;The following slides navigate along the Chronos screens, showing some of the functionality already provided by the standard Open Chronos firmware and also the new SWAP features:&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;div align="CENTER" style="margin-bottom: 0in;"&gt;&lt;embed flashvars="host=picasaweb.google.com&amp;amp;hl=en_US&amp;amp;feat=flashalbum&amp;amp;interval=7&amp;amp;RGB=0x000000&amp;amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fusapiens%2Falbumid%2F5623335869010438177%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" height="430" pluginspage="http://www.macromedia.com/go/getflashplayer" src="https://picasaweb.google.com/s/c/bin/slideshow.swf" type="application/x-shockwave-flash" width="400"&gt;&lt;/embed&gt;&lt;/div&gt;&lt;br /&gt;For those wanting to take a look at the code, I still have to consult the &lt;a href="https://github.com/poelzi/OpenChronos/"&gt;Open Chronos&lt;/a&gt; team about the best way to merge both works. If maintaining a fork is the solution, then I'll upload the project to the panStamp code page as I did with the Arduino work and the Java tools. I understand than replacing Simpliciti by SWAP may not be of the interest to everyone so forking from the trunk project may be an option.&lt;br /&gt;&lt;br /&gt;-- Edit --&lt;br /&gt;These SWAP mods have been recently added to the Open Chronos project as a fork from the main project:&lt;br /&gt;&lt;a href="https://github.com/dberenguer/OpenChronos"&gt;https://github.com/dberenguer/OpenChronos&lt;/a&gt;&lt;br /&gt;-------------&lt;br /&gt;&lt;br /&gt;What are the main differences between using Open Chronos with &lt;a href="http://www.ti.com/corp/docs/landing/simpliciTI/index.htm?DCMP=hpa_rf_general&amp;amp;HQS=NotApplicable+OT+simpliciti"&gt;Simpliciti&lt;/a&gt; or with &lt;a href="http://code.google.com/p/panstamp/wiki/SWAP"&gt;SWAP&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;General functionality&lt;/b&gt;&lt;br /&gt;Both firmwares provide similar functionalities, except that the SWAP firmware does not include a method for re-flashing the Chronos wirelessly. Instead, the Chronos has to be reprogrammed using the JTAG programmer provided in the kit.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Transmission of accelerometer data (ACC mode)&lt;/b&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;With Simpliciti, the Chronos sends XYZ accelerometer data every 0.5 seconds whilst SWAP initially stablish a periodic interval of 1 second in order to simplify resources and save power. However, this may be changed in the future.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reception of packets in SYNC mode&lt;/b&gt;&lt;br /&gt;Simpliciti plays with periodic windows where the Chronos is able to receive data. Out of these windows , the radio remains inactive. The SWAP way is much simpler although more power consuming. Instead, the new Sync mode is mainly limited to short transactions, like sending a limited number of configuration commands.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Firmware footprint&lt;/b&gt;&lt;br /&gt;Due to the simple nature of SWAP, the new firmware does around 2 KB of savings in Flash space. I've not done the necessary RAM tests but I'd say that SWAP saves some space there too.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Power consumption&lt;/b&gt;&lt;br /&gt;More or less the same in both cases, depending on the working mode in use.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;ez430-Chronos powered from the external JTAG connector at 3.6 VDC&lt;/span&gt;&lt;/div&gt;&lt;div align="CENTER" style="margin-bottom: 0in;"&gt;&lt;table border="2"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;th&gt;Mode&lt;/th&gt; &lt;th&gt;SWAP&lt;/th&gt; &lt;th&gt;Simpliciti&lt;/th&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Normal operation (radio off)&lt;/td&gt; &lt;td&gt;12 uA&lt;/td&gt; &lt;td&gt;15 uA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Accelerometer, radio off&lt;/td&gt; &lt;td&gt;0.88 mA&lt;/td&gt; &lt;td&gt;0.88 mA&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Sync mode&lt;/td&gt; &lt;td&gt;16.26 mA&lt;/td&gt; &lt;td&gt;4.5 mA&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;ACC mode, radio on&lt;/td&gt; &lt;td&gt;0.1 mA&lt;/td&gt; &lt;td&gt;4.5 mA&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;Table 1:  Table of consumptions. Comparison between SWAP and Simpliciti. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;Regarding the storage of user data in Flash (the CC430 processor has no EEPROM inside), I had to give it up due to the large space consumed by the &lt;i&gt;infomem&lt;/i&gt; driver. Open Chronos, like TI's stock firmware, already takes most of the flash space provided by the CC430F6137 processor (32 KB) so adding this new feature forced me to remove some others.&lt;br /&gt;&lt;br /&gt;By the way, I've added a custom configuration window for the Chronos in the SWAPdmt tool. This has let me run my tests quickly without having to type the configuration commands by hand from the serial terminal.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-U8D60AzPBBI/TgoZXcKANqI/AAAAAAAAA8Y/xmKcl6OsUjA/s1600/SWAPdmt_Chronos.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="315" src="http://4.bp.blogspot.com/-U8D60AzPBBI/TgoZXcKANqI/AAAAAAAAA8Y/xmKcl6OsUjA/s400/SWAPdmt_Chronos.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="toctext"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: SWAPdmt configuration window for the ez430-Chronos&lt;/span&gt; &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;a href="http://processors.wiki.ti.com/index.php/EZ430-Chronos?DCMP=Chronos&amp;amp;HQS=Other+OT+chronoswiki#CC430F6137_Code_Examples"&gt;&lt;span class="toctext"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Anything else to relate? Well, this has nothing to do with the firmware but I had wanted the Chronos to show a better wireless range – a few meters according to my tests – but this was not a surprise since other users reported the same limitation. Anyway, I hope to improve this range after placing a decent whip antenna to the panStamp connected to my computer. But these new experiences will surely deserve a new entry in this blog.&lt;/div&gt;&lt;/div&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-2380213830363036145?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/2380213830363036145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/06/openchronos-is-finally-swap-enabled.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2380213830363036145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2380213830363036145'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/06/openchronos-is-finally-swap-enabled.html' title='OpenChronos is finally SWAP-enabled'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-U8D60AzPBBI/TgoZXcKANqI/AAAAAAAAA8Y/xmKcl6OsUjA/s72-c/SWAPdmt_Chronos.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-2303280804302492258</id><published>2011-06-10T23:06:00.005+02:00</published><updated>2011-06-10T23:16:01.829+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swap protocol'/><title type='text'>Wiki documentation</title><content type='html'>I just wanted to let you know that I'm (slowly) documenting everything related to this project in the &lt;a href="http://code.google.com/p/panstamp/w/list"&gt;Google Code wiki page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Currently, there are just a couple of pages available but I have the intention to make this wiki grow with further resources, descriptions and manuals.&lt;br /&gt;&lt;br /&gt;This page introduces SWAP, the basis of the protocol itself, frame format and types of packets:&lt;br /&gt;&lt;a href="http://code.google.com/p/panstamp/wiki/SWAP"&gt;Description of the SWAP protocol&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This other page describes the mandatory registers that any SWAP device has to maintain in order to provide basic interoperability between devices:&lt;br /&gt;&lt;a href="http://code.google.com/p/panstamp/wiki/SWAPregisters"&gt;List of mandatory registers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm now working in the way to provide information about custom registers. I've finally taken the decision to use XML files for that purpose. From a functional point of view, any software or device wanting to automatically detect the available registers or endpoints in a wireless network should have access to a central repository of XML product descriptions. Then it would be just an issue of identifying the correct XML file from the product code, one of the mandatory registers listed in the above &lt;a href="http://code.google.com/p/panstamp/wiki/SWAPregisters"&gt;wiki page&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-2303280804302492258?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/2303280804302492258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/06/i-just-wanted-to-let-you-know-that-im.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2303280804302492258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2303280804302492258'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/06/i-just-wanted-to-let-you-know-that-im.html' title='Wiki documentation'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-9064010129267284980</id><published>2011-06-01T15:49:00.000+02:00</published><updated>2011-06-01T15:49:28.651+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp ez430-chronos watch cc430 cc1101 openchronos'/><title type='text'>SWAPping packets with my ez430-Chronos – Part 2</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt; &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;I've been doing some progresses on the custom firmware for the ez430-Chronos. I'm now able to control panStamp outputs via SWAP from the Chronos browser. Besides, whenever the SWAP mode is activated, the Chronos periodically sends multiple data measured from its internal sensors: temperature, barometric pressure and altitude (calculated from the barometric pressure).&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UTGZg3I0pbM/TeZAf-ctUqI/AAAAAAAAA60/Mb1U6yuQx6Q/s1600/chronos_led_off.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://2.bp.blogspot.com/-UTGZg3I0pbM/TeZAf-ctUqI/AAAAAAAAA60/Mb1U6yuQx6Q/s320/chronos_led_off.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: Chronos watch displaying a SWAP binary output&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;As for the external values, temperature and humidity are received from a battery-operated panStamp whilst LED's are controlled by a second panStamp connected to a permanent power supply. You may notice the little heart appearing on the left side of the screen. That little heart indicates that the endpoint is an output so that it can be controlled from the arrow buttons. I'd like to upload a video showing these and other features but I want to show something more interesting than just turning a couple of LED's on and off.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;The rest of features already existing in the Open Chronos firmware are enabled, except for the continuous transmission of accelerometer data, where I'm still working on. Another feature that needs to be added is the ability to save configuration data on the Chronos flash, including calibration data. After this, I think that my Open Chronos add-ons will be ready for release.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Finally, my Chronos is experiencing a notable voltage drop whenever it enters the communication mode. Maybe my Chronos came with a discharged battery so this may explain the problem. In any case, I'll need to replace the battery... once I find how to do it.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-9064010129267284980?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/9064010129267284980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/06/swapping-packets-with-my-ez430-chronos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/9064010129267284980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/9064010129267284980'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/06/swapping-packets-with-my-ez430-chronos.html' title='SWAPping packets with my ez430-Chronos – Part 2'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-UTGZg3I0pbM/TeZAf-ctUqI/AAAAAAAAA60/Mb1U6yuQx6Q/s72-c/chronos_led_off.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-835555764205532223</id><published>2011-05-14T16:40:00.001+02:00</published><updated>2011-05-15T11:32:26.225+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp ez430-chronos watch cc430 cc1101 openchronos'/><title type='text'>SWAPping packets with my ez430-Chronos</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; &lt;/style&gt;   &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;It's been a while since my last post, mainly because I've been working on things that may not be really interesting  for the readers of this blog, such as improving the Java library and developing a first version of the opnode panTastic server – and I mean “server”, it still lacks the necessary communication clients in order to do the application really usable.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;But finally, I've found the time to work with my new &lt;a href="http://processors.wiki.ti.com/index.php/EZ430-Chronos?DCMP=Chronos&amp;amp;HQS=Other+OT+chronoswiki"&gt;ez430-Chronos kit&lt;/a&gt; (868 MHz). As I explained in a &lt;a href="http://panstamp.blogspot.com/2011/03/ti-ez430-chronos.html"&gt;precedent post&lt;/a&gt;, I had the idea to integrate the Chronos watch into the panStamp ecosystem. This desire has led me to develop a &lt;a href="http://panstamp.blogspot.com/2011/03/swap-very-tiny-protocol-for-constrained.html"&gt;SWAP&lt;/a&gt; extension for the &lt;a href="https://github.com/poelzi/OpenChronos"&gt;Open Chronos platform&lt;/a&gt;, on top of the existing MRFI (Minimal Radio Frequence Interface) stack. The availability of the MRFI API has enormously simplified my work since it provides the necessary functions to send and receive wireless packets. However, I've had to tweak this API a bit in order to make it usable with custom protocols, not only with &lt;a href="http://www.ti.com/corp/docs/landing/simpliciTI/index.htm?DCMP=hpa_rf_general&amp;amp;HQS=NotApplicable+OT+simpliciti"&gt;SimpliciTI&lt;/a&gt;.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-o3jMe5ZGqiA/TXZUnWrsZCI/AAAAAAAAAyk/U3dIeFHOcXc/s1600/ez430-chronos_800.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-o3jMe5ZGqiA/TXZUnWrsZCI/AAAAAAAAAyk/U3dIeFHOcXc/s320/ez430-chronos_800.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: ez430-Chronos kit&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;My custom ezChronos application is based on the &lt;a href="https://github.com/poelzi/OpenChronos"&gt;Open Chronos project&lt;/a&gt;, an open source implementation of the original Texas Instruments sources, that can be compiled using the open &lt;a href="http://www.blogger.com/goog_125613115"&gt;MSPGCC4&lt;/a&gt;&lt;a href="http://mspgcc4.sourceforge.net/"&gt; compiler&lt;/a&gt;. As for the flashing procedure, I'm using &lt;a href="http://mspdebug.sourceforge.net/"&gt;MSPDEBUG&lt;/a&gt; as serial uploader through the provided USB programmer.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Hd6zinkp_3E/Tc6OsJ4qK_I/AAAAAAAAA5k/i9A5AuGy5rk/s1600/chronos_programmer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="310" src="http://3.bp.blogspot.com/-Hd6zinkp_3E/Tc6OsJ4qK_I/AAAAAAAAA5k/i9A5AuGy5rk/s400/chronos_programmer.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: programming the Chronos watch serially&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;One of the great things about the Chronos is that panStamps can natively communicate with it using FSK and GFSK modulations with all the packet smartness enabled at both ends. CC430 MCU's and CC11XX radios share a common packet structure so the communication between these families of IC's is done quite straightforward.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;In my opinion, anyone wanting to develop his own protocol for the Chronos has previously to learn about how the SimpliciTI stack is implemented and how this stack is anchored to the existing display menus. When I started this development I thought that the menu interfaces were a bit more protocol-agnostic that they really are. In fact, I've had to surgically replace some of the current dependencies with the SimpliciTI stack with custom functions that do more or less the same but without the initial stack calls.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Back to the interesting things, porting SWAP to the Chronos platform has been very simple. I'd even say that replacing SimpliciTI by SWAP has saved some Kilobytes of flash so I've finally gained some additional space for the new data browser.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-9xpCuX17A6M/Tc6QvhZs9FI/AAAAAAAAA5o/Z-Sv9YOzWdo/s1600/chronos_benchmark1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://4.bp.blogspot.com/-9xpCuX17A6M/Tc6QvhZs9FI/AAAAAAAAA5o/Z-Sv9YOzWdo/s320/chronos_benchmark1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 3: simple benchmark&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;The above diagram shows the components used in a simple test. The Chronos watch  receives and stores temperature and humidity values sent from the &lt;a href="http://panstamp.blogspot.com/2011/04/humidity-temperature-wireless-mote.html"&gt;humidity&amp;amp;temperature panStamp&lt;/a&gt; whilst the PC+modem set is used during configuration only. In fact, everything in the Chronos, including the data pages to be displayed, is configured wirelessly through the use of configuration registers. Again, the basic philosophy of the SWAP protocol, where everything can be represented in form of addressable registers, has vastly simplified things in this development. From the PC, I only had to send a SWAP command addressed to a given configuration register (one per SWAP data page) that simply sets the origin of the data to be displayed, a basic text label and some transformation operands. Then, the watch basically listens for incoming SWAP informations and refreshes the internal data pages when necessary.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-sVEiazn--nM/Tc6S6jfHnWI/AAAAAAAAA5s/JEwg0KE0n2s/s1600/chronos_screen1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://2.bp.blogspot.com/-sVEiazn--nM/Tc6S6jfHnWI/AAAAAAAAA5s/JEwg0KE0n2s/s320/chronos_screen1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 4: Some custom SWAP pages&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;As you can see, the bottom line of the display, initially reserved for labelling each SWAP endpoint, has some obvious limitations. It's a 6-digit 7-segment area so before writing any text onto it, anyone has to decide which label fits best these limitations. Anyway, for the above test I just wanted to identify each endpoint with some basic alphanumeric identifiers: “hu 1” for Humidity 1 and “tE 1” for Temperature 1.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Anything else? What is this custom application supposed to do apart from displaying external SWAP data? Well, the new Chronos firmware includes pretty much the same functionality than the stock firmware:&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Date and time&lt;/li&gt;&lt;li&gt;Time alarm&lt;/li&gt;&lt;li&gt;Stopwatch&lt;/li&gt;&lt;li&gt;Temperature sensor&lt;/li&gt;&lt;li&gt;Pressure sensor and altimeter&lt;/li&gt;&lt;li&gt;3-axis accelerometer&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Moreover, my current implementation updates an internal SWAP register with the values extracted from the temperature and pressure/altimeter sensors. Thus, anyone may query this register wirelessly whilst the SWAP mode is active on the Chronos. I wanted to do the same with the accelerometer values but then I realized that the initial TI approach is much more usable so I'll surely work on developing a similar function using SWAP instead of SimpliciTI. Once completed, this feature will let us manually release a continuous stream of xyz-accelerometer data for any third-party application wanting to exploit (or simply plot) these data.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;So... what's next? Some of the above features need to be improved but, apart from that, I still need to solve some issues regarding the consumption on the Chronos and the way the watch stores data after each configuration. I also need to decide the amount of custom pages available on the watch and the way the external endpoints may be controlled from the Chronos. I'll initially work on controlling some binary switches from the up-down buttons but later I'll probably want to control analog setpoints or even RGB data. Finally, I'll want to extend the SWAP device management tool to configure the Chronos from one of its graphical windows instead of having to send the configuration commands manually from a serial console.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;I'll try to document these progresses and much more in future posts so please... stay tuned for the next. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-835555764205532223?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/835555764205532223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/05/swapping-packets-with-my-ez430-chronos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/835555764205532223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/835555764205532223'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/05/swapping-packets-with-my-ez430-chronos.html' title='SWAPping packets with my ez430-Chronos'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-o3jMe5ZGqiA/TXZUnWrsZCI/AAAAAAAAAyk/U3dIeFHOcXc/s72-c/ez430-chronos_800.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-4241319503860195050</id><published>2011-04-27T19:36:00.005+02:00</published><updated>2011-08-17T12:49:43.279+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google speech voice recognition pantastic home automation'/><title type='text'>Speech Recognition from Google - New possibilities for Open Home Automation</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;    &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Although this does not seem to be related to the panStamp project, I've always wanted to integrate voice commands into my home automation software without having to pass through some of the existing commercial solutions; most of them being platform dependent.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Last week a friend pointed me to Google Translate, one of the new Google apps for mobile platforms that translates voice statemens to a good number of languages. This application seemed to recognize our very different voices on the fly without having to pass any previous training. Even complex statements were being recognized with a high degree of precision, and all that from a simple small application installed on an iPhone!&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Speech recognition software has proven to be one of the most specialized areas in the software programming world. Only a few companies develop voice recognition engines and most of these software rely on complex voice models and ultra-secret recognition algorithms. Some of these applications, like Windows' Voice Recognition Engine are mostly specialized in recognizing short commands. Other, like &lt;a href="http://www.nuance.com/dragon/index.htm"&gt;Dragon Naturally Speaking&lt;/a&gt;, seem to offer a better performance for dictating applications.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Over the past years I've been studying the possibility to add speech recognition capabilities to my custom software applications, mainly to those solutions having to do with Home Automation. Some years ago I decided to play with HomeSeer's integrated speech recognition scripting engine. Well, &lt;a href="http://www.homeseer.com/"&gt;HomeSeer&lt;/a&gt; was using Windows' engine in those times but HomeSeer did offer a good scripting interface for controlling the Home Automation stuff from voice commands; something really useful and well documented. Unfortunately, Windows was providing speech recognition only in English. As you may guess, I needed something closer to my mother language so I ended by giving it up.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Now Google arrives with a very interesting solution, and I mean interesting due to the following reasons:&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Google's Speech Recognition API would seem to be free and open source. This feature would let us integrate these Speech Recognition capabilities into any existing software, including my panTastic software.&lt;/li&gt;&lt;li&gt;It's client server-based. This means that the client just has to generate an audio file and then send it to Google's remote voice recognition servers. A few seconds later, Google responds with a formatted string containing the text recognized from the provided audio file. The whole speech recognition engine, including voice models and dynamic algorithms, are placed in Google's servers. Thus, we can do speech recognition almost from any lightweight device capable to record audio.&lt;/li&gt;&lt;li&gt;The API is http-based so it's truly open-platform. We Linux users would be finally allowed to run speech to text routines in a decent way. Indeed this http API opens new possibilities to open control software like opn-max and panTastic (soon...) since we'll be able to keep the small factor and low power and still provide Voice Recognition capabilities.&lt;/li&gt;&lt;li&gt;We'd take advantage of the growing voice models being added to Google's servers, probably being improved dynamically along the use from the wide community (??).&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;On the other hand, there are some drawbacks that will have to be considered too:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Any device wanting to do Voice Recognition through Google's engine will have to be on-line. This should not be an issue for most Home Automation applications though.&lt;/li&gt;&lt;li&gt;The whole recording-transmission-processing-reception procedure takes a few seconds. Some users may expect a faster response to their voice commands.&lt;/li&gt;&lt;li&gt;Google Speech Recognition seem to be still under test. As result, Google may want to move their servers or change the API URL address without previous notice.&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-tovklWr-kv4/TbhT7_ZS3tI/AAAAAAAAA04/yBZVhOEhZtE/s1600/google_speech.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="137" src="http://3.bp.blogspot.com/-tovklWr-kv4/TbhT7_ZS3tI/AAAAAAAAA04/yBZVhOEhZtE/s400/google_speech.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;OK but, how can Google Speech Recognition engine be used from a custom software? I've deeply browsed the net during the last days and found very little information about Google's API. It would seem that most of Google's efforts are being focused on providing speech recognition capabilities for Android and some of Google's most  popular applications, including Google Chrome. Finally, I found this great source of information:&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;a href="http://www.commandlinefu.com/commands/by/sairon"&gt;http://www.commandlinefu.com/commands/by/sairon&lt;/a&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Sairon, the maintainer of the above website provides some interesting scripts that would let us integrate the speech-to-text engine in any application with IP connectivity. Since I was mainly interested in testing the Speech Recognition Engine in Spanish, I modified the suggested scripts for my convenience.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;First of all, we need to create a flac file with the desired voice command to be processed. The sampling rate must be 16 KHz:&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;sox -r 16000 -t alsa default recording.flac silence 1 0.1 1% 1 1.5 1%&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Once the flac file created, it's time to transmit it to Google's Speech Recognition server through a wget command:&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;wget -q -U "rate=16000" -O - "http://www.google.com/speech-api/v1/recognize?lang=es&amp;amp;client=Mozilla/5.0" --post-file recording.flac --header="Content-Type: audio/x-flac; rate=16000"&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Sairon suggests a more complex script, identifying the http request as coming from both Mozilla and Chrome, maybe as a way to offer some redundancy. For my tests, I just used the Mozilla portion of the command.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Less than three seconds after running the above wget command I got the following response from Google:&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;{"status":0,"id":"b62308e814a4287240f68d23258914d2-1","hypotheses":[{"utterance":"estamos probando el motor de reconocimiento vocal de google","confidence":0.8816453}]}&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Indeed, “we were testing Google's Voice Recognition engine”, a command spoken in a very natural way without having to include additional pauses between words. Quite awesome given my precedent experiences with other VR software. At the end of Google's response,  0.8816453 seems to show the degree of confidence of the resulted procedure, more than 88% of confidence would not seem so bad.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Finally, Sairon also explains how to use Google's text-to-speech engine:&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;wget -q -U Mozilla -O output.mp3 "http://translate.google.com/translate_tts?tl=es&amp;amp;q=esto+parece+funcionar+a+la+perfeccion"&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-4241319503860195050?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/4241319503860195050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/04/speech-recognition-from-google-new.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4241319503860195050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4241319503860195050'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/04/speech-recognition-from-google-new.html' title='Speech Recognition from Google - New possibilities for Open Home Automation'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-tovklWr-kv4/TbhT7_ZS3tI/AAAAAAAAA04/yBZVhOEhZtE/s72-c/google_speech.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-4586304142680285624</id><published>2011-04-15T14:15:00.000+02:00</published><updated>2011-04-15T14:15:35.156+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pantastic swap opnode xap'/><title type='text'>opnode panTastic: architecture of a new server controller</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; &lt;/style&gt;      &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;I must admit that I slightly abandoned my &lt;a href="http://www.opnode.org/"&gt;opnode&lt;/a&gt; project long time before starting the panStamp project. After more than five years, opnode has not gotten the popularity that I initially expected, surely due to the cost of the custom hardware. &lt;a href="https://sites.google.com/a/usapiens.com/opnode/products/opn-max"&gt;Opn-max&lt;/a&gt; is the only opnode relying on a low-cost third-party (Linksys) hardware platform and people still seems reluctant to do the jump – hacking the Linksys NSLU2 has resulted a bit complicated for non Linux users.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-RvISlBaL8_U/SNimwlA69UI/AAAAAAAAAM8/CsiQpgB1-so/s1600/opn-max_rear.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-RvISlBaL8_U/SNimwlA69UI/AAAAAAAAAM8/CsiQpgB1-so/s320/opn-max_rear.png" width="302" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: opn-max controller running on a Linksys NSLU2&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;This said, I've planed to revolution the opnode project since I started this blog. I see lots of synergies between opnode and panStamp, maybe not for simple wireless networks but most people wants to integrate different technologies nowadays, and that is exactly the goal of the opnode project: piping different communication technologies into a common IP integration platform. The old opnode architecture has resulted to work efficiently and fast. However, the “&lt;i&gt;one gateway per cloud&lt;/i&gt;” paradigm is a bit costly and not very popular in the Home Automation area. Instead, most people prefers to invest in more powerful hardware capable to work as a multi-port gateway or controller. At least, this is what I've learned from the opnode community.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-ozprGZIl364/ShUmShsTPXI/AAAAAAAAAYo/peN6ialrsS4/s1600/xAP_architecture_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://1.bp.blogspot.com/-ozprGZIl364/ShUmShsTPXI/AAAAAAAAAYo/peN6ialrsS4/s400/xAP_architecture_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: old “one gateway per cloud” paradigm&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Coming from the Industrial world, I'm a big fan of isolating networks and tasks through the use of independent gateways. However, I understand that Home Automation hobbyists prefer to take such decision themselves. On the other hand maintaining a single plural project instead of several vertical ones seems that will simplify my life a little. All these factors have led me to conceive a new opnode, &lt;i&gt;panTastic&lt;/i&gt;, a controller with all the features provided by &lt;a href="https://sites.google.com/a/usapiens.com/opnode/products/opn-max"&gt;opn-max&lt;/a&gt; plus the possibility to add support for different communication technologies into a common box.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Since the current opnode software was exactly tuned to follow the old paradigm, panTastic will need a new architecture, something really open to the addition of new communication ports and protocols without having to rebuild the whole application along each addition. Moreover, I want this project to be as much programming language independent as possible, at least regarding the development of plugins (or clients). As result, I've configured a new architecture where the main core (panTastic server) dialogues with multiple communication clients. Each client is then the responsible to maintain the necessary communication tasks with each wireless cloud or bus field.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UwYUkHR7KJM/Tag10zVSIlI/AAAAAAAAA0o/pKF4qJUaTlI/s1600/pantastic_architecture.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-UwYUkHR7KJM/Tag10zVSIlI/AAAAAAAAA0o/pKF4qJUaTlI/s400/pantastic_architecture.png" width="287" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 3: panTastic architecture&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Flexibility is maybe one of the main features of such architecture. Anyone can decide whether to integrate multiple communication technologies or not, place the client inside or outside the server box or simply develop the client using any programming language capable to work with TCP/IP sockets. As for the hardware, panTastic will work on any 32-bit platform capable to run Java ME, SQLite, Perl, PHP and LightHttp. In other words, almost any cheap x86 platform such as the &lt;a href="http://en.wikipedia.org/wiki/SheevaPlug"&gt;ShevaPlug&lt;/a&gt; or any of the &lt;a href="http://www.compactpc.com.tw/ebox-2300.htm"&gt;eBoxes&lt;/a&gt; should be able to run panTastic without problems.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Regarding the integrability of panTastic, this project will let us do many things with our wireless PAN's:&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Maintain different PAN's (SWAP-based or not) from one or multiple panTastic controllers.&lt;/li&gt;&lt;li&gt;Use the IP LAN as a common communication trunk for different panTastic controllers and thus for different PAN's.&lt;/li&gt;&lt;li&gt;Program events and scripts for each PAN or bus field.&lt;/li&gt;&lt;li&gt;Monitor and control endpoints from any web browser.&lt;/li&gt;&lt;li&gt;Generate and display Web charts based on data stored in the SQLite database.&lt;/li&gt;&lt;li&gt;Integrate wireless and wired clouds into other remote software applications via xAP BSC or custom TCP/IP (opn-max, Mr House, HomeSeer, HAL, MainLobby, etc).&lt;/li&gt;&lt;/ul&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;In summary, panTastic will bring new possibilities to SWAP networks, providing a good degree of smartness, even to clouds formed by very simple motes.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-4586304142680285624?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/4586304142680285624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/04/opnode-pantastic-architecture-of-new.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4586304142680285624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4586304142680285624'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/04/opnode-pantastic-architecture-of-new.html' title='opnode panTastic: architecture of a new server controller'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-RvISlBaL8_U/SNimwlA69UI/AAAAAAAAAM8/CsiQpgB1-so/s72-c/opn-max_rear.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-3518992150978383155</id><published>2011-04-11T18:47:00.000+02:00</published><updated>2011-04-11T18:47:55.712+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp solar cell wireless'/><title type='text'>Solar experiences: first tries</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;      &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;a href="http://panstamp.blogspot.com/2011/03/power-consumption.html"&gt;In precedent posts&lt;/a&gt; I've introduced some informations about power consumptions. As a rule of thumb, when configured as battery-operated devices, panStamps may drain a few microamps in power-down mode and a few miliamps when measuring and transmitting. Under these circumstances, powering a panStamp based board from a couple of AA batteries should give us an autonomy between one and three years, depending on the particularities of each project (consumption of the sensor, DAQ and transmission intervals, time remaining in Rx after each transmission, etc).&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Now I want to go a step further and create real autonomous wireless motes; no need to replace batteries at all since solar energy is available for free almost everywhere. Before adding more complexity to the hardware, I thought about checking this concept with a common solar battery, one of those cheap USB chargers for cell phones.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-3gXb-zjXGJA/TaMtNEkr4QI/AAAAAAAAA0I/aaDc0llla4w/s1600/solar_battery.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="265" src="http://2.bp.blogspot.com/-3gXb-zjXGJA/TaMtNEkr4QI/AAAAAAAAA0I/aaDc0llla4w/s400/solar_battery.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: panStamp base board being powered from a solar phone charger&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;The solar charger appearing in the above picture may seem somehow overkilled for our purpose; the most simple (and cheap) solar chargers may be used instead. The base board where the panStamp is plugged onto was originally designed to work as programmer and USB interface. It also includes a LDO, independent from the ft232 on-chip voltage converter, so that the FTDI USB chip can remain unpowered (through an external jumper) whilst the board can still be powered from an external 5VDC power supply.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;However, the above solution is not what I had in mind when I planned to build cheap and simple solar-powered devices. Thus, I needed to go back to the basis, restart my solar design and do things step by step.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;My first decision was to build a boost power supply where to base my solar design on. Powering a microcontroller from a solar cell is a bit more complicated than simply connecting the cell to the Vcc and GND pins. Voltages provided by solar cells are far from being constant and regulated. Moreover, I need to back up some of the power produced into a battery or capacitor. Finally, I want my solar kit to cost less than USD10. Otherwise I'd see no reason for abandoning the (above) USB solar battery approach.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Regarding the step-up voltage regulator, the NCP1400 chip, made by ON Semiconductor, appears as a good candidate. It costs less than USD1.0 and requires only a few passive components. This regulator is capable to start converting 0.8 V into other more usable voltages and keep conversions when the voltage source goes below 0.2 V. In order to test the samples received from the manufacturer, I built some small boards that will let me plug different power sources and storage devices.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-nRuSJbYHmIE/TaMtwkiBQgI/AAAAAAAAA0M/s7oqWd-Qz3A/s1600/NCP1400_Schema.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://4.bp.blogspot.com/-nRuSJbYHmIE/TaMtwkiBQgI/AAAAAAAAA0M/s7oqWd-Qz3A/s400/NCP1400_Schema.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: NCP1400 test board schematics&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;This step-up regulator is not only suitable for solar designs. Since it accepts low voltage ranges, I'll be able to power my panStamps from single AA/AAA batteries, ensuring that their charge will be drained more efficiently than simply connecting AA/AAA pairs as described in the &lt;a href="http://panstamp.blogspot.com/2011/04/humidity-temperature-wireless-mote.html"&gt;precedent post&lt;/a&gt;.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Yc9d9g9-s1Q/TaMuSvUV7PI/AAAAAAAAA0Q/yDSsXxVoTFY/s1600/ncp1400_board.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="184" src="http://2.bp.blogspot.com/-Yc9d9g9-s1Q/TaMuSvUV7PI/AAAAAAAAA0Q/yDSsXxVoTFY/s320/ncp1400_board.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 3: NCP1400 test board&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;Finally, I ordered some cheap solar cells from Internet and a supercapacitor where to store the excess of power and keep the panStamp running through the night. The supercapacitor is a &lt;span style="font-weight: normal;"&gt;6.6F 2.7V ELNA DZ one, purchased from eBay, that should show a low ESR (Equivalent Series Resistance), 0.2 ohms or so. Choosing a good supercapacitor is very important, not only for the amount of charge that it will be able to store but also for its rate of discharge. A low ESR ensures low current leakages.&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-qeymU_Fg2cw/TaMvK9DjZKI/AAAAAAAAA0U/QoBZSKrHhZ8/s1600/solar_cells.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="386" src="http://2.bp.blogspot.com/-qeymU_Fg2cw/TaMvK9DjZKI/AAAAAAAAA0U/QoBZSKrHhZ8/s400/solar_cells.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 4: Cheap solar cells. 29 x 59 mm. 2V 45 mA under direct sunlight.&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;Once I got all the necessary pieces I assembled them all together and run some tests. I initially expected the ensemble to work under low daylight conditions and still be able to back up the necessary energy to work through a whole night...&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-TxCXCRJMd_8/TaMv-GciUNI/AAAAAAAAA0Y/gHJwc90L0e0/s1600/solar_kit_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://1.bp.blogspot.com/-TxCXCRJMd_8/TaMv-GciUNI/AAAAAAAAA0Y/gHJwc90L0e0/s400/solar_kit_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 5: My first solar engine&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;… Unfortunately, none of my initial wishes fulfilled. Firstly, the solar cells resulted to work only under direct sunlight. Under the shade, even with good indirect daylight, these cells do not provide the necessary voltage to make the regulator work. My second frustration arrived when I checked that the supercapacitor was not able to keep its charge more than 7 minutes, even when my panStamp was not consuming more than 0.2 mA. All these bad news have led me to review my design and get the following conclusions:&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;1. I need to look for more efficient solar cells, capable to produce a minimum of voltage and current even under low daylight conditions. In household applications, these solar-powered sensors won't rarely be placed under direct sunlight so my current solar cells are useless.&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal; margin-bottom: 0in;"&gt;2. The NCP1400 board requires low ESR capacitors. Placing a good supercapacitor besides not so good filtering capacitors makes the whole design discharge quicker. As filtering capacitors I initially used some tantalum ones that I had in stock but later I realized that their ESR's were not acceptable for my design. Instead, I'll have to search better ones, with ESR's below 0.3 ohms.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;3. I need to try other supercapacitors. The one purchased from eBay theoretically has an ESR of 0.2 Ohms but I've not been able to find the original data sheet. Indeed, I'd say that ELNA no longer makes this reference and, instead, Mouser and other distributors provide the 4.7 F value and lower ones. I'm beginning to question the quality of this 6.6 F supercapacitor.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;In summary, I guess it's an issue of replacing pieces in my current design. I'll try to document in future posts my progresses and other experiences about this exciting topic.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-3518992150978383155?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/3518992150978383155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/04/solar-experiences-first-tries.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3518992150978383155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3518992150978383155'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/04/solar-experiences-first-tries.html' title='Solar experiences: first tries'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-3gXb-zjXGJA/TaMtNEkr4QI/AAAAAAAAA0I/aaDc0llla4w/s72-c/solar_battery.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-1978839692312984578</id><published>2011-04-02T14:41:00.000+02:00</published><updated>2011-04-02T14:41:34.060+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='dht11 temperature humidity'/><title type='text'>Humidity &amp; Temperature wireless mote</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;    &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;More than a week without posting a single article to this blog... My second son was born yesterday after a week full of stress, worries and finally happiness :-)&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;Meanwhile, I've only progressed on the software aspects of the panStmap project. The jswap Java library has been improved with some smarties that will let the user application send commands to sleeping motes when they come back to life for their periodic reports. Additionally, a basic XML profile inspector has been added to the engine, providing a number of informations to the master application about each available device from a single product code (8 bytes). Nevertheless I wanted to close this week with a practical application, a true sensor mote that sends temperature and humidity values with the use of a panStamp, a couple of AA batteries and a DHT11 Humidity &amp;amp; Temperature sensor&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Tn_ivbOFWCo/TZcLtJulzpI/AAAAAAAAAzo/n75Ro_V0hG4/s1600/IMGP0072.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://3.bp.blogspot.com/-Tn_ivbOFWCo/TZcLtJulzpI/AAAAAAAAAzo/n75Ro_V0hG4/s320/IMGP0072.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: Humidity &amp;amp; Temperature panStamp sensor&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;DHT11 is an interesting sensor providing compensated digital temperature and humidity values through a single wire. There are some example applications about DHT11 for Arduino so integrating this dual sensor with panStamp has resulted to be very easy.&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-O-ymCUKT2sc/TZcL_6HWfFI/AAAAAAAAAzs/LaTdCYKAULo/s1600/IMGP0073.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-O-ymCUKT2sc/TZcL_6HWfFI/AAAAAAAAAzs/LaTdCYKAULo/s320/IMGP0073.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: Another view of this home-brew wireless sensor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;As you can see, the hardware part of this practical example is quite simple. Just to be noted that the DHT11 sensor is actually being powered from a panStamp digital pin so that the sensor can be unpowered before the panStamp enters the power-down mode. This will ensure that the wireless mote will not exceed 5 uA during sleep and, although I've not checked the power consumption when in active mode, I expect to have an autonomy of about 1.5 years with the showed alkaline batteries.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;Firmware wise, what is behind the scenes? The arduino sketch is primarily represented by the following loop code:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * loop&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * Arduino main loop&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;void loop()&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; epTable[EPI_PRODUCTCODE]-&amp;gt;getData();  // Transmit product code&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  delay(10);&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; epTable[EPI_VOLTSUPPLY]-&amp;gt;getData(); // Measure and transmit voltage supply&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  delay(10);&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  epTable[EPI_HUMIDTEMP]-&amp;gt;getData(); // Measure and transmit humidity and temp values (2 bytes)&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  delay(100); // Listen for remote commands for 100 msec&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  panstamp.sleepFor(WDTO_8S);  // Power-down for 8 sec&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;The above code may be modified to make the panStamp sleep during longer periods. Besides, anyone may prefer to not to send the product code so frequently or decompose humidity and temperature in two different endpoints. All this is customizable by the developer.&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;But previous to the above code, the new non-standard endpoints have had to be declared somewhere in the sketch:&lt;/div&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;/*&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * Add here your custom endpoints&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;// Voltage supply&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;static byte dtVoltSupply[2];&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;ENDPOINT epVoltSupply(dtVoltSupply, sizeof(dtVoltSupply), &amp;amp;updtVoltSupply, NULL);&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;// Temperature and humidity from the DHT11 sensor&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;static byte dtTempHum[2];&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;ENDPOINT epTempHum(dtTempHum, sizeof(dtTempHum), &amp;amp;updtTempHum, NULL);&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;Here both endpoints are declared and statically allocated. For each endpoint, a pointer to an &lt;i&gt;“updater”&lt;/i&gt; function or &lt;i&gt;“getter”&lt;/i&gt; is passed as argument to the &lt;i&gt;ENDPOINT&lt;/i&gt; constructor. These &lt;i&gt;“getters”&lt;/i&gt; will later be called whenever &lt;i&gt;ENDPOINT.getData()&lt;/i&gt; is used in the sketch. In fact these custom functions are automatically called by the SWAP library to automate things like sending info messages after receiving SWAP queries for instance so that the end user has not to worry about dealing with the basic mechanisms of the SWAP protocol.&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;Then the new endpoints are declared as part of the global array of endpoints (&lt;i&gt;epTable&lt;/i&gt;):&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * Initialize table of endpoints&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;ENDPOINT *epTable[] = {&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epProductCode,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epHwVersion,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epFwVersion,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epSysState,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epCarrierFreq,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epFreqChannel,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epSecuOption,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epSecuNonce,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epNetworkId,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epDevAddress,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;// Add here your custom endpoints&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epVoltSupply,&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;amp;epTempHum&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;};  &lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;And finally, both updater or getter functions are defined:&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * updtVoltSupply&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * Measure voltage supply and update endpoint. Code inspired from&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * http://code.google.com/p/tinkerit/wiki/SecretVoltmeter&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * 'eId'  Endpoint ID&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;const void updtVoltSupply(byte eId)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  unsigned short result;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  // Read 1.1V reference against AVcc&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;  delay(2); // Wait for Vref to settle&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;  ADCSRA |= _BV(ADSC); // Convert&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; while (bit_is_set(ADCSRA,ADSC));&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  result = ADCL;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  result |= ADCH &amp;lt;&amp;lt; 8;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  result = 1126400L / result; // Back-calculate AVcc in mV&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;  /**&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;   * endpoint[eId]-&amp;gt;member can be replaced by epVoltSupply.member in this case since&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;   * no other endpoint is going to use "updtVoltSupply" as "updater" function&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;   */&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  // Update endpoint value&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  epTable[eId]-&amp;gt;value[0] = (result &amp;gt;&amp;gt; 8) &amp;amp; 0xFF;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  epTable[eId]-&amp;gt;value[1] = result &amp;amp; 0xFF;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * updtTempHum&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * Measure humidity and temperature and update endpoint&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; *&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; * 'eId'  Endpoint ID&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; */&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;const void updtTempHum(byte eId)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  int result;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  if ((result = dht11_ReadTempHum()) &amp;lt; 0)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  // Update endpoint value&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  epTempHum.value[0] = (result &amp;gt;&amp;gt; 8) &amp;amp; 0xFF;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;  epTempHum.value[1] = result &amp;amp; 0xFF;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;span style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-1978839692312984578?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/1978839692312984578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/04/humidity-temperature-wireless-mote.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/1978839692312984578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/1978839692312984578'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/04/humidity-temperature-wireless-mote.html' title='Humidity &amp; Temperature wireless mote'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Tn_ivbOFWCo/TZcLtJulzpI/AAAAAAAAAzo/n75Ro_V0hG4/s72-c/IMGP0072.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-6256242516511321944</id><published>2011-03-25T14:33:00.000+01:00</published><updated>2011-03-25T14:33:49.129+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp jswap jcc11xx java opnode'/><title type='text'>SWAP device management tool</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;    &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;I've been intensively working during this week, developing a simple configuration tool for my wireless network. It happened that I found I was wasting some of my time in basic operations like changing addresses, network id's and frequency channels. For every intervention I had to manually send SWAP commands from minicom, a bit hard when you're doing these changes a dozen of times per day. Finally, this management tool will simplify my life, at least along my developments.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-az5G-nls8EA/TYyJ_nAe_FI/AAAAAAAAAzg/aZbw5BJSvPI/s1600/SWAPdmt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="263" src="https://lh5.googleusercontent.com/-az5G-nls8EA/TYyJ_nAe_FI/AAAAAAAAAzg/aZbw5BJSvPI/s400/SWAPdmt.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: SWAP Device Management Tool&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;This tool has been entirely developed using Java ME under Netbeans. This means that it should work on either Linux, Mac or Windows. I admit that this application may have been developed using other cross-platform languages like C++, Python or Ruby. It just happens that Java provides me a good compromise between fast-delivery and good integration with third-party UML tools. On the other hand, this development has been the perfect excuse for creating two Java libraries for the panStamp project:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;jcc11xx&lt;/i&gt;&lt;/b&gt; is a java library for communicating with a panStamp connected to a computer USB port and running the &lt;a href="http://panstamp.blogspot.com/2011/03/piping-wireless-packets-to-computer.html"&gt;modem application&lt;/a&gt;. This library provides the necessary classes and methods to transmit and receive wireless CC11XX packets in an asynchronous way.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;jswap&lt;/i&gt;&lt;/b&gt; is a Java library, sitting on top of jcc11xx, that implements the SWAP protocol layer and some other smart features like a basic XML parser and a device/endpoint management platform. This library may seem a little overkilled for the basic management tool but I had other projects in mind. In particular, I've been always thinking in this library as a way of providing wireless SWAP connectivity for Home Automation, HVAC and Home Theater software. Once jswap get to a complete stage, I'll surely start a new project consisting in a new generation of &lt;a href="http://www.opnode.com/"&gt;opnodes&lt;/a&gt; for wireless networks.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-Z_be56diScw/TYyK1CBooYI/AAAAAAAAAzk/Yl1u0KbxuFM/s1600/jswap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="281" src="https://lh5.googleusercontent.com/-Z_be56diScw/TYyK1CBooYI/AAAAAAAAAzk/Yl1u0KbxuFM/s400/jswap.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&amp;nbsp;&lt;span style="font-size: x-small;"&gt;Figure 2: Java SWAP stack&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Back to the management tool, there is still some work to do, mainly in how custom configurations are stored in the computer and also in the way device product codes are translated into something readable and understandable by the end user. By the way, developing such automatic identification algorithm will bring me to other needs, like the one of having to identify device resources (endpoints) and inherent functionalities. All this just after receiving an eight-byte product code (standard endpoint 0) wirelessly.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-6256242516511321944?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/6256242516511321944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/swap-device-management-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/6256242516511321944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/6256242516511321944'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/swap-device-management-tool.html' title='SWAP device management tool'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh5.googleusercontent.com/-az5G-nls8EA/TYyJ_nAe_FI/AAAAAAAAAzg/aZbw5BJSvPI/s72-c/SWAPdmt.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-8207273894925918975</id><published>2011-03-22T08:44:00.000+01:00</published><updated>2011-03-22T08:44:24.948+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless SWAP gateway modem'/><title type='text'>Piping wireless packets to the computer</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;The computer gateway will be one of the key pieces of the panStamp ecosystem. In order to communicate with the panStamps from my PC, I've developed an Arduino application that basically converts wireless packets to ASCII strings and vice-versa. Since I need to configure some parameters such as device address, carrier frequency and channel, this gateway has also been programmed to accept a set of AT commands.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-QV1NISKmbRk/TXAQ_lJcu8I/AAAAAAAAAxo/6mleAUhi3rA/s1600/panstamp2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="269" src="https://lh3.googleusercontent.com/-QV1NISKmbRk/TXAQ_lJcu8I/AAAAAAAAAxo/6mleAUhi3rA/s320/panstamp2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: panStamp mounted on the USB board working as serial modem&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;One of the important things about this gateway is that is does not implement the SWAP stack itself. Instead of this, the “modem” simply pipes raw wireless packets to the computer, making it compatible with other wireless protocols. Later, we'll have to develop an implementation of the SWAP protocol for PC, where computation resources and disk space are something unlimited compared to Atmega's.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Another advantage of working with ASCII packets and AT commands is that anyone can access the modem from a serial terminal such as hyperterminal (for Windows) or minicom (for Linux). Apart from this, ASCCI strings also simplify the integration from custom applications, making the use of additional drivers and libraries almost unnecessary.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-Infr2SZnrjo/TYhRiDHVqYI/AAAAAAAAAzc/jPJtpBlnLFU/s1600/minicom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh6.googleusercontent.com/-Infr2SZnrjo/TYhRiDHVqYI/AAAAAAAAAzc/jPJtpBlnLFU/s1600/minicom.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2 : minicom in the process of capturing some wireless packets&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;The above screenshot shows minicom receiving frames from a mote. Taking one of those frames, we can de-compose it as follows:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style="margin-bottom: 0in;"&gt;(D730)0001001E00010A0CA4  &lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;0xD7&lt;/i&gt;&lt;/b&gt; is the RSSI value whilst receiving the frame, coded as the CC1101 datasheet indicates.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;0x30&lt;/i&gt;&lt;/b&gt; is the LQI alue (7 bits), as explained in the CC1101 datasheet too.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x00&lt;/b&gt;&lt;/i&gt; is the destination address. This packet has been broadcasted then, as specified by the SWAP protocol.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x01&lt;/b&gt;&lt;/i&gt; is the address of the source device or mote&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x00&lt;/b&gt;&lt;/i&gt; is the value of the hop counter (4 bits) and the security option (4 bits). In other words, this packet has never been repeated and includes no security protection.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x1E&lt;/b&gt;&lt;/i&gt; is the cyclic nonce. Even if it's not taken into account (security option = 0), every information packet being transmitted makes this counter increment.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x00&lt;/b&gt;&lt;/i&gt; is the function code, indicating that the packet is a SWAP information message, reporting the value of an endpoint&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x01&lt;/b&gt;&lt;/i&gt; is the address of the device actually owning the endpoint. This tells us that the device that owns the endpoint is also the one having sent the info packet.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x0A&lt;/b&gt;&lt;/i&gt; is the index of the endpoint. Endpoint address (0x01) and endpoint index (0x0A) make a unique endpoint code within the wireless network: 0x010A.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;&lt;b&gt;0x0CA4&lt;/b&gt;&lt;/i&gt; is the value of the endpoint. This 2-byte digit particularly shows the voltage supply on the remote device (0x0CA4 hex = 3236 dec = 32.36 VDC).&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;What is the next step? I'm already working on a PC tool for configuring SWAP motes wirelessly without having to handwrite command frames from the serial terminal. This tool may also derive into some kind of diagnosis application for testing remote motes and helping developers in their projects. Meanwhile, I have a good excuse for developing a SWAP Java library.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-8207273894925918975?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/8207273894925918975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/piping-wireless-packets-to-computer.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8207273894925918975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8207273894925918975'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/piping-wireless-packets-to-computer.html' title='Piping wireless packets to the computer'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh3.googleusercontent.com/-QV1NISKmbRk/TXAQ_lJcu8I/AAAAAAAAAxo/6mleAUhi3rA/s72-c/panstamp2.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-7739982185791969994</id><published>2011-03-18T10:20:00.001+01:00</published><updated>2011-03-18T18:59:17.681+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless arduino library size'/><title type='text'>panStamp library now available on Google Code</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;A first version of the panStamp library has been recently uploaded to Google Code. This library has a GPL license so anyone could use it for their projects, commercial or not, free of charge.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;SVN repository on Google Code: &lt;a href="http://panstamp.googlecode.com/svn"&gt;http://panstamp.googlecode.com/svn&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;From the panStamp library we may use just the CC1101 driver or the complete application stack, including SWAP and the endpoint management system. In the next days I'll also try to show some examples of real applications in order to give a better understanding about the way to interface with the library&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-mNnrVZAb5nA/TYMjEkMWYvI/AAAAAAAAAzY/-FXLH2xnbSM/s1600/uml.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="277" src="https://lh4.googleusercontent.com/-mNnrVZAb5nA/TYMjEkMWYvI/AAAAAAAAAzY/-FXLH2xnbSM/s400/uml.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: UML diagram of the panStamp library v0.0.1&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;As for the final size of the binaries, an Arduino sketch implementing a simple basic SWAP-enabled sensor, with integrated endpoint management system, takes around 5 KB of flash (of 30 KB available in the Atmega328p) and will take no more than 725 bytes of RAM (of 2 KB available in the Atmega328p). Given that the Arduino bootloader needs 2 KB of flash, our sketch should still run on an Atmega88 without problems.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-7739982185791969994?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/7739982185791969994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-library-now-available-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7739982185791969994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7739982185791969994'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-library-now-available-on.html' title='panStamp library now available on Google Code'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh4.googleusercontent.com/-mNnrVZAb5nA/TYMjEkMWYvI/AAAAAAAAAzY/-FXLH2xnbSM/s72-c/uml.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-8987183597956592655</id><published>2011-03-16T17:56:00.000+01:00</published><updated>2011-03-16T17:56:36.063+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless swap endpoints'/><title type='text'>SWAP, a very tiny protocol for constrained wireless M2M networks: basic SWAP endpoints</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;    &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;In order to set up a basic endpoint reference, at least for the common configuration options, any SWAP device should provide support for the following endpoints:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Product code&lt;/i&gt;&lt;/b&gt; (8 bytes): Each type of device is defined by a unique product identifier. This endpoint may be queried by other wireless nodes as a way to discover the device capabilities. A central repository containing XML definitions for each product ID may be also maintained, allowing the creation of automatic mechanisms on internet-enabled controllers.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Each product code is composed by a manufacturer id and a product id. No need to produce then unique device id's (MAC), just a unique product code for each product type.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-O0yUvAEqRgY/TYDko4wALjI/AAAAAAAAAy4/CgFfzcjaK88/s1600/product_code.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="96" src="https://lh4.googleusercontent.com/-O0yUvAEqRgY/TYDko4wALjI/AAAAAAAAAy4/CgFfzcjaK88/s320/product_code.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&amp;nbsp;&lt;span style="font-size: x-small;"&gt;Figure 1: Product code&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Hardware version&lt;/i&gt;&lt;/b&gt; (4 bytes): Hardware version of the device.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Firmware version&lt;/i&gt;&lt;/b&gt; (4 bytes): Firmware version of the device.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;System state&lt;/i&gt;&lt;/b&gt; (1 byte): Working state of the device. This endpoint can be queried or controlled so that different working modes can be entered wirelessly, including reseting the remote node.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Carrier Frequency&lt;/i&gt;&lt;/b&gt; (1 byte): This endpoint will be used to switch between the different carrier frequencies available on the device (basically between 868 MHz and 915 MHz). Modulation type will be always GFSK for SWAP.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Frequency channel &lt;/i&gt;&lt;/b&gt;(1 byte): RF channel.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Security option &lt;/i&gt;&lt;/b&gt;(1 byte): Type of encryption algorithm applied on each data packet. It should be equal to 0 if security is disabled.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Security nonce&lt;/i&gt;&lt;/b&gt; (1 byte): Current value of the cyclic nonce. If security is enabled, this endpoint should be queried before sending a command to the device. The reported nonce value would then be used in the subsequent command in order for the command to pass the protection against playback transmissions.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Network identifier&lt;/i&gt;&lt;/b&gt; (2 bytes): Custom 2-byte code used as synchronization word in a common network. In order to communicate with each other, all devices in the same wireless network must use the same network id.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;Device address&lt;/i&gt;&lt;/b&gt; (1 byte): Unique device address within the network. This address  must be comprised between 1 and 255, being 0 reserved as broadcast address.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;These fixed endpoints will have to be defined and indexed following the above order. Any custom endpoint would be added at the end of that table.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;The advantage of this solution is that any endpoint, including configuration parameters and regular endpoints would be queried and modified in the same way. This said, a proper endpoint management layer would free the protocol stack from having to address configuration operations, reducing the size of the resulting code and simplifying the work on future extensions. Almost anything in a device can be treated as an endpoint: IO's, configuration registers, setpoints, special programmings, diagnosis flags, etc. Then it's just an issue of making those endpoints readable only or modifiable.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-9xZkFEVnwNs/TYDq28YYcII/AAAAAAAAAzQ/_EAsyI6S_kE/s1600/stack_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="218" src="https://lh4.googleusercontent.com/-9xZkFEVnwNs/TYDq28YYcII/AAAAAAAAAzQ/_EAsyI6S_kE/s320/stack_2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: architecture of the panStamp library&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;The final panStamp library will provide all the necessary functions to develop SWAP-enabled devices, battery-operated or not, capable to handle commands, queries and information packets, without having to deal with the protocol details. The following piece of code implements a battery-operated sensor device that sends an ADC value (epTable[10]) every eight seconds, sleeping the rest of the time:&lt;/div&gt;&lt;blockquote&gt;&lt;div style="margin-bottom: 0in;"&gt;#include "eptable.h"&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;#include "panstamp.h"&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;void setup()&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;{  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&amp;nbsp; panstamp.init();&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;}&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;void loop()&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;{&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&amp;nbsp; epTable[10]-&amp;gt;getData();&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&amp;nbsp; panstamp.sleepFor(WDTO_8S);&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;}&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Example 1: Arduino sketch of a simple battery-operated transmitter&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;For those wanting to directly interface with the CC1101 driver, the panStamp library will also provide lower-level methods like “CC1101::sendData” or “CC1101::receiveData”, allowing the creation of custom proprietary protocols and avoiding the use of the current endpoint management system.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-8987183597956592655?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/8987183597956592655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/swap-very-tiny-protocol-for-constrained_16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8987183597956592655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/8987183597956592655'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/swap-very-tiny-protocol-for-constrained_16.html' title='SWAP, a very tiny protocol for constrained wireless M2M networks: basic SWAP endpoints'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh4.googleusercontent.com/-O0yUvAEqRgY/TYDko4wALjI/AAAAAAAAAy4/CgFfzcjaK88/s72-c/product_code.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-6128232884271195893</id><published>2011-03-14T11:17:00.006+01:00</published><updated>2011-05-19T23:47:35.459+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless swap packet'/><title type='text'>SWAP, a very tiny protocol for constrained wireless M2M networks: packet format</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;Having listed our requirements in the precedent post, designing our protocol has been just an issue of applying logics and dimensioning frame fields. At this stage, we should still decide some of the technical aspects around the protocol such as data rates, maximum hop count allowed and data encryptions. However, the rest is quite clear so far.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;First of all, our SWAP frames had to fit into the original CC11XX packet structure in order to take advantage of the full list of features provided by the TI IC's. The following picture shows the SWAP frame format compared with the original CC11XX frame: &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ldLSH3Mfsko/TdWPySWWQHI/AAAAAAAAA54/MUON0rlIr0A/s1600/swap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="65" src="http://4.bp.blogspot.com/-ldLSH3Mfsko/TdWPySWWQHI/AAAAAAAAA54/MUON0rlIr0A/s400/swap.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: SWAP packet structure&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;The above packet structure will be constant, regardless of the type of message (function), optimizing the frame parser significantly. In fact, the retained frame structure has been specially designed to simplify the protocol stack and reduce the amount of lines of code. Device addresses are 1-byte fields, taking advantage of the automatic address filter provided by the CC1101 chip. Thus, the microcontroller has not to worry about checking and discarding messages addressed to other devices. 0 is the broadcast address, as marked by the CC1101 data sheet.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Regarding the sub-addressing, that is the way device resources are addressed, SWAP is endpoint oriented, each endpoint being identified by a unique ID within the wireless node. Every parameter in a node may become an endpoint, including configuration parameters so that they may be addressed and controlled in the same way other regular endpoints (ADC inputs, binary outputs, etc) are treated. Again, this policy provides an extra degree of simplicity to the protocol since no special configuration function has to be created. Besides, this makes the protocol extremely flexible and powerful as new features may be added in the future without having to change the frame format or the protocol itself.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Every SWAP frame will contain the following fields:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Preamble (&lt;i&gt;preamble&lt;/i&gt;, 4 bytes): It's a typical 10101010... preamble sent to mark the beginning of the wireless frame.&lt;/li&gt;&lt;li&gt;Network Identifier (&lt;i&gt;network id&lt;/i&gt;, 2+2 bytes): Each wireless network is identified by its own 2-byte id. Since this identifier sits on the CC1101 synchronization field, the network id is duplicated in order to provide better consistency to the packet.&lt;/li&gt;&lt;li&gt;Data Length (&lt;i&gt;len&lt;/i&gt;, 1 byte): Length of the CC1101 data field. This length is later used to calculate the actual length of the endpoint value.&lt;/li&gt;&lt;li&gt;Destination Address (&lt;i&gt;dest addr&lt;/i&gt;, 1 byte): address of the targeted device. Broadcast address = 0.&lt;/li&gt;&lt;li&gt;Source Address (&lt;i&gt;src addr&lt;/i&gt;, 1 byte): Address of the transmitter.&lt;/li&gt;&lt;li&gt;Repeater hop (&lt;i&gt;hop&lt;/i&gt;, 4 bits): Amount of times that each message is repeated. Original value = 0.&lt;/li&gt;&lt;li&gt;Security option (&lt;i&gt;secu&lt;/i&gt;, 4 bits): Encryption method used. Default value = 0 (no encryption).&lt;/li&gt;&lt;li&gt;Cyclic nonce (&lt;i&gt;nonce&lt;/i&gt;, 1 byte): Value incremented on each device each time an information message is sent. This mechanism acts as a protection against playback attacks. Default value = 0.&lt;/li&gt;&lt;li&gt;Function code (&lt;i&gt;function&lt;/i&gt;, 1 byte): &lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Function = 0&lt;/i&gt;: Information packet. This packet contains information about an endpoint value on the transmitter. It may be  sent periodically, as a response to an external query or as result of an internal event. Information frames are always broadcasted (destination address = 0) so that other nodes can be notified about endpoint changes from the transmitter.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Function = 1&lt;/i&gt;: Query packet. IT requests information (endpoint value) on the destination device. Once received by the destination node, it has to broadcast an information packet about the endpoint being queried. Query packets are the only exception to the above frame format, not transporting any data field&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Function = 2&lt;/i&gt;: Command packet. Commands are sent to change endpoint values on the receiver. In order to minimize transmission explosions and avoid packet collisions, we should broadcast commands and queries only in case of  punctual necessity.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Endpoint Address (&lt;i&gt;ep addr&lt;/i&gt;, 1 byte): Address of the device containing the endpoint being queried or controlled. This address has not necessarily to be the same than the destination address since SWAP allows querying a device (data recorder or central controller) about and endpoint contained in a third wireless node. This feature should be specially useful to get values from any battery-operated device, typically sleeping during long periods of time.&lt;/li&gt;&lt;li&gt;Endpoint Identifier (&lt;i&gt;ep id&lt;/i&gt;, 1 byte): Each endpoint is identified by its own 1-byte ID. This ID will be later used to index the endpoint in a global table by the protocol stack.&lt;/li&gt;&lt;li&gt;Endpoint value (&lt;i&gt;endpoint value&lt;/i&gt;, n bytes): This is a variable length field. Each endpoint will have a its own length, depending on the nature of its value. This length may be calculated following a basic  formula:  &lt;/li&gt;&lt;/ul&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Length of the value = Data Length – 6&lt;br /&gt;&lt;br /&gt;SWAP is contents-agnostic. This means that SWAP frames do not contain any information about the type of endpoint value being transported. As result, the receiver has to know how to decode the received value by its own means. This philosophy has its own pros and cons but, in general, abstract protocols are easier to maintain and provide extra flexibility. The reduced plug&amp;amp;playability is maybe the main drawback of such protocols.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Cyclic Redundancy Check (&lt;i&gt;crc&lt;/i&gt;, 2 bytes): 16-bit CRC automatically added by the CC1101 chip.&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;In summary, this protocol should give us a good result in terms of compactness, flexibility and speed. In a future post I'll try to document my first impressions regarding the size of the protocol stack, performance and integration with real applications.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-6128232884271195893?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/6128232884271195893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/swap-very-tiny-protocol-for-constrained.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/6128232884271195893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/6128232884271195893'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/swap-very-tiny-protocol-for-constrained.html' title='SWAP, a very tiny protocol for constrained wireless M2M networks: packet format'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ldLSH3Mfsko/TdWPySWWQHI/AAAAAAAAA54/MUON0rlIr0A/s72-c/swap.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-6559614430417914004</id><published>2011-03-10T13:35:00.002+01:00</published><updated>2011-03-10T13:38:32.935+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless protocol swap'/><title type='text'>Swapping wireless data</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;   &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;After highlighting our need for a wireless protocol in the &lt;a href="http://panstamp.blogspot.com/2011/03/wireless-protocol-way-to-talk-with.html"&gt;precedent post&lt;/a&gt;, I've been carefully thinking about the way to proceed. Finally, I've taken the decision to create a custom protocol, something really simple and usable for generic M2M needs. We specially need a very lightweight protocol, simple to implement, flexible, robust and capable to fit into the list of features provided by the CC1101 chip.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-AZRko3w0tWQ/TXi_5pE8jZI/AAAAAAAAAys/AaWgqlUyuz0/s1600/panstamp1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="https://lh3.googleusercontent.com/-AZRko3w0tWQ/TXi_5pE8jZI/AAAAAAAAAys/AaWgqlUyuz0/s320/panstamp1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: First panStamp boards&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;After working with dozens of M2M protocols, mainly for wired systems, I've learned some useful things that may be applied to our wireless protocol. Flexibility is a concept rarely wanted in protocols nowadays. Instead, &lt;i&gt;“plug and play”&lt;/i&gt; is showed as the ultimate goal for any communication technology. I personally think that a correct balance between both requirements can give the optimum result, mainly for general-purpose systems where application variables are not known at the time of designing the communication schema. The following list shows our requirements in terms of communications:&lt;/div&gt;&lt;ol style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;Our communication frames must fit into the CC11XX packet structure. This requirement may seem obvious but the CC11XX chips provide some useful filters and smart functions based on the contents of each data packet, and these features may result useless if the final protocol frames do not respect some basic rules.&lt;/li&gt;&lt;li&gt;We just need a peer-to-peer protocol, not a wireless mesh technology. Mesh systems entail maintaining routing tables and this usually requires more RAM. Instead, we want a flexible agnostic P2P protocol capable to do relatively complex things without having to invest resources for maintaining wireless infrastructures.&lt;/li&gt;&lt;li&gt;Our protocol must allow some basic encryption algorithm and a defensive mechanism against replay attacks. Then, the user may decide to use these features or not, depending on his requirements in terms of security and confidentiality.&lt;/li&gt;&lt;li&gt;Networks should be identified by custom ID's in order to minimize collisions and interferences from other neighbour networks. This feature would also allow creating multiple networks into a common building or area.&lt;/li&gt;&lt;li&gt;Our protocol must be very simple and allow an extremely compact implementation. Although our prototypes are initially using Atmega328p's (32KB of flash), we should be able to reuse the communication stack on Atmega168p's (16 KB) and Atmega88p's (8 KB).&lt;/li&gt;&lt;li&gt;Our protocol will be free and open source. We'd really like to see ports of this protocol stack for other microntroller platforms, like Microchip PIC's, TI MSP430's, generic 8051's, etc. In fact one of the first non-Arduino ports could be done for my Texas Instruments &lt;a href="http://panstamp.blogspot.com/2011/03/ti-ez430-chronos.html"&gt;ez430-Chronos&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Our protocol must allow accessing off-line data through some external data recorders. Mobile devices like the ez-Chronos, may want to read some battery-operated device that could be sleeping at the moment of sending the query. Instead, the Chronos could send the query to a central node (data recorder) that would be permanently listening the channel for news from those battery-based sensors. In a typical mesh network, the coordinator would be this central node.&lt;/li&gt;&lt;li&gt;Our protocol must be contents-agnostic. From my experience when I worked with Modbus - an old boy from the 70's - I learned that abstract protocols provide an extra degree of flexibility and compactness. Any M2M information, including the most exotic one, can fit in a row of bytes. No need to create function profiles or heavy data dictionaries. At the end, the ultimate application, the one that really needs to decode the received data, has just to know the way to do it, maybe through the use of XML-based product definitions. This ultimate application will be running on a computer most of the times. Computers have the power, memory and disk space to do this kind of things whilst the wireless nodes can concentrate on transmitting and receiving data following their own formats.&lt;/li&gt;&lt;li&gt;Our protocol should be endpoint-based. We don't want to work with fixed-length registers as Modbus does. Instead, we''ll create variable-length endpoints at start-up time, addressable by a unique ID within the network.&lt;/li&gt;&lt;li&gt;Every device developed will contain a unique identifier (common for all devices of this type). This identifier will be used by the “ultimate” applications to decoded the endpoint values.&lt;/li&gt;&lt;/ol&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Well, we have a good list of requirements. I've already started working on the protocol schema, called SWAP (Simple Wireless Abstract Protocol) from now on. I expect to come back to this blog with a presentation of the protocol in a few days, so please hold the line :-) Thanks for your time!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-6559614430417914004?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/6559614430417914004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/swapping-wireless-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/6559614430417914004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/6559614430417914004'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/swapping-wireless-data.html' title='Swapping wireless data'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh3.googleusercontent.com/-AZRko3w0tWQ/TXi_5pE8jZI/AAAAAAAAAys/AaWgqlUyuz0/s72-c/panstamp1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-5913157018616140830</id><published>2011-03-09T09:57:00.000+01:00</published><updated>2011-03-09T09:57:19.438+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless stack protocol'/><title type='text'>Wireless protocol. The way to talk with other devices</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;The &lt;a href="http://panstamp.blogspot.com/2011/03/ti-ez430-chronos.html"&gt;precedent post&lt;/a&gt; showed the need for the panStamps to communicate with other wireless devices. The target of this project is not to provide just a CC1101 driver for DIY arduino projects but also develop  the necessary libraries and tools to create a complete wireless ecosystem. Therefore, the course of the panStamp project will be accompanied by the development of a series of libraries and applications, being the CC1101 arduino driver the first of them.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-Lo1Vl3hsVRg/TXc-8xSQjkI/AAAAAAAAAyo/jz6UOGQLwgM/s1600/stack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="https://lh3.googleusercontent.com/-Lo1Vl3hsVRg/TXc-8xSQjkI/AAAAAAAAAyo/jz6UOGQLwgM/s320/stack.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: panStamp stack&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Once assumed that we need a protocol, which one could we use for the panStamp project? I've been doing the search for some time but I've not found any open protocol, compatible with the CC1101 interface, with the sufficient popularity to be considered as a standard. This leads us to consider the creation of a custom protocol for this project, specially adapted to take advantage of the features provided by the CC1101 IC.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-5913157018616140830?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/5913157018616140830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/wireless-protocol-way-to-talk-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/5913157018616140830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/5913157018616140830'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/wireless-protocol-way-to-talk-with.html' title='Wireless protocol. The way to talk with other devices'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh3.googleusercontent.com/-Lo1Vl3hsVRg/TXc-8xSQjkI/AAAAAAAAAyo/jz6UOGQLwgM/s72-c/stack.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-2045531193075317082</id><published>2011-03-08T17:13:00.000+01:00</published><updated>2011-03-08T17:13:37.925+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless ez430 chronos'/><title type='text'>TI ez430-Chronos</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;        &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;This post doesn't want to be a true review about the ez430-Chronos. Internet is full of these reviews and  other resources related to this interesting gadget. AFAIK, this is the only programmable wireless watch currently available in the market. Texas Instruments sells this watch as a way of promoting their cc430 wireless microcontrollers in form of development kit. This kit contains not only the Chronos watch but also a programming interface and a CC1111-based wireless stick, probably capable to act as RF gateway for SmartRF Studio. Not bad at all for USD49, shipping costs included.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-o3jMe5ZGqiA/TXZUnWrsZCI/AAAAAAAAAyk/U3dIeFHOcXc/s1600/ez430-chronos_800.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="https://lh4.googleusercontent.com/-o3jMe5ZGqiA/TXZUnWrsZCI/AAAAAAAAAyk/U3dIeFHOcXc/s400/ez430-chronos_800.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Besides the available on board sensors (temperature sensor, barometer and accelerometer), the low-power &lt;a href="http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?familyId=1663&amp;amp;sectionId=95&amp;amp;tabId=2428&amp;amp;family=mcu&amp;amp;paramCriteria=no"&gt;CC430F6137&lt;/a&gt; has an internal CC1101 RF front-end. Thus, our panStamps will be able to natively communicate with this device, taking advantage of the full list of features provided by the CC1101 IC. Regarding the development tools, there is &lt;a href="http://mspgcc4.sourceforge.net/"&gt;MSPGCC4&lt;/a&gt;, a gcc-based compiler for the ez430 microcontroller and a specific open-source project called &lt;a href="https://github.com/dkm/OpenChronos"&gt;OpenChronos&lt;/a&gt; about the Chronos. All these free resources can be used to develop applications without size limitations for this wireless watch.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;I've just ordered one of these kits. If the results are satisfactory, we may work on a standard firmware for the Chronos, something configurable via USB or RF so that other users would be able to join the Chronos to their panStamp networks without having to write a single line of code for the ez430. For this purpose, the Chronos may act as a kind of data browser or something similar&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;But, how could panStamps and ez430-Chronos' talk together? It's obvious that we'll need a common protocol for the wireless data exchange, but which one? This is a different subject and will be discussed in the next post. Stay tuned!&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-2045531193075317082?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/2045531193075317082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/ti-ez430-chronos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2045531193075317082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2045531193075317082'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/ti-ez430-chronos.html' title='TI ez430-Chronos'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh4.googleusercontent.com/-o3jMe5ZGqiA/TXZUnWrsZCI/AAAAAAAAAyk/U3dIeFHOcXc/s72-c/ez430-chronos_800.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-4902181696463745069</id><published>2011-03-07T09:03:00.002+01:00</published><updated>2011-08-23T15:43:53.886+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless collision cca'/><title type='text'>Multiple access, collision avoidance</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Avoiding packet collisions is one of the main worries when designing wireless systems. The radio-frequency space is usually crowded since ISM bands are very popular nowadays. On the other hand, implementing collision-avoidance systems depends on the features provided by each RF IC most of the times. Fortunately, CC11xx interfaces do include a &lt;i&gt;listen-before-talk&lt;/i&gt; mechanism called &lt;i&gt;Clear Channel Assessment&lt;/i&gt; (CCA). From the CC1101 datasheet:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;i&gt;“The Clear Channel Assessment (CCA) is used to indicate if the current channel is free or busy”&lt;/i&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Any of the CC1101 GDO pins can be configure to show the current CCA state. Even better, the CC1101 includes a feature that forces it to complete transmissions only if the channel is clear. The following piece of code, taken from the CC1101 library currently being developed, shows the final function responsible of transmitting packets between panStamps:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;pre class="c++" name="code"&gt;&amp;nbsp;* sendData&lt;br /&gt;&amp;nbsp;* &lt;br /&gt;&amp;nbsp;* Send data packet via RF&lt;br /&gt;&amp;nbsp;* &lt;br /&gt;&amp;nbsp;* 'packet'&amp;nbsp;&amp;nbsp; &amp;nbsp;Packet to be transmitted&lt;br /&gt;&amp;nbsp;*&lt;br /&gt;&amp;nbsp;*&amp;nbsp; Return:&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp; True if the transmission succeeds&lt;br /&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp; False otherwise&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;boolean CC1101::sendData(CCPACKET packet)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; // Enter RX state&lt;br /&gt;&amp;nbsp; cmdStrobe(CC1101_SRX);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Check that the RX state has been entered&lt;br /&gt;&amp;nbsp; while (readStatusReg(CC1101_MARCSTATE) != 0x0D)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(1);&lt;br /&gt;&amp;nbsp; delayMicroseconds(500);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; // Set data length at the first position of the TX FIFO&lt;br /&gt;&amp;nbsp; writeReg(CC1101_TXFIFO,&amp;nbsp; packet.length);&lt;br /&gt;&amp;nbsp; // Write data into the TX FIFO&lt;br /&gt;&amp;nbsp; writeBurstReg(CC1101_TXFIFO, packet.data, packet.length);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // CCA enabled: will enter TX state only if the channel is clear&lt;br /&gt;&amp;nbsp; cmdStrobe(CC1101_STX);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; // Check that TX state is being entered (state = RXTX_SETTLING)&lt;br /&gt;&amp;nbsp; if(readStatusReg(CC1101_MARCSTATE) != 0x15)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Wait for the sync word to be transmitted&lt;br /&gt;&amp;nbsp; wait_GDO0_high();&lt;br /&gt;&amp;nbsp; // Wait until the end of the packet transmission&lt;br /&gt;&amp;nbsp; wait_GDO0_low();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Flush TX FIFO&lt;br /&gt;&amp;nbsp; cmdStrobe(CC1101_SFTX);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; // Enter back into RX state&lt;br /&gt;&amp;nbsp; setRxState();&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; //cCheck that the TX FIFO is empty&lt;br /&gt;&amp;nbsp; if((readStatusReg(CC1101_TXBYTES) &amp;amp; 0x7F) == 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; return false;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;CC1101::sendData(CCPACKET packet) can be cyclically called until the transmission is actually completed. Each transmission will be started only if the channel is free. &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-4902181696463745069?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/4902181696463745069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/multiple-access-collision-avoidance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4902181696463745069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4902181696463745069'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/multiple-access-collision-avoidance.html' title='Multiple access, collision avoidance'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-4798696656300677543</id><published>2011-03-05T18:53:00.001+01:00</published><updated>2011-03-05T18:54:56.237+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless power current consumption'/><title type='text'>Power consumption</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;     &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Instead of trying to get long transmission lengths, panStamps have been specially designed to consume low currents and sleep during periods of inactivity. For the current test, one of the stamps has been programmed to send a message, then sleep for 8 seconds, then wake up and send a message again; all this in a cyclic manner. The result is more than good: 5 uA during sleep (8 sec) and 2.5 mA at the moment of transmitting (0.15 sec approx).&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in; text-align: center;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/uH_47pyEgGo/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uH_47pyEgGo?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/uH_47pyEgGo?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Video showing packet reception (console on the right) on panStamp A and packet transmission (current meter on the left) from panStamp B.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Atmega's watchdog is used to periodically wake up the microcontroller from Power-Down state, the lowest power mode available on the Atmegas. Enabling the watchdog is actually adding some additional microamps to the bill; if we wanted to still reduce the current consumption, we could use Timer 2 instead of the watchdog, with an external 32.768 Khz crystal connected to the TOSC pins. According to the datasheet, we could switch from 5 uA to around 1 uA in Power-Save mode using Timer 2!&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Arduino code used to put the panStamp in sleep mode:&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: x-small;"&gt;/**&lt;br /&gt;&amp;nbsp;* sleepFor&lt;br /&gt;&amp;nbsp;* &lt;br /&gt;&amp;nbsp;* Put panStamp into Power-down state during "time".&lt;br /&gt;&amp;nbsp;* This function uses the internal watchdog timer in order to exit (interrupt)&lt;br /&gt;&amp;nbsp;* from the power-down state&lt;br /&gt;&amp;nbsp;* &lt;br /&gt;&amp;nbsp;* 'time'&amp;nbsp;&amp;nbsp;&amp;nbsp; Sleeping time:&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_15MS&amp;nbsp; = 15 ms&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_30MS&amp;nbsp; = 30 ms&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_60MS&amp;nbsp; = 60 ms&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_120MS&amp;nbsp; = 120 ms&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_250MS&amp;nbsp; = 250 ms&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_500MS&amp;nbsp; = 500 ms&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_1S = 1 s&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_2S = 2 s&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_4S = 4 s&lt;br /&gt;&amp;nbsp;*&amp;nbsp; WDTO_8S = 8 s&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;void PANSTAMP::sleepFor(byte time) &lt;br /&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; // Power-down CC1101&lt;br /&gt;&amp;nbsp; cc1101.setPowerDownState();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Power-down panStamp&lt;br /&gt;&amp;nbsp; set_sleep_mode(SLEEP_MODE_PWR_DOWN);&lt;br /&gt;&amp;nbsp; sleep_enable();&lt;br /&gt;&amp;nbsp; setup_watchdog(time);&lt;br /&gt;&amp;nbsp; delayMicroseconds(10);&lt;br /&gt;&amp;nbsp; // Disable ADC&lt;br /&gt;&amp;nbsp; ADCSRA &amp;amp;= ~(1 &amp;lt;&amp;lt; ADEN);&lt;br /&gt;&amp;nbsp; // Unpower functions&lt;br /&gt;&amp;nbsp; PRR = 0xFF;&lt;br /&gt;&amp;nbsp; // Enter sleep mode&lt;br /&gt;&amp;nbsp; sleep_mode();&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // ZZZZZZZZ...&lt;br /&gt;&lt;br /&gt;&amp;nbsp; // Exit from sleep&lt;br /&gt;&amp;nbsp; sleep_disable();&lt;br /&gt;&amp;nbsp; wdt_disable();&lt;br /&gt;&amp;nbsp; // Re-enable functions&lt;br /&gt;&amp;nbsp; power_all_enable();&lt;br /&gt;&amp;nbsp; // Enable ADC&lt;br /&gt;&amp;nbsp; ADCSRA |= (1 &amp;lt;&amp;lt; ADEN);&lt;br /&gt;&amp;nbsp; // Reset CC1101&lt;br /&gt;&amp;nbsp; cc1101.reset();&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's obvious that only battery-operated applications are interested in achieving so low consumptions. As an example, I've calculated the expected autonomy of the above application (WDT enabled) when powering the board from a couple of 1.5 AA batteries. The nominal charge of an AA battery (1.5 V) is around 2500 mA. If we connect the batteries directly to the panStamp, the panStamp will work only whilst the batteries are able to provide 2.7 V or more. This means that only a fraction of the charge – let's say 50% of the nominal charge - will be used for powering the boards. The rest will remain into the batteries. OK, so let's assume we have 1250 mAh of charge. With all those mAh available, we'll get the following numbers:&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;The panStamp sleeps (5 uA) during 8 sec → 98.33% of an hour&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;The panStamp transmits (2.5 mA) during 0.15 sec → 1.67% of an hour&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;The above percentages give us 0.0466 mAh, that means more than 3 years of autonomy when powering the board directly from the couple of AA batteries. All this with the watchdog enabled and powering the boards without an intermediate step-up regulator capable to drain the batteries below 2.7 V.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-4798696656300677543?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/4798696656300677543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/power-consumption.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4798696656300677543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4798696656300677543'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/power-consumption.html' title='Power consumption'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-2469262757757623458</id><published>2011-03-05T17:49:00.000+01:00</published><updated>2011-03-05T17:49:28.690+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless transmission length'/><title type='text'>Transmission distances</title><content type='html'>&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Both transmitters are equipped with simple wire antennas (82 mm, ¼ wave for 868 MHz). Under  particular outdoor urban conditions, we've got transmission distances of more than 200 meters without loosing a single packet!&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;We should still check these distances under true open field conditions, without near buildings, trees and vehicles surrounding the transmission area. By the moment, results are quite satisfactory, given that these modules have not been designed with the idea of communicating over long distances. Anyway, I feel that we could even improve these distances on future prototypes, just adding bigger ground planes and better tuning the RF filter.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;More tests coming soon!&lt;/div&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-2469262757757623458?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/2469262757757623458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/transmission-distances.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2469262757757623458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/2469262757757623458'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/transmission-distances.html' title='Transmission distances'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-3514232649411319290</id><published>2011-03-05T11:44:00.000+01:00</published><updated>2011-03-05T11:44:01.545+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless schematics'/><title type='text'>panStamp board schematics</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Schematics are quite simple: the atmega connected to the CC1101 interface via SPI, RF balum, filter, de-coupling capacitors and some few more passives. This simplicity allows 2-layer designs and this is the case for the current prototypes.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-if-tgOlkUH8/TXISjkboqcI/AAAAAAAAAxw/XujKIo2z_Sw/s1600/panstamp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="254" src="https://lh5.googleusercontent.com/-if-tgOlkUH8/TXISjkboqcI/AAAAAAAAAxw/XujKIo2z_Sw/s320/panstamp.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 1: Microcontroller and external pins&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-Rd50CNV9yJc/TXISoeuZx5I/AAAAAAAAAx0/tvCJlLcXsjY/s1600/panstamp-RF.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" src="https://lh5.googleusercontent.com/-Rd50CNV9yJc/TXISoeuZx5I/AAAAAAAAAx0/tvCJlLcXsjY/s320/panstamp-RF.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;Figure 2: RF circuitry&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;However, next versions will be 4-layer surely. Working on 4 layers will let us create an intermediate continuous ground plane, closer to the top component layer. That should give us a better RF performance. As for the PCB thickness, the thinner is the board the smaller is the distance between ground plane and signal tracks so the lower is the line impedance of those tracks. This is specially important when designing RF tracks with given impedances.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Back to the above design, what could we improve for the next prototypes?&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Well, there seems to be a problem on the current design that affects the firmware upload. The Arduino bootloader may be enabling the CC1101 interface during the bootstrap process, perhaps generating some undesirable SPI traffic. All this may be causing the bootload communication problems. Anyway, there are still a lot of tests to be done but I think that I'll add, at least, some in-line and pull-up/down resistors to the SPI lines in order to firmly settle those lines during the firmware upload. On the other hand, I may take a look at the Arduino bootloader too I guess.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-3514232649411319290?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/3514232649411319290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-board-schematics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3514232649411319290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/3514232649411319290'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-board-schematics.html' title='panStamp board schematics'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh5.googleusercontent.com/-if-tgOlkUH8/TXISjkboqcI/AAAAAAAAAxw/XujKIo2z_Sw/s72-c/panstamp.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-7165656568097571637</id><published>2011-03-03T23:13:00.001+01:00</published><updated>2011-03-05T11:44:53.333+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless prototype'/><title type='text'>First prototypes!</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: center;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;This is not the finest work that the project deserves but I have my limitations when soldering small pitches by hand. Final prototypes and production runs will be totally outsourced so I'll surely want to mount smaller packages, mainly for the Atmega (QFN instead of TQFP) and the passives (0402 instead of 0603). That should let me reduce the size of the panStamp board too, maybe from DIP28 (0.6 in) to a DIP24 (0.6 in) package.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-7tqzQkROBLA/TXAP7SrCUsI/AAAAAAAAAxk/elYxsA5XmZo/s1600/panstamp1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="https://lh4.googleusercontent.com/-7tqzQkROBLA/TXAP7SrCUsI/AAAAAAAAAxk/elYxsA5XmZo/s320/panstamp1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;I really like the DIP format. You can plug it onto a bread board, solder components and wires directly  to it or grip probes without having to use a mother board. For this first design, I decided to make all Atmega's ports available from the external pins, including the TOSC ones so I may solder a 32.768 KHz crystal for driving Timer 2 or plug an external MHz crystal when the precision or speed of the internal RC oscillator is not sufficient.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;The current version of panStamp can be powered from 2.8 to 3.6 regulated VDC. This is not a tremendous voltage range but I have plans to pair the panStamp with an external NCP1400-based board in order to provide better performance for battery-powered applications. Xmegas are a better choice for this kind of battery-operated situations but Arduino does not support Xtmegas AFAIK. Anyway, even without the NCP1400 regulator the panStamp board can operated from a pair of AA/AAA batteries or a coin cell. Not so bad!&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;panStamp should run from its internal 8 MHz RC oscillator. That will free the TOSC pins for RTC purposes and save some space on the board too. In those cases where speed is really an issue, an external clock can be connected to the board. Powering the board at 3.3 VDC reduces the crystal choice up to 12 MHz or so according to the datasheet but maybe 3.6 VDC would let us use a 16 MHz crystal, the most common crystal valueused in Arduino designs.. By the moment, my initial tests are showing that the internal 8 MHz oscillator is more than enough for driving the CC1101 chip.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;I've fabricated a couple of mother boards with USB interface for programming the stamps and acting as serial gateway. The final version will probably show a pendrive from-factor. At the current stage I just needed some extra space for soldering sensors and connecting probes.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-dpkZQ3r_CDE/TXARR2qF3dI/AAAAAAAAAxs/OIiYNLnSUfA/s1600/panstamp2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="269" src="https://lh5.googleusercontent.com/-dpkZQ3r_CDE/TXARR2qF3dI/AAAAAAAAAxs/OIiYNLnSUfA/s320/panstamp2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Well, it's time now to start developing a CC1101 library for Arduino. Stay tuned for the next episode.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-7165656568097571637?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/7165656568097571637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/first-prototypes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7165656568097571637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7165656568097571637'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/first-prototypes.html' title='First prototypes!'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh4.googleusercontent.com/-7tqzQkROBLA/TXAP7SrCUsI/AAAAAAAAAxk/elYxsA5XmZo/s72-c/panstamp1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-4552483577945584091</id><published>2011-03-02T18:49:00.002+01:00</published><updated>2011-03-02T18:55:33.893+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless cc1101'/><title type='text'>Texas Instruments CC1101 retained</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;I've decided that the TI CC1101 IC is a good solution for the panStamp project in terms of wireless communication. There are basically four factors that have led me take such decision:&lt;/div&gt;&lt;br /&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;It's a very popular IC, widely available from most  electronic suppliers. It's moreover used in thousands of commercial products.&lt;/li&gt;&lt;li&gt;Price is under $4 each unit in small quantities.&lt;/li&gt;&lt;li&gt;CC11XX IC's implement different kind of modulation mechanisms: FSK, GFSK, OOK and ASK. This will let the panStamps communicate with a huge amount of commercial products, including low-cost home automation equipment and weather stations.&lt;/li&gt;&lt;li&gt;The CC1101 can operate n the 315/433/868/915 MHz ISM/SRD bands . Thus, this version of panStamp will be a sub-1GHz one, extending communication distances and avoiding the most complex RF design issues.&lt;/li&gt;&lt;li&gt;It provides sufficient smartness to do most of the communication work in the chip, including automatic CRC calculation, address filtering, RSSI and LQI values and a Clear Channel Assessment (CCA) mechanism. CCA is specially interesting when you want to minimize packet collisions.&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-Ejv8VNz5z30/TW6B_g1MCuI/AAAAAAAAAxg/or9oZHjZHUE/s1600/RTK-20-PQFP+Pkg.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="https://lh5.googleusercontent.com/-Ejv8VNz5z30/TW6B_g1MCuI/AAAAAAAAAxg/or9oZHjZHUE/s200/RTK-20-PQFP+Pkg.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;(Picture obtained from Digikey)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;But before retaining this IC, I considered other alternatives as Atmel's 802.15.4 interfaces (AT86RF2XX), Texas Instruments' (CC25XX) and Silabs' SI443X RF transceivers, very good options all of them. I strongly recommend taking a look at &lt;a href="http://www.freaklabs.org/"&gt;Freaklabs&lt;/a&gt; for anyone wanting to dive into the low-power wireless panorama. The author of this great website frequently publishes reviews about the latest low-power RF devices and IC's. A very good learning resource indeed.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;At the end, the CC1101 appeared as a war veteran, with lots of available resources in the net and with serious expectations to still soldier on for years. Now it's time to start designing!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-4552483577945584091?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/4552483577945584091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/texas-instruments-cc1101-retained.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4552483577945584091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/4552483577945584091'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/texas-instruments-cc1101-retained.html' title='Texas Instruments CC1101 retained'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh5.googleusercontent.com/-Ejv8VNz5z30/TW6B_g1MCuI/AAAAAAAAAxg/or9oZHjZHUE/s72-c/RTK-20-PQFP+Pkg.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-9222897527005663045</id><published>2011-03-01T23:58:00.002+01:00</published><updated>2011-03-02T18:55:09.448+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless arduino'/><title type='text'>panStamp Arduino</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;a href="http://www.arduino.cc/"&gt;Arduino&lt;/a&gt; has been proven to be a very popular platform with thousands of adopters around the world. There is a huge amount of libraries, tutorials and sketches developed for the very diverse Arduino boards. The IDE is simple and popular; it runs under Windows, Linux and Mac and its installation is done in a breeze. This popularity has encouraged lots of independent developers to create new arduino boards for very different applications. Arduino will definitely be a good solution for the panStamp project, the perfect compromise between my needs in terms of low-level development and the interests of the final user/developers.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;Arduino uses basically C++ as programming language. It re-uses avr-gcc's libraries and provides new ones, offering high-level interfaces for most common applications. It's indeed a real success, the Arduino community has gained a major popularity among the embedded world and seem to have taken an important advantage  with regards to other similar solutions, maybe because it's free and open source.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;Once Arduino has been retained as programming platform, we'll obviously need to mount an Atmega on our board; not an issue, atmegas are great flexible-robust 8-bit microcontrollers with sufficient RAM memory and flash space, more than enough for most wireless applications.&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;What about the RF side? Which RF front-end should we use? There is no definitive response to this question in my opinion. Each solution will provide special good performances in different areas, for specific solutions. Mesh, no mesh? 802.15.4 or not? Zigbee, 6LowPAN, no stack at all? Many questions that will find an answer in the next post.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-9222897527005663045?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/9222897527005663045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-arduino.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/9222897527005663045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/9222897527005663045'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-arduino.html' title='panStamp Arduino'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8559533432966670190.post-7506060024381391789</id><published>2011-03-01T23:03:00.003+01:00</published><updated>2011-03-02T18:58:43.613+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='panstamp wireless'/><title type='text'>panStamp project: main goals</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;Welcome to the panStamp blog&amp;nbsp;!&lt;br /&gt;&lt;br /&gt;This is my first post so I'll try to introduce the project and summarize its main goals in order for the subsequent posts to seat on well reasoned basis. I don't mean that everything is clear at this very primary stage but, behind the multiple unknown variables that decorate the future of this project there are some solid ideas that will help me bring it to an useful and productive end.&lt;br /&gt;&lt;br /&gt;In some way, this weblog will try to relate the progresses of the panStamp project, from its conception up to the commercial release. Having to write about my daily work, about my ideas and decisions may help me take the necessary pause between milestones and, at the same time, let me open a window to new fresh ideas.&lt;br /&gt;&lt;br /&gt;First of all, what does &lt;i&gt;“panStamp”&lt;/i&gt; stand for? The first part of the word, &lt;i&gt;“pan”&lt;/i&gt;, stands for “Personal Area Network” whilst “Stamp” is a recurrent term given to small microprocessed boards. These stamp boards usually adopt small-factor sizes, similar to postal stamps so the term is quite appropriate after all. On the other hand, from wikipedia:&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;“A WPAN (wireless personal area network) is a personal area network - a network for interconnecting devices centered around an individual person's workspace“&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Once the &lt;i&gt;“panStam”&lt;/i&gt; term justified let's dive into the main goals of the project:&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;ol style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;Create a complete ecosystem of wireless devices, capable to communicate with real things, the whole integrable with other RF or IP equipments.&lt;/li&gt;&lt;li&gt;Develop small OEM boards with the necessary components to start playing with low-power RF projects easily. This will include the development of mother boards, libraries, drivers and PC applications.&lt;/li&gt;&lt;li&gt;Use open source tools during the complete development of the project. This requirement aims to facilitate the cooperation of other developers and reduce the learning curve for future customers/adopters of the solution.&lt;/li&gt;&lt;li&gt;Develop the associated firmware and libraries under popular programming languages, from popular IDE's &lt;/li&gt;&lt;/ol&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-93q2MWljf5o/TW1zQjymxQI/AAAAAAAAAwk/H9i5rSWfRg0/s1600/pan.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="https://lh6.googleusercontent.com/-93q2MWljf5o/TW1zQjymxQI/AAAAAAAAAwk/H9i5rSWfRg0/s320/pan.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: x-small;"&gt;Fig 1. Example of low-power wireless + IP ecosystem&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;br /&gt;All the above goals will surely evolve into finer requirements during the next weeks. Nevertheless, this post  does not pretend to become the actual project plan – this is just a first introductory post. Please stay tuned for the rest.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8559533432966670190-7506060024381391789?l=panstamp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://panstamp.blogspot.com/feeds/7506060024381391789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-project-main-goals.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7506060024381391789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8559533432966670190/posts/default/7506060024381391789'/><link rel='alternate' type='text/html' href='http://panstamp.blogspot.com/2011/03/panstamp-project-main-goals.html' title='panStamp project: main goals'/><author><name>Daniel Berenguer</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-Bqk_EzyBn54/TW5pncZj6aI/AAAAAAAAAwo/g88IrC-7JEA/s220/H%2526D1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh6.googleusercontent.com/-93q2MWljf5o/TW1zQjymxQI/AAAAAAAAAwk/H9i5rSWfRg0/s72-c/pan.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
