This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PGA460PSM-EVM: Unable to configure the sensor in High Frequency Mode

Part Number: PGA460PSM-EVM
Other Parts Discussed in Thread: PGA460, , ENERGIA, PGA460-Q1

I have connected PGA460PSM-EVM with MSP432P401R. I have used the Get Distance.ino code as mentioned in PGA460 Software Development Guide. I am able to get the distance for objects placed at a distance greater than 30cm. However my application requires to measure distances between 10 and 60cm. Is there any way to shift to high frequency mode of PGA using the code mentioned in the Software Development Guide and not the GUI.pga_ultrasonic_guide.pdf    

  • Hi Amit,

    If you are using the 40-kHz PUI Audio UTR-1440K-TT-R included with the PGA460PSM-EVM, then you are limited to an approximately 30cm minimum. This transducer is intended for long range applications in the meter range.

    The PGA460 compatible with ultrasonic transducers operating at a center frequency between 30 kHz to 80 kHz and 180 kHz to 480 kHz. Keep in mind that transducers have narrow operating bandwidths of +/-1 kHz, so you cannot use a 40kHz transducer at any other frequency.

    For a 10 to 60cm range, you should consider using a single high frequency transducer in the 180 to 480kHz range, or any bi-static transducer pair (separate emitter and receiver). Take a look at the PGA460 Transducer & Transformer Listing for transducer part numbers.

    It is possible to enable high frequency mode in the Energia sketch by modifying or adding a switch-case to the PGA460_USSC.cpp file.

  • Ok understood. Could you guide me with the modifications required in the PGA460_USSC.cpp file?

  • Hi Amit,

    In the void pga460::defaultPGA460(byte xdcr) function, add or modify switch-case statement '2'. When prompted which transducer to use in the serial port, enter value '2' (will not be shown as an option, unless you modify the serial dialog at the sketch startup).

    In this switch-case, there are two registers you will need to update that are import to enable and set high-frequency operation:

    • TVGAIN6 (bit 0 FREQ_SHIFT set to 1 to enable FREQ = FREQ * 6)
    • FREQUENCY (bit 7:0 FREQ to drive and receive frequency = 0.2 * FREQ + 30 [kHz])

    You can burn these settings into the device EEPROM so that you don't need to write to them every time after power cycling.

    However, just like the thresholds, the band-pass filter coefficients are stored in volatile memory, and will need to be written to at least once after power-up or wake-up from low power mode to enable the receiver for high frequency mode. The registers that you will need to manually write to are:

    • BPF_A2_MSB
    • BPF_A2_LSB
    • BPF_A3_MSB
    • BPF_A3_LSB
    • BPF_B1_MSB
    • BPF_B1_LSB

    You can use the PGA460-Q1 EVM GUI's BPF Coefficient Calculator or the High-Frequency BPF Coefficients look-up table to determine what these values need to be set to. You do not need to EVM hardware to run the GUI to get this information. PGA460 FAQ #5.10 ( http://www.ti.com/lit/an/slaa733/slaa733.pdf?ts=1588703250746 ) gives a similar step-by-step guide on enabled high-freq mode: 5.10 How do I successfully use a high-frequency transducer (180-480kHz) with the GUI?

    In your GetDistance.ino Energia sketch, you will need to add six lines call of the byte pga460::registerWrite(byte addr, byte data) function after the defaultPGA460 function to perform the single register writes to the BPF coefficient registers since they are not included in the defaultPGA460 function. Eventually you could also create your own setHighFreqCoef function in the PGA460_USSC library to hide the six register writes from the main sketch.