Follow our illustrated blog on Embedded Software Architecture

How to build a hybrid solar/wind energy harvester?

How procedural code evolves to object-oriented code

Introduction Most (real :-)) embedded software is written in C. Although C is a general-purpose procedural programming language, it is perfectly possible and useful to write object-oriented code in it. Object-orientation - well, GOOD … [Continue reading]

Painless CRC for your embedded device

We cannot take credit for any of the code – which is public domain – but we found it to be so valuable that we dedicate this blog post to it. A CRC or cyclic redundancy check algorithm is used to detect errors or changes in raw data. It is … [Continue reading]

Dual channel power switching: testing different PWM configurations

switching power to two lamps

Switching power between battery and dump load is an important functionality of a charge controller. Switching fast by means of PWM allows for efficient battery charging: the battery (bank) is charged with an appropriate algorithm (bulk, absorption, … [Continue reading]

STM32 bootloader

stm32vldiscovery boot mode

Flashing via USART Most STM32 devices have an on-board (first-level) boot-loader (see Table1 of AN2606 for an overview of supported devices). The boot-loader allows developers to flash MCU's internal ROM memory via SPI, CAN, USB, I2C etc. but for … [Continue reading]

Storing settings and data on an embedded device

Every once and a while, one needs to persistently store settings, information or other data on an embedded device. This poses risks. There are a few (simplified) categories of embedded data storage solutions to look at. More 'advanced' and … [Continue reading]

STM32F100: configuring two PWM channels, polarity and alignment

PWM center-aligned same polarity

Introduction In our project one source supplies power to two different loads and we need to control how much power goes to which load. To achieve this, we use an STM32F100 processor to PWM high-power mosfets. These mosfet channels do or do not … [Continue reading]

Embedded device boot

Eventually an embedded device's micro controller or processor is expected to execute the designed-for-the-purpose software. But before that happens, some vendor specific voodoo is required. Only then, it understands it should run your code, which is … [Continue reading]

Recycling a VAWT as a HAWT

A few years ago, I bought a Chinese manufactured Vertical Axis Wind Turbine from a vendor in Canada. After it travelled the world, and was delivered at my doorstep, it seemed it had fallen down or been thrown about a couple of times. Anyway, a bit … [Continue reading]

High-side mosfet board: an elance experience

Introduction A few months ago - as a prototyping experiment - we decided to develop two types of high-power switching boards: one for high-side switching and another one for low-side switching. Goal was to gain some experience on different switching … [Continue reading]

Filtering sensor data

The ADC is a much used peripheral in embedded systems. This is not different in our project. We extensively use it to read out - for example - voltage and amperage data. Many people are still unaware of the fact that it is still just sampling: One … [Continue reading]