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”
This is a fully open-source car datalogger that reads engine data using the OBD2 interface in real time and stores it on an SD card. It also stores GPS data. All communication is done directly by the MCU without a translator chip like ELM327 or STN1110. The datalogger supports all CAN and K-Line OBD2 protocols. All hardware fits into an off-the-shelf OBD2 connector enclosure.
This project is available on Github.
Continue reading “Open OBD datalogger”
I bought a pair of ePaper displays from Waveshare with the intent to use them in a wireless sensor network for displaying slowly changing data. The reference code from Waveshare is quite clunky and not so easy to re-use, so I made my own small, portable graphics library and display driver (with ARM Cortex-M in mind).
The library is available on Github.
Continue reading “Waveshare ePaper display library”
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”
K-Line is another popular OBD2 interfacing standard, that has been used in European cars before CAN bus became common. There are a couple of physical variations (K-line, K+L, KKL) and slightly different protocols (KWP2000 or Keyword Protocol, and ISO 9141) running on those lines. Basically all you need to talk to an older car is an MCU with a UART and a single transistor. 🙂
Continue reading “Reading OBD2 data without ELM327, part 2 – K-Line”
All modern cars have an OBD2 diagnostic connector that allows reading many engine and drivetrain parameters like RPM, vehicle speed, temperatures etc.
Most of car interfaces use a special protocol translating chip like ELM327 or STN1110 to convert different vehicle protocols (that depend on the age and brand of the car) into an easier to use serial protocol with AT-commands.
I wanted to build a datalogger that would fit into a OBD2 connector. There was no space to fit my microcontroller and another chip to do protocol conversion, so I investigated and reverse-engineered the most common OBD2 protocols to be able to implement them directly on my MCU.
Continue reading “Reading OBD2 data without ELM327, part 1 – CAN”
The Youkits TJ5A is now my primary transceiver. I bought it with portable operation in mind (I do not have much space for decent antennas at home). Read more for high-resolution photos.
Continue reading “Youkits TJ5A”
I have recently bought a BananaPi with the intent of making a automotive datalogger. I needed a simple power supply that would work reliably in my car. I found some nice looking modules in “The Thick Electronic” store on Aliexpress.
Continue reading “Small, cheap power supply modules from Aliexpress”
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”