Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Intel IoT Path to Product: Transportation Project Case Study

16 Sep 2015 1  
Using the Intel® IoT Commercial Developer Kit to Monitor Status Inside a Semi-Truck Trailer

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Get access to the new Intel® IoT Developer Kit, a complete hardware and software solution that allows developers to create exciting new solutions with the Intel® Galileo and Intel® Edison boards. Visit the Intel® Developer Zone for IoT.

Disclaimer: This device has not been authorized as required by the rules of the Federal Communications Commission. The device is not, and may not be, offered for sale or lease, or sold or leased, until authorization is obtained.

Introduction

In this project, the goal was to both build a functional proof of concept based on the Intel® IoT Commercial Developer Kit and the more basic sensors contained within, and then progress to an Industrial solution that uses a commercial gateway, industrial sensors, McAfee Security and a Wind River based platform for a scalable product deployment. The base project is in the Transportation sector with the desire to monitor the status inside a semi-truck trailer that would be hauling perishables and to alert the driver if the temperature exceeds thresholds set by the driver.

The proof of concept will be built on an Intel Galileo board using a base shield with various sensors to be attached. The sensors chosen at this stage are contained within a standard Grove Seeed– Starter Kit Plus*.

Figure 1 The finished product demonstration with custom trailer housing

By the end of this paper you will see the transition from a basic proof of concept to an industrial solution that emphasizes a quick and easy way to see the Wind River operating system and adjoining hardware come together rapidly. Using a precompiled OS as well as RPM’s helps to eliminate unnecessary downloads, having to customize the OS and identifying libraries necessary to bring a project to life.

Creating the Use Case

A team was formed for the purpose of demonstrating the capabilities of the Intel® IoT Commercial Developer Kit as well as Intel® IoT Commercial Gateways as part of a use case. The team decided that a transportation use case focusing on maintaining freshness of perishable items during transport.

This project was devised based on the likelihood of similar projects being conjured and potentially built in the market. While the base project was designed with basic functionality, it can be shown that a variety of features could be added, and the project expanded (future) to have web connectivity, cloud capabilities, remote monitoring and other sought after components.

Following the project focus area the team listed potential features for the proof of concept and the product. A variety of ideas were listed to include rear door status, temperature of the trailer, alarms for the door and the temperature, online application to view data, and in-cab monitoring of information.

To begin the proof of concept phase an Intel® IoT Commercial Developer Kit was specified for use which includes a Grove Seeed Sensor kit. As a challenge, this phase was limited to just the sensors available within the kit. All functionality would need to be achieved based on real world usage of the Developer Kit.

Figure 2 Intel XDK project for Microsoft Surface Pro 3 interface

Proof of Concept using the Commercial Developer Kit

As a team we broke the project into 3 key areas:

1. Desired User interface

  • Had development team start working on the actual production UI layout and design

2. Interface to host the UI

  • Began working on the what we would use as the final solution.
  • We realized we would need to make changes as we integrated Industrial solution.

3. Proof of Concept sensor solution

  • Create a working a solution with the Grove Sensors and utilizing the UPM/MRAA libraries for rapid development.

-This allowed us to create a mock sensor environment for the UI and Interface team to use for development

Figure 3 The mock sensor environment

By separating the project out we were able to progress through the proof-of-concept (POC) stage much faster by utilizing skillsets where they mattered most. The user interface was important, and needed the most time to be designed and implemented. It was started early so that completion by our deadline could be realized.

The second key area was quite beneficial in that we looked at what the final functional POC was going to potentially be built with, and then made decisions in the early POC process looking to the future. Overall we were able to simplify the sensor choices since we knew that the door sensor would be simple. This allowed increased focus on proper utilization of a temperature sensor on a small and then commercial scale.

By utilizing the Grove Sensor Kit, we were able to rapidly create a POC with a functional sensor environment for the UI team to work within. This enabled layout and design elements to come to life quickly and provided a future framework for the final functional use case.

Figure 4 Developer kit with selected sensors enabled

The Use Case was built upon the following scenario:

  1. Press button to start the use case (simulating opening the door)
    1. Sets threshold ambient temp +5 degrees
    2. Solid red LED lights up in cab
    3. LCD: current temp and door status: open

Figure 5 Showing door status

2. Touch temp sensor to raise ambient room temp

3. >+5 degrees

  1. Buzzer sounds
  2. Red LED blinks continuously
  3. LCD turns red: actual temp: xx, door status: open

Figure 6 Showing high temp status

4. Touch sensor

  1. Acknowledge = turns off buzzer

5. Press button to close the door

  1. Red LED continues to blink till temp gets below threshold
  2. LCD alert: temp: xxdoor status: closed
  3. When Temp reaches below threshold blinking Red LED turns off and solid Green LED lights up LCD turns green
  4. LCD: temp: xx, door status: closed

Simulation: Reduce potential loss of temperature sensitive cargo by monitoring temperature changes and alerting the driver

Figure 7 Log file showing events

Figure 8 Base online view as envisioned

The following table outlines the sensors intended to be used:

Target commercial solution

With an operational POC based on the Intel IoT Commercial Developer Kit it was necessary to determine how to proceed into a commercial solution. There are many Commercial Gateways available, each designed slightly different for a variety of industries. Our major concern was IO options, essentially, how we would hook our sensors up to provide a data feed.

An Intel® IoT Commercial Gateway was chosen for the Gateway device on the product portion of this project. The processing power, and IO functions were deemed sufficient for the presented commercial usage.

A wired Modbus temperature sensor was deemed necessary to have a reliable connection to obtain temperature readings every several seconds. All communications on devices were all performed via direct wiring, or via Ethernet. Standard MRAA/UPM libraries were maintained throughout the process without any modifications.

The gateway acts as the webserver to the stored data as well as making calls to the temperature sensor to keep the data fresh. To accomplish this curl calls update the webserver direct from the temp sensor which was written in C using the libmodbus library.

Figure 9 Gateway installed as part of demo with temperature sensor

Transferring code to the Gateway

Normally ramping up to a commercial gateway involves having to revamp code so that it is compatible with whichever services are available on the system. In this case, the coding on the proof of concept was all performed in Python*, HTML and Javascript* which made it simple to bring over to the commercial side. There was no issues in regards to the code running as the same MRAA/UPM libraries were available to tap into.

Mapping Grove sensors to industrial sensors - Using MRAA/UPM libraries to jump start a project

Steps on porting app to the commercial product solution

  1. Target desired Industrial hardware
    1. Determine if hardware requires additional libraries or application support
    2. If needed integrate libraries/Software
      1. Create WR layers for software deployment
  2. Once commercial product hardware is working integrate into existing solution removing code for previous solution
    1. Utilize existing layers created during proof of concept to install solution dependencies.
      1. Make changes as needed for new hardware
  3. Take new and old layers and build into WR runtime

To finished product on Intel® Gateway - App install, testing

Setup Guide

Adding the Intel® Galileo to the Gateway’s network

In the short amount of time allowed we used a Galileo Gen 2 as a sensor hub (controller), this is not ideal but it is recommended that an industrial grade controller be used in its place. This can be achieved using the Ethernet ports on the two devices and a network cable. Since the Ethernet interface (eth0) on the gateway is configured for WAN access, some additional configuration steps are required. Assigning static IP addresses to both devices will work, but since DHCP is installed on the gateway we can eliminate additional steps required on the Galileo and work with an automatic configuration.

  • On the gateway do the following:
  1. ifconfig eth0 10.0.0.1 netmask 255.255.255.0 up
  2. Add to /etc/dhcp/dhcpd.conf:
subnet 10.0.0.0 netmask 255.255.255.0 {

range 10.0.0.100 10.0.0.120;

option routers 10.0.0.1;

}
  1. Run dhcpd to start the DHCP server
  • On Galileo, you might need to bring the interface down then up again:
  1. ifconfig enp0s20f6 down
  2. ifconfig enp0s20f6 up
  3. Test with a ping.

The configuration steps above are not persistent and will be required again after a gateway reboot. In order to make the changes permanent, perform the additional changes as listed.

  • On the gateway do the following:
  1. Modify the wan interface /etc/config/network:
config interface ‘wan’

option ifname ‘eth0’

option proto ‘static’

option ipaddr ’10.0.0.1’

option netmask ‘255.255.255.0’
  1. Enable auto start of dhcpd on eth0 with: systemctl enable dhcpd.service

Note that placing the wan interface in static mode means that the gateway cannot be used to connect to an external network using the eth0 port anymore without reverting these changes. Also, port forwarding and routing between the WiFi network and eth0 will be enabled by default.

This project was presented as part of the Intel Developers Forum 2015. Read about important announcements at IDF on Bill Pearson's blog. Additionally, find out more about flexible scalable solutions. If you would like to find out more about the Intel IoT Commercial Developer kit it can be found here at Developer Kits.

Intel® Developer Zone for IoT

Start inventing today with the Intel® IoT Developer Program which offers knowledge, tools, kits and a community of experts to quickly and easily turn your innovative ideas into IoT Solutions.

Dream it, Build it with the Intel® IoT Developer Kit for Intel® Edison and Intel® Galileo platforms. These kits are versatile, performance-optimized and fully integrated end-to-end IoT solutions supporting a variety of programming environments, tools, security, cloud connectivity and hardware.

For more resources and to learn how the new Intel® IoT Developer Kit v1.0 can help streamline your IoT projects:

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here