A kind of robot and digital motor controller thereof
Technical field
The utility model relates to the synchronous control technique of robot, particularly relates to a kind of robot and digital motor controller thereof that can 1-255 digital motor not had the synchro control of mistiming through universal serial bus.
Background technology
Robot is a system ensemble that integrates multiple functions such as environment sensing, dynamic decision, behavior control, and it combines multi-disciplinary development result, has represented the frontier development of hi-tech.Wherein, Mobile robot (Mobile Robot); Be meant that having certain perception thinking ability and certain moves the robot with Motor ability; It has greater flexibility than general industrial robot, is all having wide practical use aspect industrial and agricultural production, scientific exploration, military surveillance, service for life and the amusement etc. a lot.
Because need to coordinate and a plurality of systems such as balance environment sensing system, running gear and moving system,, need many motor synchronous control technology accurately so the mobile robot needs a plurality of motors of accurate control.
At present, the synchronous control technique of many motors comprises simulating signal control and Digital Signals, adopts simulating signal control to receive external interference easily, and reliability is relatively poor.Digital Signals is divided into parallel port control and two kinds of forms of serial ports control, if adopt parallel port control, the motor number that then can control generally can not surpass 8, otherwise can make the parallel port excessive, can increase the robot volume and make cost too high; If adopt Serial Control, then because the steering order that processor is carried out each motor has time-delay, when a plurality of motor synchronous are controlled, the accumulation that can produce departure.
Therefore; Prior art can not provide a kind of small size that 8 above motors are carried out precise figures control control system cheaply; This causes walking robot to be difficult to carry out the accurate coordination of multisystem, and accuracy and reliability are relatively poor, has seriously restricted the development and the application of walking robot.
The utility model content
The purpose of the utility model provides a kind of robot and digital motor controller thereof, can carry out digital controlly accurately through serial ports to the motor more than 8, effectively removes the latency issue that produces in the Electric Machine Control process.
To achieve these goals, the utility model provides a kind of digital motor controller, comprising:
Be used for connecting the control interface of a plurality of digital motors through universal serial bus;
Be used for sending to the register of each digital motor the setting module of corresponding motor action parameter through said control interface;
Be used for sending fill order to each digital motor, make each digital motor carry out the operation module of the motor action parameter of the said correspondence in the said register simultaneously through said control interface.
In the above-mentioned digital motor controller, said universal serial bus comprises ground wire, power lead and control line.
In the above-mentioned digital motor controller, said control interface has the ternary output of four buses buffered gate, and the ternary output of said four buses buffered gate connects said control line.
In the above-mentioned digital motor controller, said motor action parameter comprises target angle and rotating speed.
In the above-mentioned digital motor controller, the motor number of said a plurality of digital motors greater than 8 less than 256.
To achieve these goals, the utility model also provides a kind of robot, has a plurality of digital motors, also comprises: the digital motor controller;
Said digital motor controller specifically comprises:
Be used for connecting the control interface of said a plurality of digital motors through universal serial bus;
Be used for sending to the register of each digital motor the setting module of corresponding motor action parameter through said control interface;
Be used for sending fill order to each digital motor, make each digital motor carry out the operation module of the motor action parameter of the said correspondence in the said register simultaneously through said control interface.
In the above-mentioned robot, said universal serial bus comprises ground wire, power lead and control line.
In the above-mentioned robot, said control interface has the ternary output of four buses buffered gate, and the ternary output of said four buses buffered gate connects said control line.
The technique effect of the utility model embodiment is:
1) the utility model through universal serial bus earlier the operational factor corresponding stored in the register of each digital motor; Make each digital motor move the parameter of having stored in the register simultaneously through broadcasting instructions then; Just " receive respectively, carry out simultaneously "; This has just solved because receive the inconsistent and inconsistent problem of execution time that cause of the time of reception of data in the universal serial bus, thereby each digital motor can synchronization action, and the molar behavior of robot is steadily coordinated.
2) the utility model carries out motor synchronous control through universal serial bus; Only need a serial bus interface; And parallel bus need all be provided with an interface to each motor, and when the motor of needs control was more, the utility model had been practiced thrift interface; Reduce the volume of robot, reduced cost.
3) the utility model carries out motor synchronous control through universal serial bus, can carry out the Electric Machine Control more than 8 easily, can 1-255 digital motor not had the synchro control of time-delay.
Description of drawings
The johning knot composition of the digital motor controller that Fig. 1 provides for the utility model embodiment;
The circuit diagram of the digital motor controller that Fig. 2 provides for the utility model embodiment.
Embodiment
For the purpose, technical scheme and the advantage that make the utility model embodiment is clearer, will combine accompanying drawing that specific embodiment is described in detail below.
The johning knot composition of the digital motor controller that Fig. 1 provides for the utility model embodiment, as shown in Figure 1, digital motor controller 100 connects a plurality of digital motors through universal serial bus 200, and digital motor controller 100 comprises:
Control interface 110 is used for connecting a plurality of digital motors through universal serial bus;
Setting module 120 is used for sending corresponding motor action parameter through said control interface 110 to the register of each digital motor;
Operation module 130 is used for sending fill order through said control interface to each digital motor, makes each digital motor carry out the motor action parameter of the said correspondence in the said register simultaneously.
It is thus clear that; Among the utility model embodiment; Through universal serial bus earlier the operational factor corresponding stored in the register of each digital motor; Make each digital motor move the parameter of having stored in the register simultaneously through broadcasting instructions then, just " receive respectively, carry out simultaneously ", this has just solved the inconsistent problem of execution time that cause because the time of reception that receives data in the universal serial bus is inconsistent; Thereby each digital motor can synchronization action, and the molar behavior of robot is steadily coordinated.
Wherein, universal serial bus comprises ground wire, power lead and control line.Here the supply voltage of power lead can be 12V.Said motor action parameter comprises target angle and rotating speed etc.
Said control interface 110 has the ternary output of four buses buffered gate, and the ternary output of said four buses buffered gate connects said control line.
The circuit diagram of the digital motor controller that Fig. 2 provides for the utility model embodiment; As shown in Figure 2, adopt the 74HC126 device to realize half-duplex operation, form the ternary output of one four bus buffered gate 300; It adopts 5V power supply VCC power supply; Always have four triple gates, each triple gate has an input end, an output terminal, also has an Enable Pin.Each triple gate can be realized transmitting several different data with a guide roller stream.CPU RXD port connects with the RXD0 port of single-chip microcomputer 400, as the transmitting terminal of data, and the input end of triple gate just; CPU TXD port connects with the TXD0 port of single-chip microcomputer in the circuit, as the receiving end of data, and the output terminal of triple gate just; The transmit and receive data direction of signal of TTL depends on ENABLE RX signal and ENABLE TX signal, and they are connected to the PE mouth of single-chip microcomputer, when ENABLE TX is high level, enable to send, and promptly controller sends the instruction bag to steering wheel; When ENABLE RX is high level, enable to receive, promptly controller receives the state bag that steering wheel sends over.
Among the utility model embodiment; Setting module 120 can pass through firmware or chip microcontroller with operation module 130; Also can realize, store the software module that can realize the setting module 120 and the function of operation module 130 in this storer through CPU and storer.
Specifically being exemplified below of this software module:
It is thus clear that for each motor of driven in synchronism, steps flow chart is earlier with the parameter of drive motor motion, delivers in the register of motor internal processor, but does not carry out, after the parameter of treating all motors all sets, carry out movement instruction at the same time.Reach the operation of synchronous driving motor with this.
It is pointed out that the setting module 120 in the utility model is the hardware with specific function with operation module 130, for example have pre-programmed firmware, single-chip microcomputer or CPU and memory set, is not simple software.
In addition, the utility model also provides a kind of embodiment of robot, and robot has a plurality of digital motors, is used for carrying out exercises such as walking, detection, wherein also comprises: the digital motor controller;
Said digital motor controller specifically comprises:
Be used for connecting the control interface of said a plurality of digital motors through universal serial bus;
Be used for sending to the register of each digital motor the setting module of corresponding motor action parameter through said control interface;
Be used for sending fill order to each digital motor, make each digital motor carry out the operation module of the motor action parameter of the said correspondence in the said register simultaneously through said control interface.
Said universal serial bus comprises ground wire, power lead and control line.Said control interface has the ternary output of four buses buffered gate, and the ternary output of said four buses buffered gate connects said control line.In the ternary output of the said four buses buffered gate, CPU RXD port is connected to form the input end of the ternary output of said four buses buffered gate with the RXD0 port of single-chip microcomputer; CPU TXD port is connected to form the output terminal of the ternary output of said four buses buffered gate with the TXD0 port of single-chip microcomputer.
The motor number of said a plurality of digital motors greater than 8 less than 256.
By on can know that the utility model embodiment has following advantage:
1) the utility model through universal serial bus earlier the operational factor corresponding stored in the register of each digital motor; Make each digital motor move the parameter of having stored in the register simultaneously through broadcasting instructions then; Just " receive respectively, carry out simultaneously "; This has just solved because receive the inconsistent and inconsistent problem of execution time that cause of the time of reception of data in the universal serial bus, thereby each digital motor can synchronization action, and the molar behavior of robot is steadily coordinated.
2) the utility model carries out motor synchronous control through universal serial bus; Only need a serial bus interface; And parallel bus need all be provided with an interface to each motor, and when the motor of needs control was more, the utility model had been practiced thrift interface; Reduce the volume of robot, reduced cost.
3) the utility model carries out motor synchronous control through universal serial bus, can carry out the Electric Machine Control more than 8 easily, can 1-255 digital motor not had the synchro control of time-delay.
The above only is the preferred implementation of the utility model; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the utility model principle; Can also make some improvement and retouching, these improvement and retouching also should be regarded as the protection domain of the utility model.