+1 224 836 1572   +91 80563 33955

Saravana Pandian Annamalai
30. May 2017 · Write a comment · Categories: Embedded Software, Sparklet GUI Library, Technology · Tags: ,

Embien has been working on various types of embedded systems including those powered by FPGA’s for a variety of applications. Of late, there are a lot of requirements for GUI Application development on FPGAs for user interaction. In this blog, we introduce our Sparklet embedded GUI library along with our Flint FPGA UI Interface Editor for enabling FPGA for graphics. Also Sparklet running on a Linux powered Intel Cyclone V SX SoC FPGA is demonstrated with a Terasic DE1-SoC-MTL2 kit.

FPGA GUI Application Development

Modern FPGA’s have a multitude of IPs to handle different peripherals interfaces. Most of these FPGAs, called SoC FPGAs have an internal microcontroller core as a hard IP around with LEs are placed for configuration and customization.

Such a design warrants a powerful user interface for communication with the user for a seamless experience. Full fledged Intuitive GUI application development ecosystem is the need of the hour to enable a faster time to market. Developers need to dedicate their effort on FPGA and internal logic developments rather than working on nitty-gritty of FPGA GUI application development.

Sparklet – embedded GUI library is the right fit for such a FPGA based GUI development. Written purely in ANSI C, Sparklet can be ported across platform with minimal effort. The GUI Application development can be done using our Eclipse based Flint tool that supports Windows based emulation as well. The FPGA UI Interface Editor tool generates ‘C’ source files and headers that can be compiled in to the project to get a fully working application within a very short time.

Sparklet being a very modular and extensible design, it is also possible to take advantage of the Graphical acceleration engines with Sparklet to improve the rendering speed and quality.

Sparklet GUI on Intel Cyclone V FPGA

This demo of the Sparklet GUI library runs on a Intel Cyclone V SX SoC FPGA. Some of the salient features of the FPGA include

  • Dual-core ARM Cortex-A9 (HPS)
  • 85K programmable logic elements
  • 4,450 Kbits embedded memory
  • Fractional PLLs
  • Hard memory controllers
  • Multiple display interfaces
  • Multiple USB Host interface
  • Ethernet, UARTs, ADCs etc

The development kit from Terasic, DE1-SoC-MTL2 includes a DE1-SoC development board targeting Altera Cyclone® V SX SoC FPGA, along with a capacitive LCD multimedia color touch panel which natively supports five points multi-touch. The display is a 7-inch TFT LCD with pixel resolution of 800*480 and color depth of 16 million colors (8-bit RGB) along with a    LED backlight.

For such an FPGA based design, the underlying software can be designed with any of the following architectures:

  • Without an OS
  • With a minimal RTOS
  • With full fledged OS like Linux

Sparklet, providing design flexibility, is suitable for use with each of these approaches. The below demo showcases Sparklet running on top of Linux OS.

Though none-of the underlying Graphical engine features are not used in this case, it is possible to do so using the hardware acceleration engine changes.

Thus Sparklet along with Flint makes FPGA GUI application development a lot easier and enables developers work on core functionality there by reducing overall product development time.

About Embien: Embien Technologies is a leading service provider in the Embedded software domain. Our team has rich experience in working with various OS like Linux, Android, Windows CE, FreeRTOS, uC-OS, QNX etc. Learning from our experiences in various application domains, we have conceptualized and created the Sparklet Embedded GUI tool that can be used to develop UI’s faster and smaller.

Smart Metering

Today things are made smart and processes are becoming smart which enhances the life style of humans in many ways. One such example is the “Smart Metering”. All over the world, the mechanical energy meters are replaced by digital energy meters and currently advanced to smart meters which provide accurate results for greater period of time.

Digital energy meter is an electronic device that measures and stores the consumption of electric energy periodically and communicates the stored information to the provider (utility) via wired communication (Optical port, serial communication) as well as wirelessly for monitoring, analysis and billing. The wireless energy meters are referred as Smart Meters and most commonly used in industrial segments for various reasons and low end energy meters (wired communication) are used in domestic, commercial segments which supports digital interface such as RS232, RS485 serial communication.

Advanced Metering Infrastructure

Since the smart meters include wireless communication such as GSM/GPRS, low power radio, etc the readings can be updated in the central database from anywhere in the world and facilitates the customer (User) with plenty of information’s such as daily usage, peak demand, last interval demand, load profile, voltage profile, sag and swell events, phase information, power factor, tamper notifications, etc. This type of system is named as “Advanced Metering Infrastructure“(AMI). Such a huge amount of information is more important in building a smart grid by which the amount of power generation can be predicted based on power demands.

Automatic Meter Reading

Smart meters with AMI system are more advanced and expensive which makes them overrated for domestic segments. Similar to the “Advanced Metering Infrastructure” (AMI), Automatic Meter Reading (AMR) system is available as an automated way to collect basic meter reading from low end energy meters that are widely used in domestic segments where a system is required for collection only. AMR includes a handheld reading entry device where data from Smart Meters is acquired by connecting the device to the digital ports typically RS232 or RS485 serial ports using dedicated serial cables. The technician will have to plug these cables to the meter of concern and the handheld device will acquire the readings automatically. Likewise the technician will acquire data from each and every meter of his zone and the acquired readings are transferred to the central database for billing.

Though AMR has become common way of reading meters, it can be made more advanced. At present there are many wireless technologies available for small data transfer at very low costs. Among the various wireless technologies, BLE is the most popular. With the BLE enabled smart phones together with an Android app will simply replace the handheld AMR system which performs the similar functionality with wireless operation. Also a tiny BLE module with serial interface (RS232) like eStorm-B1 is sufficient to enable wireless connectivity for the energy meters.

Smart Metering using eStorm-B1 BLE Module

In previous blog, we have discussed in detail about eStorm-B1 BLE module application as a UART to BLE Bridge with a brief demo video. In this blog, we will demonstrate a Smart Metering application which can be realized by interfacing eStorm-B1 with energy meter via RS232 interface and by replacing the traditional handheld reading device with Smart AMR Android app running in Android smart phone with BLE connectivity.

The following video shows the demo of Smart Metering application,

In this demo, a digital energy meter is upgraded to a smart meter by adding eStrom-B1, an NXP KW31Z based BLE module via already available RS232 serial interface. In the other end, an Android Smart phone is equipped with a custom designed Android application “SMART AMR” which will communicate with the smart meter via BLE connectivity and acquire the reading when required.

The following are the features of Smart AMR Android application,

  1. Secured login – User name and password protection for authorized person login only
  2. Area selection – User configurable settings for selecting region, circle and section of his/her zone
  3. GPS based location mapping – Automatic mapping of the user’s present location
  4. One touch reading acquisition – Complete list of available registered meters in the particular location with complete details such as consumer name, ID, meter number, phase, load information and one touch acquisition of old, new reading and energy consumption.
  5. Auto update – Automatic update of acquired readings to central database via available 3G/4G connectivity in Smartphone.

This type of setup is very much suitable for AMR systems which can replace the handheld systems with the low cost smart phones and can reduce the burden on technicians by reducing more physical works that are present in the current handheld systems.

About Embien: Embien Technologies is a leading provider of embedded design services for the Semi-conductor, Industrial, Consumer and Health Care segments. Embien has successfully executed many projects like based on IoT such as healthcare Wearables, Gateways, and Data Analytics etc. Embien also offers a set of wearable design collections complete with electronics, firmware and Cloud that can be used to shorten product development costs and time significantly.

With wide spread proliferation of low cost wireless technologies such as WiFi, BLE etc and smart phones, there is a need to provide such connectivity to systems across application domains. For example, nowadays wellness industry expects the products such as thread mills to communicate with user phones and provide details of the calories spent so far along with the running pattern.  While it might be possible to incorporate the wireless features in newer designs, there are many cases in which the existing systems need to provide these new features with minimal design changes due to reasons such as re-engineering complexity, costs etc.  This calls for Bluetooth to Serial Adapter that can be interfaced to existing systems over UART and enabling wireless connectivity easily with minimal changes.

In this blog, we will discuss in detail about such an application where by Embien’s eStorm-B1 platform is used as a Bluetooth UART module and performing BLE communication to an Android mobile app.

eStorm-B1 Bluetooth UART Module

Embien recently launched “eStorm-B1”, an automotive ready BLE module as a part of its eStorm offerings. The module supports many peripherals and interfaces such that it can be used as a standalone system or can embed in an existing system to enable BLE communication.

Of the available interfaces such as CAN, SPI, I2C etc, this particular demo uses UART as the choice of communication. For such application, eStorm-B1 will act as a slave module which can receive commands from the host processor via UART and do actions accordingly.

The following block diagram depicts the setup of eStorm-B1 as a UART to BLE bridge,

 Bluetooth to Serial adapter

eStorm-B1 – UART to BLE Bridge Setup

The host processor and the module are connected via TTL UART interface. Interrupt signal from eStorm-B1 can be routed to a digital input of the host processor with interrupt detect functionality such that the host processor is made aware of the connection event occurred between the devices. eStorm-B1 can operate in sleep mode where it consumes ultra low power and the module can be switched between active and sleep mode suitably when data transfer is required.

Bluetooth UART module communication

Based on a simple command set, the host processor can speak to the eStorm-B1 module and in turn communicate with another BLE device such as a smart phone, tablet or an IoT gateway.

The following picture illustrates the serial command sequence between the eStorm-B1 BLE module and host processor via UART,

UART to BLE command sequence

Serial Command Sequence

The following video shows the real time demo of eStorm-B1 UART to BLE bridge application typically applicable in many IoT device developments for enabling BLE communication on existing system.

To show case the same, instead of a host MCU, a PC is used and connected to the eStorm-B1 over an USB to UART bridge. PC is connected to eStorm-B1 module via UART interface using an external commercially available UART to USB converter. Tera term, a terminal emulator is used to transfer the data’s from Laptop to eStorm-B1 module via UART. On the other end, a custom Android application installed in Smartphone is used to receive and transmit the data via BLE. UART to BLE Bridge is suitable for various device designs such as wearable device in healthcare, key finder, tire pressure monitoring system in automotives, asset tracking in industries, etc.

Apart from the above mentioned features, the eStorm-B1 also supports rich peripheral options such as timers/PWM, ADCs, GPIO’s which adds more advantage for standalone system developments in various domain applications such as automotive, industrial, healthcare etc.

About Embien: Embien Technologies is a leading provider of embedded design services for the Semi-conductor, Industrial, Consumer and Health Care segments. Embien has successfully executed many projects for IoT product developments such as healthcare/wellness wearable’s, data acquisitions systems, Gateways, and Data Analytics platforms etc. Embien also offers a set of wearable design collections complete with electronics, firmware and Cloud that can be used to shorten product development costs and time significantly.