I’m stuying and evaluating the MOD_CH101-03-01- I have an DKCH101 Development Kit.
I download the example SmartSonic_HelloChirp_v1_11_0 from TDK site. I’m using 4 device MOD_CH101-03-01 that are connected to the daughter board of the Development Kit.
I run the application without make modification. I only uncommented two define (READ_AMPLITUDE_DATA and OUTPUT_AMPLITUDE_DATA) inside the file app_config.h in order to allow the application to print the full amplitude data after a measurement cycle.
I print the full data value in a Comma Separated Value file in order to analyze the data in Excel (like it was the A-scan) and I noticed that:
1. The device return correctly the distance of the nearest object in the FoV
2. But the full amplitude data does not represent the total registration of theultrasonic impulse since after the sample 65 or 66 (that is about 500 mm using the formula to conver sample in distance [mm] ) the registration start from first sample and I lose the remaining samples (about 30 sample loss since the maximum distance for this example is 750mm by default)
This registration was made by the Sensor3 (cofigured in CH_MODE_TRIGGERED_RX_ONLY) that reports in CH_RANGE_DIRECT, but also if I configure all the sensors to report the data in CH_RANGE_ECHO_ONE_WAY I have the same problem, that is:
the reported measurement is correct but if I plot all amplitude values I found an unexpected behaviour since after a certain number of samples(65 maybe) the amplitude values are replicated.
Please see the figure 1 of the pdf file in attachment.
Related to this problem I realized another example in which the four device MOD_CH101-03-01 are configured in HW-TRIGGERED MODE (firts sensor TX/RX and the remaining sensors Rx-only). The Max ranging distance is set to 1200mm (thus we use 150 sample). The four sensors are installed in a box. They are in the same line. They see the same environment. In their FoV there are two object.
Please see the figure 2 of the pdf file in attachment.
The sensors report correctly the distance to the plastic bottle since it is the nearest object in the FoV. If I collect the full amplitude data I can see also the second object (the grey plastic box) but as in the previous message I do not understand why the the variuos plots are truncated around 500 mm and then restart from the beginning. The result is shown in the diagram below
Please see the figure 3 of the pdf file in attachment.
Reading the CH101 documentation I noticed that the SonicLib API library function (ch_get_amplitude_data) should calculate amplitude values by means of I / Q data pairs. Since this example allows to obtain the I / Q data, I chose to compare the amplitude values obtained with the ch_get_amplitude_data function with those obtained by processing the I / Q data pairs "manually" (i.e. for each pair I calculated the square root of the sum of I^2 + Q^2).
As a use case I chose to place only one object inside the FoV of the sensor placed at a distance of 850 mm. Thanks to this comparison I was able to notice that using the raw I / Q data I do not run into the same phenomenon that I had using the amplitude values coming from the function ch_get_amplitude_data. Below I show the comparison:
Please see the figures 4 and 5 of the pdf file in attachment.
Could you help me understand why this happens? Furthermore, why, considering only the first 60 samples, the two graphs are not the same? Perhaps for certain versions of the CH101 firmware the function ch_get_amplitude_data does not use the I / Q data to calculate the amplitude values?
Sorry for the length of the message. I wanted to be as clear as possible.
Thanks in advance for your support!
Vincenzo
I have also noticed that the output amplitude samples are duplicated. i.e. if ch_get_num_samples() returns say 130 then the second 65 samples are duplicates of the first 65 samples. Whether this means that every other sample is missing or the last 65 samples are missing, I'm not sure as I don't trust the data.
Is anyone at TDK looking into this?