Rfish RFID Wristband

April 23, 2009

Lacking the courage to implant an RFID, I’ve been looking for a sort of bracelet suitable for swimmers. According to the spec, the ID-12 reader reads EM4001 compatible 125 kHz RFIDs. Google brought up a ton of RFID suppliers, but most of the form factors on offer didn’t look very robust.

The Smart-Wrist tag by Smart-Tec might be an elegant solution as it could be attached to the locker-key bracelet which you get at many pools. However, the German producer did not even bother to write back after I painstakingly filled out their contact form.

Fortunately, there is a pretty well-suited wristband from Daily RFID in China. They seem to sell their product in big quantities ($0.73 per piece for 1000 pieces) but you can ask them for an engineering sample ($15.00 for 5 pieces). Their staff is very friendly and helpful and they accept payment via PayPal.

RFID Wristband

A few days after my order the sample arrived (yesterday) and the first impression is pretty good. The RFID wristbands feel soft and the Rfish reader prototype reads them without a problem. While it perfectly fits my wrist, the fixed size could be a slight disadvantage for skinny people. And it remains to be seen how the material and my skin looks after using the bracelet for a while in the pool.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Rfish Reader Prototype

March 30, 2009

Motivated by the success of linking a BlueSmirf Bluetooth module directly to the Parallax RFID reader I began to think about how to package the reader in a way that allows you to use it close to or even in the water. A visit to the local DIY store brought up a cable junction box by Ensto, a Finnish company. Intended to shield high voltage electric installations from dust and humidity, the practically water-tight box comes in clean Scandinavian design. It includes an ergonomic front shield with rounded edges and rubber “buttons” on the side and costs no more than $3.

Ensto Box

Unfortunately, the Parallax reader does not fit into this little box. Convinced that it is pretty ideal to embody the first Rfish reader, I thought about cutting the Parallax shield between the antenna and the reader logic to squeeze it in. Meanwhile the ID-12, a small RFID reader module with built in antenna for only $29.95, arrived from SparkFun. With the previously gained knowledge, the hint from a squid and a soldering iron (d0 to rx-i, /rst to 5v to vcc and fs to gnd to gnd) it was possible to coax the ID-12 into sending the first ID to my laptop via Bluetooth in half a day. And even better: It’s a perfect fit.

Rfish Reader v0

A first test in the kitchen sink seems to prove that both RFID and Bluetooth perfectly work when the box is floating in the water and even when it is submerged a few centimeters. What’s still missing is a sort of feedback in the form of a buzzer or a vibrator, a power switch and maybe a stronger battery (though it has been on for hours now and keeps working flawlessly). Still, I guess we can call this a major milestone without exaggeration.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Jumping In At The Deep End

March 4, 2009

To gather some hands-on experience with RFID technology, and to eventually build a first prototype of an Rfish reader, I did order Grand Idea Studio’s Serial RFID Module which is available as item #28140 from the Parallax web store for $39.99 (discounts apply for orders of five or more). From an earlier project I have a BlueSmirf Gold Bluetooth Module, sold by SparkFun for $64.95 and an USB to Serial Adapter similar to the FT232RL for $14.95, SparkFun as well.

After reading the Data Sheet of the the Parallax module it seemed that some additional circuitry is necessary to connect the 5V RFID reader to the 3.3V BlueSmirf module. Lacking even the most basic hardware skills I thought that this could already be the end. Google brought up several projects connecting an RFID module to a Laptop or a controller like the Arduino, but only after a while I found Knut’s Bluetooth RFID reader, the project by HC Gilje and some comments hinting at a similar effort by David from Blendid. Thanks to their encouragement I had another look at SparkFun’s product page and finally realized that the BlueSmirf module can be powered from 3.3V up to 6V for easy battery attachment. So all there was left to do was setting the BlueSmirf to 2400 baud and throwing together a test program that reads from the COM port. Half an hour later the console on my laptop displayed the first few RFIDs – received over Bluetooth, straight from the Rfish reader.

serialc

The Parallax Serial RFID module and the BlueSmirf Bluetooth module where connected through direct wires (sout to rx-i, /enable to rts-o, vcc to vcc and gnd to gnd) and powered by the same battery pack (three AA LR6 1.5V cells). While this might not be the ideal setup it is at least a proof of concept. Once again it paid out to eliminate the biggest risk first – today was a good day.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Your Daily Serving

March 3, 2009

The remaining part of the reference model we haven not looked at yet is the Rfish server. You might ask yourself why a simple lap counter should be connected to the internet at all. But if you swim more often than once a month you might well be interested in the history of your lap counts visualized as a fancy trend chart right in your web browser. Also, sending the link to your current high score to a friend might be a fun way to compete, even if you swim in different towns. Or maybe you would want to automatically publish your lap count on Twitter after every session?

Whatever your needs, once the lap count data is available on the web in a standard format like RSS, there is almost no limit to what can be done with it. This statement will of course alarm advocates of privacy. But even if the exact mechanism of how to store data on the Rfish server is not clear yet we can limit possible damage by simply not storing any personal data such as the name or email address of anybody. The only link between you and your data will be the number stored in your RFID tag. The lap counts per tag are public but you decide if you want to publish which tag is yours.

Matorikkusu
Image by Pixelsior

The mother of all Rfish servers is online at http://rfish.net/ already (albeit with rather limited functionality) but the system does not require a central server. Once the development phase is over, it should be possible to clone the server and run a separate instance. As long as the links to the Rfish community sites remain in place on the start page of every instance, users will be able to lobby for new features and to share tutorials for setting up everything and building additional Rfish reader hardware. In the case of a design decision affecting more than a single Rfish component, this blog shall retain the authority to guarantee the conceptual integrity of the overall system architecture.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Dear Reader

February 21, 2009

Next in our closer look at the reference model is the Rfish reader. It should be able to distinguish swimmers by reading their personal ID. In principle, the reader could be designed to work as a stand-alone lap counter but as you’ll see soon, connecting it to the internet makes it a lot more useful. Therefore, we design the Rfish reader to pass the data it reads on to a web server.

In the near future, web-enabled special purpose devices and even individual sensors will each have their own direct connection to the internet over one of today’s mobile phone networks (an example of such a device is the Amazon Kindle). But right now, GPRS modules required for such a connection are still a little pricey. Fortunately a cheap alternative is readily available, because of the abundance of Bluetooth-enabled mobile phones. All we have to do is to wire our reader to a cheap Bluetooth hardware module and use a standard mobile phone as a gateway to the web. A further advantage of this setup is that we can connect multiple readers through a single gateway, reducing the cost per lane.

Since Bluetooth data transmission works without wires and doesn’t consume too much energy, it should be possible to put the reader, the Bluetooth module and a battery together in a relatively small, water-tight case. In terms of energy use, low-power ZigBee radio would be even better, but current mobile phones do not support it.

There is at least one supplier selling an RFID reader with Bluetooth in a palm sized form factor for around $300. Assembling a custom reader might lower the cost, given the actual price of RFID readers and bluetooth hardware. Still, the prototype will be considerably above $100. And yes, this is an optimistic estimate by someone who never before designed a hardware product. So, if you know better please drop me a note.


Photo by Thomas Hawk

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Next Round’s On Me

February 20, 2009

s
Photo by Rougerouge

Now let’s have a closer look at the individual parts of the reference model by starting out in the pool. An important requirement Rfish should meet is allowing more than one person swimming on the same lane, at the same time. So Rfish must be able to distinguish between swimmers to maintain separate lap counts for each one of them. We will achieve this by attaching an ID (i.e. a unique number) to each swimmer, which can be read by a reader of some sort. Hooking up those readers to the web requires the IDs to be unique in the entire system. One person can then visit different pools with Rfish readers installed without messing up other peoples lap counts.

The personal ID should cost as little as possible. It’s desirable but far less important to also have a cheap reader, as its cost can be shared between multiple swimmers or maybe even paid for by your pool operator. Without having used them before, my first guess is to work with RFID tags. They can be bought in the form of water resistant wristbands for a few dollars and do not require a direct contact with the reader. While the RFID technology might not work under water, it at least allows us to put the reader in a watertight case.

Of course there are several alternatives to using RFID technology as a means of identification. A personal web-enabled counter or sensor similar to the Nike Plus system could probably be built using a simple controller that might be attached to the internet via USB, making the reader obsolete. The downside of using USB to upload lap counts is that the data is not available on the web at real time, preventing scenarios such as lap swimming competitions. Another approach makes use of computer vision. Instead of an RFID tag, swimmers would wear a QR code (or another 2D bar code) on their head. The reader could be a standard mobile phone with a camera and some QR code reader software. A possible downside of this approach is that cameras are banned from many pools. Considering this, RFID seems to be worth a try.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Opening Up

February 16, 2009

Most swimmers are not engineers. Today, the only way for you (and almost everybody else) to profit from recent technological development is to buy a commercially available product developed by an innovative company. While such products can provide great value to the targeted community (e.g. Nike Plus for runners) they also have to generate money for the respective company. All to often, this leads to closed proprietary solutions confined to their initial purpose. There is no room left for innovation coming from the users themselves or from third parties. Even worse, communities too small to be considered a viable market are not served at all.

We plus Plus
High-tech held hostage

On the other hand, there is an established open source movement in software and a nascent one in hardware and even industrial design with projects like Arduino, Bug Labs (together with Ideo), Chumby, Gumstix, Liquidware or Openmoko. And when it comes to connecting devices to the internet, books like Making Things Talk do a great job explaining all the technical details end-to-end in a language targeted at a non-technical audience. There is no lack of building blocks like sensors, controllers, protocols, data formats and incredibly cheap hosting or data storage solutions – but trading off their qualities and integrating the selected components to a consistent product is not trivial.

Documenting the development of Rfish as a sort of open design or open engineering project might help hackers in other communities to understand our design decisions and solve similar problems with less headache by adapting the system or at least the ideas behind it to their own needs. And even more important, it will hopefully one day bring state-of-the-art technology in a usable, affordable and open product straight to your swimming pool.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

A Simple Plan

February 13, 2009

Here’s a first sketch of how Rfish should help you count your laps. As it already contains hardware components and data transmission technology, the picture looks a bit complicated. But don’t worry, we’ll look at every part in detail. Even if it might change with further insight, the advantage of such a detailed reference model is that we can talk about every aspect of the project by pointing to this picture.

So let’s get started: the basic idea is to use RFID tags to trigger a stationary lap counter. Every person swimming on the lane gets such a tag and thus a unique ID. By touching the reader with your RFID tag, you can increase your personal lap count. The collected data (i.e. your lap count per session) is then transmitted to a server, where it is accessible over the internet with every web browser.

How can such a system ever be available at a reasonable price? By taking advantage of openness and collaboration. As illustrated above, many swimmers can share one RFID reader on the same lane. If this project leads to a usable prototype, instructions to build a reader from relatively cheap parts will be available for free under an open license. So you can build your own reader and either get your pool’s staff to install it for everyone, or just bring it with you and use it together with your friends. The rest of the system will be based on open standards allowing everybody (or at least some nerds) to replace individual parts by cheaper alternatives or more innovative solutions. Of course, until further notice this is all just wishful thinking. But it might well be worth some more brain cycles.

Regards,
tamberg

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

Counting Laps Without Losing Track

February 13, 2009

Many existing electronic lap counters require the swimmer to press a button on every lap. Such systems are often either built into a kind of wristwatch or wall-mounted. On the crowded lanes of a public pool, mounting a manually triggered counter to one end of the lane seems to be a bad idea, as there is no way to distinguish different swimmers.

Finis Lap Track
Finis Lap Track

Another more sophisticated type of counter relies on a wearable 3D-compass to deduce the number of laps by sensing a swimmer’s orientation. Unfortunately, such systems are not available as a product yet or at least not at an affordable price.

So in the meantime we’ll try to build a system that is usable, available and affordable.

Regards,
tamberg

Under Construction

February 12, 2009

Photo by Plymography
Photo by Plymography

As a rather mediocre but dedicated swimmer in a country with cold winters I spend quite some time every other day swimming laps in a pool. But because of the meditative nature of swimming, it’s often quite hard to keep track of your lap count (at times I even struggle to remember breathing). Still, although you’re not some sort of an athlete it would be nice to know roughly how many laps you did in a session.

My other passion is software engineering. Even in the water I often can’t stop thinking about programming problems. Due to the lack of most audiovisual sensory input, being submerged is actually great for breading ideas. One such idea is the project this blog is all about: Rfish – a system to count swimming laps.

While I got a vague vision of how to build such a system, the work is far from done. In fact, the minimal main site and this blog are all there is for the moment. Rather than building the system behind closed doors I’ll try to share every single step it takes to build it – from registering the domain name to the engineering of the system and implementing a first prototype.

Of course, such an approach could end in utter humiliation. But on the other hand there is a fair chance that this project can profit from your input and comments and become useful to more than a single person. Still, I’m scared. I never took part in one, but this must be the web equivalent of hearing the start signal to the first lap of a swimming contest.

Regards,
tamberg