Thursday, September 11, 2008

SunSPOT underwater radio range

For this experiment, I moved the SPOTs over to the local community center pool. Using the same watertight case and ZipLoc bag full of pennies as anchor, the configuration changed slightly. This time the ZipLoc bags anchored the SPOTs from a cord attached to each of their waterproof cases. These allowed the SPOTs to hover about 3 feet above the floor of the pool. I performed the test in a section of the pool which is 4 feet deep.


Oddly enough, the SPOTs could communicate with each other up until approximately the same distance as in the bathtub-- 8 inches.

In addition to this disappointing conclusion, SPOT communication on the water's surface appears stable up to approximately 5 feet. I tested this to the extent that I could indoors, from long side to long side of an olympic side swimming pool. Raising the SPOTs slightly above the surface of the water improved results greatly. So maybe there's some hope for autonomous surface vehicle SPOT communication.

This ends my experiments with underwater SPOT communication, as I am not convinced it will get any better. In fact, in saltwater, it may become worse.
There is one final water-based experiment that I would like to see done (by myself or some other more industrious individual)-- above-ground basestation to saltwater surface SPOT communication strength.

Saturday, September 6, 2008

SunSPOT underwater radio range (preliminary tests)

At least one member of Sun Research Lab, and a number amateur SunSPOT enthusiasts, have performed tests to measure the ability of the SunSPOT radios to communicate under different conditions. To date, I have not found an experiment to test whether or not SunSPOTs can communicate underwater. 

Using a bath tub, two waterproof cases, and two ZipLock bags, I performed this crude experiment.


My intentions for this experiment were not to take any detailed range or lost packet data. Rather, I hoped for the experiment to yield two important boolean answers to the following questions. Are my purchases truly waterproof? Can SunSPOTs communicate underwater?

To the first question, yes, the hard, waterproof cases I bought from Dick's Sporting Goods are waterproof to at least a foot. I tested this by placing tissue paper inside each and leaving them under a foot of water for an hour. N.B.: ZipLoc bags are not waterproof-- I used these on top of the waterproof cases so I could weight them to the bottom with pennies.

To the second question, yes, I was able to achieve up to 3.5 LEDs with no lost packets (using Ron Goldman's RadioStrength demo in %SPOT_HOME%/sdk/Demos). Of course, this occured only when the two SPOT antennae were close enough to be "more than just friends." Without touching, they achieved a signal strength of just over 2 LEDs.


The crudeness of this setup prevents any further solid conclusions. Whether or not I go to the YMCA pool tomorrow depended on the results of this experiment (Why waste the effort if they don't work in a bath tub?). However, for kicks, I threw a ruler into the tub. At 8 inches apart, the SPOTs communicated with no lost packets.













Consider these issues with the current setup: 
  • As mentioned by Ron Goldman in this post, placing the SPOTs too close to the ground will decrease the signal strength. Now, I live several stories above the actual ground, but I can only assume that Ron meant any solid surface. In my experiment, the SPOTs laid on the bottom of the bathtub.
  • In addition to the the adjacency of the SPOTs to the ground, the walls of the bathtub may provide additional signal interference/assistance.
  • Signal strength could not be tested at depths greater than one foot.
  • Different SPOT orientations produce varying signal strengths. Clearly, antenna-on-antenna action peaks reception. However, orientating SPOTs so that they face each other seems to produce the greatest signal strength over distance.
  • My SPOTs were severely undercharged at the time of this experiment (less than 10% charged). I configured both SPOTs to transmit at full power. Theoretically, battery power should not have any effect on signal strength, but I make no assumptions.

Thursday, September 4, 2008

SunSPOT sdk blue compiles with JDK1.4

By default, the blue version of the SunSPOT compiles with JDK1.4. This is not much content for a blog post, but the problem wasted an hour of my life/development time. Here's the error message:

generics are not supported in -source 1.4

Simple enough, right? Obviously, generics weren't around until version 1.5. Usually, this error yields to a simple change in the project properties or platform manager in Netbeans. Or, on the command line, you would specify "-source=1.5" as an option when compiling. Unfortunately, we're dealing with SunSPOT applications that use special ant scripts that automatically specify all the paths and properties needed to compile/run either a host or client application, with host-compile/host-run and compile/run, respectively.

The solution: In your %SPOT_HOME%/sdk directory exists a file named default.properties. Open this file for editing and search for "host.java.version". You'll see that the file sets this property to some value (1.4 in my case). Change that value to the latest version of Java.

Perhaps the fine researchers at Sun Research Labs will change the default setting of host.java.version from 1.4 to 1.5 in future SDK releases.