CN107583288A - A kind of electronic building blocks based on I2C interface - Google Patents
A kind of electronic building blocks based on I2C interface Download PDFInfo
- Publication number
- CN107583288A CN107583288A CN201710944412.4A CN201710944412A CN107583288A CN 107583288 A CN107583288 A CN 107583288A CN 201710944412 A CN201710944412 A CN 201710944412A CN 107583288 A CN107583288 A CN 107583288A
- Authority
- CN
- China
- Prior art keywords
- member block
- microcontroller
- chip microcomputer
- interface
- building blocks
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004891 communication Methods 0.000 claims abstract description 40
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 230000002349 favourable effect Effects 0.000 abstract description 2
- 230000002093 peripheral effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000000034 method Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 239000002023 wood Substances 0.000 description 2
- 235000015429 Mirabilis expansa Nutrition 0.000 description 1
- 244000294411 Mirabilis expansa Species 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 235000013536 miso Nutrition 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Toys (AREA)
Abstract
The present invention discloses a kind of electronic building blocks based on I2C interface, containing base and pluggable the member block being arranged on base, each member block is configured as different address, there is microcontroller and the single-chip microcomputer for managing communication data stream between each member block and microcontroller on base, member block includes the first kind member block based on I2C communications, is both configured to be communicated by I2C communication modes between first kind member block and single-chip microcomputer, between microcontroller and single-chip microcomputer.For the present invention due to only needing two data lines between first kind member block and base, connection is simple, is easy to plug, and reduces children and use difficulty, raising playability, and relatively simple hardware connection request also contributes to control cost, has good economical;I2C buses can mount large number of external equipment, favorable expandability, substantially increase that peripheral module is rich, and product up-gradation is relatively more convenient.
Description
Technical field
The present invention relates to intelligent toy and teaching aid field, is accumulated more specifically to a kind of electronics based on I2C interface
Wood.
Background technology
Intelligent toy is the brand-new market developed on a large scale by electronics and information industry and risen, and is following toy for children/teaching aid neck
The direction of domain development.Electronic building blocks overturn the playing method of traditional building blocks with a kind of brand-new pattern, in culture children's manipulative ability
It is touched certain physics, chemical knowledge simultaneously, allow children to have more perceptual, specific cognition to science.Electronics accumulates
Wood overcomes traditional building blocks shortcomings well, makes children more interesting, brings easily free electronics DIY experience, helps
Young children realize the electronics intention dream of oneself.
Data communication between electronic component is had point of synchronous versus asynchronous by transmission clock, is then had by data transmit-receive pattern
Point of serial parallel.It is general using the more simple serial communication of connection in the case of not having high requirements to transmission rate.
In the serial communication protocols such as more popular SPI, UART, I2C, synchronous communications protocol SPI is due to being full-duplex communication, root
The connection of the line of MOSI, MISO, NSS, SCK tetra- is needed according to agreement, although data transmission capabilities are more powerful, hardware connects also phase
To complexity, it is not appropriate for using in this product;Generic asynchronous serial communication UART is equally full duplex, and needs communication double
There is corresponding communication module side, that is, is more suitable between microcontroller and uses;I2C communication protocols have hardware the simplest
Connection request, it is only necessary to which a data lines SDA and a clock line SCL can complete half duplex communication, are articulated in I2C buses
On each device have unique address identifier code, main frame can be according to the addressing of address to different slaves, you can realize master
The communication of machine and more slaves, has met the design concept of this product well.However, at present really not by I2C communications applications
Into electronic building blocks.
The content of the invention
The technical problem to be solved in the present invention is, for it is above-mentioned in the prior art also not by I2C communications applications in
A kind of technological deficiency of electronic building blocks, there is provided electronic building blocks based on I2C interface.
The present invention is solves its technical problem, there is provided a kind of electronic building blocks based on I2C interface, comprising base and can
Plug ground is arranged on the member block on base, and each member block is configured as different address, and the electronic building blocks also include microcontroller
Device and the single-chip microcomputer for managing communication data stream between each member block and microcontroller, the member block are included and are based on
I2C communication first kind member block, between first kind member block and single-chip microcomputer, between microcontroller and single-chip microcomputer by with
It is set to and is communicated by I2C communication modes, member block includes the first kind member block based on I2C communications, first kind member
It is both configured to be communicated by I2C communication modes between part block and single-chip microcomputer, between microcontroller and single-chip microcomputer.
In the electronic building blocks based on I2C interface of the present invention, multiple element block needs to microcontroller while sends number
According to when, after single-chip microcomputer is connected to the data transmitted by these member blocks at the same time, by the data of each member block respectively according to the time
Sequencing be forwarded to microcontroller successively.
In the electronic building blocks based on I2C interface of the present invention, microcontroller is additionally configured to need in the microcontroller
When controlling multiple member blocks simultaneously, according to time order and function order send respectively each control instruction to the single-chip microcomputer with
It is forwarded to corresponding member block.
The present invention the electronic building blocks based on I2C interface in, member block include the member block with wifi module, with
The member block of sensor and the functional module with any one in display, luminous, sounding or a variety of functions.
In the electronic building blocks based on I2C interface of the present invention, using the side of jack and contact pin between member block and base
Formula connects, the wire communication formed between the contact pin and jack of connection between single-chip microcomputer, wherein first kind member block and monolithic
Each I2C interface between machine realized using the four pin plug connectors with 4 pairs of contact pins and jack, with connect respectively SDA,
SCL, power supply and ground wire.
In the electronic building blocks based on I2C interface of the present invention, member block also includes the Second Type based on non-I2C communications
Member block, the single-chip microcomputer are additionally configured to be converted to the I2C signals that the microcontroller is sent and Second Type member block
Corresponding Second Type member block is forwarded to after corresponding non-I2C signals and/or is configured as sending Second Type member block
Non- I2C signals switch to I2C signals after be forwarded to the microcontroller.
In the electronic building blocks based on I2C interface of the present invention, when first kind member block is plugged on base, each first
Type element block is connected on the data/address bus between first kind member block and microcontroller.
In the electronic building blocks based on I2C interface of the present invention, microcontroller STM32x103VCT6.
In the electronic building blocks based on I2C interface of the present invention, single-chip microcomputer STM8L151K6U6.
In the electronic building blocks based on I2C interface of the present invention, single microcontroller and single-chip microcomputer are fixedly installed in base
The module upper base for being either also designed to be arranged on pluggablely on.
The electronic building blocks based on I2C interface of the present invention are using I2C agreements as microcontroller and first kind member block
Data communication mode, its advantage are mainly reflected in:Due to only needing two connecting line transmission between first kind member block and base
Communication data, connection is simple, is easy to plug, and reduces children and uses difficulty, improves playability, relatively simple hardware connection will
Ask and also contribute to control cost, have good economical;I2C buses can mount large number of external equipment, favorable expandability,
It is rich to substantially increase peripheral module, product up-gradation is relatively more convenient.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the circuit theory diagrams of a preferred embodiment of the electronic building blocks based on I2C interface of the present invention;
Fig. 2 is the circuit theory diagrams of single-chip microcomputer in the electronic building blocks based on I2C interface in Fig. 1 of the invention;
Fig. 3 is the circuit theory diagrams of the microcontroller based on I2C interface in Fig. 1 of the invention;
The temperature detecting alarm system circuit theory diagrams based on the present invention of Fig. 4 present invention.
Embodiment
In order to which technical characteristic, purpose and the effect of the present invention is more clearly understood, now compares accompanying drawing and describe in detail
The embodiment of the present invention.
The electronic building blocks of the present embodiment have a base and member block, have contact pin on base, have in member block and insert
Hole, by contact pin and jack, member block pluggable can be arranged on base, is also had on base for electronic building blocks power supply
Battery.Member block can be the member block with wifi module, the member block with sensor and with display, luminous, hair
The functional module of any one in sound or a variety of functions, the invention is not limited in this regard.Each member block is configured as not
Same address, address are configured to write by program in advance, carried when can also work using pin of the different circuits in member block
Configured for different voltages, may specifically regard the different and different of member block.
As shown in figure 1, its circuit theory diagrams for the preferred embodiment of the invention based on I2C interface of the present invention.
The electronic building blocks also include microcontroller 2 and the list for managing communication data stream between each member block and microcontroller 2
Piece machine 3, microcontroller 2 and single-chip microcomputer 3 are fixedly installed on base or are also designed to the bottom being arranged on pluggablely
Module on seat.The element 1 provided in the present embodiment be based on I2C communication first kind member block 1, first kind element
It is both configured to be communicated by I2C communication modes between block 1 and single-chip microcomputer 3, between microcontroller 2 and single-chip microcomputer 3.First
When type element block 1 is plugged on base, each first kind member block 1 is connected to first kind member block 1 and microcontroller 2
Between data/address bus on.When multiple first kind member blocks 1 need to microcontroller 2 while send data, single-chip microcomputer 3 is same
When be connected to the data transmitted by these first kind member blocks 1 after, by the data of each first kind member block 1 respectively according to when
Between sequencing be forwarded to microcontroller 3 successively, the data that will be subject to simultaneously are transmitted in the different time.Microcontroller
When device 2 will control multiple first kind member blocks 1 simultaneously, each control instruction is sent respectively to monolithic according to time order and function order
Machine 3 is with first kind member block 1 corresponding to being forwarded to.
With reference to Fig. 2 and Fig. 3, in the present embodiment, microcontroller STM32x103VCT, single-chip microcomputer is
STM8L151K6U6.When STM32 needs to gather the data of some member block, according to the sequential of I2C bus protocols and corresponding device
Part address is addressed to required sensor, and for ease of managing multiple I2C interface signals, STM32 microcontrollers pass through special
Single-chip microcomputer STM8L151K6U6 is connected with each member block.When any I2C interface on member block connection single-chip microcomputer, equivalent to being connected on
A pair of I/O mouths of single-chip microcomputer 3.When there is data exchange to need, single-chip microcomputer 3 is used as I2C communication hosts, in control of correspondent program
Under according to I2C communication protocols complete send initial conditions, receive response, send 7 bit address, receive response, send data, send
Stop.Serial communication is used between the single-chip microcomputer 3 and STM32 microcontrollers 2:I.e. single-chip microcomputer 3 is whole by each road I2C data received
STM32 USART ports are sent to after reason by serial communication port, and the control signal that STM32 microcontrollers need to transmit also is led to
Cross single-chip microcomputer 3 and pass to respective element block.Data transfer ensure that using serial communication between single-chip microcomputer 3 and STM32 microcontrollers 1
Speed and reliability.
With reference to figure 4, STM32 microcontrollers 2, Sensor Hub single-chip microcomputers 3, temperature sensor module 12, charactron are shown
Show that pipe 13,11 several modules of buzzer module are stitched together, form simple temperature detection warning device.Temperature sensor 12 passes through
Sensor Hub single-chip microcomputers 2 are connected to STM32 microcontrollers 2.
During system operation, I2C communications, STM32 microcontrollers are carried out by Sensor Hub single-chip microcomputers 3 and temperature sensor 12
2 send initial conditions and address after the match is successful, initialize temperature sensor 12, the mode of operation that will be needed, temperature first
The information such as threshold value write sensor corresponding registers, after the completion of can be by reading the deposit of the storage temperature value of temperature sensor 12
Device obtains ambient temperature value.The temperature value is sent to STM32 microcontrollers 2 by Sensor Hub single-chip microcomputers 3 in real time, and STM32 is micro-
Controller 2 controls digital display tube 13 to show this temperature value.When environment temperature exceeds the temperature pole of sensor setting
In limited time, interrupt signal is produced, this interrupt signal sends alarm audio by buzzer driver is triggered, and prompts current temperature value to surpass
Go out preset temperature threshold value.Wherein, temperature sensor module 12, numeral method pipe 13, buzzer module 11 are above-mentioned the
One type member block.
In another embodiment of the invention, member block also includes the Second Type member block based on non-I2C communications, monolithic
Machine is additionally configured to turn after the I2C signals that microcontroller is sent are converted into non-I2C signals corresponding with Second Type member block
Second Type member block corresponding to being sent to and/or the non-I2C signals for being configured as sending Second Type member block switch to I2C letters
Microcontroller is forwarded to after number.It is that first kind member block or Second Type member block can be by single-chip microcomputers to distinguish member block
Specify and (such as preset in single-chip microcomputer either microprocessor between type and the address of member block in advance in microprocessor
Corresponding relation) or the single-chip microcomputer either microprocessor forwarding of single-chip microcomputer (need to pass through) send test signal, according to returning
The test signal returned confirms type.
Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific
Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art
Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot
Form, these are belonged within the protection of the present invention.
Claims (10)
1. a kind of electronic building blocks based on I2C interface, it is characterised in that comprising base and pluggable be arranged on base
Member block, each member block are configured as different address, and the electronic building blocks are also comprising microcontroller and each for managing
The single-chip microcomputer of communication data stream between member block and microcontroller, the member block include the first kind member based on I2C communications
Part block, it is both configured between first kind member block and single-chip microcomputer, between microcontroller and single-chip microcomputer by I2C communication modes
Communicated.
2. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that multiple element block is needed to micro-
When controller sends data simultaneously, after single-chip microcomputer is connected to the data transmitted by these member blocks at the same time, by each member block
Data are forwarded to microcontroller successively according to the sequencing of time respectively.
3. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the microcontroller also by with
It is set to when the microcontroller needs while controls multiple member blocks, each control is sent respectively according to time order and function order
System is instructed to the single-chip microcomputer to be forwarded to corresponding member block.
4. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the member block includes having
The member block of wifi module, the member block with sensor and with any one in display, luminous, sounding or a variety of
The functional module of function.
5. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that
Connected between member block and base by the way of jack and contact pin, between the contact pin and jack of connection formed single-chip microcomputer it
Between wire communication, each I2C interface wherein between first kind member block and single-chip microcomputer is using having 4 pairs of contact pins
And four pin plug connectors of jack are realized, to connect SDA, SCL, power supply and ground wire respectively.
6. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the member block also includes base
In the Second Type member block of non-I2C communications, the I2C signals that the single-chip microcomputer is additionally configured to send the microcontroller turn
Corresponding Second Type member block is forwarded to after being changed to non-I2C signals corresponding with Second Type member block and/or is configured as
The non-I2C signals that Second Type member block is sent are forwarded to the microcontroller after switching to I2C signals.
7. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the first kind member block
When being plugged on base, each first kind member block is connected to the data/address bus between first kind member block and microcontroller
On.
8. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the microcontroller is
STM32x103VCT6。
9. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the single-chip microcomputer is
STM8L151K6U6。
10. the electronic building blocks according to claim 1 based on I2C interface, it is characterised in that the microcontroller and institute
State the module that single-chip microcomputer is fixedly installed in the base for being either also designed to be arranged on base pluggablely on.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710944412.4A CN107583288A (en) | 2017-09-30 | 2017-09-30 | A kind of electronic building blocks based on I2C interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710944412.4A CN107583288A (en) | 2017-09-30 | 2017-09-30 | A kind of electronic building blocks based on I2C interface |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107583288A true CN107583288A (en) | 2018-01-16 |
Family
ID=61053661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710944412.4A Pending CN107583288A (en) | 2017-09-30 | 2017-09-30 | A kind of electronic building blocks based on I2C interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107583288A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109605345A (en) * | 2018-12-20 | 2019-04-12 | 清华大学 | A kind of modularization robot structure cognitive method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103930182A (en) * | 2012-02-17 | 2014-07-16 | 技术第一公司 | Baseplate assembly for use with toy pieces |
US20160158659A1 (en) * | 2014-12-07 | 2016-06-09 | Pecoto Inc. | Computing based interactive animatronic device |
CN206198697U (en) * | 2016-10-20 | 2017-05-31 | 深圳市华海技术有限公司 | A kind of electronic modular system |
CN106999781A (en) * | 2014-10-08 | 2017-08-01 | Dxtr触觉创业有限公司 | Interactive learning building blocks |
CN107134205A (en) * | 2017-07-06 | 2017-09-05 | 深圳市魔块智能有限公司 | Wireless programmable electronic modular system and its control method |
CN207462675U (en) * | 2017-09-30 | 2018-06-08 | 中国地质大学(武汉) | A kind of electronic building blocks based on I2C interface |
-
2017
- 2017-09-30 CN CN201710944412.4A patent/CN107583288A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103930182A (en) * | 2012-02-17 | 2014-07-16 | 技术第一公司 | Baseplate assembly for use with toy pieces |
CN106999781A (en) * | 2014-10-08 | 2017-08-01 | Dxtr触觉创业有限公司 | Interactive learning building blocks |
US20160158659A1 (en) * | 2014-12-07 | 2016-06-09 | Pecoto Inc. | Computing based interactive animatronic device |
CN206198697U (en) * | 2016-10-20 | 2017-05-31 | 深圳市华海技术有限公司 | A kind of electronic modular system |
CN107134205A (en) * | 2017-07-06 | 2017-09-05 | 深圳市魔块智能有限公司 | Wireless programmable electronic modular system and its control method |
CN207462675U (en) * | 2017-09-30 | 2018-06-08 | 中国地质大学(武汉) | A kind of electronic building blocks based on I2C interface |
Non-Patent Citations (1)
Title |
---|
周德俭: "SMT组装质量检测与控制", pages: 115 - 116 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109605345A (en) * | 2018-12-20 | 2019-04-12 | 清华大学 | A kind of modularization robot structure cognitive method |
CN109605345B (en) * | 2018-12-20 | 2020-07-07 | 清华大学 | Modular robot structure sensing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN207462675U (en) | A kind of electronic building blocks based on I2C interface | |
CN102023953B (en) | Control method of system having many inter-integrated circuit (I2C) buses | |
TWI393009B (en) | Data sharing and transfer systems and methods | |
US20110191503A1 (en) | Motherboard Compatible with Multiple Versions of Universal Serial Bus (USB) and Related Method | |
WO1999045461A3 (en) | Improved compact flash memory card and interface | |
CN104571991B (en) | Control panel, apparatus for lighting and lighting method | |
CN105372619B (en) | A kind of safety chip power failure test equipment | |
US6704827B1 (en) | Hot plug interface (HPI) test fixture | |
CN107583288A (en) | A kind of electronic building blocks based on I2C interface | |
JP5512147B2 (en) | USB memory | |
CN201655114U (en) | Hardware structure of DSP experimental platform | |
CN102156618B (en) | Memory device with multiple connectors and method for transmitting data | |
CN209103591U (en) | A kind of single-chip learning plate of intelligent control | |
US8266348B2 (en) | System and method of communicating with portable devices | |
CN110349480A (en) | teaching development board and robot | |
CN207571945U (en) | For the experimental box of hardware programming study | |
CN108525325A (en) | A kind of building block system instruction module, host apparatus and modular system | |
CN110413547A (en) | The communication system of interface control unit and the application interface control unit | |
CN102289926B (en) | Signaling method and device and TV remote controller | |
CN204423022U (en) | Can general purpose transducer opertaing device and system | |
CN101645804A (en) | Veneer, communication system and method for detecting connection state of communication interface | |
CN109557846A (en) | Detect identification circuit, its detection recognition method and electronic equipment | |
CN206804302U (en) | A kind of simulative automobile communication test device | |
CN218273383U (en) | Thing networking study development board | |
CN221613300U (en) | All-in-one serial port patch cord |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180116 |