SUMMERY OF THE UTILITY MODEL
A primary object of the present invention is to provide an automatic power on/off circuit to solve the problem that the current equipment cannot be automatically turned on/off and the automobile battery consumes much.
In order to achieve the above object, according to the present invention, there is provided an automatic switching circuit, the circuit comprising:
the first startup and shutdown module comprises a first input end, a first controllable switch and a first output end;
the first input end is used for inputting a power supply, the control end of the first controllable switch is connected with the first input end, the first end of the first controllable switch is respectively connected with the first output end and the signal generation end, and the second end of the first controllable switch is grounded.
Optionally, the method further comprises:
the second startup and shutdown module comprises a second input end, a second controllable switch, a third controllable switch and a second output end;
the second input end is used for inputting a startup and shutdown instruction; the control end of the second controllable switch is connected with the second input end, the first end of the second controllable switch is connected with the control end of the third controllable switch, the second end of the second controllable switch is grounded, the first end of the third controllable switch is respectively connected with the second output end and the signal generation end, the second end of the third controllable switch is grounded, and the control end of the third controllable switch is connected with the first input end.
Optionally, the signal generating terminal is used for connecting with a high-level voltage signal.
Further, the first output terminal and the second output terminal are connected with a controller.
Optionally, the first power on/off module further includes:
and the voltage stabilizing module is arranged between the first input end and the control end of the first controllable switch.
Further, the first power on/off module further includes:
and the first voltage division module is arranged between the voltage stabilizing module and the control end of the first controllable switch.
Further, the second power on/off module further includes:
and the second voltage division module is arranged between the second input end and the control end of the second controllable switch.
Further, the second power on/off module further includes:
and the third voltage division module is arranged between the voltage stabilizing module and the control end of the third controllable switch.
Optionally, the first power on/off module further includes:
and the first waveform shaping module is used for being connected with the control end of the first controllable switch.
Further, the second power on/off module further includes:
and the second waveform shaping module is used for being connected with the control end of the third controllable switch.
In the embodiment of the present invention, the automatic power on/off circuit includes a signal generating terminal and a first power on/off module, the first power on/off module includes a first input terminal, a first controllable switch and a first output terminal, the first input terminal is used for inputting a power supply, a control terminal of the first controllable switch is connected to the first input terminal, a first terminal of the first controllable switch is connected to the first output terminal and the signal generating terminal, respectively, and a second terminal of the first controllable switch is grounded; the first output end realizes the automatic on-off function of the equipment according to the signal level of the first input end, when the voltage of the first input end is changed from the high level to the low level, the first controllable switch is turned off, the voltage of the first output end is changed from the low level to the high level corresponding to the signal generation end, therefore, the voltage reduction of the first input end is detected, the automatic on-off function is realized after the preset time is delayed, the bottom current of the equipment when the equipment is connected with a vehicle is reduced, and the problem of consuming a storage battery of the vehicle is solved.
Detailed Description
In order to make the technical solution of the present invention better understood, the technical solution of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by a person skilled in the art without creative efforts shall belong to the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances for purposes of describing the embodiments of the invention herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
It should be noted that, in the present invention, the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In the application of the vehicle-mounted equipment, the automatic power-on function can enable a user to use part of low-power-consumption equipment after getting on the vehicle, so that the energy consumption is reduced; however, when an Accessory circuit (ACC) signal of a general device is at a low level, the general device does not automatically turn off but enters a sleep state, which causes a problem of large standby current and consumption of a battery of an automobile.
In order to solve the above problem, according to the embodiment of the present invention, there is provided an automatic switching circuit, the schematic diagram is shown in fig. 1, and the circuit includes:
the switching device comprises a signal generating end 1 and a first switching module 2, wherein the first switching module 2 comprises a first input end 21, a first controllable switch 22 and a first output end 23;
the first input end 21 is used for inputting a power supply, the control end of the first controllable switch 22 is connected with the first input end 21, the first end of the first controllable switch 22 is respectively connected with the first output end 23 and the signal generating end 1, and the second end of the first controllable switch 22 is grounded.
The signal generating end 1 is a voltage signal which is always maintained at a high level after the system is started; the first input end 21 is an ACC signal provided by an On-Board device, which may be an Electronic Control Unit (ECU) of an automobile or other On-Board devices of an On-Board diagnostic system (OBD); the first controllable switch 22 may be a triode, MOS, CMOS, IGBT or silicon controlled; the first output terminal 23 is an ACC _ DET signal, i.e. a detection signal of the ACC signal; the ACC _ DET signal is provided with a pull-up resistor.
Based on the content of the foregoing embodiment, as an optional embodiment, another embodiment of the present invention provides an automatic on/off circuit, the schematic diagram is shown in fig. 2, and the automatic on/off circuit further includes:
a second switching module 3, including a second input terminal 31, a second controllable switch 32, a third controllable switch 33 and a second output terminal 34;
the second input terminal 31 is used for inputting a power on/off instruction; the control end of the second controllable switch 32 is connected to the second input end 31, the first end of the second controllable switch 32 is connected to the control end of the third controllable switch 33, the second end of the second controllable switch 32 is grounded, the first end of the third controllable switch 33 is connected to the second output end 34 and the signal generating end 1, the second end of the third controllable switch 33 is grounded, and the control end of the third controllable switch 33 is connected to the first input end 21.
The power on/off instruction Input by the second Input end 31 is an instruction sent by a controller, and raises or lowers a voltage signal of the second Input end 31, the controller is a CPU or an MCU, and the second Input end 31 is connected to a single General Purpose Input Output (GPIO) pin of the controller; the second controllable switch 32 and the third controllable switch 33 may be a triode, MOS, CMOS, IGBT or silicon controlled; the second output terminal 34 is a PWRKEY signal provided with a pull-up resistor.
Specifically, the signal generating terminal 1 is configured to be connected to a high-level voltage signal, and the high-level voltage signal is maintained at a high level all the time after the system is started.
Specifically, the first output end 23 and the second output end 34 are connected with a controller; the first output end 23 is connected with a single GPIO pin of the controller, and the second output end 34 is connected with a switch-on/off pin of the controller; the controller is a CPU or an MCU; and if the power on/off pin has an internal pull-up pin, the pull-up resistor of the PWRKEY signal is not mounted, and if the power on/off pin has no internal pull-up pin, the pull-up resistor of the PWRKEY signal is mounted.
Specifically, the first power on/off module 2 further includes:
the voltage stabilizing module is arranged between the first input end 21 and the control end of the first controllable switch 22; the voltage stabilizing module comprises a voltage stabilizing diode, and an output signal ACC _ ON of the anode of the voltage stabilizing diode is provided with a pull-down resistor.
Specifically, the first power on/off module 2 further includes:
and the first voltage division module is arranged between the voltage stabilizing module and the control end of the first controllable switch 22.
Specifically, the second power on/off module 3 further includes:
and the second voltage division module is arranged between the second input end 31 and the control end of the second controllable switch 32.
Specifically, the second power on/off module 3 further includes:
and the third voltage division module is arranged between the voltage stabilizing module and the control end of the third controllable switch 33.
The first voltage division module, the second voltage division module and the third voltage division module comprise voltage division resistors.
Specifically, the first power on/off module 2 further includes:
a first waveform shaping module for connection to a control terminal of said first controllable switch 22.
Specifically, the second power on/off module 3 further includes:
a second waveform shaping module for connection with a control terminal of the third controllable switch 33.
The first and second waveform shaping modules each include a waveform shaping capacitor, which shapes the waveforms at the control terminals of the first and second controllable switches 22 and 32, respectively, to avoid overshoot of the signal.
According to the embodiment of the utility model provides an automatic switching on and switching off circuit is provided, and the circuit diagram is as shown in fig. 3, the circuit includes:
the signal generation end is a VIO signal, the first input end is an ACC signal, the first output end is an ACC _ DET signal, the second input end is a GPIO signal, and the second output end is a PWRKEY signal;
the first controllable switch comprises a transistor Q1, the second controllable switch comprises a transistor Q3, and the third controllable switch comprises a MOSFET Q2;
the voltage stabilizing module comprises a voltage stabilizing diode D1, the first voltage dividing module, the second voltage dividing module and the third voltage dividing module respectively comprise voltage dividing resistors, each voltage dividing resistor comprises a resistor R1, a resistor R2, a resistor R4, a resistor R8, a resistor R6 and a resistor R7, the first waveform shaping module and the second waveform shaping module respectively comprise waveform shaping capacitors, and each waveform shaping capacitor comprises a capacitor C1 and a capacitor C2;
the output signal of the anode of the zener diode D1 is an ACC _ ON signal, the pull-down resistor of the ACC _ ON signal includes a resistor R5, the pull-up resistor of the ACC _ DET signal includes a resistor R3, and the pull-up resistor of the PWRKEY signal includes a resistor R9.
An input signal of the cathode of the voltage stabilizing diode D1 is an ACC signal provided by a vehicle or vehicle-mounted equipment, and the anode of the voltage stabilizing diode D1 is respectively connected with the resistor R1, the resistor R4 and the resistor R5;
the other end of the resistor R1 is respectively connected with a resistor R2, a capacitor C1 and a base electrode of a triode Q1, a collector electrode of the triode Q1 is connected with a resistor R3, and the input of the other end of the resistor R3 is VIO voltage; the output between the collector of the triode Q1 and the resistor R3 is an ACC _ DET signal;
the other end of the resistor R4 is respectively connected with a resistor R8, a MOSFET Q2 grid and a triode Q3 collector, the MOSFET Q2 drain is connected with a resistor R9, and the input of the other end of the resistor R9 is VIO voltage; the output of the drain of the MOSFET Q2 is a PWRKEY signal;
the input of the resistor R7 is a GPIO signal, and the other end of the resistor R7 is respectively connected with a resistor R6, a capacitor C2 and a base electrode of a triode Q3;
the resistor R2, the capacitor C1, the emitter of the triode Q1, the resistor R5, the resistor R6, the resistor R8, the capacitor C2, the source of the MOSFET Q2 and the emitter of the triode Q3 are grounded respectively.
The VIO signal is maintained to be a high voltage level after the system is started, the GPIO signal is connected with an independent GPIO pin of the CPU or the MCU, the ACCDET signal is connected with an independent GPIO pin of the CPU or the MCU, and the PWRKEY signal is an on-off pin of the CPU or the MCU or a power chip;
if the power on/off pin has an internal pull-up pin, the resistor R9 is not attached; if the switch power pin has no internal pull-up pin, then resistor R9 is a patch.
According to the embodiment of the utility model provides an automatic startup and shutdown system is provided, and the system block diagram is shown in FIG. 4, and this system includes: the system comprises an automatic on-off circuit, other vehicle-mounted equipment such as an automobile ECU/OBD and the like, a main system and an automobile storage battery;
the automobile storage battery supplies power to the main system and other vehicle-mounted equipment such as an automobile ECU/OBD; other vehicle-mounted equipment such as an automobile ECU/OBD and the like is connected with the main system through the CAN or a serial port and transmits vehicle information, such as voltage data of an automobile storage battery and the like; other vehicle-mounted equipment such as ECU/OBD judges the state of the vehicle to generate an ACC signal, the automatic startup and shutdown circuit receives the ACC signal for judgment and outputs an ACC _ DET signal and a PWRKEY signal to a main system; the main system supplies power to the automatic on-off circuit through the VIO, and turns off the control of the automatic on-off circuit on the PWRKEY signal through the GPIO signal.
The ACC signal is generally a voltage of an automobile storage battery, when the ACC level is high, the voltage range is 9-15V, such voltage can reach the breakdown voltage of a voltage regulator diode D1, so as to pull the ACC _ ON signal high, the ACC _ ON signal acts ON the gate of a Q2 through a voltage dividing resistor composed of R4 and R8, so that the PWRKEY signal is maintained at a low level, and the MCU/CPU of the main system receives the PWRKEY and starts up when the PWRKEY is at the low level; after the system is started, the GPIO is set to be at a high level, the high level acts on the base electrode of Q3 through a voltage dividing resistor formed by R7 and R6, the grid level of Q2 is pulled down, so that Q2 is turned off, a PWRKEY signal is pulled up to VIO through R9, the maintained low level state is ended, so that the PWRKEY signal is changed into the high level, and the condition that the PWRKEY signal is maintained at the low level for a long time to cause the shutdown of the system is avoided; the capacitor C2 connected with the R6 in parallel plays a role in shaping the waveform on the base of Q3, and overshoot of signals is avoided;
the ACC _ ON signal acts ON the base of Q1 at a high level through a voltage division resistor consisting of R1 and R2, so that ACC _ DET which is pulled to be at a high level by R3 is grounded through Q1 to generate a low level, and a capacitor C1 which is connected with R2 in parallel plays a role in shaping the waveform ON the base of Q1, and avoids overshoot of the signal; the ACC _ DET signal is at low level, so that the MCU/CPU of the main system knows that the ACC signal always exists, and the power-on state is maintained;
when the ACC level is low, the zener diode D1 is in an off state, the ACC _ ON signal is pulled low through R5, thereby making the base of Q1 low, ACC _ DET is pulled up through R3 to VIO, thereby becoming high, making the MCU/CPU of the host system know that the ACC signal has become low, thereby entering the off state;
when the ACC level is high and the main system acquires the information that the voltage of the automobile storage battery is too low through the CAN bus, the main system sets the GPIO from the high level state to the low level state, so that the Q3 is turned off, the grid of the Q2 is at the high level at the moment, the Q2 is turned on, the PWRKEY is set from the high level state to the low level state at the moment, and the system is turned off after the PWRKEY is set to the low level state for a period of time.
From the above description, it can be seen that the utility model discloses following technological effect has been realized:
the utility model discloses an automatic on-off circuit controls equipment automatic on-off according to the height of ACC signal level; when the level of the ACC is high, the vehicle is automatically started, whether the vehicle is kept in a starting state or enters a shutdown state is judged according to the voltage data of the automobile storage battery, and when the level of the ACC is low, the vehicle can be automatically shut down or shut down after delaying preset time is determined, so that the bottom current of the device when the device is connected with a vehicle is reduced, and the vehicle-mounted device can be widely applied to vehicle-mounted terminals and other devices.