‘Experience Energy’ at the Verkehrshaus: The ‘House of Energy’ Construction Kit

The ‘Verkehrshaus der Schweiz‘, the ‘Swiss Museum of Transport’ is Switzerland’s most popular museum.

In April 2023, it opened up a new building and the ‘Experience Energy!’ exhibition. For the opening event we created a unique construction kit to explore energy: from harvesting to storing and up to distributing and using energy.

“House of Energy” at the Swiss Museum of Transport in Lucerne
Continue reading

Power Measurement with INA260 Sensor

For a research project and demonstrator at HSLU university I have to measure voltage a DC voltage and current. For this I’m planning to use the Texas Instrument Texas Instruments INA260, so I had to quickly develop a software driver for it.

TI INA260 Power Sensor Breakout Board
Continue reading

Processor Expert Components: 24-Dec-2023 Release

The new year 2024 is coming, so time to close the current year with a new release: I’m pleased to announce a new release of the Processor Expert components, available on SourceForge and GitHub.

Processor Expert Components in Eclipse (KDS)

Continue reading

Implementing File I/O Semihosting for the RP2040 and VS Code

I’m working recently on a new lecture module using the Raspberry Pi Pico (RP2040) board, which highlights several aspects of modern software engineering, including DevOps and CI/CD. An important part of any CI/CD pipeline is testing. For a host application, one could pass arguments to the application, e.g. ‘myapp --test=module1‘, or let it read such information from a configuration file which describes the tests. Or write GNU gcov data to a file to collect coverage information.

Unfortunately, a normal embedded application has no argv[], and many system have no file system. A solution to this problem would be using semihosting with file I/O. Unfortunately for the Raspberry Pi Pico SDK 1.5.1 for the RP2040, there is no semihosting file I/O implemented :-(.

I have now implemented and added file I/O to the SDK, making it possible for the RP2040 to access and use files on the host, among other things. This greatly extends the capabilities of the device, and is very useful for testing, including gathering test coverage information.

RP2040 writing files on the host with semihosting
Continue reading

Debug Probes for RP2040 with VS Code

For systematic debugging, an engineer needs a debug probe. For the Raspberry Pi Pico (RP2040) device there are plenty of debug options with VS Code.

In this article I show different options, from professional tools to DIY solutions and the settings in VS Code I’m using.

Continue reading

Semihosting with VS Code on RP2040

With semihosting I can use standard I/O function like printf() and I can read and write data on the host through the debug connection. If used with care, this is a great feature especially for unit testing.

Raspberry Pi Pico-W (RP2040) board
Continue reading

Integrating Solar-Surplus-Charge-Controller into EV Wallbox

Solar panels and electrical vehicles become more and more common in Switzerland. Ten years ago I installed solar panels. To use the available solar energy, the electrical vehicle charging box has been augmented with an open source charge controller. The controller monitors the building energy usage and adjusts the current using the Modbus connection to the charger.

Integrated Charger Controller into Wallbox
Continue reading

Open Source picoLink: Raspberry Pi RP2040 CMSIS-DAP Debug Probe

One essential part of embedded development is the ability to debug the target application. The good thing with the Raspberry Pi Pico RP2040 Eco-system is: One can use another RP2040 Pico board as a debug probe to debug other ARM Cortex-M devices.

But instead using a Raspberry Pi Pico board with some wires, why not building a dedicated board? The result is a small, versatile and open source debugging probe which virtually can debug any ARM Cortex-M device as a standard ARM CMSIS-DAP probe:

picoLink Debug Probe debugging a Raspberry Pi Pico Board
Continue reading

RP2040 with PIO and DMA to address WS2812B LEDs

I love the WS2812B (aka SK6812) addressable LEDs: they are inexpensive and available in different packages. I have used them in different projects, including the MetaClockClock one. I used the NXP Kinetis for these projects, but because they are not available any more, for a new project we had to choose a new microcontroller, with the Raspberry Pi Pico RP2040 as the winner.

Raspberry Pi Pico RP2040 driving WS2812B with PIO and DMA
Continue reading

Using a Watchdog Timer with an RTOS

When something goes wrong in an embedded system, a watchdog timer is the last line of defense against a blocked or malfunctioning system. A watchdog is a special timer which needs to be ‘kicked’ in a special way, otherwise the timer will run out and reset the system.

For example, a watchdog is an important safety feature in the E-Vehicle charging controller with Raspberry Pi Pico-W RP2040:

EVCC Controller
Continue reading