Other Parts Discussed in Thread: ENERGIA
Hi,
I've created a board around PGA460 to interface with Murata MA58MF14-7N and Arduino Mega 2560, and I'm having problems getting readings for object detection.
The design is based on the suggested layout from the PGA460 datasheet.
I'm using the Energia Code and Library to run the GetDistance program, with slight modification of #include <Energia.h. --> #include <Arduino.h>. Otherwise, everything is kept the same.
I have been running the code with 19.2k baudrate, set up with 8 bits, no parity, 2 stop bits.
The problem I'm running into is that the same distance measurement keeps on appearing regardless of whether or not an object is in front of it or not. I have looked up this problem in the E2E forum and found someone experiencing the same problem (https://e2e.ti.com/support/sensors/f/1023/t/705837?PGA460-Custom-Drive-Board-Design-Issues). Below is my own record of the problem:
It was suggested from the forum that:
"For instance, the repeated result value of 2.7m from one of your examples may actually be a combination of the diagnostic field and the time-of-flight's MSB byte, rather than the time-of-flight's MSB and LSB byte. More specifically, if the diagnostic field is 0x40 and the ToF's MSB is 0x00, the the ToF according to the master is 0x4000 (16384us), which is identical to ~2.810m. You would likely see this value change if a long range ToF were captured." - Akeem
I have tried to verify this by printing out all the elements in ultraMeasResult[] array, but found no changes in any elements when posing an object in front of the Murata sensor.
Also, it was suggested that I should try to read the values of UART transmit and receive activity:
"I recommend that you first use a logic analyzer to check the values of the UART transmit and receive activity of the PGA460, and to ensure the diagnostic field is not a value other than 0x40. (A diagnostic field of 0x40 implies there is no UART communication error.)
Then, you should check how the actual byte values are being queued into the resulting array (in your PGA460_USSC.cpp file equivalent) of your ported code." -Akeem
I'm not sure how to do this. I will appreciate if there's detailed instructions and code for how to do this.
Other oddities that I have observed:
1. When I unplugged the Murata sensor, the measurement keeps on displaying the same number instead of outputting like "No data".
2. I've tried probing with an oscilloscope at INP and INN, and the signals are constant. I have tried exciting the INP with a small voltage, hoping to see a change in measurement but nothing changed.
3. RX pin on PGA460 is pulled highed for some reason.
4. Switching on and off the power supply will sometimes give a different measurement number.
Thanks in advance for any help
Uyen