Modbus RTU to Cloud Gateway Development with IP40 Enclosure

CASE STUDY SNAPSHOT

Customer : A start up in industrial automation sector
Size : < 50
Project vertical : Industrial Automation
Challenge : Develop a Serial IoT Gateway to collect information from Modbus Server and custom protocol interface devices
Solution : Design and develop a NXP LPC5516 based Modbus RTU to Cloud Gateway with storage capability with IP40 Enclosure
Services Availed :  Turnkey Product Engineering, RAPIDSEA Modbus Stack, Embedded Application Development, DFM Services
Tools and Technologies :
  • MPU/MCU: NXP LPC5516
  • Framework: RAPIDSEA
  • Programming Language: C
  • Compiler: GCC
  • Tools: MCU Expresso

INTRODUCTION

With its leaders working in the industrial automation domain for over 2 decades across different application areas, Embien is a leader in offering product engineering services meeting the demands of the domain. One of our acquaintances passed on a customer reference who is setting up their startup in the field of industrial automation products. This product is a Serial IoT gateway to be deployed in remote areas. Either Modbus devices or custom protocol devices will be connected. The acquired data from the Modbus RTU to Cloud Gateway must be uploaded to a cloud interface.

CHALLENGE

There were two primary challenges in the Modbus RTU to Cloud Gateway development. One is the cost. Being a competitive market with many players working on similar products, the cost of the product had to be low. Second, being used in critical applications, there must be no loss of data even if the cloud connectivity is down for whatever reasons. Further the customer was worried about re-configuration and rolling out new features later as these devices were deployed across a wide geography and in remote areas that are difficult to access.

SOLUTION

Having made many such products for various applications, Embien’s team was able to quickly identify the challenges and come up with the solution. It was planned to develop the product over 2 versions – one for prototyping to validate the functionality and another one optimized for cost and manufacturability. Remote Configuration Over the Air (COTA) and Firmware Over the Air (FOTA) updates were planned to enable gateway management from convenience of the office workstation without having to travel far. Finally internal SD card was planned as backup device for data storage.

Embedded Hardware Design

Embien’s embedded hardware design team kick-started the prototyping phase of Modbus RTU to Cloud Gateway, worked on the design and zeroed in on LPC5516 based design. The MCU offered enough processing power and peripheral set to match the product requirements. A 4G model was selected for cloud communication. Configuration storage was done over EEPROM connected over I2C and data storage on SD card connected over SPI interface. An RS485 transceiver was provided for serial connectivity. Even during the prototyping stage, the BoM cost was kept as low as possible. Care was taken to ensure compliance for CE certification and routing done to minimize the effects. The PCB form factor was matched with enclosure design by closely collaborating with their mechanical design team.

IP40 Enclosure Design

The mechanical design team worked with industrial design partners and came up with multiple enclosure designs. Various factors like ease of mounting, cost of manufacturing, provisions for modifications etc. were considered during the process. With close collaboration with the customer one of the designs was finalized. It was designed to be an IP40 rated enclosure to prevent access to solid objects inside it. SLA based prototyping was done and branding done to match the customer expectations.

Firmware Design

Our software design team started the design and worked on the EVK kit available for the MCU. It was designed with FreeRTOS OS with clearly defined tasks each handling one aspect of the functionality. It was decided to take advantage of the proven RAPIDSEA Modbus Stack. In Modbus mode, RAPIDSEA Modbus Client stack was used to send Modbus requests on to the RS485 line and response received is processed and converted to physical units. Another mode for custom protocol was provided where a pre-defined request packet is sent for which the response received is parsed and information extracted.

IoT Cloud connectivity

The 4G modem, connected over UART, was utilized to send the data to the IoT cloud. It was decided to use MQTT protocol for data communication. Apart of the telemetry, another topic was used to push the notifications for availability of configuration data and new firmware update. If messages received over these topics, the IoT gateway reads either the update file or the configuration data over HTTPS interface and utilizes it. The connection to the cloud was secured with some of the advanced security mechanisms including TLS backed by asymmetric encryption algorithms.

User Interface

Even though there was practically no requirement for user interface, it was decided to provide an USB interface for local configuration and update operations of the Modbus RTU to Cloud Gateway. The configurations can be generated with the customer’s Windows based configuration tool and the same can be downloaded over the USB interface directly on to the device. Even firmware updates can be performed via the same. It was also made possible to download the accumulated data over the interface to the tool. Three LEDs were given to indicate internal status to the user including serial connectivity, cloud connectivity and error conditions.

Store and Forward Mechanism

One important requirement from the customer was that there should be no loss of data even if there was no internet connection for prolonged intervals. Our team integrated SD card interface and the collected data, if cannot be pushed on to the cloud, was stored in the SD card over file system. Later once the cloud connectivity was up, the data was transmitted to the same with priority for the real time data and historical data sent after that.

DFM and Value Engineering

The prototype was thoroughly validated by our QA team and tested for both functionality and performance. The gateway was run for multiple days altogether and multiple error conditions simulated. After that, about 50 prototypes were manufactured and deployed to the field for validation. Some of the issues detected in the field were identified and corrected. Once the results were satisfactory, our team entered the phase of value engineering where the BoM was optimized to meet the highly competitive price targets. PCB form factor was reduced, and Design for Manufacturing practices were followed. The final hardware was designed and once again validated before taking the Modbus RTU to Cloud Gateway for mass production.

BENEFITS

With this Modbus RTU to Cloud Gateway development, Embien offered the following benefits to our customer.

  • Complete development of the Serial IoT gateway including hardware design, PCB layouts, embedded firmware development, and IP40 Enclosure Design.
  • Reduced the manufacturing cost through Value engineering and DFM practices.
  • Reduces cost of ownership by enabling remote configuration and firmware update support.
  • Ensured no data is lost due to loss of cloud connectivity by leveraging Store and Forward design.
  • Shorter development cycle by using the proven RAPIDSEA Modbus Client stack.
  • Extensive documentation including SRS, architecture documents, design documents, developer manual, acceptance test plan, test reports, etc. and thoroughly reviewed code.

CONCLUSION

With our support, the customer was able to design and develop a highly cost-effective Modbus RTU to Cloud Gateway and ensured business continuity for their end-customers by advanced remote management support. This is one of the many success stories we have been part of in the industrial automation field. Our rich expertise in industrial stacks like RAPIDSEA Modbus Stack, BACnet, Ethernet/IP, Profibus, CANOpen, ProfiNet have helped customers in faster product realization especially for cross-protocol converters.

Are you looking to develop sturdy industrial devices in IP40 Enclosure Design?
Speak to the team that did the Modbus RTU to Cloud Gateway with RAPIDSEA Modbus Stack!