Give away medical masks when you place an order. learn more

OpenPICUS Speeds Designs Based on Microchip Technology's MCUs and Connectivity Chips



OpenPICUS combines the chips and technology integration expertise of Microchip Technology with an open-source development framework to help designers develop projects at exceptionally low cost with leading-edge hardware and field-tested software. Headquartered in Italy, openPICUS is a Microchip Technology Design Partner, a member of the EnOcean Alliance, and is in the process of joining the Open Source Hardware Association.

Designers have responded to the openPICUS value proposition with numerous projects including a web-controlled Geiger counter that sends email alerts; an Android-controlled wake-up alarm system that dims lights and turns on a coffee machine; and an iPhone-controlled robot using Safari. OpenPICUS is also useful in industrial sensor and robotic applications.

In addition to its open-source software development framework, openPICUS offers designers two types of low-cost hardware:
  • Flyport is a system-on-module solution based on a 16-bit PIC24FJ256GA106-I/PT processor with embedded software and Internet connectivity via either Wi-Fi or Ethernet. The two modules are Flyport Wi-Fi and Flyport Ethernet.
  • Expansion boards called Nests come in various combinations of relays, connectors, sensors, encoders, and drivers for quick and efficient prototyping. Nine Nests are currently available, including a mini-USB programmer board that serves as the standard tool for downloading firmware to Flyport modules. Other Nests target specific applications. The Lighting Nest, for example, integrates four relays, two opto-isolated inputs, one triac, and a six-way miniUSB programmer. The Music Nest for stereo audio over IP applications includes a stereo codec, a microSD card slot for local storage, and a miniUSB programmer.
Flyport Wi-Fi

An obvious question for open source developers: What is the relationship between openPICUS and Arduino™? Are they competitors or complementary technologies? The openPICUS Wi-Fi Flyport can actually be considered a front-end for Arduino because all the grunt work of creating Wi-Fi connectivity for an Arduino application has been eliminated with the field-proven TCP/IP stack from Microchip. In that sense, they are complementary technologies.

The Flyport TEIK001 Wi-Fi module is compact (35 x 48 mm) and includes the previously mentioned PIC 24FJ256 MCU, as well as a fully integrated 802.11b Wi-Fi interface – Microchip’s MRF24WB0MA/RM – and several communications interfaces including UART and SPI. It supports HTTP, TCP, UDP, SNTP, FTP and SMTP and integrates Wi-Fi chips, supplied by Microchip, with technology acquired through the acquisition of ZeroG Wireless in 2010. The Flyport Wi-Fi module is shown in Figure 1.

Flyport TEIK001

Figure 1: Flyport Wi-Fi includes a 16-bit MCU and Wi-Fi interface chip – both from Microchip. (Courtesy of Microchip Technology.)

Dynamic Web pages are also supported, which means real-time data can be displayed and updated from a standard web browser, as well as smartphones and tablets. The transceiver is certified by the Wi-Fi Alliance and comes with either a PCB antenna or an U.FL connector for an external antenna.

Flyport runs the openPICUS open source framework and has a serial bootloader onboard. The free openPICUS IDE hides the complexity of the communication stack, allowing designers to create applications, import web pages, and to compile and download code to the module. Developers need only C/C++ expertise to create their application because Flyport manages all the required network interfacing, Internet communications protocols, and web server protocols.

Since openPICUS developers typically target applications that are often involved with sensor data and actuator response, an innovative method of supporting dynamic web pages has been included in the Open PICUS IDE. This allows real-world variables and the information from the host system (such as temperatures, speeds, levels, voltages, and switch positions) to be displayed or changed using simple HTML or advanced jQuery. Flyport connects to Wi-Fi networks through access points and routers. It is possible also to connect it directly by Wi-Fi ad hoc mode. WEP, WPA, and WPA-2 security are all supported.

The embedded Web server, the communication stack, and the application all reside in 245 Kbytes of Flash memory in the MCU. Power consumption and battery life are frequently important concerns with sensor-oriented applications, so the creators of openPICUS added support for a hibernation mode and a feature that allows the Wi-Fi transceiver to be switched on and off with just one code instruction.

A standard 2 x 13, male-pin header connector is integrated into the module. The pins are remappable and interface directly to the PIC 24FJ256. Most pins are PPS enabled, which means they can be configured for UART, SPI, PWM, timer input, interrupts, and other common functions because as they are internally connected to the PIC 24F microcontroller.

Typical Flyport Wi-Fi applications include environmental monitoring, connection to cloud services, vending machines, IT systems monitoring, HVAC monitoring and control, security systems and home automation.

OpenPICUS rounds out its Wi-Fi product offerings with its TEIK002 Flyport Wi-Fi starter kit, which includes a Flyport Wi-Fi Module and a USB Nest. The USB Nest provides a USB interface and screw terminals for all Flyport I/O pins. Flyport sits on top of the USB Nest to facilitate application development. Once an application has been programmed into the PIC24F MCU, the Flyport can be removed and deployed.

A second hardware module, Flyport Ethernet, offers fully integrated Ethernet 10/100 connectivity (see Figure 2) via an ENC424J600 10/100 Base-T Ethernet controller – Microchip’s ENC424J600-I/PT. It has many of the same features as Flyport Wi-Fi, and is targeted for the same types of applications, but there are some differences. Flyport Ethernet has two, 2 x 13, male-pin connectors, JP1 and JP2. JP1 is identical to the Flyport Wi-Fi connector in order to have full pin-to-pin compatibility with the Flyport Wi-Fi module. Flyport Ethernet provides some add-on pins on the J2 connector. Signals routed on this connector come from the Ethernet transceiver, as well as directly from the microcontroller to expand number of available I/O pins. Developers use an external RJ45 connector to access their expansion board.

Flyport Ethernet comes in two versions: one with an RJ45 connector onboard (default) and the other or without the RJ45 connector.

Figure 2: Flyport Ethernet comes with or without an RJ45 connector onboard. (Courtesy of Microchip Technology.)

Software

The open-source orientation of openPICUS includes a free C-30 Microchip compiler and free openPICUS IDE, as well as numerous libraries for interfacing sensors and other devices to Flyport modules. Its software framework is based on FreeRTOS: an efficient, reliable, open-source OS that also manages the communication protocol stack.

FreeRTOS was developed and is maintained by Real Time Engineers Ltd. It supports 31 MCU architectures – including Microchip’s, of course – and is free for use in commercial products. Developers are not required to expose their proprietary source code.

Because FreeRTOS requires minimal ROM, RAM, and processing overhead, an RTOS kernel binary image will be in the region of 4 to 9 Kbytes. For real-time applications, in particular, it is a good alternative to eCOS™, embedded Linux®, real-time Linux, and uCLinux™. Its RTOS kernel is contained in only three C files: tasks.c, queue.c and list.c. These three files are located in the same FreeRTOS/Source directory that also contains two optional files called timers.c and croutine.c, which implement software timer and co-routine functionality, respectively.

Pre-configured examples have been made available for each MCU, which makes it easy to set up a project; it is just a matter of downloading and compiling. In fact, the majority of the many files included in the FreeRTOS.zip download relate to these numerous demonstration applications.

Flyport Nests

Of the nine expansion boards, called Nests, the miniUSB programmer (a simple USB to serial converter) is universally useful for designers because it is used to download firmware to Flyport modules on Nest boards. It has a six-way female-pin head connector that is the standard programming interface on the expansion boards. An onboard FTDI converter is included with drivers for a Windows® Virtual COM port available on the FTDI web site. Signals on the six-pin connector are: 1 = 5 V output, 2 = NC, 3 = GND, 4 = UART RX, 5 = UART TX, and 6 = RESET.

With the Arduino Shield Nest, openPICUS gives developers access to the numerous Arduino Shields on the market. (Arduino is based on an open-source wiring standard that defined the concept of Shield – a specific board with a standard pinout.) Arduino development kits, such as the A000056, are available for designers who wish to integrate the two open-source technologies.

The Arduino Nest adapts Arduino shields for use with openPICUS modules. The Arduino processor is not integrated into the Nest because the Flyport module supplies the processing power. The Flyport module appropriate to the application is also purchased separately. A PC running Windows with a USB port for the power supply is all that is required for the firmware download. Libraries or code for Arduino Shields may not be available, so a list of available code has been published on the openPICUS Web site.

Perhaps the most interesting expansion board is the Nest that enables applications for the wireless building automation technology EnOcean™, which is gaining popularity in Europe, particularly since its ratification by ISO/IEC in March 2012 as ISO/IEC 14543-3-10. EnOcean is an energy-harvesting wireless technology that combines micro-energy converters with ultra-low-power electronics, enabling wireless communications between battery-less wireless sensors, switches, controllers, and gateways. It is based on the observation that when ultra-low-power electronic components are used, sufficient energy can often be harvested from the environment to send a wireless signal. Harvesting energy from indoor lighting or the mechanical energy generated when flipping a switch are two examples, but any other action that causes a change in energy state can potentially be used.

OpenPICUS has designed Nests that address specific applications such as lighting and music. The rest are for general-purpose use and include an expansion board for RS232 and RS485 communication; a general-purpose prototype board compatible with Flyport modules; and a board with a USB connector to power the module and download applications.

Conclusion

Although the open-source movement has proven it can provide many benefits for engineers in terms of low-cost development and fast prototyping, the expertise and technology advantages of established semiconductor companies such as Microchip Technology have much to offer the open-source designer. OpenPICUS is, to a large degree, an integration project that marries Microchip’s MCU, Wi-Fi, and Ethernet chip expertise with an open-source RTOS from Real Time Engineers Ltd. and an the openPICUS application development framework. Technology bridges that leverage Arduino technology and the EnOcean building automation standard have also been put in place. The result is an impressive technology suite that provides a fast, efficient design path for innovative engineering.

Supplier