The client is a global medical solutions provider. The company needed to upgrade a raw sample of their heartbeat simulation device, which is used to demonstrate their clinical cardio equipment. They wanted a fully functional solution with several heart signal modes that would help them showcase their equipment more effectively, increasing sales. The simulation device would also allow the client to educate medical staff on how to use the equipment without actually needing human participation.
The client produces and sells a heart amplifier—a system that tracks and records heart signals. It is supplied to hospitals and helps doctors diagnose heart diseases. During demonstrations, the system used to need to be plugged into the human body to obtain heart signals. This wasn’t practical and meant the system was used less frequently. As such, this limited the client’s opportunities for demonstrations and sales.
To avoid having to use a real patient, the client built a raw prototype of an additional device that simulated heart signals. It would connect to the heart amplifier to reproduce a cardiogram pattern. The prototype, which was built on the Arduino platform, could generate an output signal similar to the signal of a real heart. The solution generated up to 11 cardiogram patterns that emulated different heart conditions.
But the device was non-user-friendly—it didn’t allow heart signals to be changed on the fly. For example, adjusting just one of the signal peaks could ruin the whole pattern. The device was also unstable and randomly gave out signal failures, which spoiled the cardiogram pattern. These issues meant that a new heart condition configuration required firmware updates.
The customer wanted to make the heart-simulating device more universal. They wanted a stable and easy-to-configure solution that could be used by doctors at hospitals.
Softeq was employed to upgrade the hardware and firmware to enable a quick and simple setup. To achieve this, we had to review and document the firmware code and hardware architecture. We were also asked to deliver ready-to-use devices that could interface with the client’s heart amplifier to showcase its capabilities.
Our hardware team changed the device components to improve its performance.
We replaced the Arduino microcontroller with a Raspberry PI microprocessor installed on a carrier board. It sends signals that convert into micro voltage output signals, which are required for the simulator. Also, Raspberry PI allows Linux OS to run. This enabled us to install firmware controlled via an internet connection.
To make the solution universal and UX-friendly, we rewrote the initial code completely. This would allow users to configure heartbeat modes without the need to rebuild the firmware.
Simplifying Heart Mode Adjustments
We converted code blocks into JSON format. This enabled the client to quickly create new cardiogram patterns manually. Users can now form new peak sequences by changing figures in the impulse delay field. They can also compile new heart conditions out of separate code pieces taken from different modes.
Resolving the Technical Challenges
The device’s operating scenario imposed certain requirements. It had to keep a sharp signal timing, generate random impulses, and reproduce an externally specified heart rhythm.
Impulse delay elimination. The timing of signal peaks was critical, with an admissible error of 0.5 ms. If the delay is longer, the peaks will differ, and the ECG picture will be invalid.
In order to strictly adhere to time periods, we had to get into the Linux kernel. We used kernel timers, which precisely schedule functions to be executed at specific times. Our infrastructure allowed us to set peaks with an accuracy of 0.1 ms. The end result was a system that provides heart condition modes without fluctuations.
Realistic pattern replication. Our firmware engineers developed a feature for adding random impulses to an ECG pattern—just like a real heart. We also added a periodic repetition function for the same signal, making it possible to repeat the event the required number of times.
External signal responding. We enabled the device to respond to a pacemaker—an external device that connects to the heart amplifier and sets the heart rhythm from the outside. The solution’s 11 modes should show different reactions to pacemaker signals, drawing their own impulse patterns.
Connecting the Device to a Server
The device connectivity is based on MQTT—a simple messaging network protocol. To make the connection stable, lightweight, and secure, we used libmosquitto—an open-source client–server library. The heart simulator connects to the client’s server and receives commands in JSON format to turn on the required mode.
Adding Extra Functionality
At the customer’s request, we equipped the heart simulator with additional features for better diagnostics:
Softeq collaborated with a trusted contractor who handled component sourcing. They manufactured PCBs and supplied the required components based on our documentation. The final assembly of the heart simulator was then carried out in our Softeq laboratory.
The heart simulator can both simulate heart signals based on the pacemaker’s external commands and generate heart impulses itself.
Our firmware engineers made the device easy for regular users to manage and configure. This helps the client sell the heart amplifier that the device interfaces with.
The initial batch we delivered was made up of just a few items. After the heart simulator had passed real-world testing, the client increased the order by several times.