Single-motor closed-loop control circuit for automatic lifting table and control method thereof

文档序号:1558673 发布日期:2020-01-21 浏览:39次 中文

阅读说明:本技术 一种用于自动升降桌的单电机闭环控制电路及其控制方法 (Single-motor closed-loop control circuit for automatic lifting table and control method thereof ) 是由 叶霞 李伟 倪虹 王玉槐 安康 江霞 邵壮壮 张文剑 金睿 邵浙栋 于 2019-10-16 设计创作,主要内容包括:本发明公开了一种用于自动升降桌的单电机闭环控制电路及其控制方法。对于自动升降桌的控制电路一直是一个难点,尤其是单电机电路设计,存在升降不稳,生命周期短,电机控制不精准等缺点。本发明一种用于自动升降桌的单电机闭环控制电路,包括稳压模块、主控模块、电机驱动模块、电机电流检测模块、按键选择模块。本发明通过在线检测电机电流电路,能有效防止电机过载或者饱和,防止电机在突发情况烧毁。本发明采用半桥驱动芯片和CMOS全桥驱动电路完成电机的正转、反转功能,相对于常用电机驱动方式或利用驱动芯片L298N等,该驱动电路稳定性高,成本低廉,功耗低,散热快,驱动能力更强。(The invention discloses a single-motor closed-loop control circuit for an automatic lifting table and a control method thereof. The control circuit of the automatic lifting table is always a difficult point, and particularly, the design of a single motor circuit has the defects of unstable lifting, short life cycle, inaccurate motor control and the like. The invention discloses a single-motor closed-loop control circuit for an automatic lifting table. The invention can effectively prevent the motor from being overloaded or saturated and prevent the motor from being burnt out in an emergency situation by detecting the current circuit of the motor on line. The invention adopts the half-bridge driving chip and the CMOS full-bridge driving circuit to complete the forward rotation and reverse rotation functions of the motor, and compared with the common motor driving mode or the driving chip L298N and the like, the driving circuit has the advantages of high stability, low cost, low power consumption, fast heat dissipation and stronger driving capability.)

1. A single-motor closed-loop control circuit for an automatic lifting table comprises a voltage stabilizing module, a main control module, a motor driving module, a motor current detection module and a key selection module; the method is characterized in that: the voltage stabilizing module supplies power to the main control module, the motor driving module, the motor current detection module and the key selection module;

the motor driving module comprises a first motor driving chip and a second motor driving chip; the HIN pin and the LIN pin of the first motor driving chip are both connected with one end of a resistor R10, the COM pin is connected with one end of a capacitor C2 and grounded, the VCC pin is connected with the other end of a capacitor C2, the anode of a diode D1 and the 15V output end of a voltage stabilizing module, the VB pin is connected with the cathode of a diode D1 and one end of a capacitor C4, the Vs pin is connected with the other end of a capacitor C4 and the first pin of a power supply connector, and the Ho pin is connected with one end of a resistor R9; the other end of the resistor R9 is connected with the gate of the MOS transistor Q1; the source electrode of the MOS transistor Q1 is connected with a first pin of a power supply connector, and the drain electrode is connected with one end of a capacitor C1 and a resistor R3; the other end of the resistor R3 is connected with the external 24V voltage, and the other end of the capacitor C1 is grounded; the Lo pin of the first motor driving chip is connected with one end of a resistor R14; the other end of the resistor R14 is connected with the gate of the MOS transistor Q2; the source electrode of the MOS tube Q2 is grounded, and the drain electrode is connected with a second pin of the power supply connector;

the HIN pin and the LIN pin of the second motor driving chip are both connected with one end of a resistor R16, the COM pin is connected with one end of a capacitor C7 and grounded, the VCC pin is connected with the other end of a capacitor C7, the anode of a diode D2 and the 15V output end of a voltage stabilizing module, the VB pin is connected with the cathode of a diode D2 and one end of a capacitor C8, the Vs pin is connected with the other end of a capacitor C8 and the first pin of a power supply connector, and the Ho pin is connected with one end of a resistor R15; the other end of the resistor R15 is connected with the gate of the MOS transistor Q3; the source electrode of the MOS tube Q3 is connected with a first pin of a power supply connector, and the drain electrode is connected with the end of the capacitor C6 and the resistor R3 which are connected with the external 24V voltage; the other end of the capacitor C6 is grounded; the Lo pin of the second motor driving chip is connected with one end of a resistor R17; the other end of the resistor R17 is connected with the gate of the MOS transistor Q4; the source electrode of the MOS tube Q4 is grounded, and the drain electrode is connected with a second pin of the power supply connector; the third pin of the power supply connector is grounded, and the third pin is connected with external 24V voltage;

the end of the resistor R10 far away from the first motor driving chip is a first PWM wave input end of the motor driving module; the end of the resistor R16 far away from the second motor driving chip is a second PWM wave input end of the motor driving module; a first PWM wave input end and a second PWM wave input end of the motor driving module are both connected with the main control module; the end of the resistor R3 connected with the external 24V voltage is a first current feedback output end of the motor driving module; the end of the resistor R3 connected with the MOS transistor Q1 is a second current feedback output end of the motor driving module;

the motor current detection module comprises a current detection chip; the V + pin of the current detection chip is connected with one end of a capacitor C18 and a 15V output end; the other end of the capacitor C18 is grounded; the GND pin of the current detection chip is grounded, and the OUT pin is connected with one end of a resistor R29, a resistor R31 and a capacitor C19; the other ends of the capacitor C19 and the resistor R31 are grounded; the VIN + pin of the current detection chip is connected with a first current feedback output end of the motor driving module, and the VIN-pin of the current detection chip is connected with a second current feedback output end of the motor driving module; the end of the resistor R29 far away from the current detection chip is the output end of the motor current detection module, and the main control module is connected with the output end of the motor current detection module;

the key selection module includes a raise button S2, a lower button S3, a first position button S4, a second position button S5, a third position button S6, a fourth position button S7, and a set button S8, all of which are connected to the main control module.

2. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: the motor line spacing feedback module is also included; the motor line space feedback module comprises a resistor R25, a resistor R27 and a feedback connector; the first pin of the feedback connector is connected with the 5V output end of the voltage stabilizing module, the second pin is connected with one end of a resistor R25, the third pin is connected with one end of a resistor R27, and the fourth pin is grounded; the other ends of the resistor R25 and the resistor R27 are a first line spacing feedback end MOTOA and a second line spacing feedback end MOTOB of the motor line spacing feedback module respectively, and are connected with the main control module; the feedback connector is connected with a signal feedback interface of the motor.

3. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: the digital tube display module is also included; the nixie tube display module comprises a nixie tube; the model of the nixie tube is SM 410806; the a pin of the nixie tube is connected with one end of a resistor R2, the b pin is connected with one end of a resistor R4, the c pin is connected with one end of a resistor R5, the d pin is connected with one end of a resistor R6, the e pin is connected with one end of a resistor R7, the f pin is connected with one end of a resistor R8, the g pin is connected with one end of a resistor R13, and the com pin is grounded; the other ends of the resistor R2, the resistor R4, the resistor R5, the resistor R6, the resistor R7, the resistor R8 and the resistor R13 are seven input ends of the nixie tube display module respectively, and the other ends are connected with the main control module.

4. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: the main control module comprises a singlechip; the model of the singlechip is ATmega 328P-AU; a 29 pin of the singlechip is connected with one end of a resistor R1, a capacitor C5 and a switch S1; the other end of the resistor R1 is connected with the 5V output end of the voltage stabilizing module; the other ends of the switch S1 and the capacitor C5 are grounded; the 7 pin of the singlechip is connected with one end of the crystal oscillator Y1 and one end of the capacitor C9, and the 8 pin is connected with the other end of the crystal oscillator Y1 and one end of the capacitor C10; the other ends of the capacitor C9 and the capacitor C10 are grounded; a 20-pin of the singlechip is connected with one end of a capacitor C3; the other end of the capacitor C3 is grounded; pins 4, 6 and 18 of the singlechip are all connected with the 5V output end of the voltage stabilizing module, and pins 3, 5 and 21 are all grounded; the first PWM wave output interface of the singlechip is connected with the first PWM wave input end of the motor driving module, and the second PWM wave output interface is connected with the second PWM wave input end of the motor driving module; first to seventh key input pins of the single chip microcomputer are respectively connected with the ungrounded ends of a rising button S2, a lowering button S3, a first positioning button S4, a second positioning button S5, a third positioning button S6, a fourth positioning button S7 and a setting button S8 in the key selection module.

5. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: one end of the rising button S2, the falling button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7 and the setting button S8 is respectively connected with one end of a resistor R18, one end of a resistor R19, one end of a resistor R21, one end of a resistor R23, one end of a resistor R26, one end of a resistor R28 and one end of a resistor R30 are respectively connected with the other end of the resistor R18, the other end of the resistor R28 and the other; the other ends of the resistor R18, the resistor R19, the resistor R21, the resistor R23, the resistor R26, the resistor R28 and the resistor R30 are all connected with the 5V output end of the voltage stabilizing module; the ends of the raise button S2, the lower button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7, and the set button S8, which are not grounded, are respectively connected to the main control module.

6. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: the voltage stabilizing module comprises a first voltage stabilizing chip and a second voltage stabilizing chip; the model of the first voltage stabilizing chip is MCP 16301; the model of the second voltage stabilizing chip is LM317 MQDCR; the VIN pin and the EN pin of the first voltage stabilizing chip are connected with one end of a capacitor C11, one end of a capacitor C13, one end of a capacitor C14 and the cathode of a diode D4; the other ends of the capacitor C11, the capacitor C13 and the capacitor C14 and a GND pin of the first voltage stabilizing chip are all grounded; the anode of the diode D4 is connected with the external 24V voltage; the BOOST pin of the first voltage stabilizing chip is connected with the capacitor C12 and the cathode of the diode D8, and the SW pin is connected with the other end of the capacitor C12, one end of the inductor L1 and the cathode of the diode D6; the other end of the inductor L1 and the anode of the diode D8 are connected with one ends of a resistor R20, a capacitor C15, a capacitor C16 and an inductor L1; the anode of the diode D6, the other ends of the capacitor C15 and the capacitor C16 are all grounded; the other end of the resistor R20 is connected with one end of the resistor R22; the other end of the resistor R22 is connected with the VFB pin of the first voltage stabilizing chip and one end of the resistor R24; the other end of the resistor R24 is grounded; the IN pin of the second voltage stabilizing chip is connected with the VIN pin of the first voltage stabilizing chip and one end of a capacitor C17, the ADJ pin is connected with one ends of a resistor R32 and a resistor R33, and the two OUT pins are connected with the other end of the resistor R32 and one ends of a capacitor C20 and a capacitor C21; the other ends of the capacitor C17, the resistor R33, the capacitor C21 and the capacitor C20 are all grounded; the anode of the diode D8 is the 5V output end of the voltage stabilizing module; and an OUT pin of the second voltage stabilizing chip is a 15V output end of the voltage stabilizing module.

7. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: the model of first motor driver chip and second motor driver chip is IR2301 SBpF.

8. A single motor closed loop control circuit for an automatic table lift as recited in claim 1 wherein: the model of the current detection chip is INA 139.

9. A method of controlling a single motor closed loop control circuit for an automatic table lift as recited in claim 1, wherein: the method comprises a height adjusting method, a preset height setting method and an emergency shutdown method;

the height adjusting method specifically comprises the following steps:

when a user presses a lifting button S2, the main control module outputs a PWM control signal to a first motor driving chip in the motor driving module, and the motor rotates forwards to lift the desktop; after the user releases the lifting button S2, the main control module stops outputting the PWM control signal, and the motor stops rotating;

the user presses the lower button S3, the main control module outputs a PWM control signal to the second motor driving chip in the motor driving module, and the motor rotates reversely, so that the desktop is lowered; after the user releases the lowering button S3, the main control module stops outputting the PWM control signal, and the motor stops rotating;

when the user needs to adjust the desktop to the first preset height, the user presses and releases the first positioning button S4, and the main control module controls the motor to rotate, so that the desktop is adjusted to the first preset height;

when the user needs to adjust the desktop to a second preset height, the user presses and releases the second positioning button S5, and the main control module controls the motor to rotate, so that the desktop is adjusted to the second preset height;

when the user needs to adjust the desktop to a third preset height, the user presses and releases the third positioning button S6, and the main control module controls the motor to rotate, so that the desktop is adjusted to the third preset height;

when the user needs to adjust the desktop to a fourth preset height, the user presses and releases the fourth positioning button S7, and the main control module controls the motor to rotate, so that the desktop is adjusted to the fourth preset height;

the emergency shutdown method specifically comprises the following steps:

a current detection chip of the motor current detection module continuously detects current passing through a resistor R3, converts a current signal into a digital signal and transmits the digital signal to the main control module; the main control module judges whether the motor is locked according to the received digital signal; if the motor is locked, the main control module stops outputting the PWM control signal;

the preset height setting method specifically comprises the following steps:

the user presses and releases the setting button S8, and the main control module enters a data storage mode; then, the user presses the first positioning button S4, the second positioning button S5, the third positioning button S6 or the fourth positioning button S7, and the main control module records the current height as a first preset height, a second preset height, a third preset height or a fourth preset height; the user again presses and releases the set button S8 and the host module exits the data storage mode.

Technical Field

The invention belongs to the technical field of household appliances and office furniture, and relates to a single-motor control system circuit based on an automatic lifting table.

Background

At present, the automatic rising desk in market uses the bi-motor as the main, and the device compares with fixed desk, can alleviate user working strength, lets the user sit tiredly just to stand, and the tired seat of standing avoids long-time position of sitting to lead to disease production such as obesity, cervical spondylopathy and lumbar vertebra disease, and efficiency and health can all hold concurrently, improves work efficiency greatly. However, the control circuit of the automatic lifting table is always a difficult point, and particularly, the design of a single motor circuit has the defects of unstable lifting, short life cycle, inaccurate motor control and the like.

Disclosure of Invention

The invention aims to provide a single-motor closed-loop control circuit for an automatic lifting table.

The invention discloses a single-motor closed-loop control circuit for an automatic lifting table. The voltage stabilizing module supplies power to the main control module, the motor driving module, the motor current detection module and the key selection module.

The motor driving module comprises a first motor driving chip and a second motor driving chip. The HIN pin and the LIN pin of the first motor driving chip are both connected with one end of a resistor R10, the COM pin is connected with one end of a capacitor C2 and grounded, the VCC pin is connected with the other end of a capacitor C2, the anode of a diode D1 and the 15V output end of a voltage stabilizing module, the VB pin is connected with the cathode of a diode D1 and one end of a capacitor C4, the Vs pin is connected with the other end of a capacitor C4 and the first pin of a power supply connector, and the Ho pin is connected with one end of a resistor R9. The other end of the resistor R9 is connected with the gate of the MOS transistor Q1. The source of the MOS transistor Q1 is connected to the first pin of the power supply connector, and the drain is connected to one end of the capacitor C1 and the resistor R3. The other end of the resistor R3 is connected with the external 24V voltage, and the other end of the capacitor C1 is grounded. The Lo pin of the first motor driving chip is connected with one end of a resistor R14; the other end of the resistor R14 is connected with the gate of the MOS transistor Q2. The source of the MOS transistor Q2 is grounded, and the drain is connected with the second pin of the power supply connector.

The HIN pin and the LIN pin of the second motor driving chip are both connected with one end of a resistor R16, the COM pin is connected with one end of a capacitor C7 and grounded, the VCC pin is connected with the other end of a capacitor C7, the anode of a diode D2 and the 15V output end of a voltage stabilizing module, the VB pin is connected with the cathode of a diode D2 and one end of a capacitor C8, the Vs pin is connected with the other end of a capacitor C8 and the first pin of a power supply connector, and the Ho pin is connected with one end of a resistor R15. The other end of the resistor R15 is connected with the gate of the MOS transistor Q3. The source of the MOS transistor Q3 is connected to the first pin of the power supply connector, and the drain is connected to the end of the capacitor C6 and the resistor R3 connected to the external 24V voltage. The other terminal of the capacitor C6 is connected to ground. The Lo pin of the second motor driving chip is connected with one end of a resistor R17; the other end of the resistor R17 is connected with the gate of the MOS transistor Q4. The source of the MOS transistor Q4 is grounded, and the drain is connected with the second pin of the power supply connector. The third pin of the power supply connector is grounded, and the third pin is connected with external 24V voltage.

The end of the resistor R10 far away from the first motor driving chip is a first PWM wave input end of the motor driving module. The end of the resistor R16 far away from the second motor driving chip is the second PWM wave input end of the motor driving module. And a first PWM wave input end and a second PWM wave input end of the motor driving module are both connected with the main control module. The end of the resistor R3 connected with the external 24V voltage is a first current feedback output end of the motor driving module; the end of the resistor R3 connected with the MOS transistor Q1 is a second current feedback output end of the motor driving module.

The motor current detection module comprises a current detection chip. The V + pin of the current detection chip is connected with one end of a capacitor C18 and a 15V output end. The other terminal of the capacitor C18 is connected to ground. The GND pin of the current detection chip is grounded, and the OUT pin is connected with one end of a resistor R29, a resistor R31 and a capacitor C19. The other ends of the capacitor C19 and the resistor R31 are grounded. And the VIN + pin of the current detection chip is connected with the first current feedback output end of the motor driving module, and the VIN-pin of the current detection chip is connected with the second current feedback output end of the motor driving module. The end of the resistor R29 far away from the current detection chip is the output end of the motor current detection module, and the main control module is connected with the output end of the motor current detection module.

The key selection module includes a raise button S2, a lower button S3, a first position button S4, a second position button S5, a third position button S6, a fourth position button S7, and a set button S8, all of which are connected to the main control module.

Preferably, the single-motor closed-loop control circuit for the automatic lifting table further comprises a motor line distance feedback module. The motor line spacing feedback module comprises a resistor R25, a resistor R27 and a feedback connector. The first pin of the feedback connector is connected with the 5V output end of the voltage stabilizing module, the second pin is connected with one end of a resistor R25, the third pin is connected with one end of a resistor R27, and the fourth pin is grounded. The other ends of the resistor R25 and the resistor R27 are a first line spacing feedback end MOTOA and a second line spacing feedback end MOTOB of the motor line spacing feedback module respectively, and are connected with the main control module. The feedback connector is connected with a signal feedback interface of the motor.

Preferably, the single-motor closed-loop control circuit for the automatic lifting table further comprises a nixie tube display module. The nixie tube display module comprises a nixie tube. The nixie tube is model number SM 410806. The a pin of the nixie tube is connected with one end of a resistor R2, the b pin is connected with one end of a resistor R4, the c pin is connected with one end of a resistor R5, the d pin is connected with one end of a resistor R6, the e pin is connected with one end of a resistor R7, the f pin is connected with one end of a resistor R8, the g pin is connected with one end of a resistor R13, and the com pin is grounded. The other ends of the resistor R2, the resistor R4, the resistor R5, the resistor R6, the resistor R7, the resistor R8 and the resistor R13 are seven input ends of the nixie tube display module respectively, and the other ends are connected with the main control module.

Preferably, the main control module comprises a single chip microcomputer. The model of the singlechip is ATmega 328P-AU; the pin 29 of the singlechip is connected with one end of a resistor R1, a capacitor C5 and a switch S1. The other end of the resistor R1 is connected with the 5V output end of the voltage stabilizing module. The other ends of the switch S1 and the capacitor C5 are both grounded. The 7 pin of the singlechip is connected with one end of the crystal oscillator Y1 and one end of the capacitor C9, and the 8 pin is connected with the other end of the crystal oscillator Y1 and one end of the capacitor C10. The other ends of the capacitor C9 and the capacitor C10 are grounded. The 20 pin of the singlechip is connected with one end of a capacitor C3. The other end of the capacitor C3 is connected to ground. Pins 4, 6 and 18 of the singlechip are all connected with the 5V output end of the voltage stabilizing module, and pins 3, 5 and 21 are all grounded. The first PWM wave output interface of the singlechip is connected with the first PWM wave input end of the motor driving module, and the second PWM wave output interface is connected with the second PWM wave input end of the motor driving module. First to seventh key input pins of the single chip microcomputer are respectively connected with the ungrounded ends of a rising button S2, a lowering button S3, a first positioning button S4, a second positioning button S5, a third positioning button S6, a fourth positioning button S7 and a setting button S8 in the key selection module.

Preferably, one end of the up button S2, the down button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7, and the set button S8 is connected to one end of each of the resistor R18, the resistor R19, the resistor R21, the resistor R23, the resistor R26, the resistor R28, and the resistor R30, and the other end is grounded. The other ends of the resistor R18, the resistor R19, the resistor R21, the resistor R23, the resistor R26, the resistor R28 and the resistor R30 are all connected with the 5V output end of the voltage stabilizing module. The ends of the raise button S2, the lower button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7, and the set button S8, which are not grounded, are respectively connected to the main control module.

Preferably, the voltage stabilizing module includes a first voltage stabilizing chip and a second voltage stabilizing chip. The model of the first voltage stabilization chip is MCP 16301. The model of the second voltage stabilization chip is LM317 MQDCR. And the VIN pin and the EN pin of the first voltage stabilizing chip are connected with one end of a capacitor C11, one end of a capacitor C13, one end of a capacitor C14 and the cathode of a diode D4. The other ends of the capacitor C11, the capacitor C13 and the capacitor C14 and the GND pin of the first voltage stabilization chip are all grounded. The anode of the diode D4 is connected to the external 24V voltage. The BOOST pin of the first voltage regulation chip is connected with the capacitor C12 and the cathode of the diode D8, and the SW pin is connected with the other end of the capacitor C12, one end of the inductor L1 and the cathode of the diode D6. The other end of the inductor L1 and the anode of the diode D8 are connected to one end of the resistor R20, the capacitor C15, the capacitor C16 and the inductor L1. The anode of the diode D6, the other ends of the capacitor C15 and the capacitor C16 are all grounded. The other end of the resistor R20 is connected with one end of the resistor R22. The other end of the resistor R22 is connected to the VFB pin of the first voltage stabilization chip and one end of the resistor R24. The other end of the resistor R24 is connected to ground. The IN pin of the second voltage stabilizing chip is connected with the VIN pin of the first voltage stabilizing chip and one end of a capacitor C17, the ADJ pin is connected with one ends of a resistor R32 and a resistor R33, and the two OUT pins are connected with the other end of the resistor R32 and one ends of a capacitor C20 and a capacitor C21. The other ends of the capacitor C17, the resistor R33, the capacitor C21 and the capacitor C20 are all grounded. The anode of the diode D8 is the 5V output of the regulator block. And an OUT pin of the second voltage stabilizing chip is a 15V output end of the voltage stabilizing module.

Preferably, the first motor driving chip and the second motor driving chip are both IR2301 SBpF.

Preferably, the model of the current detection chip is INA 139.

The control method of the single-motor closed-loop control circuit for the automatic lifting table comprises a height adjusting method, a preset height setting method and an emergency stop method.

The height adjusting method specifically comprises the following steps:

when the user presses the lifting button S2, the main control module outputs a PWM control signal to the first motor driving chip in the motor driving module, and the motor rotates forward, so that the tabletop is lifted. After the user releases the lifting button S2, the main control module stops outputting the PWM control signal, and the motor stops rotating.

The user presses the lower button S3, the main control module outputs a PWM control signal to the second motor driving chip in the motor driving module, and the motor rotates reversely, so that the table top is lowered. After the user releases the lower button S3, the main control module stops outputting the PWM control signal, and the motor stops rotating.

When the user needs to adjust the desktop to the first preset height, the user presses and releases the first positioning button S4, and the main control module controls the motor to rotate, so that the desktop is adjusted to the first preset height.

When the user needs to adjust the height of the desktop to the second preset height, the user presses and releases the second positioning button S5, and the main control module controls the motor to rotate, so that the height of the desktop is adjusted to the second preset height.

When the user needs to adjust the height of the desktop to the third preset height, the user presses and releases the third positioning button S6, and the main control module controls the motor to rotate, so that the height of the desktop is adjusted to the third preset height.

When the user needs to adjust the height of the desktop to the fourth preset height, the user presses and releases the fourth positioning button S7, and the main control module controls the motor to rotate, so that the height of the desktop is adjusted to the fourth preset height.

The emergency shutdown method specifically comprises the following steps:

the current detection chip of the motor current detection module continuously detects the current passing through the resistor R3, and converts the current signal into a digital signal and transmits the digital signal to the main control module. And the main control module judges whether the motor is locked according to the received digital signal. And if the motor is locked, the main control module stops outputting the PWM control signal.

The preset height setting method specifically comprises the following steps:

the user presses and releases the setting button S8, and the main control module enters a data storage mode; then, the user presses the first positioning button S4, the second positioning button S5, the third positioning button S6 or the fourth positioning button S7, and the main control module records the current height as a first preset height, a second preset height, a third preset height or a fourth preset height. The user again presses and releases the set button S8 and the host module exits the data storage mode.

The invention has the beneficial effects that:

1. the invention can effectively prevent the motor from being overloaded or saturated and prevent the motor from being burnt out in an emergency situation by detecting the current circuit of the motor on line.

2. The invention can accurately calculate the number of pulses returned by the motor by utilizing the motor stroke feedback circuit so as to calculate the number of rotation turns and finish the accurate feedback control of the motor stroke, thereby finishing the accurate control of the height of the office table and chair, controlling the error range within 1 cm and meeting the high-precision requirement. Compared with other motor control circuits, the motor control circuit has the advantages of simple circuit design and low cost.

3. The circuit of the invention adopts the singlechip to generate PWM wave to control the rotating speed of the motor, and finishes the accurate control of the motor speed.

4. The invention adopts the half-bridge driving chip and the CMOS full-bridge driving circuit to complete the forward rotation and reverse rotation functions of the motor, and compared with the common motor driving mode or the driving chip L298N and the like, the driving circuit has the advantages of high stability, low cost, low power consumption, fast heat dissipation and stronger driving capability.

5. The circuit has simple structure, stable output aiming at the control circuit of the single motor and low cost compared with the popular double-motor circuit on the market.

Drawings

FIG. 1 is a block diagram of the system of the present invention;

FIG. 2 is a schematic circuit diagram of a voltage regulator module according to the present invention;

FIG. 3 is a schematic circuit diagram of a main control module according to the present invention;

FIG. 4 is a schematic diagram of a motor driver chip and a motor driver module according to the present invention;

FIG. 5 is a schematic diagram of a motor current detection module according to the present invention;

FIG. 6 is a schematic diagram of a key selection module according to the present invention;

FIG. 7 is a schematic diagram of a nixie tube display module according to the present invention;

fig. 8 is a schematic diagram of a motor line space feedback module in the patent of the invention.

Detailed Description

The invention is further described below with reference to the accompanying drawings.

As shown in fig. 1, a single-motor closed-loop control circuit for an automatic lifting table includes a voltage stabilizing module 101, a main control module 102, a motor driving module 103, a motor current detecting module 104, a key selecting module 105, a nixie tube display module 106, and a motor line spacing feedback module 107. The motor in the automatic lifting table is ZYT45JS-2F, and is provided with two power lines (positive and negative electrodes) and two signal feedback lines (used for feeding back the rotation angle and the rotation speed).

The main control module 102 realizes the control of the motor, adopts a single chip microcomputer to generate PWM signals to be output to the motor driving module 103, and outputs the PWM signals to two power lines of the motor through a power supply connector J1. An external power supply 24V is connected to the voltage stabilizing module; the voltage stabilizing module draws 5V voltage through a first voltage stabilizing chip U5 to supply power for the single chip microcomputer; the voltage stabilizing module draws a voltage of 15V through the second voltage stabilizing chip U7 to supply power to the first motor driving chip U3 and the second motor driving chip U4 in the motor driving module 103. The motor driving module 103 drives the normal rotation and reverse rotation of the motor under the control of the main control module 102. The motor current detection module 104 converts the current signal of the motor driving module 103 into a digital signal through the current detection chip U6 and outputs the digital signal to the main control module 102. The main control module detects whether the motor is overloaded or not, the overload coil of the motor is prevented from being heated and burnt, and the reliability of the circuit is improved. The key selection module 105 completes the rotation of the motor, and all keys are connected to the main control module 102 and are triggered by high level. The nixie tube display module 106 completes the display of the desktop height.

As shown in fig. 2, the voltage stabilization module 101 includes a first voltage stabilization chip U5 and a second voltage stabilization chip U7. The model of the first voltage stabilization chip U5 is MCP 16301. The model of the second voltage stabilization chip U7 is LM317 MQDCR. The VIN pin and the EN pin of the first voltage stabilization chip U5 are connected with the capacitor C11, the capacitor C13, one end of the capacitor C14 and the cathode of the diode D4. The other ends of the capacitor C11, the capacitor C13 and the capacitor C14 and the GND pin of the first voltage stabilization chip U5 are all grounded. The anode of the diode D4 is connected to the external 24V voltage. The BOOST pin of the first voltage regulation chip U5 is connected to the cathode of the capacitor C12 and the diode D8, and the SW pin is connected to the other end of the capacitor C12, one end of the inductor L1 and the cathode of the diode D6. The other end of the inductor L1 and the anode of the diode D8 are connected to one end of the resistor R20, the capacitor C15, the capacitor C16 and the inductor L1. The anode of the diode D6, the other ends of the capacitor C15 and the capacitor C16 are all grounded. The other end of the resistor R20 is connected with one end of the resistor R22. The other end of the resistor R22 is connected to the VFB pin of the first voltage regulation chip U5 and one end of the resistor R24. The other end of the resistor R24 is connected to ground. The IN pin of the second voltage stabilizing chip U7 is connected with the VIN pin of the first voltage stabilizing chip U5 and one end of a capacitor C17, the ADJ pin is connected with one end of a resistor R32 and one end of a resistor R33, and two OUT pins (2 and 4 pins) are connected with the other end of a resistor R32 and one end of a capacitor C20 and a capacitor C21. The other ends of the capacitor C17, the resistor R33, the capacitor C21 and the capacitor C20 are all grounded. The anode of the diode D8 is the 5V output terminal +5V of the regulator module 102. The OUT pin of the second regulated chip U7 is the 15V output terminal +15V PWM of the regulator block 102.

As shown in fig. 3, the motor driving module 103 includes a first motor driving chip U3 and a second motor driving chip U4. The first motor driver chip U3 and the second motor driver chip U4 are both IR2301 SBpF. The HIN pin and the LIN pin of the first motor driving chip U3 are both connected with one end of a resistor R10, the COM pin is connected with one end of a capacitor C2 and grounded, the VCC pin is connected with the other end of the capacitor C2, the anode of a diode D1 and the 15V output end +15V PWM of the voltage stabilizing module 102, the VB pin is connected with the cathode of a diode D1 and one end of a capacitor C4, the Vs pin is connected with the other end of the capacitor C4 and the first pin of a power supply connector J1, and the Ho pin is connected with one end of a resistor R9. The other end of the resistor R9 is connected with the gate of the MOS transistor Q1. The source of the MOS transistor Q1 is connected to the first pin of the power supply connector J1, and the drain is connected to one end of the capacitor C1 and the resistor R3. The other end of the resistor R3 is connected with the external 24V voltage, and the other end of the capacitor C1 is grounded. The Lo pin of the first motor driving chip U3 is connected with one end of a resistor R14; the other end of the resistor R14 is connected with the gate of the MOS transistor Q2. The source of the MOS transistor Q2 is grounded, and the drain is connected to the second pin of the power connector J1. The first pin and the second pin of the power supply connector J1 are respectively connected with two power lines of the motor.

The HIN pin and the LIN pin of the second motor driving chip U4 are both connected with one end of a resistor R16, the COM pin is connected with one end of a capacitor C7 and grounded, the VCC pin is connected with the other end of the capacitor C7, the anode of a diode D2 and the 15V output end +15V PWM of the voltage stabilizing module 102, the VB pin is connected with the cathode of a diode D2 and one end of a capacitor C8, the Vs pin is connected with the other end of the capacitor C8 and the first pin of a power supply connector J1, and the Ho pin is connected with one end of a resistor R15. The other end of the resistor R15 is connected with the gate of the MOS transistor Q3. The source of the MOS transistor Q3 is connected to the first pin of the power supply connector J1, and the drain is connected to the capacitor C6 and the end of the resistor R3 connected to the external 24V voltage. The other terminal of the capacitor C6 is connected to ground. The Lo pin of the second motor driving chip U4 is connected with one end of a resistor R17; the other end of the resistor R17 is connected with the gate of the MOS transistor Q4. The source of the MOS transistor Q4 is grounded, and the drain is connected to the second pin of the power connector J1. The third pin of the power supply connector J1 is grounded, and the third pin is connected with the external 24V voltage.

The end of the resistor R10 away from the first motor driving chip U3 is the first PWM wave input end of the motor driving module 103. The end of the resistor R16 far from the second motor driving chip U4 is the second PWM wave input end of the motor driving module 103. The end of the resistor R3 connected with the external 24V voltage is a first current feedback output end I _ sensor + of the motor driving module 103; the end of the resistor R3 connected to the MOS transistor Q1 is a second current feedback output terminal I _ sensor-of the motor driving module 103.

As shown in fig. 4, the motor current detection module 104 includes a current detection chip U6. The current sense chip U6 is model INA 139. The V + pin of the current detection chip U6 is connected to one end of a capacitor C18 and the 15V output end +15V PWM. The other terminal of the capacitor C18 is connected to ground. The GND pin of the current detection chip U6 is grounded, and the OUT pin is connected to one end of a resistor R29, a resistor R31 and a capacitor C19. The other ends of the capacitor C19 and the resistor R31 are grounded. The VIN + pin of the current detection chip U6 is connected to the first current feedback output terminal I _ sensor + of the motor driving module 103, and the VIN-pin of the current detection chip U6 is connected to the second current feedback output terminal I _ sensor-of the motor driving module 103. The end of the resistor R29 away from the current detection chip U6 is the output ADC of the motor current detection module 104.

As shown in FIG. 5, the key selection module 105 includes a raise button S2, a lower button S3, a first position button S4, a second position button S5, a third position button S6, a fourth position button S7, and a set button S8. One end of the raise button S2, the lower button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7 and the set button S8 is connected to one end of a resistor R18, a resistor R19, a resistor R21, a resistor R23, a resistor R26, a resistor R28 and a resistor R30, and the other end is grounded. The other ends of the resistor R18, the resistor R19, the resistor R21, the resistor R23, the resistor R26, the resistor R28 and the resistor R30 are all connected with the +5V output end of the voltage stabilizing module 102. The ends of the raise button S2, the lower button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7, and the set button S8, which are not grounded, are respectively connected to the main control module 102.

As shown in FIG. 6, the nixie tube display module 106 includes a nixie tube U2. Nixie tube U2 is model number SM 410806. A pin a of the nixie tube U2 is connected with one end of a resistor R2, a pin b is connected with one end of a resistor R4, a pin c is connected with one end of a resistor R5, a pin d is connected with one end of a resistor R6, a pin e is connected with one end of a resistor R7, a pin f is connected with one end of a resistor R8, a pin g is connected with one end of a resistor R13, and a com pin is grounded. The other ends of the resistor R2, the resistor R4, the resistor R5, the resistor R6, the resistor R7, the resistor R8, and the resistor R13 are seven input ends of the nixie tube display module 106.

As shown in fig. 7, the motor pitch feedback module 107 includes a resistor R25, a resistor R27, and a feedback connector J3. The first pin of the feedback connector J3 is connected to the +5V output terminal of the regulator module 102, the second pin is connected to one end of the resistor R25, the third pin is connected to one end of the resistor R27, and the fourth pin is grounded. The other ends of the resistor R25 and the resistor R27 are a first line spacing feedback end MOTOA and a second line spacing feedback end MOTOB of the motor line spacing feedback module 107, respectively. The feedback connector J3 is connected with a signal feedback interface of the motor, so that the second pin of the feedback connector J3 is externally connected with a data line A of the motor, and the third pin is externally connected with a data line B of the motor. The second pin and the third pin of the feedback connector J3 are respectively connected with two signal feedback lines of the motor.

As shown in fig. 8, the main control module 102 includes a single-chip microcomputer U1. The singlechip U1 model ATmega 328P-AU; a29 pin of the singlechip U1 is connected with one end of a resistor R1, a capacitor C5 and a switch S1. The other end of the resistor R1 is connected to the 5V output terminal +5V of the voltage stabilizing module 102. The other ends of the switch S1 and the capacitor C5 are both grounded. The 7 pin of the singlechip U1 is connected with one end of the crystal oscillator Y1 and the capacitor C9, and the 8 pin is connected with the other end of the crystal oscillator Y1 and one end of the capacitor C10. The other ends of the capacitor C9 and the capacitor C10 are grounded. The 20 leading pins of the singlechip U1 are connected with one end of the capacitor C3. The other end of the capacitor C3 is connected to ground. Pins 4, 6 and 18 of the singlechip U1 are all connected with the +5V output end of the voltage stabilizing module 102, and pins 3, 5 and 21 are all grounded. A first PWM wave output interface (9 pin) of the singlechip U1 is connected with a first PWM wave input end of the motor driving module 103, and a second PWM wave output interface (10 pin) is connected with a second PWM wave input end of the motor driving module 103.

First to seventh key input pins (pins 12, 13, 14, 15, 16, 17, 11) of the single chip microcomputer U1 are respectively connected with ends of the key selection module 105, which are not grounded, of the up button S2, the down button S3, the first positioning button S4, the second positioning button S5, the third positioning button S6, the fourth positioning button S7, and the set button S8. A first stroke input end (32 pin) and a second stroke input end (1 pin) of the single chip microcomputer U1 are respectively connected with a first line spacing feedback end MOTOA and a second line spacing feedback end MOTOB of the motor line spacing feedback module 107. The overload signal input end (19 pins) of the singlechip U1 is connected with the output end ADC of the motor current detection module 104. Seven digital display pins (a common I/O port, not shown in the figure) of the singlechip U1 are respectively connected with seven input ends of the nixie tube display module 106.

The control method of the single-motor closed-loop control circuit for the automatic lifting table comprises a height adjusting method, a preset height setting method and an emergency stop method.

The height adjusting method specifically comprises the following steps:

the user presses the lifting button S2, the first PWM wave output interface of the singlechip outputs a PWM control signal, and the second PWM wave output interface outputs a low level signal; the two signals are processed by a first motor driving chip U3 and a second motor driving chip U4 respectively, and then output signals are connected to power supply interfaces (positive and negative electrodes) of the motor after the signals are processed by two MOS transistors respectively, so that the motor rotates forwards to enable the desktop to be lifted. After the user releases the lifting button S2, the single chip microcomputer stops outputting the PWM control signal, and the motor stops rotating.

The user presses down the button S3, and the second PWM ripples output interface of singlechip exports PWM control signal, and first PWM ripples output interface exports low level signal, and the motor reversal for the desktop reduces. After the user releases the lowering button S3, the single chip microcomputer stops outputting the PWM control signal, and the motor stops rotating.

When the user needs to adjust the desktop to the first preset height, the user presses and releases the first positioning button S4, and the single chip microcomputer controls the motor to rotate, so that the desktop is adjusted to the first preset height.

When the user needs to adjust the desktop to the second preset height, the user presses and releases the second positioning button S5, and the single chip microcomputer controls the motor to rotate, so that the desktop is adjusted to the second preset height.

When the user needs to adjust the desktop to the third preset height, the user presses and releases the third positioning button S6, and the single chip microcomputer controls the motor to rotate, so that the desktop is adjusted to the third preset height.

When the user needs to adjust the desktop to the fourth preset height, the user presses and releases the fourth positioning button S7, and the single chip microcomputer controls the motor to rotate, so that the desktop is adjusted to the fourth preset height.

The emergency shutdown method is specifically as follows.

The current detection chip U6 of the motor current detection module 104 continuously detects the current passing through the resistor R3, and converts the current into a digital signal to be transmitted to the main control module 102. The main control module 102 determines whether the motor is locked according to the received digital signal (if the current passing through the resistor R3 is greater than the threshold, it is determined that the motor is locked). If the motor is locked, the first PWM wave output interface and the second PWM wave output interface of the single chip microcomputer stop outputting PWM control signals, so that the control circuit stops working, and the effect of protecting the circuit is achieved.

Feedback data of the motor is transmitted to the main control module 102 through the motor line distance feedback module, and a single chip microcomputer in the main control module 102 performs proportion conversion on the feedback data of the motor to determine the stroke of the motor, so that the ascending or descending distance of the desktop and the current height of the desktop are determined. The single chip microcomputer sends the current height to the nixie tube display module after processing the information data on the desktop. The nixie tube displays the current height of the desktop in real time.

The preset height setting method specifically comprises the following steps:

the user presses and releases the setting button S8, and the single chip enters a data storage mode; then, the user presses the first positioning button S4, the second positioning button S5, the third positioning button S6 or the fourth positioning button S7, and the single chip microcomputer records the current height as a first preset height, a second preset height, a third preset height or a fourth preset height. The first positioning button S4, the second positioning button S5, the third positioning button S6, and the fourth positioning button S7 correspond to the first preset height, the second preset height, the third preset height, and the fourth preset height, respectively. The user presses and releases the set button S8 again and the single chip exits the data storage mode.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:马达驱动电路与马达驱动方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!