This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Software for EEG System
Background
EEG systems capture the brain’s electrical signals via electrodes placed on the patient’s head. These faint neuron impulses are amplified and either displayed on a screen or printed on paper. Such diagnostics enable physicians to detect and analyze disorders like epilepsy and blood flow issues.
Currently, developers of EEG equipment are focused on:
- Improving signal integrity and reliability by reducing noise through better amplifiers and electronics;
- Integrating EEG systems with mobile devices and cloud services to speed up and simplify diagnostics;
- Strictly following international standards and certification guidelines to produce safe and reliable equipment.
By taking a comprehensive approach to these challenges, we can bring to market EEG devices that are both effective and safe, meeting the needs of modern healthcare providers.

Request
Our client is a company focused on innovative EEG recording solutions. Thanks to their patented technologies, they provide highly accurate EEG recordings and collaborate closely with leading academic and research centers.
When our client faced a gap in experienced software engineering resources, they decided to engage an external development team for the new EEG system software. They chose Integra Sources because we offered deep expertise in complex hardware-software integration, along with optimal timelines and competitive pricing.
Our main responsibilities on the project were:
- Developing firmware for the EEG signal processing unit that met all functionality and power consumption requirements;
- Designing an SDK to support communication between the processing unit and the EEG application on a medical tablet.

Solution
The system includes a disposable headband with fourteen electrodes and a processing module. The headband is placed on the patient’s head to record brain activity. The processing module gathers signals from the electrodes, saves them onto a built-in microSD card, and transmits them over Bluetooth to a tablet device. The SDK on the tablet side receives the data stream, processes it, and keeps the application running smoothly.
Our device needs to handle several tasks simultaneously—receiving commands from the mobile app, processing signals from the analog-to-digital converters (ADCs), and saving data to the microSD card. To manage this multitasking efficiently, we chose FreeRTOS, an embedded operating system well suited for concurrent tasks in resource-constrained environments.
With FreeRTOS, we can run multiple tasks at the same time: accepting commands, processing incoming data, buffering it, and saving it to the microSD card. The tasks coordinate smoothly—one waits for a start signal, another processes the data, and a third writes it to storage.
Additionally, FreeRTOS helps optimize power consumption. When there’s no data to process or writing is complete, the microcontroller briefly goes into sleep mode, cutting power consumption and extending battery life up to 16 hours—ideal for long EEG monitoring.
To interface with the client’s app, we created an SDK in Java for Android. It unpacks compressed data into convenient formats and manages command transmission to the device.
In addition, our developers built a tablet application with a simple interface for internal testing. Instead of graphics, it displays text messages showing authentication status and the number of packets received, which simplifies the debugging process.
We’ve made the tablet-to-device connection easy and secure using NFC and BLE. Bringing the tablet close lets NFC scan a special tag containing the BLE address, enabling immediate pairing—even in environments crowded with similar devices.
For security, we use HMAC-SHA256 authentication. Once connected, the EEG scanner sends a unique challenge message to the tablet, which must process it and respond correctly within one second. If the response is missing or incorrect, the connection is terminated. This ensures that only tablets equipped with our SDK can operate the device.
Major Issues Resolved
Dual-MCU architecture
The client’s hardware platform relies on two microcontrollers—the PIC32 manages all primary functions, while the NINA-B311 module (powered by an nRF52840) is dedicated purely to BLE data transmission. This dual-controller setup increases costs and limits efficient resource usage.
We advised simplifying the platform by replacing the two microcontrollers with a single nRF52840 equipped with the necessary peripherals and connecting ADCs directly. This approach would reduce costs, boost energy efficiency, and offer greater flexibility with BLE operations.
However, the client decided to stick with the original architecture, so we completed the project using the supplied hardware.
Direct microSD data writing
The device constantly streams EEG signals and writes them to a microSD card at a high frequency, which generates a large amount of data. We had to make the most efficient use of the card’s storage space without compromising the stable data transfer rate to the tablet.
We decided to step away from the standard file system and write data straight to the card. Our team thoroughly studied the card’s architecture, caching, and flow management. This allowed us to optimize the process and achieve high-speed, reliable writes even under heavy load.
High-speed transfer via u-blox SPS
Since the client selected the NINA-B311 Bluetooth module, our options to organize BLE data transfer and fine-tune BLE were limited. Standard BLE services that we usually deploy on nRF platforms didn’t achieve the necessary speeds here. To get the best possible data transfer rates, we chose u-blox’s SPS service, which was the only option offering the high bandwidth we required.
Due to SPS’s data transfer characteristics, we created a custom protocol layered over the service.
Scope of Work
- Embedded software development
- Data packing protocol development
- Building an SDK for the tablet’s Android app
Technologies
- The platform provided by the client runs on a PIC32MX174F256DT-V/ML microcontroller with a 32-bit architecture and 256 KB flash.
- Firmware for the PIC32 microcontroller is created using Microchip’s MPLAB X IDE and MPLAB XC32 compiler.
- BLE connectivity is provided through the NINA-B311-01B module with the nRF52840 chip from u-blox.
- Data over BLE is transmitted using SPS (Serial Port Service).
- The system includes the ADS1298IPAG ADC for analog-to-digital conversion.
- FreeRTOS-based embedded software is implemented in C/C++.
- We created an Android SDK using Android Studio and Java.
- The Advantech AIM-75H-2 medical tablet is employed to display testing results.
- A 32GB microSD card is used for data storage.
- Tablet authentication is implemented using the HMAC-SHA256 hash algorithm.
Result
Although the client chose to keep the EEG recording hardware architecture unchanged, we completed the project and met all requirements:
- The embedded software we created keeps the system running smoothly and optimizes power consumption.
- Our custom data transmission protocol delivers data quickly and effectively to the tablet device.
- We carefully configured microSD card operations to ensure every record is saved, whether in streaming mode—where data flows immediately—or playback, where the session is recorded offline and uploaded later. In all cases, data remains safe.
Integra Sources helped the client launch a modern EEG system on time, fully aligned with strict quality standards.
You might also like...

Remote-Controlled Aroma Diffuser for Perfume Stores
The customer was looking for developers with a high level of expertise and experience in IoT systems. Integra Sources met these criteria. We created a range of software solutions for the client’s product.
LEARN MORE

Portable Dermatoscope
We partnered with a leading dermatoscope manufacturer to modernize their compact model by integrating smartphone connectivity, upgrading key components, enhancing lighting and indicators, and optimizing charging speed. These improvements boosted both usability and market competitiveness.
LEARN MORE