Speaker tick generator (for polarity testing)

A recent purchase of an inexpensive ($6) speaker polarity tester prompted a need for a stand alone driver for speakers.

Above, the tester has a microphone that senses the polarity of the pressure wave and indicates with one of two LEDs.

The tester comes with a CD containing a file that can be used to provide the test signal on a complete system with CD player, but there is a need for a stand alone driver for testing bare speakers or speaker units.

An ESC based solution

A framework for a possible solution is an Electronic Speed Controller used widely with brushless sensorless DC motors on UAVs and available at very low cost.

The BS12A ESC used has some useful elements on board:

  • Atmega8 microcontroller;
  • three n-Fet half H bridges connected to the MCU, only two are needed; and
  • 5V regulator for the microcontroller.

The one used came from spare stock and cost about $7 a few years ago.

Code was developed in the Arduino workbench (the hardware is Arduino compatible).

Above, the BS12A with superfluous connections removed, reprogrammed and wrapped in clear heatshrink. It needs 7-18VDC and can switch up to 12A. The generator was successfully tested on a 9.6V NiMh pack, I would not try to use it on a common 6LR61 9V battery. It generates 250µs pulses 1s apart, in a repeating sequence of three positive ones followed by one negative one.

The accepted convention is at +ve voltage applied to the speaker's + terminal should create a positive pressure transient in front of the speaker cone.

A compliant speaker when connected + to + to the tester will result in three flashes of the + (green) LED, then one of the – (red) LED, and so on repeating.

Here are the source code elements, bs_nfet.h and stg.ino.


On test, it works a treat.