Skip to main content

Constructing Mobile Device Application to Interact with Modular Robotics Toolkit over Bluetooth®

ABSTRACT

The availability of open source technological material and guidelines in robotics have been limited. Proprietary hardware and software are often expensive and hard to obtain because of their non-open source availability, resulting in a large barrier for young students. Therefore, the ability to impact and encourage technological interest in young adults and children is limited. In this work we have developed a user friendly, open source application to control robotic hardware for the purpose of enabling an educational and engaging robotic toolkit. Therefore, the purpose of this research is to construct a Bluetooth application using an easy, open source environment to be able to control the current open source STORM Lab Modular Architecture for Capsules (SMAC) robot with a smart phone. These robots feature easy reconstruction with magnetic contact, no soldering, and open source availability. Anaren’s Atmosphere Development Tool provided a graphical programming tool that worked in combination with a computer programming tool that used C and JavaScript Programming. Trial runs were executed to debug the communication between the Bluetooth application and the robot, using commands. The Anaren Atmosphere Development Tool is in need of improvement for the consistency of maintaining created projects and saving them consistently. However, the development of the Bluetooth application was successfully completed.


INTRODUCTION.

As technology becomes increasingly accessible, the medical field is developing new approaches and creating miniature, non-invasive medical capsule robots (MCRs). With advanced technology in the medical field, an interest to extend knowledge in technology to young adults and children arises. Current open source architecture, STORM Lab Modular Architecture for Capsules (SMAC) for MCRs, has recently been developed [1]. SMAC provides hardware modules and software architecture to establish connections from outside sources for an easy and accessible implementation of MCRs. SMAC can enable communication and data transmission between MCRs and computers and commands can be sent from users to specified MCRs [1]. The current SMAC robot is ideal for various applications (medical, educational, commercial) because of its open source accessibility, solderless hardware components, personalization, and its easy construction through magnetic contacts, with replaceable modules. The possibility of incorporating SMAC into an educational kit to result in a spark of interest in technology in children and young adults arises and can be achieved by integrating the SMAC robot with an engaging learning tool and an entertaining game.

The goal of this work reaches beyond a current interest in technology and into capturing the interest of the next generation. Many products that have been produced provide innovative technology to capitalize on recent initiatives in STEM-based learning and increase interest in technology in young adults and children. VEXRobotics® has initiated interest in high schools participating in the program while LEGO Mindstorms EV3® has drawn attention from the younger aged children [2], [3]. However, limitations applying to the present products are the lack of open source technology and expensive products. On the other hand, SMAC provides an open source technology for their consumers as well as learning strategies and concepts. SMAC has the potential to surpass its potential competitor, VEXRobotics, if placed in the market as an educational tool to spark interest for the next generation and expose young minds to new possibilities.

The current SMAC architecture must be extended to expand its application to an engaging learning tool for students. In this work, we enable the user to control the MCRs from other sources besides a computer, such as a smart phone. The communication from the smart phone to the MCRs is realized with the Anaren Atmosphere open source environment. Anaren Atmosphere is a development environment using C and JavaScript that provides multi-usable functions that are interchangeable to create a Bluetooth enabled application. The user programming interface includes two coding options, a designer view that allows the programmer to design the graphical aspect of the application being created and a code view that allows the programmer to code the application’s functions and properties. Because of its web-based applications, Anaren’s Atmosphere exporting and importing capabilities are essential when establishing open source consistency. The Anaren Atmosphere Application located in the BLE Module will be used as a transmitting bridge to communicate between a user’s phone and the SMAC robot (Supplementary Figure 1).

Once communication to the SMAC robot has taken place, implementing the proposed educational kit in the market will allow open access for the public to enjoy the SMAC robot and meet the specific user’s needs. Furthermore, it has potential to impact the generation as a product to encourage technological interest in young adults and children. This would be achieved by providing a user friendly, engaging, and educational tool.

MATERIALS AND METHODS.

Bluetooth and Robot Communication Setup.

The current STORM Lab Modular Architecture for Capsules (SMAC) robot is programmed using the Embedded Workbench for 8051, developed by a Swedish computer software company, IAR. The workbench is equipped with a C/C++ compiler and C-SPY debuggers as developing tool suites [1]. The IAR code was accessed to determine the JavaScript Object Notation ( JSON) commands used for exchanging data, storing data and for moving the SMAC robot. Specific commands in the IAR code were programmed to move the robot forward, backward, rotate left, rotate right, turn left, and turn right (Supplementary Figure 2). The specified JSON commands were to be recorded in order to be executed through the Bluetooth application, the desired form of wireless communication with the robot.

In order to have feedback interaction achieved, additional JSON commands were added to the IAR code derived from the same class. Feedback communication requires additional commands for the robot to interact with the application. The SMAC robot will be receiving JSON commands from the Bluetooth application and also send the added JSON strings to the Bluetooth Application. A second added JSON string was set to send an immediate command string to the application indicating movement or no movement from the robot. According to the feedback, a visual representation is shown in progress within the application.

Graphical User Interface Development.

Anaren’s Atmosphere Development Tool provides a designer with a graphical user interface working in combination with a code view that uses C and JavaScript software languages [4]. Anaren’s Atmosphere Multi-Sensor Development Board (MSDB) was used to program the Bluetooth chip located within the MSDB. The MSDB allowed for programming adjustments through accessing its terminal windows, in addition to the receiving and transmitting screens. To ensure connection between the MSDB and the application, a test trial was done with the preexisting demo project monitoring the peripheral Universal Asynchronous Receiver/Transmitter (UART) port of the module by installing a terminal emulator program in Windows, Tera Term. The transmitting end was visible through Tera Term under the serial configuration with a baud rate of 115200.

By analyzing pre-existing projects from Anaren, a fundamental idea was established to control a robot through the graphical user interface. The Robot sample found under the help menu of the Anaren Atmosphere Developer Tool was used as a base layout for the project. Adjustments in the graphical user interface to add images and complex buttons to work in cooperation with the Code View code were achieved by mimicking properties in the images to be visible when pressed and invisible when released. However, the interaction between the robot and the application needed to be adjusted to communicate between the UARTs. The preexisting UART class in the Anaren code suite allows the application to write via the UART port. This class was able to write on the UART port to send commands to the SMAC robot as a common command line. The commands executed were the JSON strings the SMAC robot read (Supplementary Figure 2). UART command functions, connected and in disconnected functions, were added for a user to distinctively and visually recognize if the robot was connected. These commands turn on an LED light located on the SMAC robot when a successful connection has been made and turn off the LED light when the connection has been lost. Commands were designated to their button function in the Code View window in the Atmosphere Anaren as the graphical layout was programmed in the Designer View.

Feedback was analyzed when a button is pressed, sending a JSON command to the AIR_UART_Write function where it is received in the SMAC’s RX buffer, this is seen in the Tera Term, and executes to command. Once the SMAC robot receives the command, it sends out a command stating whether its motors are off or motors are on. It is then retrieved by the application as feedback by calling the RX using AIR_UART_RegisterRXCallback library class. Once it reads the string, it uses the library class of ATMOSPHERE_NotifyFunction to notify the phone and send the string to the phone, the application in the phone should analyze whether the motors are on by specifically reading the last character. According to the feedback, the image of the SMAC robot in the app would rotate its tire 40 degrees until the application read the motor command as off.

Network Connections.

A computer was used as a power source for the MSDB. Once codes were uploaded, the application was tested using two different SMAC robots, each connected to their own phone via Bluetooth. Feedback between the application and the BLE Module are received and transmitted via Bluetooth. JSON commands are interpreted in the application when received (Figure 1). The BLE Module is connected to the SMAC robot via 802.15.4 Wireless programming preexisting in the current SMAC Module.

Yasmin Alvarado-Rayo - Alvarado-Rayo_figure01_large (1)
Figure 1. Diagram of the communication between the Smartphone and SMAC robot is visually represented. A battery module is always needed for power source to the Bluetooth module and base module. JSON commands are sent to the Bluetooth module. The Bluetooth module sends the JSON command through a channel specific to the Base Module.

RESULTS.

Anaren’s Atmosphere Tool Development allowed for the construction of a friendly graphical user interface application (Figure 2). The SMAC robot image was added for visual feedback. When feedback is returned from the SMAC robot to the phone application, the wheel of the SMAC robot image rotates consistently to the right until feedback indicates there is no motor movement on the SMAC robot.

Yasmin Alvarado-Rayo - Alvarado-Rayo_figure02_large (1)
Figure 2. Phone application screenshot. The arrows function as buttons a user may press to command the SMAC robot’s movement. The SMAC robot image on the bottom left corner is the visual representation of feedback the application receives. The visual code was constructed under the code view.

In addition to the graphical interface, Anaren Atmosphere provides a connection window allowing the user to scan all Bluetooth devices and select the device desired as shown in Figure 3. The Development Tool allows the user to customize the Bluetooth chip’s name which will be shown in the connection window in the application once the Bluetooth chip is on. Once a user selects his/her device, the device is connected to the smartphone and the other users may be unable to connect to this specific device.

Yasmin Alvarado-Rayo - Alvarado-Rayo_figure03_large (1)
Figure 3. Connection screenshot the application provides. A user selects the desired Bluetooth module named according to the robot it pertains to.

Multiple tests were executed to determine all necessary elements processed correctly in the application (Table 1). JSON strings, command lines, were executed properly and the SMAC robot moved according to the command sent. Feedback was distributed back to the application and the application represented it in the SMAC robot’s wheel.

Table 1. Results of the independent tests conducted. Each objective’s test was described and processed correctly on the application.
Objective Tests Results
Sending JSON Strings Adding a button functionality to the app and sending the string when pressed/released JSON string appeared in the terminal of the receiving port (SMAC Robot)
Movement Once the string was sent, the SMAC robot would translate it as a command The SMAC robot would move according to the string
Feedback A second JSON string would be sent to the App indicating movement or no movement The command would appear in the application
Visual Representation According to the feedback, the image of the SMAC robot in the app would move its tire When the robot moved, the wheel would rotate indicating feedback and vice versa

DISCUSSION.

Anaren’s Atmosphere was successful in providing the base software environment for the creation of the phone application. The Bluetooth hardware module also provided the Bluetooth connection platform in the SMAC robot when connected. The application had two dual windows for the Bluetooth connection and the SMAC robot control buttons. The dual windows graphical interface is user friendly and pre-established by the open source Anaren software. By default, the connectivity window is in the application when connection button is pressed. SCAN and CONNECT buttons are present and the Bluetooth Modules are listed.

All functionalities were carried through the Anaren’s Atmosphere Tool. All necessary functions were successfully implemented (Table 1). The feedback of the SMAC robot and the commanding JSON strings being sent from the buttons pressed in the application were successfully established. Anaren’s accessibility as open source technology was successfully used in the development of an open source application to control an open source robot, SMAC robot. This open source availability differs from already existing products, VEXRobotics and LEGO Mindstorms EV3, that limit the exposed content either on copyright or affordability [5]. By maintaining the open source fundamental aspect, the SMAC robot and application far pass the present products by allowing options for teaching and engaging students through customizability.

FUTURE  DIRECTIONS/CONCLUSION.

Adding feedback of different sensors to the application would be ideal to establish a fully working application taking in consideration all aspects of the robot. The SMAC robot itself offers modules of different sensors that could be easily incorporated into this application. These sensors include temperature sensors, accelerometers, gyros sensors, barometer sensors, battery life sensors, etc. [1]. All aspects of the robot would be encompassed in the application for ideal teaching purposes and engaging users.

Applying the fully working application and SMAC robot to classroom environment settings to teach coding or engineering will be looked into next. The first step to establish the product in classrooms will be to have funding to construct the SMAC robots and in providing the material. Targeting how the product will work to teach students will be looked at as well. Because of the product’s open source establishment, how the product will be used as teaching modules will be analyzed. A variety of lesson plans and tutorials will be constructed to engage students in technology and also learn from the engineering aspect.

Establishing the application and SMAC robot as a product for the potential to be distributed would also be ideal to raise the engaging aspect of technology. The product would be greatly distributed continentally and possibly internationally increasing the fundamental learning and engaging aspect of technology.

The Bluetooth Application was created successfully in an open source platform. Commands to the robot are received and feedback from the robot is retrieved in the application triggering the wheel movement on the app. The Anaren Atmosphere Development Tool is in need of improvement for the consistency of maintaining created projects. Over time, the website begins to tweak the applications it has saved in its server. However, in building and providing a user-friendly, engaging, and educational tool, in this case, the application and SMAC robot should still fundamentally encourage technological interest in young adults and children.

ACKNOWLEDGMENTS.

I would like to especially thank Ashley Peck, who was a part of this project, for her tremendous help and patience; my mentor, Ekawahyu Susilo for his guidance; Dr. Valdastri and the STORM Lab for giving me the opportunity to contribute in their research; and Dr. Weeden-Wright and the SSMV for their support and establishing me with this opportunity.

SUPPORTING  INFORMATION.

Yasmin Alvarado-Rayo - Alvarado-Rayo_supplemental01_large (1)
Figure S1. Diagram of the Bluetooth module from Anaren Atmosphere is being implemented in the connection between a Smart phone’s application to the SMAC robot.

Yasmin Alvarado-Rayo - Alvarado-Rayo_supplemental02_large (1)

Figure S2. JSON executable commands featured in the SMAC robot IAR code.

REFERENCES.

  1. Beccani, E. Susilo, C. Di Natali, P. Valdastri, SMAC — A modular open source architecture for medical capsule robots. International Journal of Advanced Robotic Systems 11, 1-16, (2014).
  2. VEXROBOTICS-Innovation First www.vexrobotics.com (2002).
  3. Mindstorms-The LEGO www.mindstorms.lego.com (2013).
  4. Low-Power Bluetooth Smart Development Kit from Anaren-BROADCOM. anaren.com/airforwiced/anaren-bluetooth-smart-development-kit (2015).
  5. Anaren Atmosphere-BROADCOM. anaren.com (2006).

Posted by on Tuesday, May 24, 2016 in May 2016.

Tags: , , , ,