A programming system compatible with LEGO EV3 and Makeblock sensors
By designing a programming system compatible with LEGO EV3 and Makeblock sensors, the core architecture of the Raspberry Pi and STM32 microcontrollers is used to solve the problems of sensor incompatibility and ecosystem imperfection in the existing system, and achieve stronger computing power and better compatibility.
Patent Information
- Application Number
- CN202010860422.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-25
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2040-08-25
AI Technical Summary
The existing LEGO EV3 and Makeblock programming systems have problems such as sensor incompatibility, imperfect ecosystem, low platform computing power and lack of graphical visual operation interfaces, which cannot meet the learning needs of teenagers of higher age groups.
设计了一种兼容LEGO EV3和Makeblock传感器的编程系统,采用树莓派和STM32单片机作为核心架构,通过单片机驱动板、LEGO EV3拓展板和Makeblock拓展板实现传感器的兼容性,并采用Python编程语言和Json协议通信,完善了生态系统。
It enhances the computing power of the programming system, achieves compatibility with all sensors of the LEGO EV3 and Makeblock kit, improves the ecosystem, solves the incompatibility problem between sensors and platforms, and improves the expansion and resource saving of the system.
Smart Images

Figure CN114089968B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of artificial intelligence education technology, and in particular relates to a programming system compatible with LEGO EV3 and Makeblock sensors. Background Art
[0002] With the advent of the era of artificial intelligence, in order to make human life more convenient and faster, more and more people have invested in the research of intelligent products. As a result, artificial intelligence education has become younger and more universal. In recent years, artificial intelligence education and programming education for teenagers have received great attention from education departments and primary and secondary school teachers.
[0003] LEGO and Makeblock are two companies that target programming education for teenagers. LEGO's EV3 kit, in particular, has attracted much attention in the domestic education field. However, they both have problems such as sensor incompatibility, imperfect ecosystem, low platform computing power, and no graphical visual operation interface. Moreover, the above two platforms are only equipped with building block programming software, which cannot meet the learning needs of teenagers of higher age groups.
[0004] In view of the above problems, it is very meaningful to develop a programming system that is compatible with LEGO and Makeblock sensors. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a programming system compatible with LEGO EV3 and Makeblock sensors. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] The present invention provides a programming system compatible with LEGO EV3 and Makeblock sensors, comprising:
[0007] Raspberry Pi, used to receive the program and execute it;
[0008] A single-chip microcomputer driving board, connected to the Raspberry Pi, and used to generate a sensor driving signal according to an execution command sent by the Raspberry Pi;
[0009] A LEGO EV3 expansion board, connected to the single-chip microcomputer driver board, and used to connect an external LEGO EV3 sensor;
[0010] The Makeblock expansion board is connected to the MCU driver board and is used to connect an external Makeblock sensor.
[0011] In one embodiment of the present invention, the programming system further includes: a programming platform for creating a program and sending the program to the Raspberry Pi, wherein the programming platform uses the Python programming language and is logged in through a browser.
[0012] In one embodiment of the present invention, the single-chip microcomputer driving board includes a driving board body and a first row of females, a second row of females, a single-chip microcomputer, a power module and a USB interface arranged thereon, wherein:
[0013] The driving board body is detachably connected to the LEGO EV3 expansion board or the Makeblock expansion board through the first female row;
[0014] The single chip microcomputer is connected to the Raspberry Pi via the second female connector;
[0015] The input end of the power module is connected to an external power supply, and the output end is respectively connected to the first row of females, the second row of females and the single chip microcomputer;
[0016] The USB interface is connected to the single-chip microcomputer and is used for data transmission with the single-chip microcomputer or for powering the single-chip microcomputer.
[0017] In one embodiment of the present invention, the single-chip microcomputer is an STM32 single-chip microcomputer, and the single-chip microcomputer communicates with the Raspberry Pi using the Json protocol.
[0018] In one embodiment of the present invention, the single chip microcomputer is transplanted with the driving code of the Makeblock sensor.
[0019] In one embodiment of the present invention, the single-chip microcomputer driver board also includes a camera cable interface, which is arranged on the driver board body and connected to the power module. The image information collected by the camera is transmitted to the Raspberry Pi through the camera cable interface.
[0020] In one embodiment of the present invention, the single-chip microcomputer driving board further includes a switch module, which is disposed on the driving board body and connected to the power module to control the opening and closing of the power module.
[0021] In one embodiment of the present invention, the LEGO EV3 expansion board includes a LEGO EV3 expansion board body and a first row of pins, a third row of female connectors and a plurality of LEGO EV3 sensor interfaces arranged thereon, wherein:
[0022] The single chip microcomputer is connected to the LEGO EV3 sensor via the LEGO EV3 sensor interface;
[0023] The plugging of the first row of pins and the first row of female pins realizes the detachable connection between the LEGO EV3 expansion board and the single-chip microcomputer driver board.
[0024] In one embodiment of the present invention, the Makeblock expansion board includes a Makeblock expansion board body, a second row of pins and a plurality of Makeblock sensor interfaces arranged thereon, wherein:
[0025] The single chip microcomputer is connected to the Makeblock sensor via the Makeblock sensor interface;
[0026] The plugging of the second row of pins and the first row of female pins realizes the detachable connection between the Makeblock expansion board and the MCU driver board;
[0027] The plugging of the second row of pins and the third row of female pins realizes the detachable connection between the Makeblock expansion board and the LEGO EV3 expansion board.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. The programming system compatible with LEGO EV3 and Makeblock sensors of the present invention adopts Raspberry Pi and STM32 single-chip microcomputer as the core architecture of the programming system, which enhances the computing power of the programming system.
[0030] 2. The programming system compatible with LEGO EV3 and Makeblock sensors of the present invention is provided with pluggable LEGOEV3 expansion boards and Makeblock expansion boards, which realizes compatibility with all sensors of LEGO EV3 and Makeblock kits, improves the ecosystem, and solves the problems of incompatibility between sensors and incompatibility between platforms through driver transplantation technology.
[0031] 3. The programming system of the present invention is compatible with LEGO EV3 and Makeblock sensors. The Raspberry Pi and the STM32 microcontroller use the Json protocol for communication, which is beneficial to the subsequent development of R&D personnel, and has stronger scalability and non-fixed word length transmission, which saves more resources.
[0032] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1is a structural block diagram of a programming system compatible with LEGO EV3 and Makeblock sensors provided by an embodiment of the present invention;
[0034] Figure 2 is a structural block diagram of another programming system compatible with LEGO EV3 and Makeblock sensors provided by an embodiment of the present invention;
[0035] Figure 3 It is a structural block diagram of a single-chip microcomputer driver board provided by an embodiment of the present invention;
[0036] Figure 4 It is a structural block diagram of a LEGO EV3 expansion board provided by an embodiment of the present invention;
[0037] Figure 5 It is a structural block diagram of a Makeblock expansion board provided by an embodiment of the present invention;
[0038] Figure 6 is a connection circuit diagram between a Raspberry Pi and a single-chip microcomputer provided by an embodiment of the present invention;
[0039] Figure 7 is a schematic diagram of a transplanted library function provided by an embodiment of the present invention;
[0040] Figure 8 The present invention is a communication diagram of a programming system compatible with LEGO EV3 and Makeblock sensors provided by an embodiment of the present invention.
[0041] Icons: 1-Raspberry Pi; 2-MCU driver board; 3-LEGO EV3 expansion board; 4-Makeblock expansion board; 5-Programming platform; 201-driver board body; 202-first row of female; 203-second row of female; 204-MCU; 205-power module; 206-USB interface; 207-camera cable interface; 208-switch module; 301-LEGO EV3 expansion board body; 302-first row of pins; 303-third row of female; 304-LEGO EV3 sensor interface; 401-Makeblock expansion board body; 402-second row of pins; 403-Makeblock sensor interface. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, a programming system compatible with LEGO EV3 and Makeblock sensors proposed in accordance with the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0043] The above and other technical contents, features and effects of the present invention are clearly presented in the following detailed description of the specific implementation modes in conjunction with the accompanying drawings. Through the description of the specific implementation modes, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood. However, the attached drawings are only for reference and explanation purposes and are not used to limit the technical solutions of the present invention.
[0044] Embodiment 1
[0045] See also Figure 1 , Figure 1 It is a structural block diagram of a programming system compatible with LEGO EV3 and Makeblock sensors provided by an embodiment of the present invention. As shown in the figure, the programming system of this embodiment includes a Raspberry Pi 1, a single-chip driver board 2, a LEGOEV3 expansion board 3 and a Makeblock expansion board 4, wherein the Raspberry Pi 1 is used to receive and execute programs; the single-chip driver board 2 is connected to the Raspberry Pi 1, and is used to generate a sensor drive signal according to the execution command sent by the Raspberry Pi 1; the LEGO EV3 expansion board 3 is connected to the single-chip driver board 2, and is used to connect an external LEGO EV3 sensor; the Makeblock expansion board 4 is connected to the single-chip driver board 2, and is used to connect an external Makeblock sensor.
[0046] For further information, see Figure 2 , Figure 2 It is a structural block diagram of another programming system compatible with LEGO EV3 and Makeblock sensors provided by an embodiment of the present invention. As shown in the figure, the programming system of this embodiment also includes a programming platform 5, which is used to create programs and send programs to Raspberry Pi 1. The programming platform uses Python programming language and logs in through a browser. Specifically, open the browser, which can be a browser installed on Raspberry Pi 1 or a browser on a computer in the same local area network as Raspberry Pi 1, enter the URL of the cloud server, and log in with a given user name and password. Then click the device connection button to connect the device and connect Raspberry Pi 1 to the server.
[0047] For further information, see Figure 3 , Figure 3: is a structural block diagram of a single-chip microcomputer driver board provided by an embodiment of the present invention. As shown in the figure, the single-chip microcomputer driver board 2 includes a driver board body 201 and a first row of females 202, a second row of females 203, a single-chip microcomputer 204, a power module 205 and a USB interface 206 arranged thereon, wherein the driver board body 201 is detachably connected to the LEGOEV3 expansion board 3 or the Makeblock expansion board 4 through the first row of females 202; the single-chip microcomputer 204 is connected to the Raspberry Pi 1 through the second row of females 203; the input end of the power module 205 is connected to an external power supply, and the output end is respectively connected to the first row of females 202, the second row of females 203 and the single-chip microcomputer 204; the USB interface 206 is connected to the single-chip microcomputer 204 for data transmission with the single-chip microcomputer 204 or for powering the single-chip microcomputer 204.
[0048] In this embodiment, the first row of female connectors 202 is disposed on the front side of the driver board body 201 , and the second row of female connectors 203 , the single chip microcomputer 204 , the power module 205 and the USB interface 206 are disposed on the back side of the driver board body 201 .
[0049] Optionally, the single-chip microcomputer 204 is an STM32 single-chip microcomputer, model STM32F103VCT6. The single-chip microcomputer 204 and the Raspberry Pi 1 use the Json protocol for communication. Since the relevant code in the Raspberry Pi 1 is developed using Python, and the code in the single-chip microcomputer 204 is developed using C language, in order to facilitate the data transmission between the Raspberry Pi 1 and the single-chip microcomputer 204, the Json protocol communication is adopted, and the use of the Json protocol is conducive to the subsequent development of R&D personnel, and the expansibility becomes stronger.
[0050] See also Figure 6 , Figure 6 : This is a connection circuit diagram of the Raspberry Pi and the single-chip microcomputer provided by an embodiment of the present invention. As shown in the figure, the Raspberry Pi 1 has a total of 40 GPIO ports, and the programming system of this embodiment occupies pins 19, 21, 23, and 24, that is, the Raspberry Pi 1 is connected to the MOSI, MISO, SCK, and NSS pins of the STM32 single-chip microcomputer. Optionally, the Raspberry Pi 1 is connected to the STM32 single-chip microcomputer using an SPI interface.
[0051] In this embodiment, the operating system of Raspberry Pi 1 is pre-loaded with commonly used artificial intelligence platforms such as Opencv and TensorFlow, enriching the software ecology of the programming system of this embodiment.
[0052] Optionally, the power module 205 includes a power interface, a power chip and a rectifier chip, the power interface is a .5mmDC power interface, and the power chip and the rectifier chip are used to adjust the voltage of the external main power supply to a voltage range acceptable to each chip.
[0053] Furthermore, the single-chip microcomputer driver board 2 also includes a camera cable interface 207 , which is disposed on the driver board body 201 and connected to the power module 205 . The image information collected by the camera is transmitted to the Raspberry Pi 1 via the camera cable interface 207 .
[0054] Furthermore, the single-chip microcomputer driving board 2 also includes a switch module 208, which is arranged on the driving board body 201 and connected to the power module 205, and is used to control the opening and closing of the power module 205. In order to realize the power-on and power-off control of the programming system compatible with LEGOEV3 and Makeblock sensors.
[0055] See also Figure 4 , Figure 4 It is a structural block diagram of a LEGO EV3 expansion board provided by an embodiment of the present invention. As shown in the figure, the LEGO EV3 expansion board 3 includes a LEGO EV3 expansion board body 301 and a first row of pins 302, a third row of females 303 and a plurality of LEGO EV3 sensor interfaces 304 arranged thereon. Among them, the single-chip computer 204 is connected to the LEGO EV3 sensor (not shown in the figure) through the LEGO EV3 sensor interface 304; the plugging of the first row of pins 302 and the first row of females 202 realizes the detachable connection between the LEGO EV3 expansion board 3 and the single-chip computer driver board 2.
[0056] In this embodiment, the first row of pins 302 is arranged on the reverse side of the LEGO EV3 expansion board 3, and the third row of female pins 303 and a plurality of LEGO EV3 sensor interfaces 304 are arranged on the front side of the LEGO EV3 expansion board 3. The LEGO EV3 expansion board 3 is equipped with 9 LEGO EV3 sensors 304.
[0057] See also Figure 5 , Figure 5 It is a structural block diagram of a Makeblock expansion board provided by an embodiment of the present invention. As shown in the figure, the Makeblock expansion board 4 includes a Makeblock expansion board body 401 and a second row of pins 402 and a plurality of Makeblock sensor interfaces 403 arranged thereon. Among them, the single-chip microcomputer 204 is connected to the Makeblock sensor (not shown in the figure) through the Makeblock sensor interface 403; the plugging of the second row of pins 402 and the first row of females 202 realizes the detachable connection between the Makeblock expansion board 4 and the single-chip microcomputer driver board 2; the plugging of the second row of pins 402 and the third row of females 303 realizes the detachable connection between the Makeblock expansion board 4 and the LEGO EV3 expansion board 3.
[0058] In this embodiment, the Makeblock expansion board 4 is equipped with 10 Makeblock sensor interfaces 403 .
[0059] It is worth noting that, according to programming requirements, the user can realize the separate connection between the single-chip microcomputer driver board 2 and the LEGO EV3 expansion board 3 by plugging the first row of pins 302 with the first row of females 202, or realize the separate connection between the single-chip microcomputer driver board 2 and the Makeblock expansion board 4 by plugging the second row of pins 402 with the first row of females 202, or realize the simultaneous connection between the single-chip microcomputer driver board 2 and the LEGO EV3 expansion board 3 and the Makeblock expansion board 4 by plugging the first row of pins 302 with the first row of females 202 and the second row of pins 402 with the third row of females 303.
[0060] Furthermore, the driver code of the Makeblock sensor is transplanted into the single-chip microcomputer 204. Specifically, the driver code of the Makeblock sensor is added to the code of the STM32 single-chip microcomputer, and the relevant calling interface is modified so that the STM32 single-chip microcomputer can call the functions of these driver codes. This is because the open source driver library of Makeblock itself can only be used for its own Arduino single-chip microcomputer, which cannot meet the requirements of product compatibility and scalability. Considering the use of the STM32 single-chip microcomputer, but the library function of Arduino itself is not compatible with the STM32 single-chip microcomputer. To overcome this problem, after comparing the characteristics of Arduino and STM32 single-chip microcomputers, by combining the HAL library of the STM32 single-chip microcomputer, the 16 driver functions related to Arduino are transplanted to the STM32 single-chip microcomputer, so that these driver programs can run smoothly on the single-chip microcomputer 204. Please refer to Figure 7 , Figure 7 1 is a schematic diagram of a transplanted library function provided in an embodiment of the present invention. The transplanted library function includes 16 sensor driver libraries.
[0061] The programming system compatible with LEGO EV3 and Makeblock sensors of this embodiment is provided with pluggable LEGOEV3 expansion board 3 and Makeblock expansion board 4, which realizes compatibility with all sensors of LEGO EV3 and Makeblock kits, improves the ecosystem, and solves the problems of incompatibility between sensors and platforms through driver transplantation technology. Moreover, Raspberry Pi 1 and STM32 microcontroller are used as the core architecture of the programming system, which enhances the computing power of the programming system.
[0062] See also Figure 8 , Figure 8It is a communication diagram of a programming system compatible with LEGO EV3 and Makeblock sensors provided by an embodiment of the present invention. As shown in the figure, when a sensor is connected to the interface, data is sent to the single-chip microcomputer 204 through the IO interface, and the single-chip microcomputer 204 sends a signal to the Raspberry Pi 1 after receiving the data to inform which sensor is connected. After that, the Raspberry Pi 1 sends a Json file of indefinite length to the single-chip microcomputer 204, and the single-chip microcomputer 204 automatically calls the driver file belonging to the sensor to generate a sensor drive signal to drive the sensor to run. This embodiment uses Json file transmission of indefinite length, which can save more resources.
[0063] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant is intended to cover non-exclusive inclusion, so that the article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the article or device including the elements. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The orientation or position relationship indicated by "up", "down", "left", "right", etc. is based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention.
[0064] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A programming system compatible with LEGO EV3 and Makeblock sensors, characterized in that: include: Raspberry Pi, used to receive the program and execute it; A single-chip microcomputer driving board is connected to the Raspberry Pi and is used to generate a sensor driving signal according to an execution command sent by the Raspberry Pi; wherein the single-chip microcomputer driving board includes a driving board body and a first row of mothers, a second row of mothers, a single-chip microcomputer, a power module and a USB interface arranged thereon, wherein, The driving board body is detachably connected to the LEGO EV3 expansion board or the Makeblock expansion board through the first female row; The single chip microcomputer is connected to the Raspberry Pi via the second female connector; The input end of the power module is connected to an external power supply, and the output end is respectively connected to the first row of females, the second row of females and the single chip microcomputer; The USB interface is connected to the single-chip microcomputer and is used for data transmission with the single-chip microcomputer or for powering the single-chip microcomputer; The LEGO EV3 expansion board is connected to the single-chip microcomputer driver board and is used to connect an external LEGO EV3 sensor; wherein the LEGO EV3 expansion board includes a LEGO EV3 expansion board body and a first row of pins, a third row of females and a plurality of LEGO EV3 sensor interfaces arranged thereon, wherein: The single chip microcomputer is connected to the LEGO EV3 sensor via the LEGO EV3 sensor interface; The plugging of the first row of pins and the first row of female pins realizes the detachable connection between the LEGO EV3 expansion board and the single-chip microcomputer driver board; The Makeblock expansion board is connected to the single-chip microcomputer driver board and is used to connect an external Makeblock sensor; wherein the Makeblock expansion board includes a Makeblock expansion board body and a second row of pins and a plurality of Makeblock sensor interfaces arranged thereon, wherein: The single chip microcomputer is connected to the Makeblock sensor via the Makeblock sensor interface; The plugging of the second row of pins and the first row of female pins realizes the detachable connection between the Makeblock expansion board and the MCU driver board; The plugging of the second row of pins and the third row of female pins realizes the detachable connection between the Makeblock expansion board and the LEGO EV3 expansion board.
2. The programming system compatible with LEGO EV3 and Makeblock sensors according to claim 1, characterized in that: Also includes: A programming platform is used to create programs and send them to the Raspberry Pi. The programming platform uses the Python programming language and is logged in through a browser.
3. The programming system compatible with LEGO EV3 and Makeblock sensors according to claim 1, characterized in that: The single-chip microcomputer is an STM32 single-chip microcomputer, and the single-chip microcomputer communicates with the Raspberry Pi using the Json protocol.
4. The programming system compatible with LEGO EV3 and Makeblock sensors according to claim 1, characterized in that: The single chip microcomputer is transplanted with the driving code of the Makeblock sensor.
5. The programming system compatible with LEGO EV3 and Makeblock sensors according to claim 1, characterized in that: The single-chip microcomputer driver board also includes a camera cable interface, which is arranged on the driver board body and connected to the power module. Image information collected by the camera is transmitted to the Raspberry Pi through the camera cable interface.
6. The programming system compatible with LEGO EV3 and Makeblock sensors according to claim 1, characterized in that: The single-chip microcomputer driving board also includes a switch module, which is arranged on the driving board body and connected to the power module to control the opening and closing of the power module.
Citation Information
Patent Citations
Intelligent equipment control device and control method based on raspberry pie
CN106789459A
Raspberry pi teaching instrument
CN109118915A