The paper focuses on an application that can be developed on android, Android is a multipurpose operating system based on Linux for mobile devices such as smartphones and tablet computers, it contains several versions such as donot, ice-cream sandwich, KitKat, pie, etc. Function generator is a device used to generate a wide range of standardized electrical pulses such as sine wave, square wave and sawtooth wave whose frequency ranges from 0.1Hz to 11,000 Hz .In this paper we aim to review how this function generator can be developed using an android mobile application. The mobile phone application uses android in order to implement a function generator which generates different A.C sources available in the laboratory. This can be used extensively in remote areas where it is not easy to carry the function generator.
Introduction
I. INTRODUCTION
Android is a mobile operating system based on a modified version of the Linux kernel and other open-source software, it is specially designed for touchscreen mobile devices such as smartphones and tablets.
The source code has been used to develop Android variants on a range of other electronic products, such as game consoles, digital cameras, media players, Personal Computers, each with a dedicated user interface. Some well-known derivatives include Android TV for TVs and Wear OS for wearable devices
Since 2011, Android has been the world’s best-selling smartphone operating system, and since 2013 it has been the best-selling operating system on tablets. As of May 2021, it has more than 3 billion monthly active users, the greatest installed base of any operating system, and as of January 2021, the Google Play Store features over 3 million apps. Android 12, released on October 4, 2021, is the latest version
A. Overview of Android Studios
Android Studio supports programming languages, such as Java, Kotlin, C++, and more with extensions, all Java 7 language features and a subset of Java 8 language features that vary by platform version. However, IntelliJ states that AS is compatible with all released Java versions, and Java 12, it is not clear to what level Android Studio supports Java versions up to Java 12.
Once an application has been built with Android Studio, it can be published on the Google Play Store. The application must comply with the content policy for developers of the Google Play Store.
B. Overview of Flutter
This paper consists of the following sections –
Introduction
Literature survey
Android development languages
Current research
Conclusion
II. LITERATURE SURVEY
Android mobile app development has benefited to mobile phone users to do several tasks efficiently such as sending a mail, catch a cab or attend online lectures due to Covid.
In the paper “Mobile Function Generator Using Android” authors Elijah Mathew, Dr. Sunil Karamchandani talks about how we can use mobile app to develop sin, square and triangle waves that is substitute of function generator to be used in remote location
III. ANDROID DEVELOPMENT LANGUAGES
A. Java
Java was the official language for Android App Development. Most apps in the Play Store are built with Java, and it is also the most supported language by Google. Java also has a great online community for support in case of any bugs.
Java is a baffling language for a beginner to use as it contains complex topics like constructors, null pointer exceptions, concurrency, checked exceptions, etc.
B. Kotlin
Kotlin is the official language for Android App Development declared by Google since 2019. Kotlin is a cross platform language that may be used as an alternative to Java for Android App Development. Kotlin can interoperate with Java and it runs on the Java Virtual Machine.
C. C++
C ++ can be used for Android application development using the Native Android Development Kit (NDK). However, an application cannot be fully created using C ++ and the NDK is used to implement parts of the application in native C ++ code. This helps to use C ++ code libraries for the application as needed.
While C ++ is useful for Android application development in some cases, it is much more difficult to configure and is much less flexible. It can also lead to more errors due to increased complexity. Therefore, it is better to use Java compared to C ++ as it does not provide enough gain to compensate for the efforts required.
IV. CURRENT RESEARCH
A. Project Overview
Function generators are bulkier, heavy and not feasible to carry everywhere. Already several researchers are working onto developing a function generator’s signal using a mobile application and transmit it to the other device using the AUX port on android devices. This signal generation involves creating sine, triangle or square wave individually one at a time. This application will help us get the signals even at remote locations where we cannot carry the gigantic function generators.
Every technology comes with certain limitations like with mobile application we can generate the signals, but its output voltage is too low and low bandwidth (can only generate signals within 20 Hz to 20,000 Hz). Another drawback is that at most 2-3 volts output is generated.
B. Procedure
Our Research mainly consists of 3 phases:
Generating sin, sawtooth and square waveforms of varying frequencies using java.
Then these generated waveforms need to be transmitted to the other device using AUX port using Android capabilities and hardware along with Android and java coding.
The waveforms are now available at the device connected with AUX port then need to be interfaced to the CRO or the working project.
C. Snippet for the Waveform Generation using Variable Input
This is the code to create a thread and generate a sign wave pulse of constant frequency of 10 KHz. To take variable frequency input we need to create a digital potentiometer knob either vertically or horizontally on the mobile screen with frequency of minimum 20 Hz to 20000 Hz. We can use the length of the variable potentiometer knob and use the scale function to compute the frequency input. For example, the length of the knob is 5 cm, and the user places the knob at the exact half that is 2.5 cm which will give us the frequency of 10010 Hz.
D. Interface with CRO
To generate the output pulse using the audio (aux) port in the android mobile we first need to understand the structure of the aux port. The 3.5 mm aux port is made of 4 parts left speaker +, right speaker +, mic and ground. [1]
To generate the signal in the 3.5mm Aux port we need to convert the digital signal into an analog signal. For this we can use the popular java class AudioTrack to play some audio resources (in our case, the waveform) from java application [6]
An AudioTrack instance works on 2 modes:
Streaming: Here the application writes a continuous stream of data to the AudioTrack, using one of the write() methods. These are blocking and return when the data has been transferred from the Java layer to the native layer and queued for playback. [6]
Static: This should be chosen when dealing with short sounds that fit in memory and that need to be played with the smallest latency possible. The static mode will therefore be preferred for UI and game sounds that are played often, and with the smallest overhead possible.
Conclusion
Thus, we have researched on an application using android implementing a function generator on a cell phone of which the sine wave generated is displayed above. It is indeed a great advantage when function generators are unavailable at home or at work field so we reviewed about how to build mobile app which could transmit signals like function generators using AUX port on the android mobile devices. It is dominant to provide a function generator application into hands of every researcher possessing a smart phone. Can use this app in isolated places. Now we don\'t have to carry heavy and bulky function generator everywhere. It will save the cost of investment by the user to buy a function generator for small applications. Taking power and other considerations into account, there will be no need for any function generators in the lab for years to come, as everyone will have function generators in their phone.
References
[1] Elijah Mathew Mobile Function Generator Using Android, 2015, D. J. Sanghvi College of Engineering, Mumbai
[2] IBM (International Business Machines) Arvind Krishna CEO of IBM https://developer.ibm.com/articles/os-android-devel/
[3] Britannica Jorge Cauz CEO of Britannica https://www.britannica.com/technology/Linux
[4] https://code.tutsplus.com/articles/android-from-scratch-an-overview-of-android-application-development--cms-25972
[5] https://thebroodle.com/android/flutter-vs-android-studio-which-is-better/
[6] https://developer.android.com/reference/android/media/AudioTrack