Dell AXIM X50 PDA User Interface with Data Acquisition

Patrick Bowles

CEN 3213

Professor Janusz Zalewski

Florida Gulf Coast University

October 6, 2008

1.  Introduction

“Data acquisition is the sampling of the real world to generate data that can be manipulated by a computer. Sometimes abbreviated DAQ or DAS, data acquisition typically involves acquisition of signals and waveforms and processing the signals to obtain desired information. The components of data acquisition systems include appropriate sensors that convert any measurement parameter to an electrical signal, which is acquired by data acquisition hardware” (wiki, 1).

There are many different companies on the market, dealing with just this kind of technology. In this project we will be dealing exclusively with the process of PDA data acquisition. There are several companies that work on these technologies. For example National Instruments has several different systems that deal with data acquisition. The CF-6004 is the data acquisition device that we will be using to implement this project. Another device from National Instruments is the DAQCard-6024E which has more functionality than others but is more expensive and almost twice the size. We are using the CF-6004 because we have a Dell Axiom X50 PDA that has a Compact Flash slot so the CF-6004 will be prefect for our need or our hardware.

Figure1 (ni.com)

Another type of Data Acquisition System is FPGA (field programmable gate array). An FPGA is a semiconductor device containing programmable logic components called "logic blocks", and programmable interconnects. Logic blocks can be programmed to perform the function of basic logic gates such as AND, and XOR, or more complex combinational functions such as decoders or mathematical functions. In most FPGAs, the logic blocks also include memory elements, which may be simple flip-flops or more complete blocks of memory. An example of an FPGA is a ZestSC2 which is a high performance desktop USB board.

Figure2

There are also PCI Data Acquisition boards available however they are not portable due to the fact that they are connected to a desktop PC. On the plus side there built for high speed and high resolution not portability.

2. Hardware and Software Description

2.1 Device Description

PDA Hardware: This device has multiple uses, more than I’m willing to list. In today’s day and age having a device that can do various jobs is not just a benefit, it’s a necessity. The most useful purpose of such a device is the ability to connect to external devices in the field for the purpose of data acquisition dealing with sensors for example. After some research this Dell Axim X50 PDA is, when released, on the top of a very short list. The specifications on this PDA model are listed in Table 2.1 and Pictures in Figure 2.

Dell Axim X50

Figure 3 (Wikipedia 4, and cnet.com, 3)

Dell Axim X50

Installed RAM / 64MB SDRAM
Installed ROM / 128MB
Processor / Intel 520 MHz XScale
Input device type / Stylus, Touch screen, 5-way navigation button
Digital audio standards supported / MP3, WMA
Audio input type / Built in Microphone
Audio output type / Built in Speakers
Voice recording capability / Yes
Display type / 3.5 in TFT active matrix
Color support / 16-bit(64K colors)
Max resolution / 240x320
Wireless connectivity / Wi-Fi, Bluetooth, IEEE 802.11b
Battery Type / 1100mAh Lithium Ion
Operating System / Windows Mobile Edition 2003 Second Edition
Storage Card / SD Memory Card, Compact Flash Card Type II

Table 2.1(Brighthand, 2)

“The Axim X50 features a bright 3.5" QVGA display with a 320x240 resolution, and includes the power and storage capacity to handle work and multimedia applications. The X50 handheld has a sleek and stylish design with CF and SDIO
expansion slots for connecting scanners, GPS systems, network cards and modems. The X50 is powered by the next-generation Intel PXA270 processor that provides technology to help extend battery life and deliver enhanced multimedia performance. Featuring Microsoft Windows MobileTM 2003 Second Edition software for Pocket PCs with familiar applications like Word, Excel and Internet Explorer, you can stay productive while you are away from your home or office on the go. Thanks to the standard 1100 mAh battery, Bluetooth and optional Wi-Fi you can stay both productive and connected all day long.”(Brighthand, 2)

2.2 Other Hardware Description

NI CF-6004 CompactFlash Data Acquisition for PDAs is designed to be lightweight and ultra portable specifically for mobile application. Some practical applications are Biomedical/wearable computing, field monitoring/ diagnostics, and portable data logging and analysis. Measuring less than 16 cm^2, slightly larger than a standard postage stamp, the National Instruments CF-6004 is a tiny, yet powerful platform for handheld measurements. With 14-bit resolution and up to 132 kS/s aggregate sampling on four analog input channels, the NI CF-6004 packs full measurement functionality into a Type II CompactFlash slot, available on many PDAs. The NI CF-6004 is ideal for many portable applications, from consolidation of multiple handheld instruments to custom handheld measurement, analysis, and communication. The following block diagram shows key functional components of the CF-6004.

Figure 4

A couple other pieces of hardware are the connector cable NI SH-15-15 Shielded Cable with D-sub Connector and the NI SCB-15 Shielded Compact Connector Block (DB-15 adapter) which is what will be connected to the battery pack, in order to get a voltage reading. Below is a table of the terminal assignments for the DB-15.

Figure 5

2.3 Programming the PDA

A number of programming methods are available to be implemented on the X50, however the CF-6004 requires the use of LabVIEW (will be discussed later). At the very beginning of this project I was under the impression that Java would work for this project.

2.3.1 JAVA Programming

Ok the first step was just to familiarize myself with the device. Understand how it works and how to install and run programs. The program I’ve been using is Mysaifu. Mysaifu is a Java Virtual Machine which runs on Windows Mobile 2003. So that being said we need to download the file JVM.Release.CAB 10.7MB (Mysaifu, 5) from the website: http://sourceforge.jp/projects/mysaifujvm/files/?release_id=29215#29215

To your local Computer then with a program call Microsoft ActiveSync witch should be installed from the CD we received with the Dell Axim X50 PDA. ActiveSync is a File transfer program that will allow you to transfer anything from you computer to the PDA. Just like an external drive just drag and drop what you want on the PDA and ActiveSync will automatically send it to the PDA. Ok so sent the JVM CAB file to the PDA then simply tap the file and the Mysaifu JVM will do the rest. Before we can run a java program on the PDA we need to create the java program first then, after compiling it we must send the class file to the PDA and any other files that goes with the class file (there may be more than one file) and make sure that you put it in my Documents on the PDA because that is were the program (Mysaifu) looks for these file by default. If you choose to use another location for you class file simply select the “Options…” button shown in Figure 8 and the in the window shown in Figure 9 go down to current directory and tap the Browse button then select your directory then the program should be ready to run.

After installing the program go to Programs folder as seen in Figure7 and open the JVM as seen in Figure 8. You will see that by default the type of file is Class so all you have to do is enter the name of the class file in the name text box and select Show console if you are displaying something on the console. Then press “execute” to run the program. I’ve had mixed success with the JVM and have not yet cleared all the bugs. However on nice feature with Mysaifu JVM is that it keeps a “Recent list” or in other words a list of recently ran programs. Success of a simple hello world program the code is below:

package helloworld;

public class HelloWorld {

public HelloWorld(){

System.out.println("HelloWorld");

}

public static void main(String[]arg){

HelloWorld HW = new HelloWorld();

}

}

Figure 6

Figure 7 Figure 8

Figure 9

However after a little research it was discovered that using Java will not be possible. Due to software requirements with the CF-6004 we’re forced to use LabVIEW to build our applications.

2.3.2 LabVIEW Introduction

NI LabVIEW is short for Laboratory Virtual Instrument Engineering Workbench, and is an intuitive graphical programming language for engineers and scientists, that have high level tools and configuration utilities that are designed for real world data. “LabVIEW is a platform and development environment for visual programming. The LabVIEW program has two windows the front panel and the block diagram. LabVIEW is commonly used for data acquisition, instrument control, and industrial automation on a variety of Operating Systems.” (7. Wiki) The graphical language is named “G” originally released for Apple Macintosh in 1986.

The block diagram is where the programmer develops the graphical code. The flow of data determines the execution of the program. The Front panel is where the programmer creates the graphical user interface with you can customize object like graphs, knobs, and buttons. Below you will see an example program, this is the code of the program, notice that there are no lines of code in this example which greatly reduces the risk of syntax errors.

Figure 10

In the front panel simply drag and drop the components that apply to the current project then you have to switch to the block panel. In the block panel the components have to be connected to other function icon using a wiring tool. After you create the program and have all the correct connection then you hit the go button and the LabVIEW software will compile and run the program. On the PDA LabVIEW actually installs an exe file for you to run.

2.3.3 LabVIEW Install and Programming

In this project the software version used is LabVIEW 8.2(20th Anniversary edition). There are six disks required for everything to work, and three files that have to be downloaded from National Instruments website.

·  Professional Development System for Windows

·  Device Drives disk (there are three disk for this step)

·  NI DAQmx Base 2.2

·  PDA Module for Pocket PC (Windows Mobile 2003 Se)

Download from www.ni.com.

·  Microsoft Web Site: Embedded Visual C++4.0

·  Microsoft Web Site: Embedded Visual C++4.0 SP4

·  Microsoft Web Site: SDK for Windows Mobile 2003-based Pocket PCs

On a PC with Windows XP it took a little over two gigs of space on the hard drive for the software to be loaded. Before a LabVIEW program can run on the PDA the drives have to be installed on the PDA. To do this, make sure Microsoft ActiveSync is installed and working on the host computer, and that the PDA is in the cradle and the USB plug is connected to the host computer. Then go to: Start>Programs>National Instruments>NI-DAQmx Base> Windows Mobile and CE Driver Installation.

Now everything is ready to start developing the LabVIEW programs. Now open the LabVIEW software by: Start>Programs>National Instrument LabVIEW 8.2.1 after it loads the start window will appear (figure 11).

Figure 11

Then select the type of project or VI (Virtual Instrument) to create, circled in red in Figure11, after making the selection the front and back panel will appear along with the project explorer, and now every thing is ready to start making the VI Figure12.

Figure12

Below are the control palette (figure 13) used for controls on the front panel and the Functions palette (Figure 14) used on the block diagram to manipulate the data. All of these are just drag and drop icons that have to be wired to one another to make working programs.

Figure 13 Figure 14

3.1 Problem Description

In this project the goal is to write software to connect to a battery pack to the PDA through the CF-6004 and read the voltage from the battery pack to product a waveform graph. Many other input sources could be used for this project such as sensors to collect field data. The next step is to add a networking aspect or have Internet connectivity with this device. In other words, from a website, retrieve data by accessing the PDA program and have it send the data to the website to display it from the website. (Figure14)

Figure14

4.1 Solution

The solution to this problem is to develop a software program to connect to the input source using the CF-6004 through the compact flash that is connected to the PDA, then read the data and display it in the form of a waveform graph on the PDA.

5.1 Examples

Unlike other programming languages like C, C++, or Java there isn’t hundred’s of lines of code to make this project work as you can see in Figure15, using LabVIEW’s graphical programming language to develop complicated programs that look very simple.

Here is the Pseudo Code for this project, please refer to Figure15 for the actual code.

  1. Specify an analog input voltage task
  2. Call the start VI to start the acquisition
  3. Read the data in a loop until the user hits the stop button or an error occurs
  4. Call the stop VI to stop the Task
  5. Use the popup dialog box to display an error if any