Apparatus for tracking an object includes a position transducer, which is adapted to be fixed to the object. The position transducer includes a digital microcontroller, which includes a plurality of output pins, and which is operative to generate an alternating digital output at a selected frequency on at least one of the output pins. At least one transmit antenna is coupled directly to the at least one of the output pins, so that the at least one antenna transmits a magnetic field at the selected frequency responsively to the alternating digital output. A field sensor senses the magnetic field and generates a signal responsively thereto. A processor receives and processes the signal in order to determine coordinates of the position transducer.