Printing apparatus 20 comprises a contact detection terminal 101, a cartridge detection circuit M10a, a for-senor terminal 104 and a sensor driving circuit M20, wherein the terminal 101 contacts to detection terminal 116 of ink cartridge 70 when the ink cartridge 70 is attached thereto, wherein the circuit M10a detects contact or non-contact between the terminal 116 and the terminal 101, wherein the terminal 104 outputs high voltage, wherein the circuit M20 controls voltage outputted from terminal 104. The cartridge detection circuit M10a also has a function of shorting detector for detecting contact between the contact detection terminal 101 and the for-senor terminal 104. In the case that the shorting is detected, the sensor driving circuit M20 redeces or interrupts the voltage outputted from terminal 104.