Ultrasonic 'chirp' circuit

Had an interesting discussion at the space tonight regarding ways of generating a tone suitable for driving an ultrasonic transducer.

Managed to hack up an example using an Arduino Duemilanove. Signal shape looks good with regards to timing.

#include <SPI.h>

// Ultrasonic sensor ‘chirp’ generator.
// Stephen Davies
// 18 July 2018
// MOSI (11) - enable signal (active low)
// SCK (13) - ‘chirp’
void setup() {

SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));

void loop() {
if (Serial.available()) {

1 Like


Andrew, google ‘ultrasonic driver schematic’.

TI make a chip that looks capable of driving a push-pull transformer circuit. SN6505B (repeat B)

Making some headway, Steve has been very helpful.

The motivation for this is to measure the speed of sound in a given fluid. Actual timing values aside, my measurements won’t vary much, between 1050 and 1010. I want to use 1MHz transducers because of the shorter wavelength giving greater fidelity over 40kHz variants.

We have a 1MHz push-pull square wave on 2 pins though voltage is low (so will need more playing), this weekend will be to simplify the circuit from Wednesday, remove the diodes and see if that cleans up the signal.

*the chip is a 74LS02 NOR logic gate

Intend getting higher drive voltages through a boost converter and storage caps rather than separate power source.

Next is connecting the receiver to an opamp (or 2),my knowledge gap is running the Tx and Rx through the same transducer and having an effectively timed gate to ensure we don’t overload the opamp while transmitting. Intend standing off for n x ms to open and close a brief sampling window through the microcontroller so that we ignore the transducer ringing and any subsequent echos (given that it is a known distance).

Discussion is open to the floor and thanks in advance.


After minimizing the circuit the setup as-is was not suitable, it appears that the mosfet has too much capacitance resulting in (D0 - signal #1, D1 - mosfet drain signal #2, D2 - signal #2):

Adding a pulldown resistor resulted in:

Finally I reverted to having transistors in a darlington pair, while not using mosfets, 500mA will be more than enough:

Hi Andrew,
am curious about your mosfet test.

  1. Which part did you use?
  2. What did the test circuit look like?

Hi Stephen,

The mosfet (IRF1405) gate was connected directly to output on the NOR gate.

Current configuration is:


From memory the nor gate was a 74LS02. Am not surprised it didn’t work. The various TTL families, I.e. 74xx/74LSxx etc., have bugger all ability to drive high. Output high volts is ~3.3V, high drive current is limited to 0.4mA.

The IRF1405 threshold voltage is 2V min, 4V max. So TTL output may or may not turn it on. A high tie resistor would have helped. A CMOS nor gate like CD4001 would be even better. CMOS outputs drive pretty much rail to rail so a high output would be close to 5V. Much more current, typically 2-3mA.

Had persistent issues driving mosfets at 1MHz so decided to hand wind a small 1:5 transformer - and am pleasantly surprised that it matches the frequency and inverts. It is low current but that will be the next problem to solve.

Hi Andrew,
Realise i’m probably creating a zombie thread here but was reading up on mosfets and found some interesting things.

Firstly, mosfets in the IRFxxxx series need to have their gate driven to 10V or so I.e. Vgs = 10. Your circuit was never going to work with the gate being driven by TTL. Mosfets in the IRLxxxx series are designed for logic level gate control, apparently that’s what the L stands for.

Also, if you compare the gate charge values between the two the IRF1405 has Qg of 170-260 nC, the IRL2703 has Qg of 15 nC. An order of magnitude difference.

Derryn gave me a few samples of the IRL2703, let me know if you’d like to try some out.

First cut at PCB production, fine lines are 0.55mm wide in the sketch, some questionable wavy lines but otherwise the method is looking sound.

Spotted at the green shed

1 Like