Embedded software voor de Bambi Interface

Embedded software voor de Bambi Interface

For my brother and father's medtech company I solved the problem of logging data to sd card from the ECG and RR status signals. I dove in the STM32 microcontroller and wrote some pieces of code to tackle the issues of mounting the card, creating files and writing data.

· 2 minute read

Bambi Medical's mission is to improve babies' lives from day 1, they have a product called the Bambi Belt System which is an ECG and Respiratory Rate monitor focussed on neonate babies (early borns).

I have worked with my brother in the past to come up with a silicon rubber based prototype which is now incorporated in the design of the Bambi Belt. When they asked me to improve their embedded software I was immediately excited to dive in.

We are used working with computers that can perform any task we require, however on more lightweight systems it is extremely important to know the capabilities of the system and customise the program (software) that runs on the hardware.

What came with the assignment was to verify the pin setup of the stm32Lxx microcontroller, the necessary pins were in fact correctly setup and the MOSI MISO and CLCK pins were assigned to SPI3 and there was a CS (chip select) pin, a GPIO output pin.

But first I needed to salvage the branch from my predecessor and do some cleanup in order for the code to be conflict free, so that later if the branch was complete, merging with main would not cause any problems.

The program runs on FreeRTOS (real time operating system) where I can still learn a lot about. Basically it runs a number of tasks, for example analog to digital conversion as well as drive the interface (a number of LED's on the BI). Every 2ms a packet is placed on the queue which can be consumed and processed. I learned many things about the packet protocols, as it can contain the actual biometric data as well as meta data.

I came closer to success step by step:

1. Mounting the SD card successfully

2. Creating a file and writing dummy data to it

3. Writing actual data to a file

4. Adjusting task priority and stack size.

Eventually I performed an overnight test, where the system logged almost 5Mb data without any interruption. Mission succeeded!!

MedTech
Bambi Medical
Embedded Software