Tablet Pc Chemistry Software

Approximate determination of acid concentrations Using J2ME for Mobile Phone Applications

1.  1. Introduction

In the chemical laboratory it is common practice to prepare standard solutions of acids for use in titration work. Typically, the volume of acid to be diluted in 1 dm3 of water is usually provided in conjunction with standard equations as well as mass in grams for the base, from which the volume of acid required in neutralizing a known volume of base (alkali) can be determined.

This data are necessary to aid in pre-titration works in the chemistry laboratory in order prepare the students as well as the laboratory assistant for the actual chemistry practical exams. In particular, a very important computation is the determination of the concentration of acid in mol/dm3.

By using a single equation, it has been shown that the concentration of acid can easily be obtained using the usual manual method [1]. However, using manual method is only recommended when data to be computed is small. For the computation of large amounts of data numerical analysis using a computer can be very valuable. Further, usage of some other embedded computing devices such as a mobile phone or ovim tablets will not only present a flexible solution but will reduce drastically the overhead costs, power requirements and inconveniences associated with conventional computers such as desktop PC’s and laptops.

 This paper is structured as follows:

In section 2 we present the algorithm for computing the acid concentration using a single equation. In section 3 we outline procedure to develop the application using Java and port to a j2me compliant mobile phone.

Finally, we give our conclusions.

 

 

1.  2. Algorithm Design and Development

The development of an algorithm for the computation of acid concentrations will usually involve a four stage process which includes problem definition, equation modeling, coding, and debugging for errors where necessary. 

A suitable model equation for the computation of acid concentrations in mol/dm^3 has been developed and is presented below [1],

Cd = (%P * s.g * Vr) / (100 * Mr) —— (1)

Where

s.g = the specific gravity (s.g), in g/cm3 per g/cm3 (ρ/ρ)

P = the percentage purity (% P) in %

Mr = the relative molar mass (Mr), in g/mol and

Vr = the required volume of concentrated acid to be diluted to 1dm3 of distilled water (Vr) in cm3.

This formula is derived from the dilution formula and eliminates the usual steps required in the analysis of a standard solution of an acid [2].

To implement code for the above model one will add the following code to the Ok command event for a java2me application:

 

    // Parameter Definition

    double P  =Double.parseDouble(this.text1.getString());

    double sg =Double.parseDouble(this.text2.getString());

    double Vr =Double.parseDouble(this.text3.getString());

    double Mr =Double.parseDouble(this.text4.getString());

   

    // Code implementation for Model Equation

    double C= (P*sg*Vr)/(100*Mr);

    String Cd=Double.toString(C);

 

    // Script for displaying results on screen

    this.form.deleteAll();

    this.form.append(“Conc:=”+Cd);

 

A simplified flow chart for implementing the above model equation is presented in fig 1 below for clarity:

                                              Start

                                                 |

        Define input parameter spaces and conditions for: s.g, P, Mr and Vr

                                                 |

    

         Write java2me script for computing Acid concentration using Eq.1

                                                 |

                        Write script for Displaying Results on screen

                                                 |

                                             End

 

Fig1 Flow Chart for algorithm development using Java

 

1.  3. Application Development

The development of software applications for mobile devices using java has seen tremendous improvements over the years with the introduction of integrated development environments (IDE) such as Netbeans and Eclipse making it easy for mobile phone application developers to develop rapid prototypes of their designs.

Netbeans IDE makes it easy for developing mobile applications with its compile-on save feature and emulator capabilities.

 In the development of a mobile application using the Netbeans [3] platform the following steps are necessary:

  1. Create a new application project
  2. Choose appropriate mobile platform (device configuration and device profile)
  3. Create a new midlet file
  4. Write script for implementing the application
  5. Compile and build the application
  6. Create jar files (executable)
  7. Deploy application to test device(s)

In our design, a CLDC 1.1, MIDP 2.0 [4], [5] platform was selected since this will allow for floating point computations in our model equation and actual hardware implementation. Also, mobile application was tested and deployed on a Nokia 2600c mobile phone (incidentally the Author’s phone) and the results were satisfactory.

 

1.  4. Conclusion

In this article, we have shown that the required dilute concentration of an acid can be obtained easily from a single equation.

We have also shown that this can be implemented with minimal efforts on a j2me compliant mobile phone using open source software such as Netbeans IDE.

With slight modifications in code this application can be adjusted to cater for large number of input data as well as model similar scientific and engineering problems.

 

 

References:

1.  Osegi N.E., Approximate Determination of Acid Concentrations Articlesbase Publications   #2864467

2.  Chendo M.N., Comprehensive Practical Chemistry, Hybrid Publishers Ltd, 1994, Nigeria, 39-41.

3.  Netbeans IDE 6.9, www.netbeans.org.

4.  CLDC, http://java.sun.com/products/cldc/

5.  MIDP, http://java.sun.com/prod

 

 

About the Author

Embedded Systems Developer at Saturnwave;

Contact: ikagbor1@yahoo.co.uk

HP Tablet PCs used in Higher Education.