Mustelidae have a strong dislike
of sound waves around 23 kHz which are inaudible for humans.

Ultrasonic sound burst generator

The heart of our generator is an ATtiny25-20 micro. To avoid the animals from becoming habituated, it generates a burst of roughly 1 second every 10 seconds. Since we human cannot hear whether the circuit is active, an LED makes the operation of the circuit visible. The microcontroller itself is nowhere near capable of delivering enough current to drive a loudspeaker directly. So we added a BS170 MOSFET as a driver stage for the MPT-001 tweeter from Monacor. After measurements in the Elektor Labs this appeared to be eminently suitable for the application at hand.
A circuit board of just  a few square centimeters in size was designed for the marten repeller. It uses only ‘through-hole’ components, so even a less-experienced hobbyist will not need much more than an hour to assemble it.

Specifications

• 9 to 12 VDC supply voltage • 7 mA average current consumption • 80 mA current consumption during sound burst • 2 mA quiescent current consumption • 20 kHz to 43 kHz adjustable frequency • intermittent output sound
 
Read the full article published in Elektor Magazine  (free download)

Photo credits: Martens Foina by Bohuš Číčel (Own work) | CC-BY-SA-3.0 via Wikimedia CommonsBackground music credits