CN109531569A - Support the interface of different soft copy interconnection and the robot based on the interface - Google Patents
Support the interface of different soft copy interconnection and the robot based on the interface Download PDFInfo
- Publication number
- CN109531569A CN109531569A CN201811480004.9A CN201811480004A CN109531569A CN 109531569 A CN109531569 A CN 109531569A CN 201811480004 A CN201811480004 A CN 201811480004A CN 109531569 A CN109531569 A CN 109531569A
- Authority
- CN
- China
- Prior art keywords
- pin
- line
- master control
- interface
- power supply
- 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.)
- Granted
Links
- 230000005540 biological transmission Effects 0.000 claims abstract description 19
- 230000006854 communication Effects 0.000 claims description 15
- 238000004891 communication Methods 0.000 claims description 14
- WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 claims description 12
- 229910052744 lithium Inorganic materials 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 12
- 230000007246 mechanism Effects 0.000 claims description 11
- 241001269238 Data Species 0.000 claims description 7
- 238000000034 method Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 claims description 3
- 230000005611 electricity Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 5
- 230000003993 interaction Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 206010048669 Terminal state Diseases 0.000 description 1
- 239000012491 analyte Substances 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1602—Programme controls characterised by the control system, structure, architecture
- B25J9/161—Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J19/00—Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Manipulator (AREA)
- Toys (AREA)
Abstract
This application discloses a kind of interface for supporting different soft copy interconnection and based on the robot of the interface.The interface includes 12 pins, specific: A1, A12 pin are used as ground wire;A2 pin, the power supply line as power supply adaptor;A3 pin, be configured for use as sensor and or master control condition line and motor identification line;A4, A9 pin, are configured for use as power supply line;A5 pin is used as the revolving speed of transmission control motor and the pwm signal of rotational angle;A6 pin is used as the signal wire of power supply adaptor;A7 pin, the identification line as power supply adaptor;A8 pin is used as the rotation direction of control motor;A10 pin, be configured for use as sensor and or master control clock line and motor orthogonal encoder A phase signals line;A11 pin, be configured for use as sensor and or master control data line and motor orthogonal encoder B phase signals line.The interface supports the connection of master control and motor, sensor, any soft copy in power supply adaptor, accomplishes the unification of interface.
Description
Technical field
This application involves electronic fields, and in particular to robot field, more particularly to support connecing for different soft copy interconnection
Mouth and the robot based on the interface.
Background technique
The electronic toys such as present robot, unmanned plane are fitted together by different soft copies, and part toy
Support user's partition and independent assortment.Because of the different communication modes that the soft copy of different function has, so existing electronics is played
In tool, there is the soft copy of different function respective interface can only be connected by specific interface when different soft copies interconnect,
Interface disunity connects not flexible.
Summary of the invention
The purpose of the application is to propose a kind of interface for supporting different soft copies interconnection and the robot based on the interface,
To solve the technical issues of background section above is mentioned.
In a first aspect, this application provides a kind of interface for supporting different soft copy interconnection, the interface includes 12 pipes
Foot, specific: A1 pin is configured for use as ground wire;A2 pin is configured for use as the power supply line of power supply adaptor;A3 pin, it is multi-functional
Pin, be configured for use as sensor and or master control condition line and motor identification line;A4 pin, is configured for use as power supply line;A5
Pin is configured for use as the revolving speed of transmission control motor and the pwm signal of rotational angle;A6 pin, is configured for use as power supply adaptor
Signal wire;A7 pin is configured for use as the identification line of power supply adaptor;A8 pin is configured for use as the rotation direction of control motor;
A9 pin, is configured for use as power supply line;A10 pin, Multifunctional pin, be configured for use as sensor and or master control clock line, and electricity
Machine orthogonal encoder A phase signals line;A11 pin, Multifunctional pin, be configured for use as sensor and or master control data line, and electricity
Machine orthogonal encoder B phase signals line;A12 pin, is configured for use as ground wire.
In some embodiments, interface is arranged to positive and negative two array of pins, pin corresponding positive and negative links together.
Second aspect, this application provides the robot based on the interface, the robot includes soft copy: master control,
Sensor, motor, power supply adaptor, wherein each soft copy configures the interface, specific: motor passes through the interface
After accessing master control, the side of the predeterminated frequency is read in the square-wave signal of control identification line A3 pin output predeterminated frequency, the master control
Wave signal, and identify the corresponding motor type of the square-wave signal;The frequency that the master control passes through the pwm signal of control A5 pin output
Rate and duty ratio control the revolving speed of motor and the angle of rotation, export high level or low level by control A8 pin, control institute
State the rotation direction of motor;In addition, the motor passes through orthogonal encoder A phase signals line A10 pin, orthogonal encoder B respectively
Phase signals line A11 pin exports A phase signals, B phase signals;The master control is calculated motor and is worked as by the A phase signals, B phase signals
Preceding velocity of rotation and angle;After power supply adaptor accesses master control by the interface, by identification line A7 pin configuration at low level,
After the master control detects the failing edge of itself identification line A7 pin level, control signal wire A6 pin exports specific frequency
Square-wave signal, the power supply adaptor are read on A6 pin after the square-wave signal of the specific frequency, control power supply line A2 output
Charging voltage is that the lithium battery of the master control charges;Master control is connected with sensor by the interface, the master control and the biography
Sensor respectively by different moments read and or write state line A3 pin, clock line A10 pin, data line A11 pin
High level or low level, realize do not distinguish principal and subordinate, half-duplex, synchronization data transmission.
In some embodiments, if the sensor internal does not configure battery, the sensor and the master control except logical
Cross condition line A3 pin, clock line A10 pin, outside data line A11 pin communication, the master control also passes through power supply line A4, A9 and is
The sensor power supply.
In some embodiments, if no configuration battery, the motor and the master control do not remove and pass through knowledge inside the motor
Other line A3 pin, A5 pin, A8 pin, orthogonal encoder A phase signals line A10 pin, orthogonal encoder B phase signals line A11 pipe
Foot communication is outer, and the master control passes through power supply line A4, A9 also as motor power supply.
In some embodiments, the power supply adaptor is except the lithium that control power supply line A2 output charging voltage is the master control
Battery charging is outer, and the power supply adaptor passes through power supply line A4, A9 also as master control power supply.
In some embodiments, the robot further includes the second master control, specific: the master control and second master control
Be connected by the interface, the master control and second master control respectively by different moments read and or write state line
A3 pin, clock line A10 pin, data line A11 pin high level or low level, realization do not distinguish principal and subordinate, half-duplex, synchronization
Data transmission.
In some embodiments, the robot further includes the second master control, specific: the master control and the robot are also
Specific including hub: the hub configuration is used for an Interface Expanding into multiple interfaces, and the master control passes through described
Hub and multiple sensors and/or Master Communications, wherein the soft copy for sending data is known as transmitting terminal, receives the electricity of data
Component is known as receiving end.
In some embodiments, the master control passes through the hub and multiple sensors and/or Master Communications, comprising:
The condition line A3 pin of each soft copy is all connected on the condition line of the hub, the clock line A10 pipe of each soft copy
Foot is all connected on the clock line of the hub, and the data line A11 pin of each soft copy is all connected to the hub
On data line.
In some embodiments, the master control sends number by the hub and multiple sensors and/or Master Communications
According to soft copy be known as transmitting terminal, the soft copy for receiving data is known as receiving end, further includes: the transmitting terminal, close bus in
Off line system decides whether the state of bus is the free time according to the level on the condition line A3 pin of reading, clock line A10 pin,
When the state of the bus is idle, byte-by-byte transmission byte data, all byte datas are sent out according to the preset time interval
After the completion of sending, universal serial bus is discharged, and open bus interrupt mechanism, wherein send the process of each byte data are as follows: control shape
State line A3 pin exports low level, i.e., the level on condition line is set to low level by high level, when determining the electricity on data line
It puts down as high level, i.e., all receiving ends are all after data line A11 pin output high level responds, the level on clock line
Failing edge, the position data in byte data are sent by data line A11 pin by turn, when sending next bit data, really
The answer signal that the high level that receiving end is returned in clock line has been received is protected, is judged also after sending each byte data
When not sent byte data, control data line A11 pin output high level, clock line A10 pin export low level, condition line
A3 pin exports high level;The receiving end, for repeating following steps: the level on real-time monitoring condition line works as inspection
The level measured on condition line becomes low level by high level, then Trigger Bus interrupts, and pause handles other tasks, acknowledgement state
Level on line is after low level, in data line A11 pin output high level as response, the level on clock line is low electricity
Usually, the position data on data line are read one by one, and after reading every bit data, control clock line A10 pin exports high level
As response, after having read a byte data, universal serial bus is discharged, and open bus interrupt mechanism, then handled other
Task.
The interface that the support difference soft copy of the offer of the application interconnects and the robot based on the interface, different function
Soft copy is connected by unified interface, by different pin communication or charging, is spliced more flexible.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the timing diagram according to one embodiment of the robot based on interface of the application;
Fig. 3 is the flow chart that soft copy communicates in one embodiment according to the robot based on interface of the application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
As shown in Figure 1, Fig. 1 is shown the interface that can be interconnected using the support difference soft copy of the application and is connect based on this
The exemplary architecture 100 of the embodiment of the robot of mouth.
Framework can be applied in the electronic toys such as robot, unmanned plane in Fig. 1.The system architecture includes soft copy: motor
101, motor 102, master control 103, power supply adaptor 104, hub 105, color sensor 106, attitude transducer 107, distance
Sensor 108.These soft copies are connected by the interface of the application.By taking robot as an example, master control 103 is as the big of robot
Brain is communicated with soft copies such as motor, sensors, to transmit data or instruction.Motor 101, the master control based on the received of motor 102
The speed and angle of the 103 data and instruction control motor rotations sent, realize activity or the driving robot of joint of robot
Wheel rotation.Power supply adaptor 104 is used as the charging of master control 103.One Interface Expanding can be multiple connect by hub 105
Mouthful.The color of the object for identification of color sensor 106.Attitude transducer 107 is used for the three-dimensional motion posture of robot measurement.
Range sensor 108 is for measuring at a distance between object.Master control 103 is communicated with each sensor, processing analyte sensors output
Data for realizing functions such as avoidances.It should be understood that soft copy number is only schematical in Fig. 1.According to realize needs,
It can have any number of soft copy.
In the present embodiment, a kind of interface for supporting different soft copy interconnection is disclosed, which includes 12 pins, tool
Body: A1 pin is configured for use as ground wire;A2 pin is configured for use as the power supply line of power supply adaptor;A3 pin, Multifunctional pin,
Be configured for use as sensor and or master control condition line and motor identification line;A4 pin, is configured for use as power supply line;A5 pin,
It is configured for use as the revolving speed of transmission control motor and PWM (Pulse Width Modulation, the pulse width tune of rotational angle
System) signal;A6 pin is configured for use as the signal wire of power supply adaptor;A7 pin is configured for use as the identification line of power supply adaptor;
A8 pin is configured for use as the rotation direction of control motor;A9 pin, is configured for use as power supply line;A10 pin, Multifunctional pin are matched
Set as sensor and or master control clock line and motor orthogonal encoder A phase signals line;A11 pin, Multifunctional pin are matched
Set as sensor and or master control data line and motor orthogonal encoder B phase signals line;A12 pin, is configured for use as ground wire.
When master control and sensor and or motor connect by above-mentioned interface when, master control is sensor by power supply line A4 pin, A9 pin
With or motor power supply.Current carrying capacities can be increased using two power supply lines of A4, A9.When power supply adaptor and master control pass through it is upper
When stating interface connection, power supply adaptor except being that lithium battery charging in master control is outer by A2 pin, also pass through power supply line A4 pin,
A9 pin is master control power supply.It avoids lithium battery from also powering while charging, causes the problem that charge efficiency is low.
In the present embodiment, the applicable master control of the interface is built-in rechargeable lithium battery.If built in the master control of robot
Be non-rechargeabel disposable battery, then still can the practical interface, relevant to power supply adaptor A2, A6, A7 pin retains,
It is set as idle pin, while removing hardware and software module relevant to power supply adaptor in master control.
In the present embodiment, male connector interface, female interface all have above-mentioned 12 pins, and male connector interface can be inserted into female and connect
Cause for gossip is now electrically connected, i.e., corresponding pin realizes electrical connection.Different soft copies can have several male connector interfaces and/or female
Interface.Realize that two soft copies of connection identify the type of soft copy by driver.
In some optional implementations of the present embodiment, by the structure setting of interface at such as USB Type-C
Structure, i.e., interface is arranged to positive and negative two array of pins, the corresponding pin in front and back sides links together.Support the positive anti-plug of user.
As an example, master control is configured with multiple Type-C female interfaces, the soft copies such as other motors, sensor, power supply adaptor are each
Configured with 1 Type-C male connector interface.For some Type-C female interface in master control, any one other soft copy is supported
Insertion, the type that master control passes through the soft copy of driver identification insertion.
In the present embodiment, interface has 12 pins, which supports master control and motor, sensor, power supply adaptor
In any one soft copy connection, accomplish the unification of interface, certainly, need borrow group driver identification soft copy a type.
After reunification, the connection between soft copy is more flexible for interface.
The timing diagram 200 of one embodiment of the robot Fig. 2 shows the application based on above-mentioned interface.It needs to illustrate
It is that master control has interrupt mechanism and time-sharing multiplex mechanism, the timing diagram that master control is communicated with motor, power supply adaptor, sensor every time is not
Uniquely, but the communication steps between master control and each soft copy are.Specifically as shown, the timing diagram includes following step
It is rapid:
Step 201, the square-wave signal of motor control identification line A3 pin output predeterminated frequency.
It in the present embodiment, can the output of active control identification line A3 pin after motor accesses master control by above-mentioned interface
The square-wave signal of predeterminated frequency.One robot can configure the motor of multiple and different types.Including but not limited to large-scale servo electricity
Machine, medium-sized servo motor, Miniature servo-motors.The square-wave signal of the corresponding predeterminated frequency of every kind of different types of motor.
Step 202, the square-wave signal of the predeterminated frequency is read in master control, and identifies the corresponding motor type of the square-wave signal.
In this embodiment, the square-wave signal on A3 pin is read in master control, and by the frequency of the square-wave signal and the side that prestores
The list of wave signal frequency-motor type is compared, and determines the corresponding motor type of the square-wave signal.Step 201 and step
202 the step of being identification motor, alternatively referred to as driver.Only after motor is inserted into master control every time, execute primary.And it is main below
Step 203 to the step 205 of control control motor rotation can be performed a plurality of times as needed.
Step 203, master control controls the revolving speed of motor by the frequency and duty ratio of the pwm signal of control A5 pin output
With the angle of rotation, high level or low level are exported by control A8 pin, control the rotation direction of motor.
In the present embodiment, master control instructs based on the received, according to the type of motor, generates certain frequency and duty ratio
Pwm signal is sent to motor by A5 pin.The driving circuit of motor in motor pwm signal based on the received controls motor
Revolving speed and rotation angle.Wherein, master control can receive the instruction from remote controler, the instruction of intelligent terminal, such as mobile phone
The instruction of robot itself pre-set button triggering is pressed in the instruction that upper APP is sent, for example, triggering machine after pressing dancing button
3 circle right-hand rotation of people's left-hand rotation, 3 circle.
In the present embodiment, master control exports high level or low level by control A8 pin, controls the rotation direction of motor.
For example, high level indicates to rotate forward, low level indicates reversion.
Step 204, motor passes through orthogonal encoder A phase signals line A10 pin, orthogonal encoder B phase signals line A11 respectively
Pin exports A phase signals, B phase signals.
In the present embodiment, motor is configured with orthogonal encoder, and it is to pass through light that orthogonal encoder, which is also known as photoelectric encoder,
Geometry of machinery displacement on motor output shaft is converted into the sensor of A, B phase signals by electricity conversion.Motor passes through A10 pin, A11
Pin exports the A phase signals and B phase signals of orthogonal encoder respectively.
Step 205, master control calculates motor current operation speed and angle by A phase signals, B phase signals.
In the present embodiment, the A phase signals, B phase signals of orthogonal encoder are signal of the motor feedback to master control, and master control is logical
Above-mentioned A phase signals, B phase signals are crossed, motor current operation speed and angle are calculated.
In the present embodiment, in actual application scenarios, master control can be according to motor current operation speed and angle, again
Then the frequency and duty ratio for adjusting pwm signal jump and execute step 203-205.The step of repeating the execution-feedback-adjustment,
Until control motor turns to target angle.
Step 206 is the interaction flow of master control and power supply adaptor to step 208.It is specific:
Step 206, power supply adaptor is by identification line A7 pin configuration at low level.
In the present embodiment, when the interface free time, A7 pin is high level, when power supply adaptor passes through above-mentioned interface access master
After control, active control identification line A7 pin exports low level.
Step 207, after master control detects the failing edge of A7 pin level, control signal wire A6 pin exports specific frequency
Square-wave signal.
In the present embodiment, when the level of A7 pin in master control becomes low level by high level, there are a failing edges.When
After master control detects above-mentioned failing edge, control signal wire A6 pin exports the square-wave signal of specific frequency as response.
Step 208, power supply adaptor is read on A6 pin after the square-wave signal of the specific frequency, and control power supply line A2 is defeated
Charging voltage is that the lithium battery of master control charges out.
In the present embodiment, power supply adaptor is read on A6 pin after the square-wave signal of the specific frequency, controls power supply
Line A2 exports the lithium battery that charging voltage is master control and charges.
Step 209 is the step of master control is communicated with sensor, specific:
Step 209, master control and sensor respectively by different moments read and or write state line A3 pin, clock
The high level or low level of line A10 pin, data line A11 pin, realize do not distinguish principal and subordinate, half-duplex, synchronization data transmission.
In the present embodiment, master control is connect with sensor by above-mentioned interface.It is not distinguish because master control is communicated with sensor
Principal and subordinate, all can serve as transmitting terminal and receiving end, and condition line A3 pin, clock line A10 pin, data line A11 pin are all connected to
Pull-up resistor, when the interface free time, the level on above-mentioned pin is high level.
Specific communication process are as follows: the level on transmitting terminal reading state line A3 pin, when detection when the level is high electricity
Usually, transmitting terminal control A3 pin exports low level, and expression will send data.Receiving end is detecting that A3 pin is lower level
Afterwards, other work are interrupted, control clock line A10 pin output low level is as response.Transmitting terminal reads the level of A10 pin
After low level, clock signal is exported in clock line A10 pin, while managing by data line A11 in the failing edge of clock signal
Foot output bit data.After data are transmitted, A3, A10, A11 pin are discharged, the level on A3, A10, A11 pin restores high electricity
It is flat.
In the present embodiment, if soft copy internal battery, when soft copy work Shi Kewei power itself, if soft copy
Without internal battery, then need external power supply that could work.In the present embodiment, rechargeable lithium battary built in master control, sensor,
Electric machine built-in disposable battery.
In some optional implementations of the present embodiment, sensor, motor can without internal battery, when its pass through it is above-mentioned
When interface accesses master control, the voltage of a certain amplitude is supplied for it by power supply line A4 pin, A9 pin by master control.It is managed using two
Foot, which is powered, can increase the transmittability of electric current.As an example, 5 volts of voltages of supply, if first device inside sensor and/or motor
Part then needs the voltage by 5 volts to be converted into 3.8 volts of voltage it is desirable that 3.8 volts of voltage.
In some optional implementations of the present embodiment, power supply adaptor exports charging voltage except control power supply line A2
Outer for the lithium battery charging of master control, power supply adaptor passes through power supply line A4, A9 also as master control power supply.Lithium battery is avoided to charge
While, go back supplying power for outside, the low problem of charge efficiency.
In some optional implementations of the present embodiment, robot further includes the second master control, and similar double-core computer mentions
The operational capability of high robot.Certainly, multiple master controls can be configured for robot according to the actual needs, for example, 3,4
Deng.In application scenes, the master control of a robot can pass through above-mentioned interface communication with the master control of another robot.
In some optional implementations of the present embodiment, robot further includes hub, wherein hub configuration is used
In by an Interface Expanding at multiple interfaces.Hub can connecting hub, continuous expansion interface, solve soft copy on interface
Limited problem.Each soft copy has unique address, is communicated between soft copy by unique address.
Master control is connect by hub with multiple sensors and/or master control, specific: the condition line A3 pipe of each soft copy
Foot is all connected on the condition line of hub, and the clock line A10 pin of each soft copy is all connected on the clock line of hub,
The data line A11 pin of each soft copy is all connected on the data line of hub.These soft copies use the side of universal serial bus
Formula is communicated, and the soft copy for sending data is known as transmitting terminal, and other soft copies are known as receiving end, and receiving end receives transmission
After holding the data sent, destination address is parsed, if destination address is consistent with the address of itself, continues with the data,
If destination address is inconsistent with itself address, the data are abandoned.Transmitting terminal can once send all byte numbers
According to transmission data that can also be byte-by-byte at a certain time interval, such receiving end can be in the gap place to go for receiving two bytes
Manage other tasks.Because transmitting terminal and the interaction flow of all receiving ends are the same, thus this list transmitting terminal with
The interaction timing diagram of one receiving end, as shown in Figure 3.
Step 301, transmitting terminal closes bus interrupt mechanism, according on the condition line A3 pin of reading, clock line A10 pin
Level, decide whether the state of universal serial bus is idle.
Either be used as transmitting terminal, or as the soft copy of receiving end, inside all configuration processors referred to by processing
The different task of processing such as order or data, execution operation.As an example, task of master control being needed to handle includes but is not limited to: connecing
The instruction of mobile phone or remote controler transmission, the rotation of each motor of control, the data acquired according to sensor are received, positioning and avoidance are done
Analysis etc..When receiving end is handling other tasks, and transmitting terminal needs then pass through touching to receiving end transmission data at this time
The bus for sending out receiving end is interrupted, and so that receiving end pause is handled other tasks, then is received the data on universal serial bus.To prevent from sending out
When sending end sends data, the bus for triggering itself is interrupted, and interrupts this task of data that sends, then prepares to receive data, institute
With transmitting terminal before sending data by universal serial bus, need first to close the bus interrupt mechanism of itself.
One moment, universal serial bus can only support a transmitting terminal to send data.The state of universal serial bus be divided into it is idle and
It occupies, only in idle state, transmitting terminal could occupy the universal serial bus for sending data.When idle state, condition line, when
Level on clock line is all high level, and the level on data line is low level.Transmitting terminal is continuous to read within the preset time
Level on condition line A3 pin, clock line A10 pin is decided until the level on condition line, clock line is all high level
The state of universal serial bus is the free time, is not high level more than the level in preset time and condition line, clock line, then decides string
The state of row bus is to occupy.
In some optional implementations, for reduce multiple terminals determine simultaneously the state of the universal serial bus for the free time,
And the probability that the universal serial bus causes error of transmission is all occupied, transmitting terminal is the free time in the state of first time determination of serial bus
Afterwards, state of a control line A3 pin first exports low level, random delay for a period of time after, the high electricity of state of a control line A3 pin output
It is flat, the state of the universal serial bus is determined again, if the state of the universal serial bus is still the free time, decides the state of universal serial bus
For the free time.
Step 302, when the state of universal serial bus is idle, transmitting terminal byte-by-byte transmission word according to the preset time interval
Joint number evidence.
Transmitting terminal first generates all byte datas to be transmitted, and calculates the number of byte, after sending a byte data,
Number subtracts one, is delayed after prefixed time interval, continues to send next data.Wherein, the spread pattern of all byte datas are as follows:
Synchronous code (1 byte)+mesh ground device address (1 byte)+source device address (1 byte)+length (1 byte)+exclusive or check (1 word
Section)+data.
Step 303, the byte-by-byte byte data for receiving transmitting terminal and sending in receiving end.It is receiving among two byte datas
In time interval, other tasks can be handled.
Wherein, transmitting terminal and receiving end send and receive the detailed process of byte data respectively are as follows:
Step 3021, transmitting terminal state of a control line A3 pin exports low level, i.e., condition line is set to low electricity by high level
Flat, control data line A11 pin exports high level.Wherein, the level on condition line is set to low level, indicates to occupy this serially
Bus.
Step 3031, the level on receiving end real-time monitoring condition line, when detecting the level on condition line by high level
Become low level, then Trigger Bus interrupts, and pause handles other tasks.
Step 3032, the level on receiving end reading state line confirms that the level is control data line A11 after low level
Pin exports high level as response.Because the low level priority of the signal wire of universal serial bus is high, so when on the universal serial bus
All soft copies all control data line A11 pin output high level, data line just shows as high level.
Step 3022, transmitting terminal reads the level on data line, determines whether the level is high level, i.e., all receiving ends
All in data line A11 pin output high level as response.Transmitting terminal can constantly read data line within the preset time
On level, until reading level be high level.If it exceeds preset time, and the level on data line is still low level,
Then need to discharge bus, i.e. state of a control line A3 pin exports high level, and control clock line A10 pin exports high level, control
Data line A11 pin exports low level.If the level on data line is high level, i.e., all receiving ends are all in data line
A11 pin exports high level as response.
Step 3023, the failing edge of transmitting terminal level on clock line is sent in byte by turn by data line A11 pin
Position data, when sending next bit data, it is ensured that have been received receiving end clock line return high level response letter
Number.
Step 3033, receiving end is read the position data on data line one by one, is being read when level on clock line is low level
After taking every bit data, control clock line A10 pin output high level is as response.
Step 3024, there are also when not sent byte data, control data line A11 pin exports high electricity for transmitting terminal judgement
Flat, clock line A10 pin output low level, condition line A3 pin export high level.It controls clock line A10 pin and exports low electricity
It is flat, the universal serial bus is held over, state of a control line A3 pin exports high level, is that triggering is total when sending byte data a next time
Line interruption is prepared, in addition, control data line A11 pin exports high level, after delay waits preset time interval, under transmission
One byte data, and receiving end can be gone to handle other tasks in this time interval.Step 3034, receiving end is being read
After a complete byte data, universal serial bus is discharged, and open bus interrupt mechanism, then continues with former stopped task or new
The higher task of priority.
Specific transmitting terminal and receiving end are in the detailed process for sending and receiving a data respectively are as follows:
Transmitting terminal control data line A11 pin output indicates 10 position data with low and high level, while controlling clock line A10
Pin exports the low level of 25 microseconds, i.e., level on clock line is set to low level by high level, indicates the level on clock line
Failing edge, data are sent by data line.Wherein, the low and high level on clock line also is understood as clock cycle signal, by
The low and high level of 25 microseconds alternately forms, and certainly, the clock cycle can change other numerical value into.As an example, above-mentioned 25 are micro-
Second is substituted for 20 microseconds, 30 microseconds, 50 microseconds etc..
Within a preset time, whether the level constantly detected on clock line is low level for receiving end, if it is low level,
The low level that clock line A10 pin exports 25 microseconds is controlled, while reading the position data on data line, after 25 microseconds, when control
Clock line A10 pin exports high level as response.If it exceeds preset time, the level on clock line is still high level, then table
Show transmission position corrupt data, universal serial bus need to be discharged.
Transmitting terminal controls clock line A10 pin and exports high level, if the position data sent are not the last of byte data
One, then clock line A10 pin is kept to export 25 microsecond of high level.The level on clock line is constantly read within a preset time,
And judge whether it is high level, that is, judge whether that all receiving ends have all been replied, if it is high level, further judges 8
Position data whether be all sent completely, if there is also not sent position data, repeat above-mentioned step for send under
One bit data.If it exceeds preset time, the level on clock line is still low level, then it represents that is not answered part receiving end
It answers, transmits position corrupt data, universal serial bus need to be discharged.
Receiving end constantly reads the level on clock line within a preset time and judges whether it is high level, i.e. judgement is serial
Whether other terminals in bus have all replied, and if it is high level, further judge whether 8 bit datas have all received
At if repeating above-mentioned step there is also not received position data.If it exceeds preset time, on clock line
Level is still low level, then it represents that transmission position corrupt data need to discharge universal serial bus.
Step 304, after transmitting terminal judges that all byte datas are sent completely, universal serial bus is discharged, and opens bus interruption
Mechanism.
Either transmitting terminal or receiving end, release universal serial bus are all state of a control line A3 pin and clock line A10 pipe
Foot exports high level, and control data line A11 pin exports low level.In the present embodiment, different soft copies pass through interface not
With pin communicated or charged, but interface be it is unified, connection type is more flexible, splicing it is more random.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (10)
1. a kind of interface for supporting different soft copy interconnection, which is characterized in that the interface includes 12 pins, specific:
A1 pin, is configured for use as ground wire;
A2 pin is configured for use as the power supply line of power supply adaptor;
A3 pin, Multifunctional pin, be configured for use as sensor and or master control condition line and motor identification line;
A4 pin, is configured for use as power supply line;
A5 pin is configured for use as the revolving speed of transmission control motor and the pwm signal of rotational angle;
A6 pin is configured for use as the signal wire of power supply adaptor;
A7 pin is configured for use as the identification line of power supply adaptor;
A8 pin is configured for use as the rotation direction of control motor;
A9 pin, is configured for use as power supply line;
A10 pin, Multifunctional pin, be configured for use as sensor and or the clock line and motor orthogonal encoder A of master control believe
Number line;
A11 pin, Multifunctional pin, be configured for use as sensor and or the data line and motor orthogonal encoder B of master control believe
Number line;
A12 pin, is configured for use as ground wire.
2. a kind of interface for supporting different soft copy interconnection according to claim 1, which is characterized in that interface to be arranged to
Positive and negative two array of pins, pin corresponding positive and negative link together.
3. the robot based on interface described in claim 1, which is characterized in that the robot includes soft copy: master control, sensing
Device, motor, power supply adaptor, wherein each soft copy configures the interface, specific:
After motor accesses master control by the interface, the square-wave signal of control identification line A3 pin output predeterminated frequency, the master
The square-wave signal of the predeterminated frequency is read in control, and identifies the corresponding motor type of the square-wave signal;The master control passes through control A5
The frequency and duty ratio of the pwm signal of pin output, control the revolving speed of motor and the angle of rotation, pass through control A8 pin output
High level or low level control the rotation direction of the motor;In addition, the motor passes through orthogonal encoder A phase signals respectively
Line A10 pin, orthogonal encoder B phase signals line A11 pin export A phase signals, B phase signals;The master control is believed by the A
Number, B phase signals, calculate motor current operation speed and angle;
After power supply adaptor accesses master control by the interface, by identification line A7 pin configuration at low level, when the master control is examined
After the failing edge for measuring itself identification line A7 pin level, control signal wire A6 pin exports the square-wave signal of specific frequency, institute
It states power supply adaptor to read on A6 pin after the square-wave signal of the specific frequency, control power supply line A2 output charging voltage is institute
State the lithium battery charging of master control;
Master control is connected with sensor by the interface, and the master control is with the sensor respectively by reading in different moments
With or write state line A3 pin, clock line A10 pin, data line A11 pin high level or low level, realization do not distinguish
Principal and subordinate, half-duplex, synchronization data transmission.
4. the robot according to claim 3 based on the interface, which is characterized in that
If the sensor internal does not configure battery, the sensor and the master control, which remove, passes through condition line A3 pin, clock
Outside line A10 pin, data line A11 pin communication, the master control passes through power supply line A4, A9 pin also as sensor power supply.
5. the robot according to claim 3 based on the interface, which is characterized in that
If no configuration battery, the motor and the master control do not remove and pass through identification line A3 pin, A5 pin, A8 inside the motor
Pin, orthogonal encoder A phase signals line A10 pin, outside orthogonal encoder B phase signals line A11 pin communication, the master control is also logical
Power supply line A4, A9 pin is crossed as motor power supply.
6. the robot according to claim 3 based on the interface, which is characterized in that
The power supply adaptor is in addition to control power supply line A2 output charging voltage is the lithium battery charging of the master control, the power supply
Adapter passes through power supply line A4, A9 pin also as master control power supply.
7. the robot according to claim 3 based on the interface, which is characterized in that the robot further includes second
Master control, specific:
The master control is connected with second master control by the interface, and the master control and second master control be not respectively by
In the same time read and or write state line A3 pin, clock line A10 pin, data line A11 pin high level or low level,
Realize do not distinguish principal and subordinate, half-duplex, synchronization data transmission.
8. according to the robot based on the interface of one of claim 3-7, which is characterized in that the robot is also
It is specific including hub:
The hub configuration is used for an Interface Expanding into multiple interfaces, and the master control passes through the hub and multiple biographies
Sensor and/or Master Communications, wherein the soft copy for sending data is known as transmitting terminal, and the soft copy for receiving data is known as receiving end.
9. the robot based on the interface according to claim 8, which is characterized in that the master control passes through the collection
Line device and multiple sensors and/or Master Communications, comprising:
The condition line A3 pin of each soft copy is all connected on the condition line of the hub, the clock line of each soft copy
A10 pin is all connected on the clock line of the hub, and the data line A11 pin of each soft copy is all connected to the line concentration
On the data line of device.
10. the robot based on the interface according to claim 9, which is characterized in that the master control passes through described
Hub and multiple sensors and/or Master Communications, the soft copy for sending data are known as transmitting terminal, and the soft copy for receiving data claims
For receiving end, further includes:
The transmitting terminal closes bus interrupt mechanism, according to the level on the condition line A3 pin of reading, clock line A10 pin,
Decide bus state whether be it is idle, when the state of the bus is idle, byte-by-byte hair according to the preset time interval
After sending byte data, all byte datas to be sent completely, universal serial bus is discharged, and open bus interrupt mechanism, wherein send every
The process of a byte data are as follows: state of a control line A3 pin exports low level, i.e., is set to the level on condition line by high level
Low level, when determining that the level on data line is high level, i.e., all receiving ends have all exported high level in data line A11 pin
After responding, the flat failing edge on clock line sends the position data in byte data by data line A11 pin by turn,
When sending next bit data, it is ensured that the answer signal that the high level that receiving end is returned in clock line has been received is being sent out
There are also when not sent byte data, control data line A11 pin exports high level, clock line for judgement after sending each byte data
A10 pin exports low level, condition line A3 pin exports high level;
The receiving end, for repeating following steps: the level on real-time monitoring condition line, when detecting on condition line
Level becomes low level by high level, then Trigger Bus interrupts, and pause handles other tasks, and the level on acknowledgement state line is low
After level, read one by one as response when the level on clock line is low level in data line A11 pin output high level
Position data on data line, after reading every bit data, control clock line A10 pin output high level is being read as response
After taking a byte data, universal serial bus is discharged, and open bus interrupt mechanism, then handles other tasks.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811480004.9A CN109531569B (en) | 2018-12-05 | 2018-12-05 | Robot based on interface supporting interconnection of different electronic parts |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811480004.9A CN109531569B (en) | 2018-12-05 | 2018-12-05 | Robot based on interface supporting interconnection of different electronic parts |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109531569A true CN109531569A (en) | 2019-03-29 |
CN109531569B CN109531569B (en) | 2021-08-31 |
Family
ID=65853722
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811480004.9A Active CN109531569B (en) | 2018-12-05 | 2018-12-05 | Robot based on interface supporting interconnection of different electronic parts |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109531569B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111775182A (en) * | 2020-05-26 | 2020-10-16 | 安克创新科技股份有限公司 | Method of detecting idle running, walking robot, and computer storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1305156A (en) * | 2000-12-21 | 2001-07-25 | 孙吉平 | Device for recognizing intelligent IC card with universal serial bus interface and its implementing method |
US20020080869A1 (en) * | 1999-02-22 | 2002-06-27 | Young Whu-Ming | DSL link with embedded control and multi-channel capability |
US6857095B2 (en) * | 1999-12-31 | 2005-02-15 | Nokia Mobile Phones, Ltd. | Method for making data transmission more effective and a data transmission protocol |
CN1661505A (en) * | 2004-12-28 | 2005-08-31 | 株洲时代集团公司 | General multifunctional bus interface for vehicles |
CN201210710Y (en) * | 2008-06-23 | 2009-03-18 | 青岛海信宽带多媒体技术股份有限公司 | Front-end plate interface of set-top box |
KR20100057324A (en) * | 2008-11-21 | 2010-05-31 | 김성태 | Sata interface apparatus for connection external device with host computer |
CN102236363A (en) * | 2010-04-28 | 2011-11-09 | 上海华虹集成电路有限责任公司 | Full-speed USB (Universal Serial Bus) equipment |
CN107053172A (en) * | 2016-12-27 | 2017-08-18 | 深圳市优必选科技有限公司 | Steering wheel mainboard control circuit and robot |
KR20180038388A (en) * | 2016-10-06 | 2018-04-16 | 로베르트 보쉬 게엠베하 | Control device, in particular control device for a motor vehicle |
-
2018
- 2018-12-05 CN CN201811480004.9A patent/CN109531569B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020080869A1 (en) * | 1999-02-22 | 2002-06-27 | Young Whu-Ming | DSL link with embedded control and multi-channel capability |
US6857095B2 (en) * | 1999-12-31 | 2005-02-15 | Nokia Mobile Phones, Ltd. | Method for making data transmission more effective and a data transmission protocol |
CN1305156A (en) * | 2000-12-21 | 2001-07-25 | 孙吉平 | Device for recognizing intelligent IC card with universal serial bus interface and its implementing method |
CN1661505A (en) * | 2004-12-28 | 2005-08-31 | 株洲时代集团公司 | General multifunctional bus interface for vehicles |
CN201210710Y (en) * | 2008-06-23 | 2009-03-18 | 青岛海信宽带多媒体技术股份有限公司 | Front-end plate interface of set-top box |
KR20100057324A (en) * | 2008-11-21 | 2010-05-31 | 김성태 | Sata interface apparatus for connection external device with host computer |
CN102236363A (en) * | 2010-04-28 | 2011-11-09 | 上海华虹集成电路有限责任公司 | Full-speed USB (Universal Serial Bus) equipment |
KR20180038388A (en) * | 2016-10-06 | 2018-04-16 | 로베르트 보쉬 게엠베하 | Control device, in particular control device for a motor vehicle |
CN107053172A (en) * | 2016-12-27 | 2017-08-18 | 深圳市优必选科技有限公司 | Steering wheel mainboard control circuit and robot |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111775182A (en) * | 2020-05-26 | 2020-10-16 | 安克创新科技股份有限公司 | Method of detecting idle running, walking robot, and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109531569B (en) | 2021-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI541659B (en) | Method and system for determining an arbitrary charging protocol in usb charging ports | |
US9836123B2 (en) | Bussed haptic actuator system and method | |
EP1291138A2 (en) | Robotic toy modular system with distributed program | |
CN103314500B (en) | For the method that electric energy accumulator is charged and charging station | |
RU2355564C2 (en) | Device for automatic robot mating | |
CN109531569A (en) | Support the interface of different soft copy interconnection and the robot based on the interface | |
EP3343386A1 (en) | Apparatus with inter-communicating processors | |
WO2007055083A1 (en) | Control/monitor signal transmission system | |
US7376760B1 (en) | Methods and apparatus to support acquisition of data | |
CN105700438A (en) | Electronic control system for multi-joint small robot | |
JP2022502183A (en) | Power-adaptive, human cavity scanning device | |
JP2004088208A (en) | Data transmission system and method therefor | |
JPH08129199A (en) | Camera body, camera accessory and camera system | |
CN108920392A (en) | A kind of conversion equipment and method of data-interface and SPI | |
CN116488763B (en) | Encoder communication delay compensation device and method | |
CN112152327A (en) | Adapter, electric tool system and adapter using method | |
CN111666215A (en) | Desktop cluster hardware platform for distributed algorithm testing and human-computer interaction research | |
CN217388740U (en) | Sensor data transmission device, sensor system and intelligent home system | |
JPS63190584A (en) | Servo-motor | |
Saracino et al. | MOTORE++ a portable haptic device for domestic rehabilitation | |
CN212623752U (en) | Trolley obstacle avoidance device based on 51 single chip microcomputer | |
US20230081348A1 (en) | Communication module and communication method | |
CN210210408U (en) | Robot body control system and robot | |
JP7223835B2 (en) | Command time test method and system, and computer storage medium | |
MXPA02002334A (en) | One way single wire communication interface. |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20191203 Address after: Room d1203, floor 11, building D, No. 9, Shangdi Third Street, Haidian District, Beijing 100036 Applicant after: BEIJING AIQI TECHNOLOGY CO., LTD. Address before: 050000 No. 501, Unit 3, Building No. 18, Chaoxia Street, Xinhua District, Shijiazhuang City, Hebei Province Applicant before: Zhang Yang Applicant before: Zhang Hu |
|
GR01 | Patent grant | ||
GR01 | Patent grant |