Other Parts Discussed in Thread: , ENERGIA
Hi,
I've created a new board based around the PGA460, but I am having some issues with getting a reading off of it.
One note, I know that the SCLK should be via a 10K resistor, but this is the current board I am working with and I don't have a fix to put that in for this version.
I am interfacing to a Particle Electron (cellular MCU). It is generally compatible with Arduino, so I have ported over the get distance sample code to work with it, and that seems to be working ok on the MCU side.
When I run the code, I have tried a few different baud rates, and it looks like I have a working connection on the UART. I have set it up with 8 Bits, No Parity, 2 Stop Bits.
The oddity that I have run into is when the diagnostic results come back and the non-response of the sensor to changing conditions.
Here are two runs on the same sensor. For this I am using the Murata sensor from the original dev board, so the gain, frequency, and other things should be OK.
(First run with the Murata, 115.2k baud - Run ended after the echo dump, so baud rate is probably too high)
Configuring the PGA460 with the selected settings. Wait...
System Diagnostics - Frequency (kHz): 83.33
System Diagnostics - Decay Period (us): 2464.00
System Diagnostics - Die Temperature (C): 98.00
System Diagnostics - Noise Level: 85.00
Retrieving echo data dump profile. Wait...
55,220,55,243,187,175,251,191,191,191,191,191,191,191,191,191,191,191,191,191,87,87,87,61,183,246,63,251,48,247,187,175,83,83,166,198,208,27,131,191,191,182,182,56,33,134,135,254,246,86,230,51,62,38,167,36,181,230,202,71,171,23,209,75,38,102,39,51,182,53,52,131,167,246,59,164,173,245,195,236,115,242,172,185,56,59,150,32,102,192,186,131,178,243,169,166,70,191,167,186,214,38,203,155,236,235,167,115,22,19,43,162,186,225,183,60,174,195,224,178,134,7,254,187,3,226,224,155,
(second run with the Murata, 38.4k baud - seems like a stable connection, the output continued as shown until paused)
Configuring the PGA460 with the selected settings. Wait...
System Diagnostics - Frequency (kHz): 20.00
System Diagnostics - Decay Period (us): 2432.00
System Diagnostics - Die Temperature (C): -40.67
System Diagnostics - Noise Level: 81.00
Retrieving echo data dump profile. Wait...
227,249,217,191,191,191,191,191,191,191,191,191,191,191,191,191,191,236,55,99,246,165,177,184,187,188,189,189,189,190,190,189,189,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
P1 Obj1 Distance (m): 2.70
P1 Obj1 Distance (m): 2.70
P1 Obj1 Distance (m): 2.70
P1 Obj1 Distance (m): 2.70
P1 Obj1 Distance (m): 2.70
P1 Obj1 Distance (m): 2.70
(Third run with Murata @ 38.4k baud - Distance readings just keep repeating, regardless of what is infront of the sensor)
Configuring the PGA460 with the selected settings. Wait...
System Diagnostics - Frequency (kHz): 20.00
System Diagnostics - Decay Period (us): 3408.00
System Diagnostics - Die Temperature (C): -40.67
System Diagnostics - Noise Level: 85.00
Retrieving echo data dump profile. Wait...
55,220,55,243,187,175,251,191,191,191,191,191,191,191,191,191,191,191,191,191,87,87,87,61,183,246,63,251,48,247,187,175,83,83,166,198,208,27,131,191,191,182,182,190,190,190,190,190,190,190,190,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
P1 Obj1 Distance (m): 5.98
P1 Obj2 Distance (m): 0.70
P1 Obj6 Distance (m): 7.48
P1 Obj7 Distance (m): 1.41
P1 Obj8 Distance (m): 7.01
P1 Obj1 Distance (m): 5.98
P1 Obj2 Distance (m): 0.70
P1 Obj6 Distance (m): 7.48
P1 Obj7 Distance (m): 1.41
P1 Obj8 Distance (m): 7.01
P1 Obj1 Distance (m): 5.98
P1 Obj2 Distance (m): 0.70
P1 Obj6 Distance (m): 7.48
P1 Obj7 Distance (m): 1.41
P1 Obj8 Distance (m): 7.01
As you can see, the die temp reading is odd. In the first run it shows much higher than actual (actual is room temp), and the second and third times it shows below freezing.
The 7.5V supply is from a small step-up supply on the same board, going from a LiPO battery. The 7.5V reads pretty stable and very near ideal.
I know this may be some mistake on the board or the driver design for the transducer, but the temp reading being off doesn't seem like it would be connected to a drive issue. Any thoughts on what may be going on here?
I have tested two separate boards with the same results from both, so I think it is probably a board level design issue rather than a problem with a single sample.
Thanks in advance for any help.