The Blog

Remote Monitoring

Remote monitoring allows you to track important changes to your hardware without requiring a field visit, thus saving time and money. India and much of Africa has many off grid installations with battery storage and some form of renewable source such as solar or wind. Usually, qualified service technicians need to travel long distances to reach these installations whenever there is a problem. Using Wattmon and a USB dongle, technicians can access the sites over GPRS or 3G if available and can troubleshoot the likely cause before travelling. Typically, problems are associated with incorrect charging or discharging of battery packs, and this data is not known before installing a data logger and understanding the charge and discharge profiles.

We have installed a prototype wind/solar hybrid setup where Wattmon controls the charging by switching on a dump load when the battery is full, and switches off the load when the battery is empty. We monitor this setup remotely and can inform the client exactly what the problem is when the system goes out by checking the graphs. We also tweaked the charge algorithm remotely. This type of control over a data connection means that we only visit a site once for the setup but we can continue to provide support remotely.

Comment (0) Hits: 2283

An Embedded Device for the Internet of Things

The Internet of things is a buzzword today. More and more platforms and solutions exist with different levels of complexity. In its essence a device needs to have an Internet connection and be able to receive and respond to commands in some predefined protocol.

The Wattmon device has everything required to get started with your Internet of things project. An integrated file manager, code editor and simple php compatible language makes it the ideal tool for beginners, but powerful enough to be useful for real world projectsas well.

The microchip, a pic32 chip, is an amazing little device that has 128k of RAM and 512k of flash, enough to fit the Wattmon kernel and interpreter. About 64k of ram is available to run applications once all core buffers and tasks have been allocated.

Wattmon runs on a FreeRTOS kernel and modified microchip stack. Background tasks take care of the various IO operations such as serial, modbus polling and Ethernet. A web server task handles incoming requests and spawns Interpreter tasks that produce the actual content. The uPHP interpreter was written from scratch and is designed to run with minimal RAM. It compiles code into tokens which it then writes back into a separate file on the sd card. This happens only when it detects a newer date on the original .cgi file and therefore the overhead is minimal and every task has a small token buffer making it possible to run scripts that are larger than what fit into RAM.

In addition to the web interface, a task scheduler lets you run scripts at predefined times defined in a crontab style file but with an accuracy of 1 second. Inter process communication can be achieved using the $_GLOBALS array. Multiple tasks can run in parallel and memory is automatically managed to ensure that when resources run low some scripts are paused until others complete. A script can be executed at startup to initialise the system and can either terminate or run continuously in the background.

A telnet interface allows you to log in remotely and execute scripts from the shell. Scripts run via a shell take their input from the keyboard and send their output back to the terminal allowing you to develop sophisticated applications such as a file editor similar to vi.

And that is just the core set of features. An action manager lets you configure triggers that will perform an action based on a set of conditions that can involve system variables, device variables and global variables and can even be enabled only during a certain time of the day! These triggers can then automatically perform actions such as switching on or off relay devices, setting global variables, sending an email or accessing a web page, or executing a script without writing a single line of code. The action processor runs from within the kernel, ensuring a minimal latency of up to 100ms to process.

This combination of features makes Wattmon a powerful yet easy to use multi-purpose embedded computer that I developed with purpose of managing DC energy but which has turned out to be so much more. Wattmon is more than capable of taking on the Internet of things!

Comment (0) Hits: 2295

Energy Monitoring Devices

Energy metering and data logging with remote access are nothing new, the Internet of Things is here and such devices are becoming more commonplace every day. So what makes Wattmon stand apart when compared to other similar devices?

The foremost two things that most people seem to like are the flexibility and the interoperability, so I will focus a little on these two topics.

Flexibility

Bringing flexibility to an embedded device is challenging for any developer - it helps a lot when product specifications are clearly defined beforehand, especially when working with limited resources and processing power such as the Microchip PIC32 processor used in the Wattmon. Even before beginning work on this project I could imagine many different scenarios where the device could be used, such as for home automation, data logging solar charging, battery management, pump control, weather stations... And more!

Wattmon separates the firmware kernel and operating system from the application - the firmware resides in internal flash and implements the uPHP (micro-PHP) scripting language with a subset of PHP's functionality. The application - or package as I refer to it - is a set of scripts that run off the microsd card and perform any function required. The wattmonsolar package handles data logging and battery management for solar setups, and the wattmon water setup handles a 3 phase bore well pump and several booster pumps, making it the perfect tool to manage remote water tank setups.

All these scripts are open source, and anyone can extend and modify them to suit their requirements - this is nothing new either since Linux is open source too, but the combination of a small embedded device capable of running custom scripts with ready made open source packages for energy monitoring is less common. The raspberry pi brings flexibility and power, but it is still not easy for a layman to manage, and it isn't packaged into a final product.

Interoperability

Many larger solar companies have some form of data logging or computer connector on their devices. Charge controllers may have information about the state of charge and voltage, as well as kWh generated. Inverters may have some outputs about load or performance. All of these usually connect to a proprietary software or hardware device from the same brand.

Consolidating this data together is not easy, and usually requires an expensive add on device. Wattmon simply plugs into your cable network and doesn't care which brand is managing your energy generation or load, as long as it has the full picture of all energy flowing through the battery. This means it is no problem to change brand, and you can save money on those expensive monitors!

Comment (0) Hits: 2290

Solar PV stand-alone systems – challenges and solutions

A stand-alone solar PV system for a home or office works independent from the public electricity grid and this is an advantage for areas where the grid is not available or not reliable. The disadvantages of a stand-alone system are that batteries typically last only five years and that the overall system efficiency is low compared with a grid-interactive system. Another challenge with stand-alone systems is that there may be under-utilisation of the available solar energy when the batteries are full and there is insufficient load or there may be shortage of energy during cloudy days. In the case of grid-interactive systems surplus energy can be exported to the grid while a shortfall in energy can be drawn from the grid.

The WattMon comes in handy here. The information that the WattMon system gives helps us to improve system configuration and system usage. When the WattMon relay system is released in the near future, loads can be switched on or off based on the charging state of the battery and loads can be added to absorb surplus solar energy that is available. In stand-alone systems that are located in buildings with grid supply, the WattMon can trigger a grid charge of the batteries to complement solar energy charging on cloudy days or on days with higher than average consumption.

I have been using the WattMon system in our stand-alone home solar system and find it extremely useful. Based on the data we got from the WattMon system we decided to provide the refrigerator with an automatic change-over switch that connects the refrigerator to the stand-alone system only when there is no grid supply so that we spare the battery from deep discharges. We also understand now that there are many days on which the battery is already fully charged by early afternoon and that there is surplus solar energy available for usage during the remaining part of the day. Thanks to WattMon we know now what is happening behind the scenes.

Comment (0) Hits: 2510