NutDAC has been developed in the Automation Technology Laboratory (ATL) of the Helsinki University of Technology (nowadays Aalto University) and the Technical Research Center of Finland (VTT) within the framework of two PEM fuel cell research projects. During these projects four different fuel cell based power sources (or simply power packs) have been designed and built with increasing power output and complexity. NutDAC is the result of the evolution of the control software for the power packs from a customized monolithic solution towards a library for creating general purpose data acquisition and control applications. Here we present chronologically a short version of the history that explains that evolution.

PowerPEM Project (2005-2007)

The origin of NutDAC is the PowerPEM project, started in 2005. One of the goals of this project was to evaluate the possibility of building commercial PEM fuel cells in Finland, and the starting point was an already existing 20 cell 1kW fuel cell built for research purposes in previous projects. This fuel cell was using LabView software and COTS instrumentation for the data acquisition and control of the BoP (Balance of Plant), which made the price per unit prohibitive. Thus, one of the tasks within the project was to create a custom cheap embedded software and hardware system to replace LabView.

During the selection process for the microcontroller board several options were considered, being the Ethernut2 board the one selected. The reasons were that:

  • The AVR architechure was already well known to the developer
  • The Ethernut boards support a RTOS with tools that make easy to develop our applications
  • Hardware flexibility: the Ethernut project offers several boards with different computing power, offering a way of scape in case the code blows in size and resources requirements.
  • Ethernuts are designed for Internet applications, suitable for remote control applications.
  • The project is open source with a suitable license, and the community of developers seemed very active and cooperative.

All the necessary electronic instrumentation was placed in 5 different boards plus the Ethernut2. In the following pictures we can see electronics of the control subsystem and the resulting first prototype of the fuel cell built around the final enclosure

Electronics of the control subsystem

First prototype for the 1kW Power Pack

The board for the cell voltage measurements was equipped with all the necessary differential amplifiers for measuring the voltage in all the cells, which were sampled in the ADCs of the I/O board. The IO board was mounted on top of the Ethernut 2, and provided extra ADCs, DACs, expanders and specific channels for temperature measurement with thermocouples. All the required external chips were connected to the microcontroller through the I2C bus. All the boards but the one for the cell voltage measurements were self made by etching.

The control software, including the GUI, was built as a custom application specifically designed for the IO board and the specific BoP selected. Although working reliably, it was difficult to expand and reuse. The code running in the microcontroller was written in C and the GUI was written in Java and running in a laptop. The communication between both sides was done with ordinary sockets through Internet.

WorkingPEM project

In WorkingPEM project, main goal was to investigate how PEMFC technology could be utilized in industrial vehicles like forklifts, straddle carriers, mining vehicles and other similar machines. On this background, construction of a fuel cell system with higher power output was started in 2007. The development of PowerPEM control system continued within this new application in mind.


First 8kW power pack

A new fuel cell had to be built from the scratch, with new components and specifications. This time we had to build an 8kW system based on a commercially available 64 cells stack from NedStack. The system was going to be tested with an artificial load. The number of required IO channels grew to 100, and new extra functional requirements were added. As a starting point for the control subsystem we took the one developed for the PowerPEM project, with significant modifications on the electronics side. Given the increased number of required ADCs a new instrumentation board was designed and manufactured in the ATL, the IB1. It included all the differential amplifiers and ADCs together with the rest of the necessary electronic components of the control subsystem but the power supply. All the external chips providing ADCs, DACs, expanders and so on were connected to the Ethernut2 through SPI bus.

Power supply, Ethernut2 and IB1 for the first 8kW power pack

First prototype of the 8kW power pack

The starting point of the software was also the programs developed in the PowerPEM project, but it required a major rework. We soon realized the need for more flexibility and modularity that would make the system more scalable, easily expandable and reusable in future projects. Thus we started a redesign process separating the parts that could be reused in other applications of the parts that were application specific. This abstraction process was the beginning of NutDAC. The result was a first set of libraries that contained all the reusable code grouped in modules, NutDAC_Micro. The application specific code to control the power pack used these libraries to build the appropriate functionality. Due to work overload, on a first step only the code for the microcontroller was redesigned, leaving the redesign of the GUI for later. Thus, the GUI for the first 8kW power pack was a simple remake of the one for the 1kW system of the PowerPEM. NutDAC_GUI had to wait still for a while in the head of the designer.


After the successful demonstration of the 8kW system, the continuation of the WorkingPEM project started with a much more ambitious goal: to build a 16kW PEM power pack for a Kalmar ECF55 forklift. Due to highly varying work cycle of the forklifts it was decided that the final system would be hybrid, using the PEM fuel cell as a main power supply and supercapacitors to handle the transient loads. The fuel cell system was going to be built around 2 cell stacks used in the first part of the project connected in series. It was decided then that the measurement of the cell voltages was going to be done by a commercially available product, a CVM (Cell Voltage Measurement) unit by Vito/DVC, which feeds the information through a CAN bus. Each 8kW stack required its own CVM. Thus the resulting 16kW power pack was going to be kind of a mixture of two 8kW packs developed in the first part of the project, of course with some required modifications. The big question was here whether to use 2 independent instrumentation boards, one for each cell stack and associated BoP, or one for both stacks and all the BoP. After a short study it was decided that a single board was going to be used.

Another question that arose at that time was whether the ATmega128 of the Ethernut2 was going to be able to handle properly the computational load of the new system. This one together with the need of in site data storage made us decide to use Ethernut3 in this power pack.

Second 8kW power pack (pp8)

As a first step towards the 16kW power pack it was decided to test the new elements with the actual existing 8kW one, that is: the Vito CVM and the Ethernut3. HW-wise the use of the CVM required the addition of a CAN controller to the instrumentation board, and the Ethernut3 required the adaptation of the power supply and the addition of voltage level converters for the digital lines (Ethernut2 uses 5V logic, while Ethernut3 uses 3,3V). Thus a new board was designed, the IB2, that could be used with either Ethernut2 or Ethernut3 and included a CAN bus driver. The new board was designed at TKK and manufactured by a company.

Ethernut3 and IB2

From the software side, NutDAC continue evolving to incorporate the new requirements and towards more abstraction. In the microcontroller side the NutDAC_Micro libraries were modified to add support for the Ethernut3, and the channel driver API was redesigned to accommodate more generic devices. Also a major effort was put in making the NutDAC_Micro libs completely configurable through an application specific configuration file. Before this, every application required the change of critical parameters in the code of the libs itself, and thus the libs had to be modified and recompiled manually for each application and each configuration change. With the new modifications the libs were now compiled independently and automatically for each application. This major step made it easier to use and maintain the code in different projects.

The drivers of the IB2 were then developed as a library completely independent of the application, and thus could be seamlessly reused in other projects.

The GUI used was initially the same one used for the first 8kW power pack. However, thinking about the future GUI for the 16kW power pack we soon realized that the redesign of the GUI could not be postponed any longer. Otherwise the new GUI would become a ever growing bunch of cumulative patches. Thus we started an abstraction process in the GUI source code similar to the one carried out on the code for the microcontroller. The result was a set of libraries with which applications running in a PC capable of automatic interaction with the program running in the microcontroller could be built. The application specific code of the GUI for the pp8 was then placed in a new SW project.

At that moment, our CVS system contained 5 different modules required for building the control software for the pp8, as shown in the picture.

Modules in the CVS for the pp8 control software

The IB2 was successfully tested with the Ethernut2 and Ethernut3 boards for controlling the pp8. The control logic for the power pack (user application) was developed independently and in parallel to the drivers of the IB2 and enhancements of NutDAC. Totally the control software was handling 100 channels, including 64 voltages coming from the CVM.

16kW hybrid power pack for forklift (pp16)

The following power pack built was the hybrid 16kW one. In essence it is a combination of two pp8 cells with other BoP components. In addition we had to fit the power source in a box specially designed to fin in the space dedicated to the batteries in the back of the forklift. Due to the increased required number of I/O channels, a new instrumentation board was built based on the IB2, the IB3.

Ethernut3 and IB3

The drivers for the board were adapted from the IB2, as most of the chips used were the same. The NutDAC libs were expanded adding new functionality, and the control application and GUI were adapted from those for pp8 with some modifications in the control strategies. They were called pp16 and pp16_gui respectively. This time the control system had to handle 188 IO channels, including 128 cell voltage measurements . The GUI was adapted and extended as well from the GUI for the pp8. Despite the complexity of the system we managed to make it work (See the video :) )

pp16 power pack

pp16 GUI
Video wmv
Forklift during operation (Click to see a video)

At this stage we got green light to publish the source code, just before the project finished. During the following months we dedicated our time to prepare the code to be published. The channel driver API was changed to accommodate more generic devices and the drivers of the instrumentation boards were split into simpler drivers for the individual ICs and adapted to the new API. This makes it possible to build custom instrumentation boards based on these ICs reusing our drivers. We also added some minor features, made an extensive code clean up and dedicated an extra effort to document the source code and prepare this web page.

We hope that this project is useful to others as much as it has been to us. Enjoy!