I am now the proud owner of a CR1025 lithium cell, destined to be the real-time clock backup battery for my new Gertduino board.

 

Note that I did not say that I'm the proud owner of five CR1025 lithium cells - so far I have not yet received my pack of five batteries ordered via Amazon (but that may be an 'own goal', as I currently have mail and packages addressed to my home automatically re-routed by the USPS to my PO Box, which can add days to the normal shipping time). So, instead of waiting (and waiting, and waiting), I bit the bullet and bought a single lithium cell from Radio Shack for about $6.00.

 

My past experience with Radio Shack is that at best, most of the store clerks have only a vague idea of which products they actually carry in the store, which means that when it comes to unusual parts (such as those most likely to be sought by electronics enthusiasts such as myself), they have no clue whatsoever. I remember, not very fondly, my search for a bottle of ferric chloride etchant at a local Radio Shack, which first involved educating the clerk about what it was that I was looking for, convincing her that Radio Shack actually sells such chemicals, then fruitlessly following her around the store, going from one improbable location where the item was not likely to be found (it wasn't) to another, and finally finding it myself after the clerk gave up.

 

Yesterday's trip to Radio Shack to find the lithium cell was par for the course. I should know by now that, upon entering the store, when a clerk asks if they can help me, my best bet is to politely decline the offer. However this time, when I walked through the door, the first thing that I spotted was a sign promising "enercells" (Radio Shack's house brand of batteries) for half price. "Hmmm...", I thought, mistakenly as it turned out, "I wonder whether the enercell CR1025 lithium batteries might be on sale for half off". So I mustered up the courage to ask the clerk whether lithium coin cells were available at half price. She laughed and replied that, no, only some batteries that were being discontinued, such as AA, AAA, C, and D-cells, were on sale. OK, at least I tried. I should have just left it at that and gone to grab an overpriced battery off of the wall rack, paid the highway-robber's ransom, and headed home with my prize. Instead, when the clerk asked me what kind of lithium cell I was looking for, I actually told her that I needed a CR1025, whereupon a second clerk piped up, claiming that, "no, we don't carry those in the store, but we do have the CR2025 if you want one of those."

 

I suppressed the sudden urge to make a rude retort along the lines of "au contraire, my good fellow, you do indeed carry the aforementioned CR1025 in the store, should you care to know such trivia, and no, despite the superficial similarity in the designation, the CR2025 is a completely different animal which will not physically fit into the same space, let alone the same battery holder, as the CR1025, and you would do well to not give incorrect advice about such matters to your valued customers in the future." Well, OK, what I had in mind was a few orders of magnitude cruder than that, but after all there's no need to lower the level of discourse on my element14 blog, and you get the picture without my needing to delete any expletives. Instead, I meekly said something along the lines of, "I think that you actually do carry them in your store."

 

To her credit, rather than becoming argumentative, the first clerk performed a stock check on her computer screen, verified that the store should have half a dozen of them on hand, and proceeded to walk over to the wall display of tiny and overpriced batteries to begin an intensive search for them. She immediately found a peg full of CR2025s and announced that fact. I reminded her that, no, I'm not looking for CR2025s, but rather for CR1025s, whereupon she apologized profusely but advised there did not appear to be any of the latter ones in stock. I graciously thanked her for her help, then began my own search for the CR1025. Within a few seconds I had located a shelf tag for that part number, but the product that was hanging at the front of the peg for the CR1025 was actually a package of, I dunno, enercell 377s or some such thing. Undeterred, I removed and put aside that wrongly-shelved package, which revealed a half dozen or so packs of CR1025s that had been innocently sitting on the peg behind it. With a triumphant shout of "I found it", I grabbed a battery, brought it to the cash register, basked in the adulation of the clerks who had moments earlier adjudged my chances of success to be near zero, paid the absurd asking price, and returned home with both my battery and the profound sense of accomplishment that can only be fully realized after having overcome tremendous obstacles.

 

As they say, "no pain, no gain."

 

Upon arriving back home, battery in hand, I looked forward to an uneventful, easy-peasy installation of the Gertduino board to provide a new home for my new battery. Sadly, that was not to be the case, at least, not yet.

 

Like many people, upon getting a new toy, my first impulse is to go ahead and fire it up, knowing that eventually I'll get around to reading the manual. However, having previously skimmed the Gertduino documentation, I knew that I couldn't get away with doing that here, so instead I took my time reviewing the PDF manual (downloaded from here: http://www.element14.com/community/servlet/JiveServlet/previewBody/64534-102-2-287165/User%20manual%20Gerduino%205.6.pdf) in detail.

 

The 26-page manual is well-illustrated, but it will be more than just a little intimidating to a novice user, whether that be a novice with the Arduino or the Raspberry Pi or both. I am neither, and so I found the manual to be useful, albeit missing some vital information (such as the Gertduino schematic which is supposed to be on page 26, but which, sadly, is not).

 

One of the things that attracted my interest in the Gertduino to start with is that the board has a lot of built-in capabilities. So many capabilities, in fact, that you need to approach it with a well-formed battle plan in mind, or else you risk becoming disoriented and missing something critical. It's not unlike going to an all-you-can-eat buffet featuring platters full of enticing and delicious appetizers and entrees, but with only a single plate in hand you need to proceed with careful deliberation and forethought to get the best mix of portions.

 

The manual is more of a Detective Joe Friday-style "Just the facts, m'am" presentation than a true "getting started" guide. It's heavy with layout photos and diagrams and jumper descriptions and header pin numbering and design rationale, but a little light on the "do this and that and the other thing and then Bob's your uncle" style of instructions.

 

It's clear to me that the design of the Gertduino involved a lot of "wouldn't it be nice if the board could do this" thinking, and it has the jumpers and I/O headers to prove it. Maybe that was driven by feedback from pioneering Gertboard users, and I'm a little late to the party since I'm not one of those. Yet right away I discovered that it was lacking some things that I would have put there if I were designing it myself. For example, having six buffered LEDs on the board is great - you can never have too many LEDs, for diagnostic purposes or whatever - but it would have been nicer still to have the buffered outputs go through a jumpered header block so that if desired, some of the LEDs could be easily moved off-board while still making use of the built-in buffering. For my specific application, the Gertduino is going to be enclosed in an opaque PVC tube during normal use, and so none of those LEDs will be visible (however they will be visible when I am doing app development, so they're not 'useless', it's just that they would be even more useful if I could move them off the board). In my application, I'm going to be drawing power from the Raspberry Pi, and so IMHO the real estate devoted to the (unpopulated) external power supply input components would be better used for other things.

 

I was a little bit disappointed by what seemed to be an unusually large number of typographical errors in the manual. Yes, I could generally figure out what the text was trying to tell me, but it would have been so much nicer if more careful editing or proofreading had been done to prevent the reader from having to stumble over words such as "programme" when what was intended was probably "programmer", or wasting time looking for the datasheet for the TSSOP4038 IR device when the actual part number should be TSOP4038, or other various hiccups in the text.

 

Performing a careful reading of the manual gave me some other insights that had largely escaped my notice previously. For example, the element14 product description at http://www.element14.com/community/docs/DOC-64326/l/gertduino-add-on-board-for-raspberry-pi mentions that the Gertduino features an "IRDA front end" and goes on to say, "The BCM2835 does not have a native IRDA interface. The protocol can be implemented using a standard GPIO pin but that puts a very heavy burden on the CPU. To support IRDA the Atmega-48 has a TSSOP4038 IRD device connected to pin D3. This device supports the most common IRDA protocol: 38KHz IR signal."


From that description, I was expecting the Gertduino to have an onboard IRDA transceiver that could be used for two-way data communication with the board. Upon reading the TSOP4038 datasheet, however, it became clear that the device is an IR receiver only, typically used to receive commands from hand-held remote controls. In fact, the spec sheet at http://www.vishay.com/docs/81926/tsop4038.pdf does not use the term "IRDA" at all, and it's not clear to me that IRDA is even possible using that component. So, while maybe some further investigation will contradict me, right now my impression is that the use of IRDA to describe Gertduino capabilities is a bit of a misnomer, and rather it looks like what is provided is half of a CIR or "consumer IR" implementation. For more info on that topic, see the Wikipedia pages for IRDA (http://en.wikipedia.org/wiki/Infrared_Data_Association) and CIR (http://en.wikipedia.org/wiki/Consumer_IR), as well as the Linux infrared How-to discussion at http://tldp.org/HOWTO/Infrared-HOWTO/infrared-howto-c-lirc-irda.html

 

The section of the manual that discusses the use of the RTC backup battery was a little unsatisfying, as it left me wondering whether the battery would be practical for handling anything other than a brief power glitch without running down the battery completely. The text states the following: "Unless the battery is removed or the Atmega-48 is programmed to go into a special ultra-low-power condition, the battery will be drained in a short time. Even if you think the device is in ultra-low-power mode it can still consume power if it has to drive outputs high." So, will I be successful in my use of the battery, or will I end up accidentally draining it even though I think that I'm using the ultra-low-power setting? I'll let you know what I find out.

 

The manual is a bit inconsistent in identifying various AVR and/or Arduino pins, sometimes using the AVR I/O pin designations, sometimes using the Arduino expansion shield pin naming, and sometimes giving both. Eventually the manual gets around to providing some extremely helpful charts (on pages 11 and 12) and diagrams (on page 13) that unambiguously clear up any questions about pin numbering. Those charts and diagrams are so useful that I'm going to print them out and tape them above my workbench for use when I'm tinkering around with my Arduino Unos and Duemilanove clones alike.

 

My intent is to use the Arduino IDE to do my development for the Gertduino, either directly on the Raspberry Pi or on my PC. When I finished reading the manual I was left with a bit of an "is that all there is" feeling, because I was still not completely certain how to achieve that. True, it does invite the user to view more specific setup details at http://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/ and that page is indeed useful, but so far I have found an even gentler "getting started" narrative at http://friendsoftheunicorn.net/content/gertduino-setup - however I have not yet completed the steps on that page, and so I'm not yet ready to give a final verdict on the whole getting started process.

 

So far, I have gotten all the way to the dreaded sh: can't access tty; job control turned off message. With a little help from the post by Gert van Loo at http://www.raspberrypi.org/forums/viewtopic.php?f=96&t=62106 ("Try placing the Re jumper on the 48 side."), I have gotten past that stumbling block, and am ready to continue with my Arduino software setup, but this blog post is starting to become overly long, and so I'm going to take a break here.

 

But, as they say, "no pain, no gain."