Introduction: Mobile Platform With IoT Technologies

The following steps describe how to assemble a simple mobile platform and include some IoT technologies for controlling this platform remotely. This project is part of the Assist - IoT (Domestic Assistant with IoT Technologies) project developed for the Qualcomm / Embarcados Contest 2018. For more information about the Assist IoT project, refer here.

The scenarios below represent some situations that this project may be used in a home environment:

Scenario 1: An elderly person who lives alone but who eventually needs some support to take medicine or needs to be monitored if necessary. A family member or responsible person can use this mobile platform for frequent or sporadic monitoring and interaction with the elderly person;

Scenario 2: A pet that needs to be left alone for 2 or 3 days because its owners have traveled. This mobile platform may monitor the feed, water and help the owners to talk to the animal so it does not get too sad;

Scenario 3: A parent who needs to travel may use this mobile platform for monitoring his or her young child or baby (that is taken care by another family member or responsible person) and even for interacting with the young child.

Scenario 4: A parent who needs to be away for a few hours may use this mobile platform for monitoring his or her son or daughter with physical or mental impairment. This son or daughter must be taken care by another family member or responsible person.

In all of the above scenarios, this mobile platform may be remotely controlled by moving to the place of the home where the person or pet to be monitored is located.

Through its onboard sensors, this mobile platform may measure ambient variables of the place where the person or the pet that is being monitored is located. With this information available in a web application, devices may be remotely triggered, regulated or disabled to suit the environment according to the needs of the monitored person or pet.

Step 1: Selecting the Material That May Be Used to Assemble the Mobile Platform Chassis

The mobile platform may be assembled using the material presented in the pictures above as the following:

  • one module with two wheels and two DC motors connected in each wheel;
  • two wheel supports for free direction;
  • three plastic sticks, bolts, nuts and washers.

Step 2: Assembling the Mobile Platform Chassis

The mobile platform chassis may be assembled as shown in the pictures above.

Some holes may be made in the plastic sticks with a drilling machine.

These holes are used to fix the plastic sticks with the module with two wheels and with the two wheel supports, by using the bolts, nuts, and washers.

Step 3: Using Some Spare Parts to Fix a Raspberry PI (and Other Devices) on the Mobile Platform for Image Capture and Transmission

The pictures above show some spare parts used to fix a Raspberry PI on the mobile platform.

A webcam and a WiFi USB adapter may be connected with the Raspberry PI for image capture and transmission in this project.

Further steps present more information about the image capture and transmission in this project.

Step 4: Assembling a L293D Module for DC Motors Control and Fixing It on the Mobile Platform

An L293D module (as shown in the first picture above) may be assembled to control the DC motors of the module with two wheels.

This L293D module may be based on this tutorial, but instead of connecting it with the Raspberry PI GPIO pins, it may be connected with another IoT development board as the Sierra mangOH Red board.

Further steps present more information about the connection of the L293D module with a mangOH Red board.

The second picture above shows how the L293D module may be fixed on the mobile platform and the connection with the DC motors.

Step 5: Fixing and Connecting the MangOH Red Board on the Mobile Platform

The first picture above shows how the mangOH Red board may be fixed on the mobile platform.

The second picture shows how some GPIO pins from the CN307 connector (Raspberry PI connector) of the mangOH Red board are connected with the L293D module.

The CF3 GPIO pins (pins 7, 11, 13 and 15) are used to control the DC motors. For more information about the CN307 connector of the mangOH Red board, refer here.

Step 6: Fixing the Battery Support on the Mobile Platform

The picture above shows how the battery support may be fixed on the mobile platform. It shows also the connection of the battery support with the L293D module.

This battery support may be used for the DC motor power supply.

Step 7: Implementing a Web Application for Supporting IoT Functionalities

The first picture above shows a web application example, called AssistIoT web application in this project, that may run in Cloud for supporting IoT functionalities.

This link shows the AssistIoT web application used in this project, running in Firebase, with four functionalities:

  • video stream captured by a webcam on the mobile platform;
  • remote control of the mobile platform movements;
  • environment variables measurement from the mobile platform onboard sensors;
  • remote control of domestic devices in a home place.

The source code of the web application example used in this project is available here.

This web application example may use technologies like HTML5, CSS3, Javascript, and AngularJS.

The second picture above shows a diagram of blocks representing how the four functionalities may be supported in this mobile platform project.

Step 8: Implementing the Video Stream Captured by a Webcam Functionality

The picture above shows a web application (called webrtcsend in this project), also running in Firebase, that provides video stream captured by a webcam and transmits to another web application (AssistIoT web application in this project).

In this project, the Raspberry PI is connected on the internet through a WiFi USB connector. When a web browser running in the Raspberry PI connects with the webrtcsend web application and the Call button is pressed, the webcam connected with the Raspberry PI is accessed and a video stream is transmitted to the AssistIoT web application.

The webrtcsend web application implementation was based on this tutorial and its source code is available here.

The mobile platform project may use a Raspberry PI version 2 or later, with a Raspbian image from March/2018 or later.

This project also used an ELOAM 299 UVC – USB webcam and a Netgear WiFi USB connector.

Step 9: Preparing the MangOH Red Board

The mobile platform project may use the mangOH Red board for supporting the other three functionalities:

  • remote control of the mobile platform movements;
  • environment variables measurement from the mobile platform onboard sensors;
  • remote control of domestic devices in a home place.

An overview of the main features of the mangOH Red board is here. More details about this board are described here.

For preparing the hardware and firmware of the mangOH Red board to be used in this project, all the steps available this tutorial must be followed.

Step 10: Testing the MangOH Red Board M2M Communication With the AirVantage Site

One of the main features of the mangOH Red board is the support for M2M via 3G technology.

Once the mangOH Red board is properly configured and its SIM card is registered in an account of the AirVantage site (here), the connection with the IoT Cloud is allowed.

For more information about the AirVantage site, access here.

The pictures above show the communication between the mangOH Red board and the AirVantage site. In this test, the mangOH Red board sends data (as the measurement of the onboard sensors) to the AirVantage site using the redSensorToCloud application example.

Step 11: Using the AirVantage API for Getting the Environment Variables Measurement

The picture above shows the data of measured environment variables available in the AssistIoT web application.

These data were gotten through the API provided by the AirVantage site. For more information about this API, access here.

Only the mangOH Red onboard sensors were used in this project. Therefore the sensors data were adapted to be shown in the AssistIoT web application:

  • Temperature: the temperature onboard sensor measures the processor temperature. This value is subtracted by 15 to represent a normal temperature of a room;
  • Light Level: this value is converted to a percentage value;
  • Pressure: this value is converted to a percentage value and represents a humidity value of a room.

Step 12: Adapting the RedSensorToCloud Application Example for Supporting the Functionality of Remote Control of the Platform Movement

The redSensorToCloud application example may be adapted for supporting the functionality of remote control of the mobile platform movement in this project.

Using the "Set LED Interval" command available in the redSensorToCloud application, as shown in the second picture above, it is possible to send to the mangOH Red board different values and map them for different applications.

For example, for the remote control functionality, the SetLedBlinkIntervalCmd function (in the "/avPublisherComponent/avPublisher.c" file) was changed the control the direction of the mobile platform movement.

As commented in step 5, the CF3 GPIO pins (pins 7, 11, 13 and 15) are used to control the DC motors. Therefore the following logic is used:

Direction Control:

1 – forward: gpio22 and gpio35 in high mode

2 – backward: gpio23 and gpio24 in high mode

3 – right: gpio24 and gpio22 in high mode

4 – left: gpio23 and gpio35 in high mode

The source code based on the redSensorToCloud application example and adapted for the mobile platform project is available here.

Step 13: Adapting the RedSensorToCloud Application Example for Supporting the Domestic Devices Remote Control Functionality

The redSensorToCloud application example may be adapted for supporting the domestic devices remote control functionality of the mobile platform project.

Using the idea of step 12, the "Set LED Interval" command available in the redSensorToCloud application may be used to control different applications in the mangOH Red board.

Step 14: Demonstration of the Implemented Functionalities

This video presents how the Mobile Platform with IoT Technologies project may work after following all the steps before.