ecg circuits
Silly method, I use it sometimes
Graphs of ECG you can find easily in the Internet
You can use audio editor like Gold Wave
Start new file of few seconds and 2k-sample rate
Generate low frequency square wave
Cut the negative part of the square wave
From Volume – Shape menu, shape the positive part of the square wave similar to one ECG wave cycle
To smooth the curve use low pass filter
Save the file as type - text integer mono
Now you have text file with numbers for lookup table for the microcontroller
To play it you need controller with DAC or use external DAC or if poor quality is OK use 8 resistors R,2R,4R.. to build primitive DAC
Just for basic knowledge – the final ECG graph you usually see is superposition of several signals form 3 up to 12 electrodes dependent on the ECG monitor quality