📜 ⬆️ ⬇️

Module underwater ultrasonic rangefinder. Part two

image

In the first part, we described the process of developing a test version of the module of the underwater rangefinder. The time has come to share information about the second version of the module, since we have implemented the proposed changes stated in the first article.

Change # 1: Temporary automatic gain control (TAD).
In the process of testing the first version of the module, the problem of zaskalivanie reflected signal from obstacles that are close to the radiator clearly loomed. Some commentators to the previous article recommended the SAIL. Yes, the use of VARU was very appropriate. Now, in the first moments after the sending of a probe pulse, it is possible to make the gain minimal and increase it over time.

The implementation of the control is shown in diagram number 1.
')
The microcontroller DAC generates a voltage applied to the gate of the Q4 transistor.
For the applied transistor, the characteristic of the introduced attenuation was experimentally obtained, depending on the voltage on the gate. Based on this characteristic, and the environment parameters specified by the user, a table of values ​​is calculated, which is sent to the microcontroller's DAC via DMA.

Actually, the transistor, operating in linear mode, partially closes the useful signal from the output of the first amplifier stage to ground, thereby adjusting the amplitude of the signal that goes to the next stages of the amplifier.

image

Change # 2: Boost converter to power the output stage.
Scheme â„–2. Everything is simple. A booster transducer allows you to make our emitter a little louder. You can adjust the output stage voltage from 5 to 16 volts. Useful thing for long-range measurements.

Change # 3: MEMS gyro / accelerometer.
Scheme number 3. Built ICM20602 chip. This will allow you to receive not only information about the levels of reflection from objects in the beam path, but also the direction (angle) where the module is looking at at that moment. Having made the simplest development of a module (even if you twist the module with your hand) you can get a realistic image of the scanned object using the principle of imaging with a lidar.

The changes should also include the use of a cheaper, but not the worst amplifier MCP669-E / ML. The gate drivers also selected the cheapest available TPS51604DSGR.
The shape of the printed circuit boards is made round for more rational placement inside the metal case.

For compactness and consistency of characteristics from instance to instance, the transformer is manufactured according to planar technology.

Iron is ready. What's next? Starts programmers coming!

Although the basic low-level functionality has already been tested in operation (driver control, working with ADCs, DACs, etc.), it is also necessary to implement convenient interaction with the host, create and describe in detail the API that gives access to all the capabilities of the module. Let me remind you that we have chosen the UART as the physical interface for this purpose. And here it is worth mentioning that a disagreement appeared in the team as to what kind of protocol it is worth while to stop: on text or binary. On the one hand, the binary protocol is a speed, ease of processing on the host side. On the other hand, the text protocol makes it easier to analyze the data exchange (even in the “Hyperterminal”), and use meaningful commands / responses from the module. Here is a small example of interaction with the module using text commands in the Putty terminal:

image

Pressing the TAB key displays a list of all commands.

An example is given of using the YPR command, which returns the current value of the direction of the module in three axes (Euler angles).

The CHART command returns the value of the reflected signal from objects in the path of the probe pulse. You can set the measurement resolution (while in centimeters) and the number of measurements.

Of course, the ideal case is the support of both protocol and binary options. But we, unfortunately, are limited in time, and I would like to immediately direct efforts to a more acceptable option for users. From here a modest request: check off the option that would be more convenient for you.

For the next article we will try to use all the functionality of the module in order to be able to scan underwater objects and get a picture with the outlines of these objects.

PS
Opinions about the content for the second article within the team were divided: dry, a little, but now, or capaciously, beautifully, but then ... "Now" won.

Dry text diluted slightly with pictures that were made in the process of making the second version of the module.

Build emitters

image

Treated metal cases

image

Laser-coated enclosures

image

Assembly of module boards

image

Source: https://habr.com/ru/post/447868/


All Articles