LoRa Logistic Service

An IoT application to create an online to offline logistic service for a self-driving car with LoRa technology

  • Project Period: Jul. 2016 - Jun. 2017
  • Project Duration: One Year
  • Project Supervisor: Yuh-Shyan Chen
  • Project Type: Group Project

Introduction

* This project is funded by College Student Research Scholarship, Ministry of Science and Technology, Taiwan and won the first place in the senior project competition at NTPU
After the emergence of the Internet of Things(IoT), many people notice about wireless network technology. LoRa technology, a low-power, wide area network technology, opens an opportunity to transmit data from a remote place to server. With this technology, more and more embedded systems can be established in our daily lives. In this project, we present a LoRa Logistic Service, an online to offline service for users to send packages to a destination through a mobile app and a self-driving car system with LoRa Technology. The goal of the project is to reduce human cost of sending packages and implement the proof of concept of lauching a logistic service on campus in order to achieve "Smart City". 

System Architecture and Design

There are four parts in our application- a LoRa gateway, a mobile app, and a server, and a self-driving car.

  • Server:
    ​The server is the main part of our application. The sever can send the data to the mobile app and LoRa gateways as a notification while arrivals of the time that users register a delivery service. It also connects to a database to store the records and arrange schedules.
  • LoRa Gateway:
    The role of Lo​Ra gateway is the mid point of the server and the self-driving car. The LoRa gateway can communicate with the server through a tranditional wired/wireless network, such as Wi-Fi or Ethernet. The gateway also embedded a LoRa module can deliver the signals back and forth from the server to the self-driving car.
  • Server:
    ​The self-driving car is an improved version of an electronic wheel car. It includes a GPS module, a LoRa module, a Raspberry Pi, and a control handle. The LoRa module can receive messages from LoRa gateways to get a notification which requests from a user. GPS module tracks the position of the car and calculate the path from a start point to a destination with an improved A* algorithm.
  • Mobile App:
    ​Mobile app serves as a medium for user to register our service. It includes an account system to maintain users' data from the service.​​​ User also can track orders, register the service, and look for history records in the app.

In the system, we settle a "state" mechanism to manage the car status in the service. The car has five different states while working. 

  1. Establish the Order
  2. When the car arrives at a sender's location, the car wait for a sender to give a package
  3. After the sender give a package, the car is going to a receiver's place
  4. When the car arrives at the receiver's location, the car wait for the receive to get the package
  5. The receiver successfully get the package and the car complete the task.

The communication between the LoRa gateway and the car is through LoRa wireless network. Data can easily be deliveried in a long distance with merely one base station. For the 59 area of acres on campus, we merely settle one LoRa gateway to transmit data between the car and gateway back and forth. However, there is still a problem for data transmission. The data transmission between the gateway and the car relies on UDP protocol, which means the data is possibly lost in the procedure. To address issue, we implement a mechanism of reliable data transfer 3.0(RDT 3.0) to resolve the problem of losing data.

System Architecture and Design

​From our senior project, we built up a mobile app from prototyping to a real application (Flows are showed as below). Prototyping is an indispensable process of creating an Android application. We can clairfy user requirements, collect user opinions, and reduce developing time cost with app prototyping.

My Role In The Project

There are two parts of works in my senior project. For the first part,  I conducted research in how to use LoRa module with Raspberry Pi to send and receive data. I cooperated with another group member to complete the experiment to make sure the data can be sent and receive through all campus. I discovered that the gateway should be installed in a high place, where can avoid losing data sent by LoRa gateway. For the second part, I created a gateway program which data can be delivered between a self-driving car and a gateway through LoRa and between a server and a gateway with wireless network by TCP socket. Besides, I also served as user interface designer and Android developer to design and complete the Android app.

Review

From this project, I learned how to cooperate with others to create a technology application from zero to one. We converged diverse applications (like.. mid-point signal transfer, LoRa weather box, and LoRa vending machine) into our final application. I also devled in to the area of network systems and utilized my understanding in network systems to implement the protocal. In a long period of project development, we even use Git to maintain our project efficiently. Moreover, the LoRa application made me get concepts of coding with terminal and use command line in an embedded system. I also deepen the knowledge of creating a prototype and developin an Android app.