Disclosure of Invention
The invention provides a current monitoring control and interference electricity current balance adjusting method aiming at the problem of unbalanced current intensity between two or more paths of electrodes in an interference electricity mode, and realizes real-time monitoring and automatic adjustment in the interference electricity treatment process.
The technical scheme adopted by the invention for solving the technical problems is as follows: comprises the following steps.
First, the system is initialized.
And secondly, sampling voltage of current flowing through an electrode plate of interference electricity, and dividing sampling point voltage into n equal parts to control gear division, wherein n is an integer larger than 5.
And thirdly, collecting the two paths of electrode sampling voltage values respectively, sequencing and filtering the collected AD voltage values for n times respectively, and acquiring voltage peak values within n times.
And step four, completing gear matching of the acquired peak voltage and the divided voltage gears, and determining a voltage display gear.
And fifthly, matching the corresponding nixie tube display value according to the voltage display gear.
Sixthly, current balance adjustment control is carried out, if the interference electric mode is judged and a knob of the potentiometer is locked, two nixie tubes (respectively representing the currents of two electrodes) display that gears are equal, and the current gear value is stored as a real gear strength value; if the two nixie tubes display unequal gears, the electrode output is balanced, the larger gear of one electrode is taken as a reference gear, and the gear output of the other electrode is adjusted to be equal to the reference gear.
And when judging whether the current mode is the interference power mode or not, if not, continuing range judgment, if the current mode is the interference power mode, judging the locking state of a knob of the potentiometer, if the knob of the potentiometer is unlocked, returning to continue interpretation, if the knob of the potentiometer is locked, judging whether the display gears of two paths of nixie tubes are equal, if the display gears of the two paths of nixie tubes are equal, saving the current gear value as a real gear strength value for output, if the display gears of the two paths of nixie tubes are not equal, starting an electrode output balance processing algorithm, taking the larger electrode gear as a reference gear, adjusting the output of the other electrode gear to be equal to the set reference gear, finally, returning to AD sampling, and repeatedly performing a sequencing algorithm.
The electrostimulation self-control reset circuit based on the method comprises a motor potentiometer, a Darlington drive chip U1 and a microcontroller, wherein a 5V power supply is respectively connected to a 7 pin of the motor potentiometer and a 9 pin of the motor potentiometer, a 10 pin of the motor potentiometer is connected to an 18 pin of the Darlington drive chip U1, a 3 pin ground wire of the motor potentiometer is connected to a 2 pin of the motor potentiometer, a sampling voltage is led out from a 2 pin of the motor potentiometer, the sampling voltage has a corresponding relation with the motor rotation angle of the motor potentiometer, the knob rotation angle of the potentiometer is consistent with the motor rotation angle, the larger the knob rotation angle of the potentiometer is, the larger the sampling voltage value output by the corresponding 2 pin of the motor potentiometer is, and the microcontroller collects the sampling voltage value through an analog-to-digital conversion module and judges the rotation angle of the motor potentiometer.
And the microcontroller divides the control gear according to the maximum rotation angle of the motor potentiometer and establishes the corresponding relation between the sampling voltage value and the control gear division.
When the microcontroller sends a reset instruction, pin 1 of the U1 outputs a high level, and at this time, pin 18 corresponding to the darlington driver chip U1 outputs a low level, and the dc motor of the motor potentiometer is turned on by 5V, and the motor starts to rotate. The AD value of the corresponding potentiometer changes along with the change, the microcontroller monitors the change of the AD value of the potentiometer in real time through a pin 2 (AD end) of the motor potentiometer, when the motor potentiometer rotates to 0, a pin 1 of the corresponding U1 obtains a low level sent by the microcontroller, and at the moment, a pin 18 of a corresponding port of the Darlington driving chip U1 outputs a high level, so that the motor of the motor potentiometer cannot obtain a current loop, and the motor does not rotate any more, thereby achieving the purpose of resetting.
A voltage stabilizing diode D1 and a capacitor C2 are connected in parallel between a power supply 7 pin and a ground 3 pin of the motor potentiometer, the voltage stabilizing diode D1 is used for clamping 3.3V voltage, the purpose that the AD acquisition voltage does not exceed 3.3V to protect the microcontroller is guaranteed, and the capacitor C2 is used for filtering high frequency.
When pin 1 of the Darlington driving chip U1 is at high level, the motor potentiometer rotates forwards; when pin 1 of the Darlington driving chip U1 is at a level, the motor potentiometer reverses; and a pin 2 of the motor potentiometer is a sampling voltage output end of the motor potentiometer, and when the voltage is detected to be 0, the motor potentiometer rotates reversely to reach a reset position, so that automatic control reset is realized.
The invention has the beneficial effects that: the invention has the functions of current monitoring and displaying and current automatic balance adjusting of interference electricity. The problem of unbalanced current intensity between two or more electrodes in an interference electricity mode is solved, and real-time monitoring and automatic adjustment in the interference electricity treatment process are realized.
The electric stimulation self-control reset circuit can solve the problem that a potentiometer knob cannot be automatically controlled after the current intensity changes, wherein the microcontroller realizes positive and negative control on the motor potentiometer by controlling the pin state of the Darlington driving chip, and when the pin 1 of the Darlington driving chip U1 is at a high level, the motor potentiometer rotates positively; when pin 1 of the Darlington driving chip U1 is at a level, the motor potentiometer reverses; and a pin 2 of the motor potentiometer is a sampling voltage output end of the motor potentiometer, and when the voltage is detected to be 0, the motor potentiometer rotates reversely to reach a reset position, so that automatic control reset is realized. Because the motor potentiometer can carry out forward and reverse rotation control according to the difference of the trigger signals of the single chip microcomputer, the control requirement of interference electricity or dynamic interference electricity on the consistency of the strength rotating gears of the two paths of motor potentiometers is met, and hardware circuit support is provided by adjusting the balance of interference electricity current.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
Example 1: a current monitoring control and interference electricity current balance adjusting method is used for solving the problem that the current intensity between two or more paths of electrodes is unbalanced in an interference electricity mode, and real-time monitoring and automatic adjustment in the interference electricity treatment process are achieved.
The control flow chart of the regulating method is shown in figure 1. After the system is powered on, the ADC module and the digital tube module are initialized firstly, 10-equal-division voltage gear division of 3.3V voltage is completed, and each voltage section corresponds to one gear which is 1-10 gears respectively. Then, the voltage value is sampled through the ADC, and the peak value of the 10 sampling voltages is calculated by adopting a bubble sorting algorithm for the sampled 10 continuous sampling values. By the method, the sampling voltage values of the two paths of electrodes are collected,
and respectively sequencing and filtering the acquired 10-time AD voltage values, and acquiring 10-time internal voltage peak values. And (4) gear matching is carried out on the acquired peak voltage and the divided voltage gears (if the peak voltage is within a certain voltage range and the potentiometer is judged to be in the gear at the moment), and voltage display gear selection is determined.
Then, the program judges whether the mode is the interference electric mode, if not, the range judgment is continued. And if the potentiometer is in the interference electric mode, judging the locking state of the knob of the potentiometer, and if the knob of the potentiometer is not locked, returning to continue interpretation. If the knob of the potentiometer is locked, whether the two nixie tubes display gears to be equal or not is judged, and if the two nixie tubes display gears to be equal, the current gear value is saved and is output as a real gear strength value. If the two nixie tubes display unequal gears, an electrode output balance processing algorithm is started (the gear of the larger one way of electrode is taken as a reference gear, the gear output of the other way of electrode is adjusted to be equal to the set reference gear), and finally, AD sampling is returned, and the sorting algorithm is repeated.
The method can realize the automatic adjustment and balance of the current intensity between two or more electrodes in the interference electric therapy mode, and realizes the real-time monitoring and automatic adjustment in the interference electric therapy process.
Example 2: on the basis of the embodiment 1, the electric stimulation self-control reset circuit included in the method comprises a motor potentiometer, a Darlington driving chip U1, a microcontroller and the like as shown in fig. 2. The method relies on the support of an electric stimulation self-control reset circuit, and particularly a motor potentiometer is required to be adopted.
Specifically, the circuit adopts a 16-type motor potentiometer comprising R _ VR1A and R _ VR1C, and U1 is a Darlington driving chip. As can be seen, pin 7, pin 9 of the motor potentiometer is connected to the 5V power supply, and pin 10 of the motor potentiometer R _ VR1C is connected to pin 18 of the Linden driver chip U1. The 3 pin of the motor potentiometer R _ VR1A is connected to ground. The 2 pins of the motor potentiometer R _ VR1C lead out sampling voltage, and the sampling voltage has a corresponding relation with the motor rotation angle of the motor potentiometer. A voltage stabilizing diode D1 and a capacitor C2 are connected in parallel between a power supply 7 pin and a ground 3 pin of the motor potentiometer, the voltage stabilizing diode D1 is used for clamping voltage of 3.3V, and the capacitor C2 is used for filtering high frequency.
Because the knob of the motor potentiometer is coaxial with the direct current motor of the motor potentiometer on the mechanical structure, the rotation angle of the knob of the potentiometer is consistent with the rotation angle of the motor, and the larger the rotation angle of the knob of the potentiometer is, the larger the sampling voltage value output by the pin 2 of the corresponding motor potentiometer R _ VR1A is. The microcontroller can acquire the sampling voltage value through the analog-to-digital conversion module and judge the rotation angle of the motor potentiometer according to the sampling voltage value. And according to the maximum rotation angle of the motor potentiometer, performing control gear division, establishing a corresponding relation between a sampling voltage value and the control gear division, and providing a basis for automatically controlling the motor potentiometer by a program.
When the microcontroller sends a reset instruction, pin 1 (kaiguanlianlianliang end) of the U1 outputs a high level, and at this time, pin 18 corresponding to the port of the darlington driving chip U1 outputs a low level, and at this time, the dc motor of the motor potentiometer is turned on by 5V, and the motor starts to rotate. At the moment, the AD value of the corresponding potentiometer changes, the microcontroller monitors the change of the AD value of the potentiometer in real time through a pin 2 (AD end) of a motor potentiometer (R _ VR 1A), when the motor potentiometer rotates to 0, a pin 1 (kaiguanlianlianlianlianlianliang end) of the corresponding U1 obtains a low level sent by the microcontroller, and at the moment, a pin 18 corresponding to a port 18 of the Darlington driving chip U1 outputs a high level, so that a motor of the motor potentiometer cannot obtain a current loop, and the motor does not rotate any more, and the aim of resetting is fulfilled. And the C1 capacitor 220uF is used for filtering low-frequency ripples generated at the moment of starting the motor, and the C2 is used for filtering high frequency ripples.
The circuit has the advantages that: microcontroller, motor potentiometer, darlington driver chip all adopt 5V power supply, voltage is unanimous, circuit structure simplifies, darlington driver chip maximum drive current no longer than 500 mA. Through the circuit shown in fig. 1, the forward and reverse rotation of the motor potentiometer can be accurately controlled by the microcontroller, the requirement of automatic control and reset of a knob of the electric stimulation intensity potentiometer can be met, and meanwhile, hardware circuit support is provided for current balance adjustment in the interference electric therapeutic apparatus.
Example 3: on the basis of embodiment 2, as shown in fig. 3, fig. 3 is a simplified control implementation method of the hardware circuit. Specifically, the microcontroller controls the positive and negative control of the motor potentiometer by controlling the pin state of the Darlington driving chip. When pin 1 of the Darlington driving chip U1 is at high level, the motor potentiometer rotates forwards; when pin 1 of the Darlington driving chip U1 is at a level, the motor potentiometer reverses; the pin 2 of the motor potentiometer is a sampling voltage output end of the motor potentiometer, and when the voltage is detected to be 0, the motor potentiometer reversely rotates to reach a reset position (a knob initial position of the motor potentiometer), so that automatic control reset is realized. Because the motor potentiometer can carry out forward and reverse rotation control according to the difference of the trigger signals of the single chip microcomputer, the control requirement of interference electricity or dynamic interference electricity on the consistency of the strength rotating gears of the two paths of motor potentiometers is met, and hardware circuit support is provided by adjusting the balance of interference electricity current.
Example 4: on the basis of the embodiment 1, the interference circuit control system included in the method is mainly used for solving the problem that the microcontroller controls the interference electricity to accurately control and work. This system of this embodiment includes power, insurance, air pump, solid state relay, air pump button, solenoid valve drive circuit, gas circuit solenoid valve, intensity adjust knob, current detection circuit, 8 way electrode sucker electric circuits, 8 way intensity pilot lamps, limit switch, capacitive switch, MOS pipe, heater wire, temperature sensor, negative pressure sensor, waveform generation circuit, touch-sensitive screen, stereo set, fan, drainage solenoid valve, lamp area etc.. The power supply is used for supplying power to the air pump and the drainage electromagnetic valve, the 3.3V power supply is used for supplying power to the microcontroller, the lamp belt and the limit switch, and the direct-current power supply is used for supplying power to the silica gel heating wire and the operational amplifier and the power amplifier chip in the waveform generating circuit. The fuse is connected to a power supply live wire of the interference electric equipment and used for preventing short-circuit faults, and if the short-circuit faults occur, the fuse is disconnected.
The air pump connect in series in the fuse output side, the air pump is used for disturbing the negative pressure function of electrical equipment extraction, and its control is judged by solid state relay according to the state of air pump button and is controlled, and after the air pump button was pressed down, microcontroller detected the high level, and the work of trigger control solid state relay is put through air pump and power supply circuit. The air path electromagnetic valve is connected to the air path at the air pumping end of the air pump and used for controlling the negative pressure in each path of electrode sucker, and the control is realized by the microcontroller through the control of an electromagnetic valve driving circuit.
The intensity adjusting knob adopts a motor potentiometer and is a controllable knob, the intensity adjusting knob is used for adjusting the current intensity acting on a human body, and when the current intensity is too high, the microcontroller can automatically adjust according to a program. The motor potentiometer is used for adjusting the intensity of single-path current, and can also be combined by two paths or multiple paths, and is used for adjusting the current balance of interference electricity (the magnitude of each path of current is adjusted to be consistent). The current detection circuit detects the current of the group used for the human body through the sampling resistor and provides a control feedback signal for adjusting the motor potentiometer. The strength indicator light is used for indicating the switching state of the knob, and corresponding indication of brightness is carried out through different resistance values of the motor potentiometer.
The limit switch is used for judging whether the heating disc is pulled out or not, if the heating disc is pulled out, power is supplied to a capacitance circuit (the TOUCH switch adopts a single-channel self-correction capacitance type TOUCH sensing chip U1, the TOUCH _ PAC is connected with a capacitance plate, namely a capacitor C3 is connected between the TOUCH _ PAC and GND, and a capacitor C3 is connected in parallel with the capacitance plate to form a capacitor for adjusting the sensitivity of a TOUCH key), and when the capacitance switch is pressed down, heating is started; if pushed in, the capacitor is cut off from supplying power. The capacitance detection circuit has a mode selection function, and can realize the negation of the touch state every time, so that the level input of the microcontroller is changed; when the microcontroller judges that a heating touch command (high level) is given, the microcontroller drives the MOS tube, an external direct-current power supply is switched on, the direct-current power supply supplies power to the silica gel heating wire to start heating, a temperature control automatic switch is arranged on the silica gel heating wire, and if the temperature exceeds 50 ℃, the power supply is automatically cut off.
Based on the above system configuration, the interference circuit control system of the embodiment has the advantages of clear control logic, high execution efficiency, multi-path protection, and the like.
Example 5: a method for monitoring and controlling current and adjusting the balance of interference current includes the following steps.
First, the system is initialized.
And secondly, sampling voltage of current flowing through an electrode plate of interference electricity, and dividing 10 equal parts of sampling point voltage into control gears.
Thirdly, collecting sampling voltage values of the two paths of electrodes, sequencing and filtering the collected AD voltage values for 10 times respectively, and acquiring voltage peak values within 10 times;
step four, completing gear matching of the obtained peak voltage and the divided voltage gears, and determining a voltage display gear;
fifthly, matching the corresponding nixie tube display value according to the voltage display gear;
and sixthly, current balance adjustment control is carried out, if the interference electric mode is judged and the knob is locked, two nixie tubes (respectively representing the currents of two electrodes) display that the gears are equal, and the current gear value is stored as a real gear strength value. If the two nixie tubes display unequal gears, the electrode output is balanced, the larger gear of one electrode is taken as a reference gear, and the gear output of the other electrode is adjusted to be equal to the reference gear.
The method has the functions of current monitoring and displaying and current automatic balance adjusting of interference electricity.
Example 6: on the basis of the above embodiments, in the interference electrotherapy mode, two electrodes in one form are as shown in fig. 2 (taking two interference electrics as an example, 1 and 2 are a group of electrodes; 3 and 4 are a group of electrodes), two electrode groups are required to work cooperatively, the system detects the current values of the two electrodes by sampling voltage, and when the two current values are detected to be inconsistent, the current output of the other electrode is adjusted by adjusting a digital potentiometer until the current output is consistent with a reference gear by taking the larger current value of the current value as a reference, as shown in fig. 3.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention.