Electrocardiogram (ECG) synchronization is useful to avoid the effects of cardiac motion in medical measurements, and is widely used in standard medical imaging. A number of medical equipment include embedded commercial synchronizers. However, the use of independent synchronization modules is sometimes needed when several non-integrated instruments are used, or in the development of new medical instruments and procedures. We present a simple low-cost ECG synchronizer module based on an Arduino controller board that converts the ECG signal into a transistor-transistor-logic (TTL) one, allowing real-time medical measurements triggered at specific phases of the cardiac cycle. The device and conversion algorithm developed is optimized in vitro using synthetic and human ECG signals, and tested in vivo on three swine specimens. Error rates during the in vivo testing stage remain below the 2% of the cycles in all animals and critical false positives are less than 1%, which is sufficient for most applications. Possible algorithm updates are discussed if its performance needs to be improved.