Disk space monitoring & e-mail notifications with Bash

Running out of disk space is a common problem for unattended Linux boxes like database servers or backup storage servers. Usually I would use Zabbix (or Nagios) do to the monitoring, but it would be an overkill for a Raspberry Pi or a single NAS, so I made a small Bash script. This script runs df, checks disk usage and sends mail in case the free space is running low.
Continue reading “Disk space monitoring & e-mail notifications with Bash”

Making graphics and fonts for embedded systems

Microcontroller systems with graphical displays require a way to display text. In case of alphanumeric displays (like HD44780) it is easy – just send your ASCII bytes to the display. Graphical displays operate on individual pixels, so firmware must generate the graphics and texts on the fly.

In this post I show the complete multi-step process from a TrueType (.ttf) font file to autogenerated C code that can be used by a graphics library to display texts on a microcontroller. All code (including the embedded graphics library) is available on Github.
Continue reading “Making graphics and fonts for embedded systems”

B6AC battery charger teardown

b6ac_1

I recently got some discarded NiCd batteries from emergency lighting fixtures (5 cells, 7 Ah) and I started looking for a way to check if they might still work. While searching for chargers I found model B6AC that: charges automatically almost any battery chemistry (various lithium, NiCd, NiMH, lead-acid), can discharge batteries in a controlled way, balance li-ion battery cells, can cycle the battery through several charges and discharges, indicates the charge and discharge capacity (and probably some more features I still do not realize).
Continue reading “B6AC battery charger teardown”