DTOF intelligent module and DTOF ranging device
By designing a DTOF smart module that supports multi-interface communication, including a laser transmitting module, a laser receiving module and a controller, the problem of high difficulty in porting the DTOF smart module in Android or Linux embedded systems is solved, and the effect of simplifying the porting operation and reducing the workload of software development is achieved.
Patent Information
- Application Number
- CN202422164807.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2034-09-04
AI Technical Summary
When porting existing DTOF smart modules to Android or Linux embedded systems, there are problems such as high porting difficulty and heavy workload.
A DTOF intelligent module was designed, which includes a laser transmitter module, a laser receiver module and a controller. The controller is connected to the laser transmitter module, the laser receiver module and the external main control module through the I2C/SPI interface, supports multi-interface communication, and interrupts the external main control module through the GPIO interface.
The porting operation of the DTOF smart module is simplified, the workload and complexity of software development are reduced, and only one device driver is needed to control the module in an Android or Linux embedded system, thereby improving porting efficiency and system reliability.
Smart Images

Figure CN223362375U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of laser ranging products, in particular to a DTOF intelligent module and a DTOF ranging device. Background Art
[0002] With the rapid development of time-of-flight (ToF) laser ranging chips and their applications, they are increasingly being used in consumer electronics, industrial control, and other fields. dToF (Direct Time of Flight) optical chips have been used in areas such as autonomous driving. When porting dToF chips to Android or Linux embedded systems, I 2 C or SPI communication interface, the dToF module is connected to the system as a camera sensor. However, because the dToF chip is different from ordinary camera sensors, in addition to the laser receiving function module, the product application also requires a laser emission module (which includes a VCSEL driver chip and VCSEL for emitting lasers of a specific wavelength). Therefore, the DTOF chip is equipped with an unconventional voltage control and regulation module for Vop voltage (-29v to -19v) and PVDD voltage (10v to 20v), as well as an EEPROM chip for storing calibration data.
[0003] like Figure 1 As shown, the driver module, laser receiving module, EEPROM, etc. of the dToF chip may have I 2 C interface or SPI interface, hardware engineers will choose according to the actual situation during design, and the voltage regulation module uses I 2 C interface for communication with the main control system.
[0004] At present, the above functional modules are all used as I 2 C or SPI slave devices. Since software development requires driving these devices and dynamic control during operation (such as regular voltage regulation), the host control system needs to be able to implement corresponding device drivers (including driver modules, laser receiver modules, EEPROM drivers, etc.) to control them. This is complex, resulting in a large workload and error-proneness when porting to Android or Linux embedded systems. Therefore, if the DTOF smart module porting operation can be simplified and multi-interface communication can be supported, the software porting development time of the DTOF smart module will be shortened. Utility Model Content
[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a DTOF smart module and a DTOF ranging device to solve the problems of high difficulty and heavy workload when transplanting the existing DTOF smart module to Android or Linux embedded systems.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] A DTOF smart module, comprising:
[0008] Laser emission module;
[0009] Laser receiving module;
[0010] The controller comprises: a plurality of groups I 2 C / SPI interface and at least one GPIO interface, the controller is connected via I 2 The C / SPI interface is connected to the laser emitting module, the laser receiving module and / or the external main control module. When receiving the read / write request output by the main control module, the read / write request is sent to the laser emitting module or the laser receiving module according to the register mapping address; and when the laser emitting module and / or the laser receiving module is abnormal, the main control module is interrupted through the GPIO interface.
[0011] The DTOF smart module also includes a voltage regulator, which is connected to the laser emitting module, laser receiving module and controller, and is used to output multiple voltages to the laser emitting module, laser receiving module and controller.
[0012] In the DTOF smart module, when the temperature of the laser emitting module and the laser receiving module exceeds a set temperature, or the voltage of the voltage regulator exceeds a set voltage, the controller interrupts the main control module.
[0013] The DTOF intelligent module also includes a storage module. 2 The C / SPI interface is connected to the controller.
[0014] In the DTOF intelligent module, the controller includes a processor and several registers, each register is connected to the processor and is used to store the addresses of the laser emitting module, the laser receiving module, the voltage regulator and the storage module respectively.
[0015] In the DTOF intelligent module, the controller also includes a serial port and / or USB interface for communicating with a host computer.
[0016] In the DTOF smart module, the controller also includes a MIPI interface, and the laser receiving module is connected to the main control module via the MIPI interface.
[0017] In the DTOF smart module, the controller is an MCU main control chip.
[0018] The present invention also provides a DTOF distance measuring device, which includes a main control module and the DTOF smart module as described above, wherein the DTOF smart module is connected to the DTOF distance measuring device through I 2 The C / SPI interface and the GPIO interface are connected to the main control module. When the DTOF smart module interrupts the main control module, the main control module reads the register of the DTOF smart module and obtains the abnormal data of the DTOF smart module according to the register address and register status.
[0019] Compared with the prior art, the DTOF intelligent module and DTOF ranging device provided by the present invention include a laser transmitting module, a laser receiving module and a controller. 2 C / SPI interface is connected to the laser transmitting module, laser receiving module and / or external main control module, and is compatible with I 2 C and SPI communication methods, when receiving the read and write request output by the external main control module, the controller sends the read and write request to the laser emitting module or the laser receiving module according to the register mapping address, and when the laser emitting module and / or the laser receiving module is abnormal, the external main control module is interrupted through the GPIO interface. By using a controller as a unified external interface, the control and management of various functional modules in the DTOF smart module are realized. Therefore, when the DTOF smart module is transplanted to the Android or Linux embedded system, only one device driver is needed to control the controller, which greatly reduces the workload and complexity of software development. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a structural block diagram of the DTOF smart module in the prior art.
[0021] Figure 2 This is a structural block diagram of the DTOF intelligent module provided by the utility model.
[0022] Figure 3 This is an interruption reporting process of the DTOF intelligent module provided by the utility model.
[0023] Figure 4 This is another interruption reporting process of the DTOF smart module provided by the present invention.
[0024] Description of Reference Numerals
[0025] Laser emission module 11, laser receiving module 12, controller 13, voltage regulator 14, control module 21, storage module 15, host computer 31 DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] See also Figure 2 The DTOF intelligent module provided by the present invention includes a laser emitting module 11, a laser receiving module 12 and a controller 13. The controller 13 includes multiple groups of I 2 C / SPI interface and at least one GPIO interface, that is, the controller 13 includes multiple I 2 C interface and multiple SPI interfaces, so that the corresponding communication interface can be flexibly selected according to the type of laser transmitting module 11 and laser receiving module 12, and the GPIO interface is mainly used to report error information.
[0028] In this embodiment, the controller 13 has a built-in driver for the laser emitting module 11 and the laser receiving module 12, which can control the status of the laser emitting module 11 and the laser receiving module 12. 2 The C / SPI interface is connected to the laser emitting module 11, the laser receiving module 12 and / or the external main control module. The external main control module can adopt a main control SOC (System on Chip) system control end, which includes a CPU, a memory controller 13, an input / output (I / O) controller 13, an interrupt controller 13, a DMA (Direct Memory Access) controller 13, etc., which can be set in an application device (such as a sweeping robot, a car). It only needs to add a driver for controlling the controller 13 in the main control module to realize the control of the DTOF smart module.
[0029] The controller 13 includes multiple groups of I 2 C / SPI interface and multiple GPIO interfaces to adapt to different communication modes and function expansion. Optionally, the controller 13 is an MCU main control chip, which can adopt the main control chip of the STM32 system, such as the microcontroller model STM32G474CB, which has a main frequency, storage space, number of GPIO interfaces, number of SPI interfaces, I 2 The number of C interfaces, ADC / DAC ports, and serial ports meet the requirements of DTOF chip applications.
[0030] During the use of the DTOF smart module, when the controller 13 receives a read / write request output by the external main control module, it sends the read / write request to the laser emitting module 11 or the laser receiving module 12 according to the register mapping address, or when the laser emitting module 11 and / or the laser receiving module 12 is abnormal, it interrupts the external main control module through the GPIO interface.
[0031] The utility model sets a controller 13 in the DTOF intelligent module as a unified external interface. The controller 13 manages and controls the laser emitting module 11, the laser receiving module 12, etc., and the external communication interface selects SPI or I2C according to the type of the external control module 21. 2 C interface, expands the types of communication interfaces, and. When an error occurs in a module inside the DTOF smart module (such as the laser emission module 11 is overheated), the controller 13 triggers a GPIO interrupt to inform the external main control module to make appropriate processing.
[0032] Optionally, the DTOF smart module of the present invention further includes a voltage regulator 14, and the controller 13 also has a built-in driver for the voltage regulator 14. The voltage regulator 14 is connected to the I 2 The C interface is connected to the laser emitting module 11 , the laser receiving module 12 and the controller 13 , and is used to output a variety of voltages to the laser emitting module 11 , the laser receiving module 12 and the controller 13 .
[0033] The voltage regulator 14 can output a Vop voltage (operating voltage) of -29V to -19V and a PVDD voltage (power supply voltage) of 10V to 20V to meet various voltage requirements of the laser emitting module 11 and the laser receiving module 12 .
[0034] When the external control module 21 obtains the error report of the DTOF smart module or the DTOF smart module reports abnormal information, its abnormal status includes abnormal temperature of the DTOF smart module, too high voltage of the voltage regulator 14, voltage overcurrent, etc. The utility model adopts an automatic reporting method. When the temperature of the laser emitting module 11 and the laser receiving module 12 exceeds the set temperature (the temperature can be set according to the application scenario), or the voltage of the voltage regulator 14 exceeds the set voltage (the voltage can be set according to actual conditions), the controller 13 interrupts the main control module through the GPIO interface, so that the main control module knows the status of the DTOF smart module and makes corresponding processing. For example, when the temperature of the laser emitting module 11 is too high, the output power of the laser emitting module 11 can be reduced or the laser emitting module 11 can be stopped and shut down.
[0035] In an optional embodiment, the DTOF smart module of the present invention further includes a storage module 15, which can be an EEPROM. 2 The C / SPI interface is connected to the controller 13 and is used to store configuration data (such as resolution, measurement range, serial number, etc.) and calibration parameters of the DTOF smart module.
[0036] In one embodiment of the present invention, the controller 13 includes a processor (not shown) and several registers (not shown), each of which is connected to the processor and is used to store the addresses of the laser emitting module 11, the laser receiving module 12, the voltage regulator 14, and the storage module 15. As shown in Table 1, the present invention maps the register addresses to achieve corresponding address division of each module, so that the external control module 21 can control the read and write operations of each module by reading and writing the registers of the DTOF smart module.
[0037]
[0038] Table 1
[0039] The utility model distributes the request to the corresponding functional modules in the DTOF smart module, such as the laser transmitting module 11, the laser receiving module 12, the voltage regulator 14, etc., according to the mapped address range (such as the address mapping table in Table 1) when the controller 13 in the DTOF smart module receives the register read or write request sent by the external control module 21, so that the DTOF smart module is used as a whole. 2 C or SPI device drivers can be connected to the Android or Linux system of the application scenario (such as intelligent driving), which greatly reduces the complexity and workload of software development and porting.
[0040] Furthermore, the controller 13 also includes a serial port and / or USB interface (not shown in the figure) for communicating with the host computer 31. The controller 13 can communicate with the host computer 31 via the UART serial port or USB interface, and can print relevant reports (or abnormal status reports) through the host computer 31, etc., which can be used for software development and debugging. In addition to being used for printing, the serial port and USB interface can also be used as a command processing interface. Through relevant commands, it can help technicians query some status or execute some commands. These commands can be to print the chip code of the MCU, the version number of the MCU firmware, or to control whether the Vop / PVDD voltage is turned on, read the current voltage, etc., and the reg_dump command can display the register value of each address segment, and the SetVop command (set operating voltage command) can turn on and manually set the Vop voltage, etc. Therefore, this command processing interface greatly facilitates the development, debugging and monitoring of the MCU firmware, and significantly improves development efficiency.
[0041] Furthermore, the controller 13 also includes a MIPI interface, and the laser receiving module 12 is connected to the main control module through the MIPI (Mobile Industry Processor Interface, a serial communication interface designed specifically for mobile devices and embedded systems) interface. The DTOF smart module feeds back the detection data output by the laser receiving module 12 (that is, the electrical signal converted when the laser receiving module 12 receives light reflected from an object) to the control module 21 through the MIPI interface.
[0042] To facilitate development and debugging, the firmware of the built-in controller 13 also implements a simple command line interface. By entering specific commands in the computer's serial communication software, technicians can view the register configuration and status information of the MCU-side firmware or execute certain test functions, etc., making it easier to discover technical problems in the development process earlier and faster, greatly reducing the customer's development to market time.
[0043] The DTOF smart module of the present invention has error detection and reporting functions by setting up functional modules such as a laser transmitting module 11, a laser receiving module 12, a controller 13, and a voltage regulator 14 in the module. The abnormal status can be automatically reported through the error reporting interrupt pin of the controller 13. When the laser transmitting module 11 (VCSEL Driver) also has some more serious errors (such as overtemperature, overcurrent, etc.) that need to be reported, they can be reported by interrupting the external control module 21.
[0044] After receiving the error report from each functional module, the controller 13 will update the error status of the corresponding register, and then trigger an interrupt through the external GPIO interface. After the control module 21 receives the error interrupt signal, it reads the error register of the MCU through polling, obtains the error type, and makes appropriate processing.
[0045] See also Figure 3 The process of the DTOF intelligent module detecting and reporting errors in each of its own functional modules includes:
[0046] After initialization, the main loop starts, and then the detection work in the DTOF intelligent module begins;
[0047] The controller 13 then reads the temperature of the sensor (laser receiving module 12) and determines whether the sensor temperature exceeds a set threshold;
[0048] When the temperature of the laser receiving module 12 exceeds a certain threshold, the RX temperature high flag of the status register is set, and the GPIO port of the error interrupt is set to a high level;
[0049] When the temperature of the laser receiving module 12 is lower than a certain threshold value, the temperature of the TX laser transmitting module 11 is read, and it is determined whether the TX temperature exceeds a certain threshold value;
[0050] When the temperature of the laser emitting module 11 exceeds a certain threshold, the TX temperature high flag of the status register is set, and the GPIO port of the error interrupt is set to a high level;
[0051] When the temperature of the laser emitting module 11 is lower than a certain threshold value, the PVDD voltage is read and it is determined whether the PVDD voltage exceeds a certain threshold value;
[0052] When the read PVDD voltage exceeds a set threshold, the PVDD voltage high flag in the status register is set, and the GPIO port of the error interrupt is set to a high level;
[0053] When the read PVDD voltage is lower than a set threshold, it returns to the first step of the main loop to continue reading the sensor temperature, thereby enabling the built-in controller 13 of the DTOF smart module to detect and report errors.
[0054] The DTOF smart module of the present invention can also read the RX temperature, TX temperature and PVDD voltage through the external control module 21, see Figure 4 , the reading process includes:
[0055] After the DTOF smart module is initialized, the GPIO interface is connected to the external control module 21 for DTOF smart module error status reporting;
[0056] Afterwards, the external control module 21 detects whether an interruption occurs.
[0057] When an interrupt is detected, read the status register of the DTOF smart module;
[0058] Determine whether the RX (laser receiving module 12) temperature is too high status bit is 1;
[0059] When the RX temperature is too high status bit is 1, the prompt message "RX temperature is too high" is displayed;
[0060] Determine whether the TX (laser transmitter module 11) temperature is too high status bit is 1;
[0061] When the TX temperature is too high status bit is 1, the prompt message "TX temperature is too high" is displayed;
[0062] Determine whether the PVDD voltage is too high status bit is 1;
[0063] When the PVDD voltage is too high status bit is 1, the prompt message "PVDD voltage is too high" is displayed.
[0064] The utility model uses the controller 13 built into the DTOF intelligent module as SPI or I 2 C slave device (Slavedevice) to work, and communicate with the CPU (i.e. control module 21) in the actual application product through I 2 C or SPI communication, expanding the application interface types and making actual application products more flexible. In addition, the module has a built-in interrupt output, which, combined with the built-in error status register, allows the controller 13 to report the error status to the control module 21 and make appropriate processing, realizing two-way communication and timely reporting of abnormal situations, ensuring the reliable operation of the DTOF intelligent module.
[0065] The present invention also provides a DTOF distance measuring device, which can be a smart device that needs to sense obstacles and make judgments, such as a sweeping robot or an unmanned vehicle. The DTOF distance measuring device includes a main control module and a DTOF smart module. The DTOF smart module can sense obstacles and make judgments, such as a sweeping robot or an unmanned vehicle, and ... 2 The C / SPI interface and GPIO interface are connected to the main control module. When the DTOF smart module interrupts the main control module, the main control module reads the register of the DTOF smart module and obtains the abnormal data of the DTOF smart module according to the register address and register status. Since the DTOF smart module has been described in detail above, it will not be repeated here.
[0066] In summary, the present invention uses the built-in controller as the unified external interface of the DTOF smart module, remaps the register address of each functional module to a unified register address space, and realizes the overall control and management of each functional module in the DTOF smart module. Therefore, in the actual application product end, only one device driver is needed to control the controller in the DTOF smart group (the controller is an I / O port of the control module in the actual application product end). 2 C or SPI slave device), greatly reducing the workload and complexity of software development, and also reducing the difficulty of software transplantation and maintenance.
[0067] Moreover, the built-in controller of the DTOF smart module can be used as SPI or I 2 C slave device, and communicates with the control module in the actual application product through I 2 C or SPI to communicate, expanding the application interface types. In actual application products, only the existing pin resources (i.e. SPI port or I 2 C port), making practical application products more flexible and adaptable.
[0068] The utility model uses the interrupt output of the built-in controller of the DTOF smart module in combination with some error status registers, so that the controller can actively report the abnormal status so that the control module can make appropriate processing, and the control module can also actively read the status of each function in the DTOF smart module.
[0069] In addition, this practical DTOF smart module communicates with the host computer through the serial port, and the register configuration and status of the controller can be viewed through the host computer. During development, the DTOF smart module can also be debugged or some test functions can be performed through the host computer.
[0070] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and utility model concept of the present invention, and all these changes or substitutions should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A DTOF smart module, characterized in that: include: Laser emission module; Laser receiving module; The controller comprises: a plurality of groups I 2 C / SPI interface and at least one GPIO interface, the controller is connected via I 2 The C / SPI interface is connected to the laser emitting module, the laser receiving module and / or the external main control module. When receiving the read / write request output by the main control module, the read / write request is sent to the laser emitting module or the laser receiving module according to the register mapping address; and when the laser emitting module and / or the laser receiving module is abnormal, the main control module is interrupted through the GPIO interface.
2. The DTOF smart module according to claim 1, characterized in that: It also includes a voltage regulator, which is connected to the laser emitting module, the laser receiving module and the controller, and is used to output multiple voltages to the laser emitting module, the laser receiving module and the controller.
3. The DTOF smart module according to claim 2, characterized in that: When the temperature of the laser emitting module or the laser receiving module exceeds a set temperature, or the voltage of the voltage regulator exceeds a set voltage, the controller interrupts the main control module.
4. The DTOF smart module according to claim 2, characterized in that: Also includes a storage module, through I 2 The C / SPI interface is connected to the controller.
5. The DTOF smart module according to claim 4, characterized in that: The controller includes a processor and several registers, each register is connected to the processor and is used to store the addresses of the laser emitting module, the laser receiving module, the voltage regulator and the storage module respectively.
6. The DTOF smart module according to claim 1, characterized in that: The controller also includes a serial port and / or a USB interface for communicating with a host computer.
7. The DTOF smart module according to claim 1, characterized in that: The controller further includes a MIPI interface, and the laser receiving module is connected to the main control module via the MIPI interface.
8. The DTOF smart module according to claim 1, wherein: The controller is an MCU main control chip.
9. A DTOF ranging device, characterized in that: The DTOF smart module comprises a main control module and any one of claims 1 to 8, wherein the DTOF smart module is connected to the main control module via I 2 The C / SPI interface and the GPIO interface are connected to the main control module. When the DTOF smart module interrupts the main control module, the main control module reads the register of the DTOF smart module and obtains the abnormal data of the DTOF smart module according to the register address and register status.