Robot joint steering engine control system, automatic numbering method and voltage calculating method
Technical Field
The invention belongs to the field of robots, and particularly relates to an automatic numbering robot joint steering engine control system, an automatic numbering method and a voltage calculating method.
Background
Small multi-joint robots typically use steering engines as the connecting and driving parts of the joints. The steering engine packages elements such as a motor, a reduction gear, a control panel and the like into a modular unit, and has the advantages of convenience in installation, high precision, high response speed and the like. According to the difference of input signals, the steering engine can be divided into an analog steering engine and a bus steering engine. The input signal of the analog steering engine is a pwm signal, the duty ratio corresponds to the output angle of the steering engine, the steering engine does not have number information, a plurality of steering engines need a plurality of pwm signals to control, and the wiring and the control are complex for the multi-joint robot. The input signal of bus steering wheel is serial digital signal, for example RS232, RS485 etc. all steering wheels all articulate on same bus, and every steering wheel has own serial number, can control every steering wheel according to the serial number through the communication protocol who makes, can carry out real-time adjustment and feedback to the steering wheel parameter as required to it is very succinct to walk the line, and is used very extensively in the articulated robot field.
The multi-joint robot has a large number of joints, generally more than ten joints. In the installation process of the multi-joint robot, the bus steering engines are required to be numbered firstly, then the steering engines with the specified numbers are installed on the specified joints, the steering engines with different numbers generally do not have interchangeability for different joints, and the production efficiency is seriously influenced in batch production. In addition, for ordinary users, if the multi-joint robot is assembled by self, once a steering engine is installed on a wrong joint, the structural part needs to be detached to replace the steering engine, and the user experience is poor.
Disclosure of Invention
The robot joint steering engine control system, the automatic numbering method and the voltage calculating method overcome the defects of the prior art, the automatic numbering is carried out after the multi-joint robot steering engine is installed, the multi-joint robot steering engine is automatically numbered, the efficiency of batch production of the multi-joint robot is improved, a user can conveniently assemble the robot by himself, and the technical problem that the steering engines with different numbers are installed on different joints in the prior art is effectively solved.
The technical scheme of the invention is as follows:
an automatic numbering robot joint steering engine control system comprises a main controller, a plurality of steering engine branches and a plurality of wiring terminals; the main controller is provided with a plurality of wiring terminals, each wiring terminal is connected with one steering engine branch, each wiring terminal corresponds to a unique steering engine branch, and each steering engine branch comprises a plurality of steering engines which are connected in series;
the steering engine comprises two steering engine wiring terminals, a T-shaped resistance voltage division network and a microprocessor; each steering engine wiring terminal comprises four wiring terminals, wherein the four wiring terminals are respectively a ground wire, a power wire, a serial signal wire and a node wire; the ground wires, the power wires and the serial signal wires of the two steering engine wiring terminals are mutually conducted, and a T-shaped resistor voltage division network is connected between the two node wires of the two steering engine wiring terminals;
the T-shaped resistor voltage-dividing network comprises a resistor R1, a resistor R2 and a resistor R3; the resistor R1 is connected in series with a resistor R2, the resistor R3 is connected between the resistor R1 and the resistor R2, and the resistor R3 is connected with the ground wire; the resistance values of the resistor R1, the resistor R2 and the resistor R3 are the same or different, the resistance values of the resistor R1 and the resistor R2 are the same, and the two steering engine wiring terminals do not distinguish input ends and output ends, namely the input ends and the output ends have interchangeability;
the analog-to-digital conversion interface of the microprocessor is connected with the middle node of the T-shaped resistor voltage division network and is used for acquiring the voltage value of the node;
and the node lines of each wiring terminal are respectively connected with a reference voltage through a pull-up resistor, and the pull-up resistors adopted by each node line are different and are used for enabling the analog-to-digital converters of the microprocessors in the steering engines of different steering engine branches to acquire different voltage values.
Furthermore, the wiring terminal comprises four wiring terminals, wherein the four wiring terminals are respectively a ground wire, a power wire, a serial signal wire and a node wire; and the ground wires, the power wires and the serial signal wires of the plurality of wiring terminals are mutually connected and conducted.
An automatic numbering method realized by a robot joint steering engine control system based on the automatic numbering comprises the following steps:
s1, completing the installation of the multi-joint robot steering engine, wherein the steering engines among different joints have interchangeability in the installation process; connecting a main controller with a wiring terminal between the steering engines, and sending an instruction by the main controller to inform all the steering engines of automatic numbering;
step S2, after each steering engine receives the instruction, the characteristic voltage value of the middle node of the T-shaped resistance voltage division network is collected through an analog-to-digital converter in the microprocessor;
step S3, searching a preset voltage-number comparison table according to the characteristic voltage value, and determining the number of the user;
step S4, after the main controller sends the automatic numbering command, waiting for a period of time, sequentially polling and sending the inquiry command with the steering engine number, if the command with the steering engine number 1 is sent for the first time, the command with the steering engine number 2 is sent for the second time, and so on, after each command is sent, waiting for the response of the steering engine with the number, if an effective response is received within the preset waiting time or no response is sent after the preset waiting time is exceeded, sending the next inquiry command until all numbers finish polling;
and step S5, if all the inquiry commands of the main controller receive the response, all the steering engines finish the automatic numbering.
A voltage calculation method realized based on the automatic numbering method of the robot joint steering engine with automatic numbering comprises the following steps:
taking the resistance R1 ═ R2 ═ R ═ 5k, the resistance R3 ═ 2R ═ 10k, and the pull-up resistance R _ a ═ R ═ 5k, the characteristic voltage value of each steering engine of the steering engine branch was calculated as follows:
taking pull-up resistor R _ B as 2R as 10k, calculating the characteristic voltage value of each steering engine of the other steering engine branch as follows:
compared with the prior art, the invention has the following beneficial effects:
the invention provides an automatic numbering robot joint steering engine control system, an automatic numbering method and a voltage calculating method.
(1) Each steering engine does not need to be numbered in advance before leaving a factory.
(2) The steering engines with different numbers have interchangeability for different joints, and the mass production efficiency is improved.
(3) The automatic numbering method has adaptability to different robot forms and can be used for robots with different forms.
(4) For a common user, the number of the steering engine does not need to be considered when the robot is assembled, and the user experience is good.
Drawings
FIG. 1 is a block diagram of the present invention;
FIG. 2 is a block diagram of the steering engine of the present invention;
fig. 3 is a flow chart of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
Detailed description of the invention
An automatic numbering robot joint steering engine control system is shown in figure 1 and comprises a main controller, a plurality of steering engine branches and a plurality of wiring terminals; the main controller is provided with a plurality of wiring terminals, each wiring terminal is connected with one steering engine branch, each wiring terminal corresponds to a unique steering engine branch, and each steering engine branch comprises a plurality of steering engines which are connected in series;
as shown in fig. 2, the steering engine comprises two steering engine connection terminals, a T-type resistance voltage division network and a microprocessor MCU; each steering engine wiring terminal comprises four wiring terminals, wherein the four wiring terminals are respectively a ground wire, a power wire, a serial signal wire and a node wire; the ground wires, the power wires and the serial signal wires of the two steering engine wiring terminals are mutually conducted, and a T-shaped resistor voltage division network is connected between the two node wires of the two steering engine wiring terminals;
as shown in fig. 2, the T-type resistor voltage-dividing network includes a resistor R1, a resistor R2, and a resistor R3; the resistor R1 is connected in series with a resistor R2, the resistor R3 is connected between the resistor R1 and the resistor R2, and the resistor R3 is connected with the ground wire; the resistance values of the resistor R1, the resistor R2 and the resistor R3 are the same or different, the resistance values of the resistor R1 and the resistor R2 are the same, and the two steering engine wiring terminals do not distinguish input ends and output ends, namely the input ends and the output ends have interchangeability;
the analog-to-digital conversion interface of the microprocessor MCU is connected with the middle node of the T-shaped resistor voltage division network and is used for acquiring the voltage value of the node;
the node lines of each wiring terminal are respectively connected with a reference voltage through a pull-up resistor, the pull-up resistors adopted by each node line are different, and the pull-up resistors are used for enabling analog-to-digital converters of the microprocessor MCUs in each steering engine of different steering engine branches to acquire different voltage values, as shown in fig. 2, a pull-up resistor R _ a and a pull-up resistor R _ B are adopted in the embodiment.
For a given multi-joint robot form, a pull-up resistor of each node line of a main controller and a T-shaped resistor voltage division network resistance value of a steering engine are designed, so that each steering engine microprocessor installed on the multi-joint robot acquires a voltage value different from other steering engines, a plurality of steering engines correspond to a plurality of different voltage values, and different voltage values correspond to different steering engine numbers.
The invention also comprises a shell, a motor, a reduction gear set, a bearing, a control panel and a potentiometer; the main controller is integrated on the control panel, and the concrete structure of shell, motor, reduction gear group, bearing, control panel, potentiometre be prior art, like application number 201721627265.5, the steering wheel structure that discloses in the patent of a name steering wheel and robot is unanimous.
Specifically, the wiring terminal comprises four wiring terminals, wherein the four wiring terminals are respectively a ground wire, a power wire, a serial signal wire and a node wire; and the ground wires, the power wires and the serial signal wires of the plurality of wiring terminals are mutually connected and conducted.
Detailed description of the invention
An automatic numbering method realized based on the automatic numbering robot joint steering engine control system is shown in fig. 3, and comprises the following steps:
s1, completing the installation of the multi-joint robot steering engine, wherein the steering engines among different joints have interchangeability in the installation process; connecting a main controller with a wiring terminal between the steering engines, and sending an instruction by the main controller to inform all the steering engines of automatic numbering;
step S2, after each steering engine receives the instruction, collecting the characteristic voltage value of the middle node of the T-shaped resistance voltage division network of the steering engine through an analog-to-digital converter in the MCU;
step S3, searching a preset voltage-number comparison table according to the characteristic voltage value, and determining the number of the user;
step S4, after the main controller sends the automatic numbering command, waiting for a period of time, sequentially polling and sending the inquiry command with the steering engine number, if the command with the steering engine number 1 is sent for the first time, the command with the steering engine number 2 is sent for the second time, and so on, after each command is sent, waiting for the response of the steering engine with the number, if an effective response is received within the preset waiting time or no response is sent after the preset waiting time is exceeded, sending the next inquiry command until all numbers finish polling;
and step S5, if all the inquiry commands of the main controller receive the response, all the steering engines finish the automatic numbering.
Detailed description of the invention
As shown in fig. 1 and 2, the main controller of the present invention has a plurality of connection terminals, each connection terminal is correspondingly connected to one steering engine branch, each steering engine branch is connected in series with a plurality of steering engines, and for example, one steering engine branch is connected in series with 3 steering engines.
A steering wheel contains two steering wheel binding post, and every steering wheel binding post contains four terminals, and four terminals correspond ground wire GND, power cord VCC, serial Signal line Signal, Node line Node1 or Node2 respectively. The ground wires, the power wires and the serial signal wires of the two steering engine connecting terminals are directly electrically conducted, and a T-shaped resistance voltage division network is arranged between the two Node wires Node1 and Node 2. The T-type resistor voltage division network comprises three resistors R1, R2 and R3, and when R1 is equal to R2, two steering engine terminals do not need to distinguish which is used as input and which is used as output, namely, the T-type resistor voltage division network has interchangeability. The steering engine further comprises a microprocessor MCU with an analog-to-digital conversion function, wherein an analog-to-digital conversion interface of the microprocessor MCU is connected to a middle node O of R1 and R2 and used for collecting a voltage value VO at the point, namely a characteristic voltage value of the steering engine.
A voltage calculation method realized based on the automatic numbering method of the robot joint steering engine with automatic numbering comprises the following steps:
taking the resistance R1 ═ R2 ═ R ═ 5k, the resistance R3 ═ 2R ═ 10k, and the pull-up resistance R _ a ═ R ═ 5k, the characteristic voltage value of each steering engine of the steering engine branch was calculated as follows:
taking pull-up resistor R _ B as 2R as 10k, calculating the characteristic voltage value of each steering engine of the other steering engine branch as follows:
by the method, the characteristic voltage value of the steering engine at each joint position is obtained, and a characteristic voltage range of +/-5% is set in consideration of the error of the voltage dividing resistor, so that a voltage-number comparison table is obtained, for example:
the above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.