SPOTting the Blind Men and the Elephant

PI: Dr. Charles Kim, Department of Electrical and Computer Engineering, Howard University, Washington, DC

Project Sponsor:  Sun Microsystems Change Your World Grant


1. Project Description

 

This project attempts to develop a teaching module, by utilizing Sun SPOT (Small Programmable Object Technologies) wireless motes and their built-in accelerometers, temperature sensors, and networks stacks, for the Embedded Systems Design course in the Electrical and Computer Engineering at Howard University. The course is designed to teach and practice wireless sensor network application design and development for knowledge aggregation and complex motion behavior understanding.

The current Embedded Systems Design course has been offered to upper level students of the departments of Electrical and Computer Engineering, and as a Technical Elective to Systems and Computer Science students. The course is centered on the development of stand-alone digital devices using medium-range microprocessors with assembly and C programming languages.   The desired improvement of the course which is hoped to be realized by the proposed project is the combination of each digital device within a network so that a new system evolves from the collaboration of the devices, and the combined interactive and interconnectivity between devices, which improves the level of knowledge and understanding of the surrounding situations and behaviors.   Each small device may not be aware of the entire situation, or be able to identify the object of interest. As each blind man in the fable of "the blind men and the elephant," the networked system of each individual devices would share the pieces of knowledge and, through an aggregation process yield an increase in the knowledge of each device and the system as a whole.

The ARM core-based Sun SPOT wireless sensors would make inroads for the Embedded Systems Design course to realize networked knowledge aggregation for object identification and complex motion/behavior understanding.    For a foreign object identification, each on board SPOT would sense, measure, and respond to the object and then would provide information to a base station SPOT, which in turn combines them with a learning process.  Further, a continued communication between each SPOT and the base SPOT would produce better information on the object.   For complex motional behavior understanding case, multiple SPOT devices attached to the various places to recognize an object in motion would provide information processed from the accelerometer and send to a base SPOT, which would combine all motional information for an aggregated understanding of the object in motion. 

The immediate benefit of the Sun SPOT course module would be the enhancement of students' understanding in a wireless sensor network architecture, communication stack and protocols, and hardware implementation of sensor technologies.  Moreover, students would benefit being exposed to the advanced topics of swarm intelligence, knowledge sharing and aggregation, and motional and behavioral composition of a situation, which in all would produce competent minority engineers and scientists in this important area of emerging technology.

Project Outcomes and Deliverables:

The outcome of the project has two components: undergraduate learning outcomes and the research outcomes.   The undergraduate learning outcomes are the major component of the project.  By practicing the SPOTing "the blind men and the elephant," the undergraduate students of the course would achieve the following outcomes:

Even though the proposed project is mainly for undergraduate student education, the developed system would provide a good resource for research.   The research outcomes include:

Deliverables include the Web posting of the project progress and the application note of completed application of object identification or motional behavior understanding.

Teaching Component and Student Participation:

The Sun SPOT course module would be adopted for the Embedded Systems Design course and would enhance students' understanding in a wireless sensor network architecture, communication stack, and protocols.  In the class, students would experience all steps of hardware/software implementation of the SOPT based wireless sensor network.  Teams of students would work together on the SPOTing "the blind men and the elephant" as their class project and they will program in Java, using a development tool such as SPOTWorld or NetBeans, the functions of the communication stack, accelerometer, data integration, and object/behavior identification.   The results would be reported and demonstrated at the end of the class.  It is expected that about a dozen students would be involved in the SPOTting project. The PI, as the instructor of the course, would guide the students through the basics of wireless sensors and networks, the software core of the Squawk virtual machine, Java development tool set-up, and SPOT's built-in features like the network stack and the accelerometer.  A Ph.D. graduate student of PI, who finished his Master's thesis in wireless sensor network power management with a long experience of Java programming, would also help the students and the PI.  Through the SPOTs and the SPOTing project, students would benefit being exposed to the advanced topics of swarm intelligence, knowledge sharing and aggregation, and motional and behavioral composition of a situation, which in all would produce competent minority engineers and scientists in this important area of emerging technology.

Research Components:

The PI and his graduate students have worked on the optimal power management of a single wireless sensor in a sensor network for use in object classification with approaches of Markov chain and matched filter to maximize the life span of wireless sensor in object classification sensor network.   The work has been so far limited to models and Monte Carlo simulation.  The provided SPOTs would provide a good opportunity to evaluate the model with physical wireless sensor for realistic power consumption and management in object identification.   Further, the research can be extended to model development and verification for a system level power management for a whole entire sensors networked together for object identification.

2. Progress
First Step - familiarity with SPOT in Spring 2009 Semester
Students: Cyril Acholo and Shnika Brumfield
Progress report:  Sun Systems Small Programmable Object Technology (SUNSPOT)

 

 

Introduction
 
SUNSPOT devices, or Sun Small Programmable Object Technology, are small, wireless, battery powered experimental platforms that have the ability to be used in a variety of different applications. Motivated to inspire users to create the next great toy, communications device, or sensor, Sun Microsystems developed SUNSPOT to encourage users to create the aforementioned applications using a platform that was Java based making it easier for all people to be able to develop their desired applications.
 
The SUNSPOT development kit comes equipped with two free-range SUNSPOTs, and a base station as well as all necessary software CDs. Each SUNSPOT is equipped with an on-board processor, sensory board, battery, and radio. The base station is used as a direct connection to the host pc and acts as the communication device from the host computer to the free-range SUNSPOTs. The base station can also be used to deploy code from the host computer to the free range SUNSPOTs. The overall development system utilizes netbeans as the java development tool for programming the SUNSPOTs.
 
One specific application that we found during our research of this technology was that of an accelerometer. The free-range sun spots were hooked up to a bicycle that was made to be stationary while the base station was connected to a host pc that had access to Google maps. Users were then able to choose a location that they wished to ride their bicycle through while they were still within the comforts of their own home on the stationary bicycle. As the user pedaled, the SUNSPOTs sent a signal to the base station telling it how fast the user was pedaling. The base station would move the user accordingly across the desired location selected from Google maps. As the terrain changed on Google maps, the base station would send a signal to the SUNSPOTs attached to the stationary bicycle telling them to change the resistance on the stationary bicycle to match the actual resistance that would naturally have been encountered had the user physically been on the terrain that was selected.
 
It was this SUNSPOT development kit that we received to completer our Embedded Systems Design project on. Once we downloaded all the necessary software onto computers both in Dr. Kim’s lab and in the electrical engineering lab in LKD 3121, we began to learn all that we could about the SUNSPOTs. We learned of the unlimited applications that could be configured for them as well as completed numerous tutorials that were already provided on the newly downloaded software to learn all that we could about the development platform.
 
Our Goal
 
Once we completed the learning process for understanding what a SUNSPOT was and all that it could do, we brainstormed possible applications that we could use to fulfill our project requirements. We wanted to use an application that utilized the wireless communication technology already built into each SUNSPOT as well as utilize at least one of the many sensors that are housed on the SUNSPOT boards. To this effect we chose to create a temperature measuring application that would utilize the base station and one SUNSPOT. The base station would be connected to the host pc in order to interpret and display the information from the SUNSPOT, and the SUNSPOT would measure temperature from the area immediately around the on-board temperature sensor and communicate this information to the base station. Alternatively, the base station will send a signal to the free range SUNSPOT to tell the SUNSPOT to measure a different value from one of its many on-board sensors. In order to work up to the culminating project, we set ourselves up with a number of mini-tasks to accomplish.
 
Progressive Work
 
The first of which was to successfully engage and understand programming for the use of the on board temperature sensors. While there was already a tutorial program provided for us to use that showed how to program the SUNSPOT to utilize the temperature sensor, we wanted to ensure that we were able to understand why things were written a certain way so that when it came time to produce our final project, we would be able to know how to make everything work appropriately. At this step, the SUNSPOT was directly connected to the host pc via a USB cord, much like how the base station is usually connected to the host pc. Using the tutorial as our guide, we proceeded to code for this first task in a way that we would be able to go back to and understand later when it came time to build upon it. We were able to complete this step rather quickly, allowing us to move onto our next task.
 
The second task was to initiate the communication between the base station and one of the SUNSPOTs. The base station was directly connected to the host pc and the free-range SUNSPOT was placed at a distance from the base station. In this communication tutorial, we used a default demo on the SUNSPOTs, the bouncing ball demo, to interact with a simulated version of the free-range spot on the host pc via the base station. The of this was to get the lights (balls) to bounce between one another by having the physical free-range base station to send a signal the base station to let it know when it was the simulated SUNSPOT’s turn to bounce its ball on the host screen. Again, there was already a tutorial within netbeans that would have pre-programmed the base station and the SUNSPOT to communicate with one another. We again chose to do our best to re-create this program on our own so that we would be able to create the more difficult application much later without many problems. Like the previous task, we were able to quickly complete this task, allowing us to move on to the next step.
 
Once we were able to successfully program and implement the SUNSPOT to measure the surrounding temperature and for the base station to interface with the free-range SUNSPOT independently, we were then ready to take the first large step toward accomplishing our goal. We would set up the SUNSPOT to measure the surrounding temperature at some location away from the base station and host pc. This SUNSPOT would then send the temperature information to the base station, which would interpret the information that it was sent and would display the information onto the host pc screen. This sub-task took a bit more time to compile and program both the base station and the SUNSPOT correctly; however, once we were able to implement this successfully, the free range SUNSPOT was reading localized temperature by using its on board temperature sensor and sending the information that it read to the base station. The base station, which was connected to the host pc, showed the temperature on the console screen.
 
The final step in accomplishing our goal was to completely program the SUNSPOTs and the base station to communicate between one another.
 
The Final Application
 
By far, this final application was the most difficult part of the overall compiling system. It took us much more time than anticipated to complete our culminating application for the SUNSPOTs.
 
For the final application, we intend to first measure the temperature using the sensor on the SUNSPOT. The free range SUNSPOT will communicate with the base station to display the temperature reading from the free range SUNSPOT onto the console. After a few iterations of this, the base station will command the free range SUNSPOT to take measurements of the light intensity using its sensor. This information will then be sent to the base station and displayed onto the console.
 
The most difficult aspect of programming this application was having the base station to send a command to the free range SUNSPOT to change the type of information that it would send. We were able to easily manipulate our previous applications to have the SUNSPOT utilize two different sensors and send the information back to the base station; however, setting up communication from the base station back to the remote boards was not as straightforward. For this, we decided to use the same radiogram connection interface (provided with the SunSPOT API) as was used by the remote station to send information to the base station. However, we first had to set up a separate connection using this interface. We set this reception connection up on a different port number (70) to differentiate it from the broadcast connection (port 67) on the remote spot.
We thus established a connection over which we then transmitted a datagram object about 2 bytes long. The datagram is an independent, self-contained message sent over the network whose arrival, arrival time and content are not guaranteed. This datagram was sent from the base to the remote spot after ten readings had been received from the remote spot. The system would then display a message stating that this datagram had been received, and the status of the information been broadcast from the remote spot had been changed. The datagram being received was also a trigger to the remote spot to start reading information from a different sensor, namely, the light sensor.
 
To obtain the sensor readings we simply used the com.sun.spot.sensorboard package which contains all the interfaces and classes that make up the sunspot sensor board java libraries.
 
Conclusion
 
After many iterations of programming and testing, we were only able to partially accomplish our desired goal. We were able to program the SUNSPOT to send sensory information to the base station. Alternatively, we were also able to have the base station send a signal back to the remote SUNSPOT to change the type of information that it would send. It was at this point; however, that we were not able to reach our goal. While the base station sent a message to the remote SUNSPOT to change the type of information that it would send, the remote SUNSPOT only sends information from just one of the two sensors that we have designated it to send information from.
 
We were able to determine that the base station was indeed sending a signal that was acknowledged by the remote SUNSPOT based on the change in console output that is produced. The SUNSPOT first sends a signal identifying the sensor that it is sending information from and the reading from that sensor. This information is printed out onto the console. After a few moments, the base station is triggered to send a signal back to the remote SUNSPOT asking for different information. When this has occurred, the display on the console changes, however, the readings are still the same; in other words the SUNSPOT transmits that it is reading information from a different sensor, but does not change the sensor that it is reading information from. This phenomenon is illustrated in the figure below.
 
 
Shown in the above figure is the image of the console from the host computer when the program is run. At first, the remote SUNSPOT is sending information regarding temperature as it can be read from its on board sensor. After a number of iterations of reporting the temperature, the base station requests different information to be sent. The request is then seen to be accepted by the remote SUNSPOT. This is seen in the following two lines:
 
            [java] [radiogram] Adding: Broadcast on port 70
            [java] Status changed
 
It is from those two lines that we were able to identify that the base station was indeed able to communicate with the remote SUNSPOT. When the remote SUNSPOT begins to transmit information again to the base station, it is saying that it is sending the light intensity value, however, from the values that it is giving, we see that the remote SUNSPOT is still sending information from its temperature sensor although it is saying otherwise. We have also tried to run this program with the remote SUNSPOT sending light intensity information first and then sending temperature information, however, the same phenomena occurs.
 
While this has been a disappointment to us to not be able to completely accomplish our goal, we were happy that we were able to demonstrate that the SUNSPOT and base station are able to communicate back and forth with each other, even if there was a slight problem with the information that was being sent between the two components. Given more time, we believe that we would be able to correct the problem in order to have the system working pr

 


WWW.MWFTR.COM