Other Parts Discussed in Thread: MSP430F5242, ,
Tool/software: Code Composer Studio
Hi,
I need to calculate the distance from an object to an ultrasound sensor. I have a PCB and components to do that but I have doubts about using the right commands. I use USART interface.
I use a MSP430F5242 to communicate with pga 460.
First I tried to do that using the “Transducer echo data dump” command (command 7 in page 38 of pga460q1.pdf). For each measurement I obtained 128 Data Bytes. I think this solution is for data analysis and not for a final measurement system (FMS). To obtain an algorithm to calculate the distance automatically with command 7 we need to do a hard work, specially, to discriminate the “normal zone” and the “blind-zone” (the zone with an object with a distance nearly less than 25 cm from the sensor).
For a FMS, we can use “Ultrasonic measurement result” (command 5 in page 38 of pga460q1.pdf). My doubt is how to use this to detect if an object is in the “blind-zone”. If an object is in the “normal zone”, command 5 can be used correctly for example with a “threshold level” high in the begin, and nearly 56 after the blind-zone. But if the object is at a distance less than 25cm the result obtained with the execution of command 5 is wrong (for example – if distance equal 15 cm the result are 44,3 cm).
To detect the blind-zone I tried to use command 8 – detect the decay time but I have doubts about the answer. For example if I consider SAT_TH = 14 (0xE) and take a measurement with no object nearby, I obtain a value of the decay time in decimal – 79. Converting this in time (in µs) we have 79x16 = 1264 µs. In attachment I send an excel file with a measurement with command 7 of the first 99 values and the distance and time of the data according to the configuration selected.
My doubts are:
- Is it possible to calculate the distance of an object to the sensor with command 5 and command 8?
- If yes, how is it possiblePost17-12-2019.xlsx