Follow our illustrated blog on Embedded Software Architecture

How to build a hybrid solar/wind energy harvester?

The embedded hierarchy – Part2

So how can we represent the embedded hierarchy in software? Before we can answer this question, we must make our goals clear: setting up and defining a new board should be as easy as possible, and code re-use should be optimal. With these goals in mind, it is useful to divide the hardware hierarchy into […]

Share

The embedded hierarchy — Part 1

Good programming skills is not the only quality a software engineer needs to have in order to write extendable, reusable and manageable software. Understanding the domain is equally important because it enables you to build good abstractions, and to do correct configuration management (version control). This is no different in embedded software: creating or even […]

Share

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 relatively larger embedded systems… …use file systems. Many times, we have heard it is a question […]

Share

STM32F100: configuring two PWM channels, polarity and alignment

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 conduct green energy to the different loads which are a battery (bank) […]

Share

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 gets a digital value which is the result […]

Share

I²C and SPI

The I²C bus The I²C bus is a multi-node bus. Nodes can have – at a given time – either a master or a slave role. On the one hand, a master node generates the clock and initiates communication with slaves. On the other hand, a slave node receives the clock and responds when addressed […]

Share

Embedded device communication

An embedded device does not do its job in the ‘void’. It needs to interact (and communicate) with users and/or other devices. Even inside an embedded device, lots of communication is required between controllers and (external) peripherals, sensors and actuators. Communication properties In general communication happens one to one (e.g. a telephone call via a […]

Share

STM32F100: why and how to use the internal reference voltage for ADC?

One of our main development boards is the  STM32VLDISCOVERY. Its st-link is an in-circuit debugger and programmer, and makes development for prototyping fast and easy. The board has an ‘interesting’ property though: its reference voltage is labeled 3.3V while it is actually… only 3V. Check out the picture for proof!   After reviewing the board schematics we found […]

Share

Pulse Width Modulation

A short definition Pulse-width modulation is commonly used in power-control or motor-control applications. Time is divided into periods. As always, the smaller the time periods, the higher the frequency. Within this time block a pulse signal is applied. The digital signal is logically active (“1”or ON) during a specified percentage of the time period, the […]

Share

ADC driver for the energy harvester

Introduction One of the goals of iteration 1 of the energy harvester project is to extend our software platform with drivers for measuring (gpio in, adc), controlling (gpio out, pwm) and debugging (uart). In this article our focus is set on the ADC driver (we already introduced the Analog-to-Digital-Converter here). It is hard (not to say […]

Share