The Blog

Wattmon 1.870 Released

It's time for an update from the Wattmon team!  Development is constantly ongoing and bug reports have been quickly attended to and integrated into the latest codebase.  New features include:
- Improved onewire support for temperature sensors
- Several bug fixes that caused erratic reboots
- Much improved file system performance using FatFS
- Several new functions
- new A5S1 module for high voltage sensing and current monitoring though an external shunt
- New WattmonOS 2.2 framework with improved layout and functionality, making it easier to configure actions, devices, roles and front end widgets

To update your system, please first update the firmware to the latest version and then the package, not the other way around.

Comment (0) Hits: 1726

WattmonOS 2.0

WattmonOS 2.0 and firmware 1.632 have just been launched!  This version has major updates on the UI and make it easier to add additional sources of data to be logged.   Firmware 1.632 solves many issues and has improved performance.

When updating, please first update the firmware and then the package.  If you have customized your roles and graphs, that data will need to be re-entered after the upgrade.

Comment (0) Hits: 2543

Understanding Lead-acid Batteries

Lead acid batteries have been around for over 150 years. They are a well understood technology and widely used for solar and off-grid backup energy storage. The two most common types of battery are wet cell and sealed batteries. The first type requires regular refilling with distilled water, whereas the sealed type is maintenance free.

A lead acid battery generates energy through chemical reactions, which are reversible. However, if a battery is not handled properly, it can quickly degrade performance by physically damaging the internal structure. The most common problem that degrades performance is called sulphation. The formation of lead sulphate crystals on the battery plates is caused by incorrect charging or by leaving a battery standing too long. If not corrected, this would eventually cause the plates to crack or warp, rendering the battery useless.

Multi-stage charge controllers take care of this by going through a series of different charge modes to ensure a battery is properly charged. The first mode is called bulk charge, and at this stage the maximum available energy is pumped in to the battery. When the battery reaches a particular voltage (around 14.4v) depending on temperature and cell chemistry, it switches to the second mode called boost mode. In this mode, the voltage remains stable and the current is adjusted to keep the voltage constant. This mode can remain active for anywhere between a few minutes to hours. At this stage, the internal cells are equalised and some de sulphation occurs. After this stage, the battery voltage is lowered somewhat to a float voltage, usually around 13.8v. This mode is usually called float or trickle mode, and the battery voltage will remain constant while the current is adjusted. Charging a battery using this method will ensure a longer life.
The other major factor that affects battery life is the depth of discharge. Battery performance degrades gradually over time but by remaining above 50-70% dod (depth of discharge) you will get extended life out of your batteries.

Battery capacity calculation

Depth of discharge is most accurately measured by coulomb counting. This involves keeping track of energy going in and out of a battery bank. A battery has a capacity rating in ampere hours, or Ah. If a battery has a 100Ah rating, you could get 100 amps out of it at the optimal discharge rate stipulated by the manufacturer. This is usually mentioned as the x-hour rate or C/x where C is the ampere rating and x is the number of hours. For example, a 5 hour rate would be C/5, or for a 100Ah this would be 20A. So, if you were to discharge the battery at 20 amperes, the battery would last for exactly 5 hours if it were new. However, this does not mean that discharging at 50 amps would make the battery last 2 hours. Other factors come into play at higher discharge currents, and the only way to correcly account for them is to use Peukert's equation. Most data logger devices will not factor this in. To make things more conpicated, battery charging also has efficiency losses, and these need to be taken into account in order to obtain accurate state of charge data.

Wattmon takes care of all of these parameters and calculates state of charge based on the following parameters: battery size, battery c-rating, peukert constant and battery charge efficiency. all incoming and outgoing currents are normalised to the c-rating equivalent value and an internal register keeps track of the battery Ah remaining. These values are used to predict the remaining run time or charge time.

No system is perfect when it comes to accurate state of charge measurement, since there are a variety of factors that affect performance, and usually inconsistencies arise after prolonged periods of charge and discharge without ever completely recharging a battery. Wattmon has a full voltage field in the config that lets you reset the battery to 100% when this is reached, which helps to correct this type of drift. Since every setup is different, a fine tuning of the peukert constant and battery charge efficiency may be required to improve accuracy.

If you are interested in more information on Peeukert's equations and lead acid batteries in general, Wikipedia is a good place to start. The purpose of this article was to give you a basic understanding of the complexities involving state of charge measurements and how Wattmon addresses the issues.

Comment (0) Hits: 2274

How much computing power is enough?

Computing power has increased exponentially over the last decades. You now have more processing power in your pocket calculator than in the first rocket to the moon! And yet we are always looking to the newer faster model that will make our tasks just a little bit easier. Ironically, along with increased speed comes applications with more sophisticated user interfaces and bloated feature sets, with a net gain in increased performance of nearly zero.

Typically when worked in an embedded environment, processing power, memory and storage are finite and tend to be on the low side. In recent years however, with the advent of low power micro computers such as the raspberry pi the line between computer and embedded device has become more blurred.

Answering the question "is this enough power for my needs?" obviously depends on the type of service you plan to offer - if its an embedded HD video solution chances are more is better. But if you need to build a home automation controller, data logger or other device that does not require high processing power then you are left with a choice of plenty of low to mid range MCUs that fit the description nicely. Using a non-Linux custom operating system does not mean your device can't have all the bells and whistles of a more powerful one - it may just do the same thing a little more slowly. A web interface with embedded scripting language may produce a page in 1 second rather than in 20ms on a raspberry pi, but if this is a task that is performed intermittently such as checking a graph or logging in once a day, it may not justify the complexity and resources of a higher power processor.

As an example of what can be achieved with limited resources, the Wattmon device runs on a pic32mx processor with 512k of Flash and 128k of RAM. This executes a customised FreeRTOS based system with Ethernet, USB host support for 3G data cards, microSD storage, and a PHP compatible scripting language. The embedded web server can handle up to 7 concurrent connections, and the scripting engine can run several scripts simultaneously in a preemptive multitasking environment. Does it work as quickly as a Linux based processor with 1GB of RAM? No. But it does work well and serves up web pages at a very decent speed, has real computing power, and runs on less than two watts including the Ethernet hardware, making it a low cost computing platform for remote monitoring and control.

This is just one example of many that can be found on the Internet that push the limits of embedded platform and show what can be done with limited resources. So next time you ask yourself whether bigger and faster is better, remember that sometimes it just isn't necessary.

Comment (0) Hits: 2269