Click to email me

The Maths Behind

Transformer Design

Rule of Thumb: For pulse transformers use the minimum number of turns possible while avoiding saturation of the core.

Observation: For the average power levels associated with this project the transformer can be expected to be physically small. For comparison think about the miniature audio matching transformers rated at about 0.5 W less than 1 cm cu, and switch mode power supplies with potted transformers with a total volume less than 2 cm cu rated at 12 W continuous with an operating frequency of around 50 kHz.

For pulse shape preservation we want high frequency performance (well above the 40 kHz resonant frequency for harmonics) therefore a ferrite core is desirable.

Toroids almost totally contain their magnetic fields, limiting coupling to other components. This is desirable.

As the coupling coefficient of the windings in a transformer approaches 1 the primary winding inductance approaches the magnetizing inductance, and the secondary inductance approaches the primary inductance multiplied by the square of the turns ratio.  Therefore with tight coupling the inductance seen from the secondary will be close to the inductance of the secondary winding.

Too much inductance is preferable to too little. It is easier to add additional capacitance in parallel with the transducer than additional inductance to the transformer.

Limitation.

The most readily available ferrite toroidal core was an 18 mm diameter L8 core from Jaycar Electronics made by Electus Distribution.  The core has the following data sheet characteristics:

    Ur, Initial Permeability = 1500
    Tan d/u, Relative Loss Factor <2.8E-5 @ 0.3 MHz
    Bs, Saturation Flux Density = 2,550 Gauss
    Br, Residual Flux Density = 1,225 Gauss
    Hc, Coercive Force = 0.225 Oe
    Tc, Curie Temperature >120°C
    DF, Disaccommodation Factor = 11.8E-3
    d, Density > 5 g/cm cu
    p, Resistivity = 19 Meg ohm cm

The core dimensions were:

    Cross sectional area = 6.0 mm high x 4.0 mm wide = 24 sq mm
    Core inner diameter = 10 mm
    Core outer diameter = 18 mm

The sheet current inductance of a ferrite cored toroidal transformer is given by:

    L = 0.0046.u.N2.h.log(r2/r1) uH

where

    r1 = inner radius
    r2 = outer radius
    h = axial depth of winding in inches
    N = number of turns
    u = permeability of the core material

This simplifies to L = k N2.  By winding a few turns on the core and measuring the inductance k turns out to be 1.75 for the L8 core where L is in uH.

The transformer inductive reactance needs to equal the static capacitive reactance of the transducer at 40 kHz.  Cs = 1.8 nF.

So   L  = 1/((2*π*f)2.C)

       = 1/((2*π*40E3) 2*1.8E-9)

       = 8.8 mH

Using L = k N2, k = 1.75 we can determine the secondary number of turns.

       N  = (8.8E3/1.75)0.5

       = 71 turns

The desired drive voltage at the secondary is 140 V ppk. With a bifilar primary winding switched from a 6 V supply, and allowing 0.5 V drop for winding and MOSFET drain-source resistance in each of the bifilar primary’s, this gives an effective primary voltage of 11 V.

For a transformer the relationship between voltage and turns ratio is:

    Np/Ns = Vp/Vs

where Np and Ns are the number of primary and secondary turns, and Vp and Vs are the primary and secondary voltages respectively.

Solving for the primary turns:

    Np = Ns*Vp/Vs

           = 71*11/140

                 = 5.5

           ~ 5 (rounded down because by test circuit actually has a 5 V rail)

Now would the toroidal core saturate?  The fundamental transformer equation is:

    Bmax = Erms*1E8/(4.44*f*Np*Ae)

where Erms is the primary voltage, f is the frequency in cycles per second A is the core cross-sectional area in sq inches, and Bmax is the maximum flux density in Gauss. (A latent memory from my school days suggests that the constant 4.44 should be 4 for a square wave drive but I can not substantiate this so I’ll run with 4.44.)

      = 5.5*1E8 / (4.44*40E3*10*(0.6*0.4))

      =  1,290 Gauss

The core should not saturate as the Bs is 2,550 Gauss and there should be no DC through the windings.

I have not considered the power rating of the core.  Both the average and peak power in this application are relatively low so that almost any core that I could physically wind would be expected to perform adequately. This was confirmed during testing. The core temperature did not rise perceivably above ambient temperature.

 

Transducer Range (in Air)

Transducer Specifications:

    Transmit SPL = 105 dB at 40 kHz referenced to 0dB = 0.0002 ubar at 30 cm.
    Receiver Sensitivity = -74 dB at 40 kHz referenced to 1 V/ubar.

SPL reduction at 1 m = 20 log (0.3/1.0)

           = -10.6 dB

Gain due to 70 V rms drive = 20 log ( 70 V rms / 10 V rms)

             = 16.9 dB

SPL at 1 m = 16.9 dB - 10.5 dB + 105 dB

                   = 111.4 dB

Equivalent pressure at 1 m = 10 111.4/20*0.0002

            = 74.3 ubar

Received voltage (assumed to be into open circuit because impedance levels were not specified for the transducer):

    Vr = 10-74 dB/20*1 V/ubar * 74.3 ubar

         = 14.9 mV

Measured received voltage ~ 17 mV at a distance of 1 m in air.

At a distance of 1.65 m the calculated receiver voltage was a meager 9 mV and the measured received voltage was fractionally over 10 mV.  The signal level was not a problem but the broad band receiver noise (about 8 mV) potentially was.

Note that the transmission characteristics in water are expected to be significantly better than this because air is elastic and absorbs sound energy more readily than water.

 

Signal Analysis

The transmitted signal at the input to the transducer is an ultrasonic pulse with a rectangular envelope (see top waveform in the Figure below). The frequency spectrum envelope of this modulated pulse is a comb of delta pulses within a sinc function ( sin(x)/x ) envelope, centred about the carrier frequency (see centre illustration in the Figure below for the envelope).  The bandwidth of the transmit and receive transducers are relatively narrow about the carrier frequency, thus the higher and lower frequency components of the ultrasonic pulse are lost, giving rise to the signal shape measured here (see lower illustration in the Figure below).   If broadband noise and interference is introduced in the communications channel then some of this can be rejected by limiting the receiver amplifier bandwidth to only the frequencies that we expect to receive. Therefore a bandpass filter response at the carrier frequency (40.3 kHz) with a pass band of approximately 1/(twice the pulse width) should reduce the reception of noise from brief high intensity sources, subject to the transient response of the filter.

 

Digital Signal Processing (DSP)

16 January 2010 and I have redeveloped my receiver to improve signal to noise while maintaining sufficient gain for ranging in excess of 100 m. The marine noise problem has been reduced significantly it is still not where I want it to be. Hence the need for DSP.

There are two a priori characteristics of the signal that should enable me to recover a valid transmitted signal in the presence of noise - the transmitted pulse width and the repetition frequency.

Pulse width is relatively easy to search for (aided by the hardware track and sample which returns the highest received value in a sample period). One simply has to look for sufficient consecutive valid signal levels above the noise floor over sufficient samples to cover the pulse width. This can be done in real time with my current ST6201 processor.

Pulse repetition is a little more complicated. The calculation needs either the sample history of the preceding pulses or alternatively the receive time of valid pulses for the calculation.

Autocorrelation is one technique for validation of periodic signals. My old university text ‘Communication Systems’ by S. Haykin describes autocorrelation for periodic signals through the following nasty looking integral.

While this looks daunting it concisely describes the process of multiplying the received waveform  by a delayed version of the same waveform, adding up the results and dividing by the sample period. Note that the integral reduces to a summation when the data is discretely sampled.  The Greek letter Tau is ideally the period of the transmitted waveform which we know already. The * is a complex conjugate but we are dealing with real signals so this requires no effort at all to solve. Multiplication using microcontrollers is usually time-consuming so I have come up with a trick to eliminate multiplication by representing the signal gp(t) in binary.

So how well does it work?  I have used Microsoft Excel to implement the software solution using previous noise and signal measurements from Goat Island.  Looking at the graphs in Figure 1 from the top down.  The top graph shows a 1 second measurement of valid transmit signal.  The second graph shows the valid transmit signals immersed in noise and resampled using the track and sample that is currently implemented in hardware. (Note that I have multiplied the field measured noise amplitude by 2 for good measure.)  I’m sure you will agree that it is difficult to visually discern the valid signal pulses from the noise. The third graph shows the signal binary conversion routine based on noise floor.  The received signal is now a sequence of 1’s and 0’s. The fourth graph shows the implementation of the valid pulse width detection. You can see the original pulse structure although the amplitude information has not yet been recovered.  The final figure shows the results of the autocorrelation with amplitude restoration. The result shows good visual correlation with the original valid signal (top graph).

While my ST6201 microcontroller can deal with the pulse width detection and binary signal conversion in real time it has insufficient RAM to store the previous pulse history (I need at least 256 bytes but 512 would be better).  With the current clock speed it is also has a relatively slow instruction execution rate of about 80,000 instructions per second which limits me to about 40 instructions per sample. This is a very real limitation to my DSP. I have decided to change to an Atmel microcontoller running at 16 MHz to effectively implement the DSP in real time.  This has several additional advantages including a reduction in cost, more I/O, optimized transmission frequency, on-board programability (and consequently a further reduction in case size through the use of SMD packaging for the processor). Thankfully I have some experience with the Atmel architecture and instruction set.

All I need to do is get on and write the code!

[Turtles are Here] [750Z Housing] [Construction] [A20 Housing] [Drawings] [Scuba Buddy Locator] [The Idea] [Proof of Concept] [Prototype] [Latest Update] [The Maths Behind] [Photo Galleries] [Galapagos] [Data Logger] [Making PCBs] [Links] [Contact Me]