Changing the baseline of a generated ECG signal

Thread Starter

IamMareks

Joined Nov 30, 2017
3
Hello!

I have been working on a project where I'm making an Arduino based ECG signal generator and have encountered a problem that i can't seem to solve. So basically what i need to do is to be able to change the baseline (not sure if correct term) of the signal up and down (shown in the image).

The signal is generated from Arduino as a plain digital signal (from an array of numbers), then goes to the d/a converter and further on. My first idea was to just use two buttons that when pressed will either add or subtract a value from each number in the array and in that way increase or decrease the voltage of the analog signal. Is this possible? Are there any better solutions?

Circuit.jpg Baseline.jpg
 

DickCappels

Joined Aug 21, 2008
10,170
Sounds like you want to add an offset to the signal. Adding or subtracting a constant to each number in the array, maybe when the number is sent to the PWM channel, would do just that.

You might want to add tests for the case of an overflow and underflow so that too large of a signal plus or minus an offset will clip at zero and maximum instead of producing garbage on the output.
 
Last edited:

Thread Starter

IamMareks

Joined Nov 30, 2017
3
The amplitude is constant, the offset is what I was aiming to change. As english is not my native language I couldn't find the correct term, but it is offset, now I know. Thank you, BR-549.
 
Top