CN113370985A - STM 32-based night vehicle safe driving system - Google Patents

STM 32-based night vehicle safe driving system Download PDF

Info

Publication number
CN113370985A
CN113370985A CN202110760229.5A CN202110760229A CN113370985A CN 113370985 A CN113370985 A CN 113370985A CN 202110760229 A CN202110760229 A CN 202110760229A CN 113370985 A CN113370985 A CN 113370985A
Authority
CN
China
Prior art keywords
pin
circuit
power supply
main control
chip
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110760229.5A
Other languages
Chinese (zh)
Inventor
马丹
童强
曹琦
李佳洲
樊建新
张家诚
王钊仙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Yiyi Wireless Technology Co ltd
Original Assignee
Chengdu Yiyi Wireless Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Yiyi Wireless Technology Co ltd filed Critical Chengdu Yiyi Wireless Technology Co ltd
Priority to CN202110760229.5A priority Critical patent/CN113370985A/en
Publication of CN113370985A publication Critical patent/CN113370985A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • B60W40/08Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models related to drivers or passengers
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60QARRANGEMENT OF SIGNALLING OR LIGHTING DEVICES, THE MOUNTING OR SUPPORTING THEREOF OR CIRCUITS THEREFOR, FOR VEHICLES IN GENERAL
    • B60Q1/00Arrangement of optical signalling or lighting devices, the mounting or supporting thereof or circuits therefor
    • B60Q1/02Arrangement of optical signalling or lighting devices, the mounting or supporting thereof or circuits therefor the devices being primarily intended to illuminate the way ahead or to illuminate other areas of way or environments
    • B60Q1/04Arrangement of optical signalling or lighting devices, the mounting or supporting thereof or circuits therefor the devices being primarily intended to illuminate the way ahead or to illuminate other areas of way or environments the devices being headlights
    • B60Q1/14Arrangement of optical signalling or lighting devices, the mounting or supporting thereof or circuits therefor the devices being primarily intended to illuminate the way ahead or to illuminate other areas of way or environments the devices being headlights having dimming means
    • B60Q1/1415Dimming circuits
    • B60Q1/1423Automatic dimming circuits, i.e. switching between high beam and low beam due to change of ambient light or light level in road traffic
    • B60Q1/143Automatic dimming circuits, i.e. switching between high beam and low beam due to change of ambient light or light level in road traffic combined with another condition, e.g. using vehicle recognition from camera images or activation of wipers
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W40/00Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models
    • B60W40/08Estimation or calculation of non-directly measurable driving parameters for road vehicle drive control systems not related to the control of a particular sub unit, e.g. by using mathematical models related to drivers or passengers
    • B60W2040/0818Inactivity or incapacity of driver
    • B60W2040/0827Inactivity or incapacity of driver due to sleepiness

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Mathematical Physics (AREA)
  • Transportation (AREA)
  • Lighting Device Outwards From Vehicle And Optical Signal (AREA)

Abstract

The invention discloses a STM 32-based night vehicle safe driving system which comprises a main control circuit, a photoelectric sensor circuit, an Open CV, an illumination intensity display circuit, a power supply circuit and an OLED screen display circuit, wherein the main control circuit is respectively connected with the photoelectric sensor circuit, the Open CV, the illumination intensity display circuit, the power supply circuit and the OLED screen display circuit; the driving assisting system can effectively prevent fatigue driving and eliminate visual blind areas caused by the formation of high beam at night.

Description

STM 32-based night vehicle safe driving system
Technical Field
The invention relates to the technical field of intelligent driving, in particular to a night vehicle safe driving system based on STM 32.
Background
The driving intelligence is an important direction for the future development of automobiles. At present, in the field of global intelligent automobiles, Germany and the United states are in the leading position, various combinations and functions of driving assistance systems exist, and China has obvious gaps with European and American developed countries in market scale and industry development level. In the domestic market, the automobile industry starts late and has a low starting point, so that the development of a driving assistance system representing an advanced automobile technology is insufficient, and a related plan for promoting the technical development of the driving assistance system is not provided in the state at present. And domestic automobile manufacturers are limited by capital and research and development strength, and have less investment in the aspect of research and development of an advanced driving assistance system. The severity of the injuries caused by automobile traffic accidents makes the research on the safety of automobiles an important subject for all countries in the world. Thus, automobile safety technology has also become one of the most important topics for the development of new technology.
The existing driving auxiliary systems are mainly directed to a lane keeping auxiliary system, an automatic parking auxiliary system, a brake auxiliary system, a backing auxiliary system and a driving auxiliary system. And there is no perfect driving assistance system for night driving.
Disclosure of Invention
The invention aims to design a night vehicle safe driving system based on STM32, which is an auxiliary driving system, can effectively prevent fatigue driving and eliminate visual blind areas caused by formation of high beams at night.
The invention is realized by the following technical scheme: STM 32-based night vehicle safety driving system comprises a main control circuit, a photoelectric sensor circuit, an Open CV, an illumination intensity display circuit, a power supply circuit and an OLED screen display circuit, wherein the main control circuit is respectively connected with the photoelectric sensor circuit, the Open CV, the illumination intensity display circuit, the power supply circuit and the OLED screen display circuit, and the power supply circuit is respectively connected with the photoelectric sensor circuit, the Open CV, the illumination intensity display circuit and the OLED screen display circuit.
In order to further realize the invention, the following arrangement mode is adopted: the power supply circuit comprises a main power supply circuit and an LDO power supply circuit which are connected with each other; the total power supply circuit comprises a connection terminal con, a capacitor C13, an LM2596 power supply chip U7, a resistor R33, an adjustable resistor R32, a diode D9, an inductor L1, a capacitor C14 and a capacitor C15, wherein the positive electrode input end of the connection terminal con power supply is connected with a VIN pin (1 pin) of the LM2596 power supply chip U7, the capacitor C13 is connected between the VIN pin (1 pin) and a GND pin (3 pin) of the LM2596 power supply chip U7, a resistor R33 is connected between a FEEDBAEDK pin (4 pin) and a GND pin (3 pin) of the LM2596 power supply chip U7, a VOUT pin (2 pin) of the LM2596 power supply chip U7 is grounded through the diode D9, preferably, the negative electrode of the diode D9 is connected with the pin, a VOUT pin (2 pin) of the LM2596 power supply chip U9 is connected with a first end of the inductor L1, a capacitor C14 and a capacitor C15 are connected between a second end of the inductor L1 in parallel, a second end of the LDO resistor R867 and a power supply circuit (368672) of the LM2596 chip U867, namely, the voltage output by the LM2596 power chip U7 passes through a switching power supply circuit formed by combining an inductor L1, a capacitor C14 and a capacitor C15 to form 5v direct current which is used as the input of an LDO power supply circuit, and the voltage of the LM2596 power chip U7
Figure BDA0003149353060000021
the/OFF pin (pin 5) is grounded, wherein the capacitor C13, the capacitor C14 and the capacitor C15 all adopt electrolytic capacitors, and the capacitor C14 is used as a filter capacitor.
In order to further realize the invention, the following arrangement mode is adopted: the motor driving circuit uses TB6612 driving module, uses interface terminal P4 and interface terminal P5 as driving module interface, 1 pin of interface terminal P4 is connected with 9V input power supply port through switch key4, 2 pin of interface terminal P4 is connected with LDO power supply circuit (filter circuit output), 3 pin of interface terminal P4 is grounded, motor driving interface con1 is connected between 4 pin and 5 pin of interface terminal P4, 2 pin of motor driving interface con1 is connected with 4 pin of interface terminal P4, 1 pin of motor driving interface con1 is connected with 5 pin of interface terminal P4, 8 pin of interface terminal P4 is connected with PGND, 1 pin and 6 pin of interface terminal P5 are both connected with PGND (power ground), 5 pin and 7 pin of interface terminal P5 are connected with LDO filter circuit output, 8 pin of interface terminal P5 is connected with main control circuit (main control chip U6 pin of 1), PGND and DGND (signal ground) are also grounded through a one-point common ground circuit, which is formed by an O Ω resistor R29.
In order to further realize the invention, the following arrangement mode is adopted: the LDO power supply circuit comprises a switch key5, a voltage stabilizing chip U5 (preferably AMS1117_1), a filter capacitor C5 and a filter capacitor C6, wherein a total power supply circuit (a node where an inductor L1, the filter capacitor C14 and an electrolytic capacitor C15 are connected in common) is connected with one end of the switch key5, the other end of the switch key5 is connected with a Vin pin (3 pin) of a voltage stabilizing chip U5, a photoelectric sensor circuit and an illumination intensity display circuit, a Vout pin (2 pin) of the chip U5 supplies power (is connected with the filter circuit), the LDO power supply circuit outputs power supply Open CV, the main control circuit and the OLED screen display circuit, the filter capacitor C5 is connected between a Vin pin and a GND pin of the voltage stabilizing chip U5, and the filter capacitor C6 is connected between the Vout pin and the GND pin of the voltage stabilizing chip U5; the filter circuit is formed by connecting a capacitor C7, a capacitor C8, a capacitor C9 and a capacitor C10 in parallel; the filter circuit outputs 3.3v direct current with low ripple to supply power to the main control circuit, the power indicator lamp on the LDO power supply circuit is connected to the Vin pin of the voltage stabilizing chip U5, and comprises a light emitting diode PPS1 and a resistor R6 which are connected in series, the positive electrode of the light emitting diode PPS1 is connected with the Vin pin of the voltage stabilizing chip U5, the negative electrode of the light emitting diode PPS1 is connected with one end of a resistor R6, and the other end of the resistor R6 is grounded.
In order to further realize the invention, the following arrangement mode is adopted: the power indicator lamps are arranged on the motor driving circuit and the LDO power supply circuit, the power indicator lamps on the driving circuit are connected to pin 1 of the interface terminal P4 and comprise a diode indicator lamp PPS4 and a resistor R24 which are connected in series, the positive electrode of the preferred diode indicator lamp PPS4 is connected to pin 1 of the interface terminal P4, the negative electrode of the preferred diode indicator lamp PPS4 is connected to one end of a resistor R24, and the other end of the resistor R24 is grounded.
In order to further realize the invention, the following arrangement mode is adopted: the main control circuit comprises a main control chip U1 (preferably STM32F103C8T6), a crystal oscillator circuit and a reset circuit, wherein the crystal oscillator circuit and the reset circuit are connected to a main control chip U1, the main control chip U1 and the reset circuit are both connected with a power supply circuit, the reset circuit is connected to an NRST pin of the main control chip U1, preferably, the reset circuit comprises a resistor R1, a switch key1 and a capacitor C1, a 3.3V power output by the LDO power supply circuit is connected to a first end of the resistor R1, a second end of the resistor R1 is respectively connected to a first end of the capacitor C1 and the NRST pin of the main control chip U1, a second end of the capacitor C1 is grounded, and the switch key1 is connected to two ends of the capacitor C1 in; the crystal oscillator circuit adopts a dual-crystal oscillator, one crystal oscillator is connected between a pin PC14-OSC32_ IN and a pin PC15-OSC32_ OUT of the main control chip U1, the other crystal oscillator is connected between a pin OSC _ IN/PD0 and a pin OSC _ OUT/PD1 of the main control chip U1, preferably, the crystal oscillator circuit comprises a crystal oscillator Y1, two ends of the crystal oscillator Y1 are respectively grounded through a resonant capacitor C3 and a resonant capacitor C4, two ends of the crystal oscillator Y1 are also respectively connected to a pin PC14-OSC32_ IN and a pin PC 32-OSC 32_ OUT of the main control chip U1, the crystal oscillator circuit further comprises a crystal oscillator Y32, two ends of the crystal oscillator Y32 are respectively grounded through a resonant capacitor C32 and a resonant capacitor C32, two ends of the crystal oscillator Y32 are also respectively connected to a pin OSC _ OSC/PD 32 and a pin IN/PD 32, and a resistor R32 is also connected to the crystal oscillator Y32.
The Open CV signal is connected with a pin PA2 and a pin PA3 of the main control chip U1, preferably, the Open CV includes a terminal P7, a pin 4 of the terminal P7 is grounded, a pin 3 and a pin 2 of the terminal P7 are respectively connected with a pin PA2 and a pin PA3 of the main control chip U1, and a pin 1 of the terminal P7 is connected with a 3.3V power supply output by the LDO power supply circuit.
The OLED screen display circuit is in signal connection with a PA10 pin, a PB12 pin, a PB13 pin, a PB14 pin and a PB15 pin of the main control chip U1, preferably, the OLED screen display circuit comprises a terminal P6, a pin 1 of the terminal P6 is grounded, a pin 2 of the terminal P6 is connected with a 3.3V power supply output by the LDO power supply circuit, and pins 3, 4, 5, 6 and 7 of a terminal P6 are respectively connected with a PB13 pin, a PB15 pin, a PA10 pin, a PB14 pin and a PB12 pin of the main control chip U1.
The PA7 pin of the main control chip U1 is grounded through a switch key2 and a resistor R10 which are mutually connected in series, and the PA12 pin of the main control chip U1 is also connected with a resistor R14 in series through a key3 to select whether to be connected with GND or not.
The main control chip U1 is also connected with an interface circuit for later circuit expansion, the interface circuit comprises a pin header interface P11 and a pin header interface P12, pins 1, 2, 3 and 4 of the pin header interface P11 are respectively connected with a VBAT pin, a PB9 pin, a PB7 pin and a PB5 pin of the main control chip U1, and pins 5 of the pin header interface P11 are connected with a Vin pin of a voltage stabilizing chip U5; pins 1, 2, 3 and 4 of the pin header interface P12 are respectively connected with a PC13-TAMPER-RTC pin, a PB8 pin, a PB 4/JNTST pin and a PB3/JTDO pin of a main control chip U1, redundant main control IO is led out from the pin header interface P12 through P11, pin 5 of the pin header interface P11 is connected with 5V, and pin 5 of the pin header interface P12 is grounded.
In order to further realize the invention, the following arrangement mode is adopted: the photoelectric sensor circuit is provided with 4 photoelectric sensors, the photoelectric sensors are respectively in signal connection with a PA0-WKUP pin, a PA1 pin, a PA4 pin and a PA5 pin of a main control chip U1, ultrasonic sensors are further in signal connection with a PA6 pin and a PA11 pin of the main control chip U1, the preferable photoelectric sensor circuit comprises photoelectric sensors which are respectively connected through a terminal P2, a terminal P8, a terminal P9 and a terminal P10, the photoelectric sensors adopt OPT101 illumination intensity photoelectric sensors, the chip integrates a photoelectric diode and a specially optimized operational amplifier, the spectrum range from infrared light to visible light can be collected, and the power supply of the OPT101 illumination intensity photoelectric sensor 1 pin is 5V; pin 2 is the inverting input terminal of the internal operational amplifier and the cathode of the internal photodiode; 3 pin power supply cathode; 4 pins are feedback input resistors with the internal resistance of 1M omega; pin 5 is the output end of the amplifier; the 6 pin and the 7 pin are suspended; the 8-pin internal photodiode anode is typically connected to GND. The output ends of the 4 photoelectric sensor amplifiers are respectively connected to a PA1 pin, a PA0-WKUP pin, a PA4 pin and a PA5 pin of the main control chip U1, the voltage value of 0-5V output by the output ends of the photoelectric sensor amplifiers represents the illumination intensity, and the value is acquired by an ADC of the main control chip U1 to judge and process the light intensity and/or whether the light intensity is an automobile light source. After the program in the main control chip U1 is operated, the PA8 pin and the PA9 pin perform analog feedback.
In order to further realize the invention, the following arrangement mode is adopted: the illumination intensity display circuit comprises 4 double-voltage comparators, and the PA1 foot of main control chip U1 is connected to double-voltage comparator's inverting input, double-voltage comparator's output all connects power supply circuit (5V power mouth) through the indicating circuit that resistance and emitting diode constitute, double-voltage comparator's power supply foot connects power supply circuit, double-voltage comparator's ground connection foot ground connection, double-voltage comparator's in-phase input adopts the mode of resistance successive partial pressure to connect on the power supply node that indicating circuit and power supply circuit are connected.
As a preferable arrangement, the illumination intensity display circuit includes 4 dual-voltage comparators, which are respectively a chip U2 (composed of U2A and U2B), a chip U3 (composed of U3A and U3B), a chip U4 (composed of U4A and U4B), and a chip U6 (composed of U6A and U6B), an output pin of the U2A is connected with a node (5V) where the switch key5 is connected with the voltage stabilization chip U5 through an indication circuit composed of a diode D1 and a resistor R3, and a non-inverting input terminal of the U2A is connected with a node (5V) where the switch key5 is connected with the voltage stabilization chip U5 through a resistor R2; the output pin of the U2B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D2 and a resistor R5, and the non-inverting input end of the U2B is connected with the non-inverting input end of the U2A through a resistor R4; the output pin of the U3A is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D3 and a resistor R11, and the non-inverting input end of the U3A is connected with the non-inverting input end of a U2B through a resistor R9; the output pin of the U3B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D4 and a resistor R18, and the non-inverting input end of the U3B is connected with the non-inverting input end of the U3A through a resistor R15; the output pin of the U4A is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D5 and a resistor R20, and the non-inverting input end of the U4A is connected with the non-inverting input end of a U3B through a resistor R19; the output pin of the U4B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D6 and a resistor R22, and the non-inverting input end of the U4B is connected with the non-inverting input end of the U4A through a resistor R21; the output pin of the U6A is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D7 and a resistor R26, and the non-inverting input end of the U6A is connected with the non-inverting input end of a U4B through a resistor R25; the output pin of the U6B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D8 and a resistor R30, and the non-inverting input end of the U6B is connected with the non-inverting input end of the U6A through a resistor R27; the non-inverting input end of the U6B is also grounded, and the inverting input end of the chip U2, the inverting input end of the chip U3, the inverting input end of the chip U4 and the inverting input end of the chip U6 are connected in common and connected to a PA1 pin of the main control chip U1; a node (5V) of the switch key5 connected with the voltage stabilization chip U5 is in power supply connection with power supply pins of the chip U2, the chip U3, the chip U4 and the chip U6; preferably, the cathode of the light emitting diode in the indicating circuit is connected with the output pin of each dual-voltage comparator.
In order to further realize the invention, the following arrangement mode is adopted: a JLINK is further connected to the PA13/JTMS/SWDIO pin and the PA14/JTCK/SWCLK pin of the main control chip U1, the JLINK includes an interface terminal P3, the 3 pin and the 2 pin of the interface terminal P3 are respectively connected to the PA3/JTMS/SWDIO end and the PA14/JTCK/SWCLK end of the main control chip U1, the 4 pin of the interface terminal P3 is connected to a 3.3V power supply output by the LDO power supply circuit, the 1 pin of the interface terminal P3 is grounded, and a filter capacitor C2 is further connected between the 4 pin and the 1 pin of the interface terminal P3; a group of triode control small lamp circuits are respectively connected to a PA8 pin and a PA9 pin of the main control chip U1, and the two groups of triode control small lamp circuits are connected with a power supply circuit, wherein one group of triode control small lamp circuits comprises a triode Q1, a resistor R12, a resistor R16, a light emitting diode PPS2 and a resistor R7, the other group of triode control small lamp circuits comprises a triode Q2, a resistor R13, a resistor R17, a light emitting diode PPS3 and a resistor R8, a first end of the resistor R12 is connected with a PA8 pin of the main control chip U1, a second end of the resistor R12 is connected with a base electrode of a triode Q1, a resistor R16 is connected with an emitting junction of the triode Q1, and a collector electrode of the triode Q1 is connected with a node (5V) connected with the voltage stabilizing chip U5 through a light emitting diode PPS2 and a resistor R7 connecting switch key5 which are mutually connected in series; the first end of the resistor R13 is connected with a PA9 pin of the main control chip U1, the second end of the resistor R13 is connected with the base electrode of the triode Q2, the resistor R17 is connected with the emitting junction of the triode Q2, the collector electrode of the triode Q2 is connected with a node (5V) of the switch key5 and the voltage stabilizing chip U5 through a light emitting diode PPS3 and a resistor R8 which are mutually connected in series, and the collector electrode of the triode Q1 and the collector electrode of the triode Q2 are connected in common and grounded.
In order to further realize the invention, the following arrangement mode is adopted: the PA15/JTDI pin of the main control chip U1 is also connected with a buzzer circuit in a signal mode, the preferable buzzer circuit comprises a resistor R28, a resistor R31, a triode Q3 and a buzzer BEEP1, the PA15/JTDI pin of the main control chip U1 is connected with the base electrode of a triode Q3 through a resistor R28, the resistor R31 is connected with the emitting junction of a triode Q3, the emitting electrode of the triode Q3 is grounded, the collecting electrode of a triode Q3 is connected with the G pin of the buzzer BEEP1, and the P pin of the buzzer BEEP1 is connected with a node (5V) connected with the voltage stabilizing chip U5 through a switch key 5.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the invention judges whether the driver is in a fatigue driving state by acquiring the action frequency information (yawning, shaking head, and the like) of a person and pupil identification (eye closing) through the camera to perform image processing.
The invention uses a light sensor system (a photoelectric sensor circuit), and judges according to the distance between opposite vehicles and the intensity of light when meeting at night, so that a driver can make a correct high beam use method (for example, if the driver closes the high beam to normally drive when meeting, if the driver does not close the high beam to carry out unconventional operation, the safe driving system can forcibly close the high beam to change into a dipped beam); if the light intensity collected by the photoelectric sensor is greater than a certain value when the road section with the street lamp is driven, the high beam is automatically turned off, and the high beam is automatically turned on when the light intensity of the high beam is not turned on and is less than a certain value in a dark road section to keep the standard and safety of driving; the environment light is collected and judged in severe environments such as rainy days and foggy days, and the use of the car lamp is reasonably standardized.
Drawings
Fig. 1 is a partial circuit (total power supply circuit) of the circuit schematic of the present invention.
Fig. 2 is a circuit diagram of a part of the circuit (LDO power supply circuit) of the present invention.
Fig. 3 is a circuit (light intensity display circuit) of a part of the circuit schematic diagram of the present invention.
Fig. 4 is a circuit (main control circuit) of a part of the circuit schematic of the present invention.
Fig. 5 shows a part of the circuit (JLINK, crystal oscillator circuit, one-point common ground circuit) of the circuit schematic of the present invention.
Fig. 6 shows a part of the circuit (ultrasonic circuit, triode control small lamp circuit, driving circuit) of the circuit schematic diagram of the invention.
FIG. 7 shows a part of the circuit (Open CV, OLED, buzzer circuit) of the circuit schematic of the present invention.
Fig. 8 is a partial circuit (photosensor circuit) of the circuit schematic of the present invention.
Fig. 9 is a part of a circuit diagram (interface circuit) of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention.
In the description of the present invention, it is to be understood that the terms etc. indicate orientations or positional relationships based on those shown in the drawings only for the convenience of describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise specifically stated or limited, the terms "mounting," "connecting," "disposing," "fixing," and the like are to be understood in a broad sense, and may be, for example, a fixed connection, a detachable connection, or an integral connection, and are not limited to any conventional mechanical connection means such as screwing, interference fitting, riveting, screw-assisted connection, and the like. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, "above" or "below" a first feature means that the first and second features are in direct contact, or that the first and second features are not in direct contact but are in contact with each other via another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly under and obliquely below the second feature, or simply meaning that the first feature is at a lesser elevation than the second feature.
It is worth noting that: in the present application, when it is necessary to apply the known technology or the conventional technology in the field, the applicant may have what technology is not specifically set forth in the text or/and the conventional technology is, but the technology is not specifically disclosed in the text and the technical solution of the present application is not considered to be unclear.
Example 1:
as shown in fig. 1 to 9, the STM 32-based night vehicle safe driving system includes a main control circuit, a photosensor circuit, Open CV, an illumination intensity display circuit, a power supply circuit, and an OLED, wherein the main control circuit is connected to the photosensor circuit, Open CV, the illumination intensity display circuit, the power supply circuit, and the OLED, and the power supply circuit is connected to the photosensor circuit, Open CV, the illumination intensity display circuit, and the OLED.
The main control circuit realizes the switching of the high beam and the low beam through the acquisition of sensor data when driving at night, and automatically controls the driving safety auxiliary control for reducing the speed of the vehicle. The automobile light source is different from other natural light sources when meeting at night by installing 4 illumination intensity sensors (photoelectric sensors) on the left and right, because light irradiated by an automobile comes from one direction, voltage values reflected by the difference of the illumination intensity collected by the 4 photoelectric sensors are different and have a value which is the largest, and all directions of the natural light are the same illumination intensity value, so that the automobile light source at night can be judged, threshold value judgment and ultrasonic distance judgment are set by a program, when the opposite side is determined to be the automobile light source and the distance meets the meeting requirement, the main control automatically switches the light from far light to near light and speed control, and the meeting is completed.
The photoelectric sensor circuit converts the collected illumination intensity into a voltage value through a high-precision analog-to-digital conversion and sends the voltage value to the master control.
The Open CV is used as another small auxiliary safe driving system of the invention, whether a driver is in a fatigue driving state or not is judged by collecting human action frequency information (yawning, shaking head and the like) and pupil identification (eye closing) for image processing, and if the driver is in the fatigue state, a buzzing alarm is sent.
The illumination intensity display circuit uses the lamp post built by the double-voltage comparator as a man-machine interaction circuit to light the LED lamps with different numbers according to different illumination intensities when meeting, and the stronger the illumination intensity of the meeting vehicle is, the more the number of the LED lamps are lighted.
The power supply circuit is a power supply part of the whole system, an LM2596 switching voltage regulator chip is used for generating a stable 5V main power supply and stably supplying power for the whole system, and as the IO port of the main control chip part cannot directly supply 5V voltage and the supplied voltage is about 2V to 3V, an AMS1117 LDO chip is required to generate 3.3V voltage to supply power for part of peripheral equipment.
The OLED screen display circuit belongs to a current type organic light-emitting device, is composed of one pixel point, and is used for displaying various parameters in the whole system, including values of illumination intensity and vehicle meeting distance, and judging flashing screen reminding after fatigue driving of a driver, and the like.
Example 2:
the present embodiment is further optimized based on the above embodiment, and the same parts as those in the foregoing technical solution will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting manner is particularly adopted: the power supply circuit comprises a main power supply circuit and an LDO power supply circuit which are connected with each other; the total power supply circuit comprises a connection terminal con, a capacitor C13, a power supply chip U7 (preferably LM2576-5V), a resistor R33, an adjustable resistor R32, a diode D9, an inductor L1, a filter capacitor C14 and an electrolytic capacitor C15, wherein the positive input end of the power supply of the connection terminal con is connected with a VIN (1 pin) of an LM2596 power supply chip U7, the capacitor C13 is connected between the VIN (1 pin) and a GND (3 pin) of the LM2596 power supply chip U7, the resistor R33 is connected between an FEEDBAK pin (4 pin) and a GND pin (3 pin) of the LM2596 power supply chip U7, a VOUT pin (2 pin) of the LM2596 power supply chip U7 is grounded through a diode D9, the preferable negative electrode of the diode D9 is connected with a VOUT pin, the inductor pin (2 pin) of the LM2596 power supply chip U7 is connected with a first end of an L1, the capacitor C14 and the capacitor C15 are connected between a second end of the adjustable inductor L2 and a ground, and a second end of the LM25 1, the second end of the inductor L1 is connected with an LDO power supply circuit, namely, the voltage output by the LM2596 power supply chip U7 passes through a switching power supply circuit formed by combining the inductor L1, the capacitor C14 and the capacitor C15 to form 5v direct current which is used as the input of the LDO power supply circuit, and the LM2596 power supply chip U7
Figure BDA0003149353060000131
the/OFF pin (pin 5) is grounded, wherein the capacitor C13, the capacitor C14 and the capacitor C15 all adopt electrolytic capacitors, and the capacitor C14 is used as a filter capacitor.
As a preferable arrangement scheme, the electrolytic capacitor C13 takes the value of 220 muF, the resistor R33 takes the value of 1k omega, the adjustable resistor R32 is adjustable within the range of 0-30 k omega, the diode D9 adopts IN914, the inductor L1 adopts the inductor of 68 muH, the filter capacitor C14 adopts the capacitor of 0.1 muF, and the electrolytic capacitor C15 adopts the capacitor of 470 muF.
An LM2596 switching voltage regulator chip is used for generating a stable 5V power supply to stably supply power to the whole system, the LM2596 switching power supply is adopted, the power supply is input from a chip 1 pin through one terminal, and the magnitude of output voltage is regulated through the resistance ratio of R32 to R33; the filtering of higher harmonic is carried out on the one hand to electric capacity C14, C15, can stabilize 5V's output through big electric capacity on the one hand, and output voltage is AMS1117 (steady voltage chip U5), photodiode, ultrasonic wave circuit, LM393 comparator, 5V power indicator and the little lamp circuit power supply of triode control.
Wherein, pin 1 (VIN) is a direct current voltage input end, the highest value of which can reach 40V, and the lowest value of which is 4.5V;
the 2 pin (VOUT) is an open-circuit output end of the emitter of the switching tube, namely a direct-current voltage output end. The highest output is 37V, and the lowest value is 1.2V;
pin 3 (GND) is the input-output common terminal, i.e. ground;
the 4-pin (FEEDBACK) is a regulated sample voltage input, and is typically connected to the output voltage, which is monitored by an IC internal voltage divider network. When the output voltage is increased or decreased, the pin voltage is increased or decreased in proportion, and the internal amplifier can automatically adjust the output duty ratio of the oscillator to reduce or increase the output voltage by comparing with the internal reference regulated voltage value of 1.23V. Thereby stabilizing the output voltage at the rated value
5 foot (
Figure BDA0003149353060000141
OFF) is an enable control terminal which controls the existence of the voltage of the output terminal, when the pin is higher than 1.23V, the internal switch tube is turned OFF, the output voltage is OV, when the pin is lower than 1.23V, the output is a rated voltage, and in actual use, the pin is generally grounded or placed on the voltage lower than 1.23V through an external component.
Example 3:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the motor driving circuit uses TB6612 driving module, uses interface terminal P4 and interface terminal P5 as driving module interface, 1 pin of interface terminal P4 is connected with 9V input power port through switch key4, 2 pin of interface terminal P4 is connected with LDO power supply circuit (3.3V power output by filter circuit), 3 pin of interface terminal P4 is grounded, motor driving interface con1 is connected between 4 pin and 5 pin of interface terminal P4, 2 pin of motor driving interface con1 is connected with 4 pin of interface terminal P4, 1 pin of motor driving interface con1 is connected with 5 pin of interface terminal P4, 8 pin of interface terminal P4 is connected with PGND, 1 pin and 6 pin of interface terminal P5 are both connected with PGND (power ground), 5 pin and 7 pin of interface terminal P5 are connected with power supply circuit (output of filter circuit), 8 pin of interface terminal P5 is connected with main control circuit (6 pin of main control chip 1), PGND and DGND are grounded via a one-point common ground circuit composed of O Ω resistor R29
Example 4:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the LDO power supply circuit comprises a switch key5, a voltage stabilizing chip U5 (preferably adopting AMS1117_1), a filter capacitor C5 and a filter capacitor C6. A general power supply circuit (a node where an inductor L1, a filter capacitor C14 and a filter capacitor C15 are connected in common) is connected with one end of a switch key5, the other end of the switch key5 is connected with a Vin pin (3 pin) of a voltage stabilizing chip U5 and a Vout pin (2 pin) of a chip U5, the output of the Vin pin and the Vout pin (2 pin) is filtered by a filter circuit and then supplies power to an Open CV, a main control circuit and an OLED screen display circuit, the filter capacitor C5 is connected between the Vin pin and a GND pin of the voltage stabilizing chip U5, and a filter capacitor C6 is connected between the Vout pin and the GND pin of the voltage stabilizing chip U5; the filter circuit is formed by connecting a capacitor C7, a capacitor C8, a capacitor C9 and a capacitor C10 in parallel, the capacitors are respectively distributed on 4 VDDA pins of the main control chip, 3.3v direct current with low noise (low ripple) is guaranteed to be provided for the main control chip, a power indicator lamp on the LDO power supply circuit is connected to a Vin pin of the voltage stabilizing chip U5 and comprises a light emitting diode PPS1 and a resistor R6 which are mutually connected in series, the anode of the light emitting diode PPS1 is connected with the Vin pin of the voltage stabilizing chip U5, the cathode of the light emitting diode PPS1 is connected with one end of a resistor R6, the other end of the resistor R6 is grounded, and if the light emitting diode PPS1 is lightened, the power of the LDO power supply circuit can normally pass; the filter circuit has the functions of reducing alternating current components in pulsating direct current voltage as much as possible, reserving the direct current components, reducing the ripple factor of the output voltage, smoothing the waveform and obtaining pure direct current.
Preferably, the values of the filter capacitor C5 and the filter capacitor C6 are 10 μ F, and the values of the filter capacitor C7, the filter capacitor C8, the filter capacitor C9 and the filter capacitor C10 are 10 μ F4pF, and the current limiting resistor R6 is a 620 Ω resistor.
The method is characterized in that a 3.3V voltage is generated by using an AMS117_1 chip of an LDO (low dropout regulator), 5V voltage cannot be directly supplied to an IO port of a main control chip, the supplied voltage is about 2V to 3V, so that 3.3V voltage needs to be generated to enable part of external equipment to work, after a switch key5 is switched on, a 5VIN power supply enters the LDO chip to be subjected to DC-DC conversion to form 3.3V stabilized direct current, a capacitor C5 is used for filtering an input power supply and filtering ripples of the input power supply, and a capacitor C6 is used for filtering output voltage on one hand and also can maintain stable output when a load is changed on the other hand. The voltage output by the LDO chip supplies power to a main control chip U1(STM32F103C8T6), Open CV, OLED and the like; wherein, 3 pins are input, 2 pins are output, 1 pin is connected with GND, and 3 pins carry out 3.3v output after being input by the 3 pins and then the 2 pins.
Example 5:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the motor driving circuit and the LDO power supply circuit are both provided with power indicator lamps, the power indicator lamps on the driving circuit are connected to pin 1 of the interface terminal P4 and comprise a diode indicator lamp PPS4 and a resistor R24 (preferably 1k omega) which are connected in series, the anode of the preferred diode indicator lamp PPS4 is connected to pin 1 of the interface terminal P4, the cathode of the preferred diode indicator lamp PPS4 is connected to one end of a resistor R24, and the other end of the resistor R24 is grounded.
Example 6:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the main control circuit comprises a main control chip U1 (preferably STM32F103C8T6), a crystal oscillator circuit and a reset circuit, wherein the crystal oscillator circuit and the reset circuit are connected to a main control chip U1, the main control chip U1 and the reset circuit are both connected with a power supply circuit, the reset circuit is connected to an NRST pin of the main control chip U1, preferably, the reset circuit comprises a resistor R1, a switch key1 and a capacitor C1, a 3.3V power output by the LDO power supply circuit is connected to a first end of the resistor R1, a second end of the resistor R1 is respectively connected to a first end of the capacitor C1 and the NRST pin of the main control chip U1, a second end of the capacitor C1 is grounded, and the switch key1 is connected to two ends of the capacitor C1; the crystal oscillator circuit adopts a dual-crystal oscillator, one crystal oscillator is connected between a pin PC14-OSC32_ IN and a pin PC15-OSC32_ OUT of the main control chip U1, the other crystal oscillator is connected between a pin OSC _ IN/PD0 and a pin OSC _ OUT/PD1 of the main control chip U1, preferably, the crystal oscillator circuit comprises a crystal oscillator Y1, two ends of the crystal oscillator Y1 are respectively grounded through a resonant capacitor C3 and a resonant capacitor C4, two ends of the crystal oscillator Y1 are also respectively connected to a pin PC14-OSC32_ IN and a pin PC 32-OSC 32_ OUT of the main control chip U1, the crystal oscillator circuit further comprises a crystal oscillator Y32, two ends of the crystal oscillator Y32 are respectively grounded through a resonant capacitor C32 and a resonant capacitor C32, two ends of the crystal oscillator Y32 are also respectively connected to a pin OSC _ OSC/PD 32 and a pin IN/PD 32, and a resistor R32 is also connected to the crystal oscillator Y32.
STM32F103C8T6 is adopted as a main control chip U1, STM32F103C8T6 is a 32-bit microcontroller based on an ARM Cortex-M kernel STM32 series, the capacity of a program memory is 64KB, and the working temperature of the voltage 2V3.6V is required to be 85 ℃ below zero 40 ℃.
PB12\ PB14\ PA10\ PB15\ PB13 is used for controlling and communicating the OLED;
the PA2\ PA3 is used for communication and control of Open CV peripherals;
the PC14-OSC32_ IN \ PC15-OSC32_ OUT \ OSC _ IN/PD0\ OSC _ OUT/PD1 is accessed through an external circuit and generates a system clock;
PA3/JTMS/SWDIO and PA14/JTCK/SWCLK are connected with downloader to realize downloading function
The PA7\ PA12 is connected with a key and can be controlled by the key;
PA8 and PA9 give different voltages;
the PA11\ PA6 is connected with the ultrasonic sensor and can control and communicate;
PA1 is connected with LM393 for voltage output;
PA15/JTDI control buzzer;
PA5\ PA0-WKUP \ PA4\ PA1 is connected with the photoelectric sensor peripheral and can control and communicate;
VBAT \ PB9\ PB7\ PB5\ V5\ PC13-TAMPER-RTC \ PB8\ PB4/JNTRST \ PB3/JTDO can realize later external expansion.
The crystal oscillator generates a main control chip internal clock by generating a stable pulse signal, the STM32F103C8T6 has a high-speed 8M, a low-speed 32.768K internal and external crystal oscillation sources, wherein the external 8M high-speed crystal oscillator is connected with an OSC _ IN/PD0 pin and an OSC _ OUT/PD1 pin of a chip U1, the external 32.768K low-speed crystal oscillator is connected with a single chip PC14-OSC32_ IN pin and a PC15-OSC32_ OUT pin, and a 20pf resonance capacitor connected IN parallel with the crystal oscillator aims to form a three-terminal LC sine wave oscillator with the crystal oscillator so as to generate a stable clock frequency.
A reset circuit: the whole system can be restarted through reset operation, debugging and detection of different algorithm functions are facilitated, meanwhile, the program can be restarted when the program runs off, a high level is added to an NRST pin after the single chip microcomputer system works normally, and the system can be reset by maintaining at least two machine periods.
The Open CV signal is connected with a pin PA2 and a pin PA3 of the main control chip U1, preferably, the Open CV includes a terminal P7, a pin 4 of the terminal P7 is grounded, a pin 3 and a pin 2 of the terminal P7 are respectively connected with a pin PA2 and a pin PA3 of the main control chip U1, and a pin 1 of the terminal P7 is connected with a 3.3V power supply output by the LDO power supply circuit.
The OLED screen display circuit is in signal connection with a PA10 pin, a PB12 pin, a PB13 pin, a PB14 pin and a PB15 pin of the main control chip U1, preferably, the OLED screen display circuit comprises a terminal P6, a pin 1 of the terminal P6 is grounded, a pin 2 of the terminal P6 is connected with a 3.3V power supply output by the LDO power supply circuit, and pins 3, 4, 5, 6 and 7 of a terminal P6 are respectively connected with a PB13 pin, a PB15 pin, a PA10 pin, a PB14 pin and a PB12 pin of the main control chip U1; the OLED is connected to the OLED peripheral and used for displaying real-time data.
The PA7 pin of the main control chip U1 is also connected with a resistor R10 in series through a key2 to select whether to be connected with GND, and the PA12 pin of the main control chip U1 is also connected with a resistor R14 in series through a key3 to select whether to be connected with GND.
The PA7 and the PA12 are connected to GND through keys, and simulate that when the keys are pressed down on the IO port to detect low level, a driver can manually switch the high beam and the low beam, for example, when the PA7 or the PA12 is pressed down to detect that the IO port is low level, the IO port PA8 or the PA9 of the single chip outputs high level to control the NPN triode to be conducted, and the low beam or the high beam is lightened.
The main control chip U1 is also connected with a pin header P11 and a pin header P12, pins 1, 2, 3 and 4 of the pin header P11 are respectively connected with a VBAT pin, a PB9 pin, a PB7 pin and a PB5 pin of the main control chip U1, and pin 5 of the pin header P11 is connected with a Vin pin of a voltage stabilizing chip U5; pins 1, 2, 3 and 4 of the pin header interface P12 are respectively connected with a PC13-TAMPER-RTC pin, a PB8 pin, a PB 4/JNTST pin and a PB3/JTDO pin of a main control chip U1, redundant main control IO is led out from the pin header interface P12 through P11, pin 5 of the pin header interface P11 is connected with 5V, and pin 5 of the pin header interface P12 is grounded.
Example 7:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the photoelectric sensor circuit is provided with 4 photoelectric sensors, the photoelectric sensors are respectively in signal connection with a PA0-WKUP pin, a PA1 pin, a PA4 pin and a PA5 pin of a main control chip U1, ultrasonic sensors are further in signal connection with a PA6 pin and a PA11 pin of the main control chip U1, the preferable photoelectric sensor circuit comprises photoelectric sensors which are respectively connected through a terminal P2, a terminal P8, a terminal P9 and a terminal P10, the photoelectric sensors adopt OPT101 illumination intensity photoelectric sensors, the chip integrates a photoelectric diode and a specially optimized operational amplifier, the spectrum range from infrared light to visible light can be collected, and the power supply of the OPT101 illumination intensity photoelectric sensor 1 pin is 5V; pin 2 is the inverting input terminal of the internal operational amplifier and the cathode of the internal photodiode; 3 pin power supply cathode; 4 pins are feedback input resistors with the internal resistance of 1M omega; pin 5 is the output end of the amplifier; the 6 pin and the 7 pin are suspended; the 8-pin internal photodiode anode is typically connected to GND. The output ends of the 4 photoelectric sensor amplifiers are respectively connected to a PA1 pin, a PA0-WKUP pin, a PA4 pin and a PA5 pin of the main control chip U1, the voltage value of 0-5V output by the output ends of the photoelectric sensor amplifiers represents the illumination intensity, and the value is acquired by an ADC of the main control chip U1 to judge and process the light intensity and/or whether the light intensity is an automobile light source. After the program in the main control chip U1 is operated, the PA8 pin and the PA9 pin perform analog feedback.
The ultrasonic sensor adopts an IO port TRIG (connected with a PA11 of a main control chip U1) to trigger ranging, and gives a high-level signal of at least 10 us;
the ultrasonic sensor automatically sends 8 square waves of 40kHz and automatically detects whether a signal returns;
when the signal returns, a high level is output through the IO port ECHO (PA 6 connected with the main control chip U1), and the duration of the high level is the time from the transmission of the ultrasonic wave to the return. Test distance (high level time: speed of sound (340M/S))/2;
the ultrasonic sensor has simple use method, and can wait for high level output at the receiving port when one control port sends out high level of more than 10 us. When the output is available, the timer can be started to time, and when the port is changed to low level, the value of the timer can be read, and at the moment, the distance can be calculated according to the time of the distance measurement.
The TRIG is responsible for receiving more than 10us of trigger signal and ECHO is the output range signal.
Example 8:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the illumination intensity display circuit comprises 4 double-voltage comparators (preferably adopting LM393), the reverse phase input ends of the double-voltage comparators are connected with a PA1 pin of a main control chip U1, the output ends of the double-voltage comparators are connected with a power supply circuit through an indicating circuit consisting of resistors and light emitting diodes, the power supply pins of the double-voltage comparators are connected with the power supply circuit (5V power port), the grounding pins of the double-voltage comparators are grounded, and the in-phase input ends of the double-voltage comparators are connected to a power supply node connected with the power supply circuit through a mode of successively dividing the voltage by the resistors.
The number of the lighted LED lamps is controlled by comparing the voltage value of the output voltage PA1IO of the photodiode with each divided voltage of 5V, and the larger the voltage value of PA1 is, the more the lighted LEDs are, so that the light alarm function is achieved.
As a preferable arrangement, the illumination intensity display circuit includes 4 dual-voltage comparators, which are respectively a chip U2 (composed of U2A and U2B), a chip U3 (composed of U3A and U3B), a chip U4 (composed of U4A and U4B), and a chip U6 (composed of U6A and U6B), an output pin of the U2A is connected with a node (5V) where the switch key5 is connected with the voltage stabilization chip U5 through an indication circuit composed of a diode D1 and a resistor R3, and a non-inverting input terminal of the U2A is connected with a node (5V) where the switch key5 is connected with the voltage stabilization chip U5 through a resistor R2; the output pin of the U2B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D2 and a resistor R5, and the non-inverting input end of the U2B is connected with the non-inverting input end of the U2A through a resistor R4; the output pin of the U3A is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D3 and a resistor R11, and the non-inverting input end of the U3A is connected with the non-inverting input end of a U2B through a resistor R9; the output pin of the U3B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D4 and a resistor R18, and the non-inverting input end of the U3B is connected with the non-inverting input end of the U3A through a resistor R15; the output pin of the U4A is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D5 and a resistor R20, and the non-inverting input end of the U4A is connected with the non-inverting input end of a U3B through a resistor R19; the output pin of the U4B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D6 and a resistor R22, and the non-inverting input end of the U4B is connected with the non-inverting input end of the U4A through a resistor R21; the output pin of the U6A is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D7 and a resistor R26, and the non-inverting input end of the U6A is connected with the non-inverting input end of a U4B through a resistor R25; the output pin of the U6B is connected with a node (5V) of a switch key5 connected with a voltage stabilizing chip U5 through an indicating circuit consisting of a diode D8 and a resistor R30, and the non-inverting input end of the U6B is connected with the non-inverting input end of the U6A through a resistor R27; the non-inverting input end of the U6B is also grounded, and the inverting input end of the chip U2, the inverting input end of the chip U3, the inverting input end of the chip U4 and the inverting input end of the chip U6 are connected in common and connected to a PA1 pin of the main control chip U1; a node (5V) of the switch key5 connected with the voltage stabilization chip U5 is in power supply connection with power supply pins of the chip U2, the chip U3, the chip U4 and the chip U6; preferably, the cathode of the light emitting diode in the indicating circuit is connected with the output pin of each dual-voltage comparator.
The resistor R2, the resistor R4, the resistor R9, the resistor R15, the resistor R19, the resistor R21, the resistor R25 and the resistor R27 are all resistors of 1k omega, and the resistor R3, the resistor R5, the resistor R11, the resistor R18, the resistor R20, the resistor R22, the resistor R26 and the resistor R30 are all resistors of 600 omega.
Example 9:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: a JLINK is further connected to the PA13/JTMS/SWDIO pin and the PA14/JTCK/SWCLK pin of the main control chip U1, the JLINK includes an interface terminal P3, the 3 pin and the 2 pin of the interface terminal P3 are respectively connected to the PA3/JTMS/SWDIO end and the PA14/JTCK/SWCLK end of the main control chip U1, the 4 pin of the interface terminal P3 is connected to a 3.3V power supply output by the LDO power supply circuit, the 1 pin of the interface terminal P3 is grounded, and a capacitor C2 is further connected between the 4 pin and the 1 pin of the interface terminal P3; a group of triode control small lamp circuits are respectively connected to a PA8 pin and a PA9 pin of the main control chip U1, and the two groups of triode control small lamp circuits are connected with a power supply circuit, wherein one group of triode control small lamp circuits comprises a triode Q1, a resistor R12, a resistor R16, a light emitting diode PPS2 and a resistor R7, the other group of triode control small lamp circuits comprises a triode Q2, a resistor R13, a resistor R17, a light emitting diode PPS3 and a resistor R8, a first end of the resistor R12 is connected with a PA8 pin of the main control chip U1, a second end of the resistor R12 is connected with a base electrode of a triode Q1, a resistor R16 is connected with an emitting junction of the triode Q1, and a collector electrode of the triode Q1 is connected with a node (5V) connected with the voltage stabilizing chip U5 through a light emitting diode PPS2 and a resistor R7 connecting switch key5 which are mutually connected in series; the first end of the resistor R13 is connected with a PA9 pin of the main control chip U1, the second end of the resistor R13 is connected with the base electrode of the triode Q2, the resistor R17 is connected with the emitting junction of the triode Q2, the collector electrode of the triode Q2 is connected with a node (5V) of the switch key5 and the voltage stabilizing chip U5 through a light emitting diode PPS3 and a resistor R8 which are mutually connected in series, and the collector electrode of the triode Q1 and the collector electrode of the triode Q2 are connected in common and grounded. Two sets of triode control small lamp circuits are used for simulating the high beam and the low beam of a vehicle, and the main control chip U1 turns on or off the high beam and the low beam under the feedback of different conditions through the PA8 and the PA 9.
J-Link (JLINK) is a JTAG emulator which is released by SEGGER company to support the emulation ARM kernel chip, and is convenient for debugging and downloading ARM series chips.
Example 10:
the present embodiment is further optimized based on any of the above embodiments, and parts that are the same as the above technical solutions will not be described herein again, as shown in fig. 1 to fig. 9, in order to further better implement the present invention, the following setting modes are particularly adopted: the PA15/JTDI pin of the main control chip U1 is further connected with a buzzer circuit in a signal mode, preferably, the buzzer circuit includes a resistor R28, a resistor R31, a triode Q3 and a buzzer BEEP1, the PA15/JTDI pin of the main control chip U1 is connected with the base of a triode Q3 through a resistor R28, the resistor R31 is connected with the emitter junction of a triode Q3, the emitter of the triode Q3 is grounded, the collector of the triode Q3 is connected with the G pin of the buzzer BEEP1, and the P pin of the buzzer BEEP1 is connected with a switch key5 and a node (5V) connected with the voltage stabilizing chip U5.
In the meeting distance of ultrasonic detection and when the automobile is judged to be a high beam light source of the automobile, an intermittent buzzing alarm function is generated, the PA15 is connected to an IO port of the single chip microcomputer, and the main control chip U1 generates a PWM wave through a timer and sends the PWM wave to a buzzer circuit through the PA15/JTD to realize the intermittent buzzing alarm.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, and all simple modifications and equivalent variations of the above embodiments according to the technical spirit of the present invention are within the scope of the present invention.

Claims (10)

1. STM 32-based night vehicle safe driving system is characterized in that: the system comprises a main control circuit, a photoelectric sensor circuit, an Open CV, an illumination intensity display circuit, a power supply circuit and an OLED screen display circuit, wherein the main control circuit is respectively connected with the photoelectric sensor circuit, the Open CV, the illumination intensity display circuit, the power supply circuit and the OLED screen display circuit, and the power supply circuit is respectively connected with the photoelectric sensor circuit, the Open CV, the illumination intensity display circuit and the OLED screen display circuit.
2. The STM 32-based night vehicle safe driving system of claim 1, wherein: the power supply circuit comprises a main power supply circuit and an LDO power supply circuit which are connected with each other; the total power supply circuit comprises a connection terminal con, a capacitor C13, an LM2596 power supply chip U7, a resistor R33, an adjustable resistor R32, a diode D9, an inductor L1, a capacitor C14 and a capacitor C15, wherein the positive electrode input end of a connection terminal con power supply is connected with the VIN pin of the power supply chip U7, a capacitor C13 is connected between the VIN pin and the GND pin of the LM2596 power supply chip U7, a resistor R33 is connected between the FEEDBAK pin and the GND pin of the LM2596 power supply chip U7, the VOUT pin of the LM2596 power supply chip U7 is grounded through the diode D9, the VOUT pin of the LM2596 power supply chip U7 is connected with the first end of the inductor L1, the capacitor C14 and the capacitor C15 are connected between the second end of the inductor L1 and the ground in parallel, the adjustable resistor R32 is connected between the second end of the inductor L1 and the EDFEBAK pin of the LM2596 power supply chip U7, the second end of the inductor L1 is connected with the LDO power supply circuit, and the LDO chip U2596 power supply chip U7
Figure FDA0003149353050000011
The pin is grounded.
3. The STM 32-based night vehicle safe driving system of claim 2, wherein: the motor driving circuit uses a TB6612 driving module, an interface terminal P4 and an interface terminal P5 are used as driving module interfaces, a pin 1 of the interface terminal P4 is connected to a 9V input power supply port through a switch key4, a pin 2 of the interface terminal P4 is connected with an LDO power supply circuit, a pin 3 of the interface terminal P4 is grounded, a motor driving interface con1 is connected between a pin 4 and a pin 5 of an interface terminal P4, a pin 8 of the interface terminal P4 is connected with a PGND, a pin 1 and a pin 6 of the interface terminal P5 are both connected with the PGND, a pin 5 and a pin 7 of the interface terminal P5 are connected with the LDO power supply circuit, a pin 8 of the interface terminal P5 is connected with a main control circuit, and the PGND and the DGND are grounded through a point common ground circuit.
4. The STM 32-based night vehicle safe driving system of claim 3, wherein: and power indicator lamps are arranged on the motor driving circuit and the LDO power supply circuit.
5. An STM 32-based night vehicle safety driving system according to claim 2, 3 or 4, wherein: the LDO power supply circuit comprises a switch key5, a voltage stabilizing chip U5, a filter capacitor C5, a filter capacitor C6 and a filter circuit, a main power supply circuit is connected with one end of the switch key5, the other end of the switch key5 is connected with a Vin pin of a voltage stabilizing chip U5, a photoelectric sensor circuit and an illumination intensity display circuit, a Vout pin of the voltage stabilizing chip U5 supplies power, the LDO power supply circuit outputs and supplies power to an Open CV, a main control circuit and an OLED screen display circuit, the filter capacitor C5 is connected between the Vin pin of the voltage stabilizing chip U5 and a GND pin, and the filter capacitor C6 is connected between the Vout pin and the GND pin of the voltage stabilizing chip U5.
6. An STM 32-based night vehicle safety driving system according to any one of claims 1-4, wherein: the main control circuit comprises a main control chip U1, and a crystal oscillator circuit and a reset circuit which are connected to the main control chip U1, wherein the main control chip U1 and the reset circuit are both connected with a power supply circuit, the reset circuit is connected to an NRST pin of the main control chip U1, the crystal oscillator circuit adopts a dual-crystal oscillator, one crystal oscillator is connected between a PC14-OSC32_ IN pin and a PC15-OSC32_ OUT pin of the main control chip U1, the other crystal oscillator is connected between an OSC _ IN/PD0 pin and an OSC _ OUT/PD1 pin of the main control chip U1, the Open CV signal is connected with a PA2 pin and a PA3 pin of the main control chip U1, the OLED signal is connected with a PA10 pin, a PB12 pin, a PB13 pin, a PB14 pin and a PB15 pin of the main control chip U1, and the main control chip U1 adopts STM32F103C8T 9.
7. The STM 32-based night vehicle safe driving system of claim 6, wherein: the photoelectric sensor circuit is provided with 4 photoelectric sensors which are respectively in signal connection with a PA0-WKUP pin, a PA1 pin, a PA4 pin and a PA5 pin of a main control chip U1, and ultrasonic sensors are also in signal connection with a PA6 pin and a PA11 pin of the main control chip U1.
8. The STM 32-based night vehicle safe driving system of claim 6, wherein: the illumination intensity display circuit comprises 4 double-voltage comparators, the reverse phase input ends of the double-voltage comparators are connected with a PA1 pin of a main control chip U1, the output ends of the double-voltage comparators are connected with a 5V power supply port through an indicating circuit consisting of resistors and light emitting diodes, the power pins of the double-voltage comparators are connected with a power supply circuit, the grounding pins of the double-voltage comparators are grounded, and the in-phase input ends of the double-voltage comparators are connected to a power supply node connected with the indicating circuit and the power supply circuit in a mode of successively dividing voltage through resistors.
9. The STM 32-based night vehicle safe driving system of claim 6, wherein: JLINK is connected to the PA13/JTMS/SWDIO pin and the PA14/JTCK/SWCLK pin of the main control chip U1, a group of triode control small lamp circuits are connected to the PA8 pin and the PA9 pin of the main control chip U1 respectively, and the two groups of triode control small lamp circuits are connected with a power supply circuit.
10. The STM 32-based night vehicle safe driving system of claim 6, wherein: and a buzzer circuit is connected to a PA15/JTDI pin of the main control chip U1 in a signal mode.
CN202110760229.5A 2021-07-06 2021-07-06 STM 32-based night vehicle safe driving system Pending CN113370985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110760229.5A CN113370985A (en) 2021-07-06 2021-07-06 STM 32-based night vehicle safe driving system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110760229.5A CN113370985A (en) 2021-07-06 2021-07-06 STM 32-based night vehicle safe driving system

Publications (1)

Publication Number Publication Date
CN113370985A true CN113370985A (en) 2021-09-10

Family

ID=77581092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110760229.5A Pending CN113370985A (en) 2021-07-06 2021-07-06 STM 32-based night vehicle safe driving system

Country Status (1)

Country Link
CN (1) CN113370985A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1565889A (en) * 2003-06-13 2005-01-19 刘忠奎 Intelligent type automatic controller for upper/lower beam of night vehicle
CN2748329Y (en) * 2004-11-12 2005-12-28 王道武 Vehicle light automatic changeover unit
US20130135132A1 (en) * 2011-11-30 2013-05-30 Sitronix Technology Corp. Analog-to-digital converter
CN104742796A (en) * 2015-03-13 2015-07-01 安徽天健环保车辆部件有限公司 Automatic lamplight controller
CN106778538A (en) * 2016-11-28 2017-05-31 上海工程技术大学 Intelligent driving behavior evaluation method based on analytic hierarchy process (AHP)
US20170267175A1 (en) * 2014-12-03 2017-09-21 Koito Manufacturing Co., Ltd. Vehicular lighting device
CN207416682U (en) * 2017-09-30 2018-05-29 宝沃汽车(中国)有限公司 A kind of vehicle head lamp control circuit and vehicle
CN110281839A (en) * 2019-07-05 2019-09-27 台州学院 A kind of automobile long-and-short distant light automatic control system based on Bluetooth technology
CN110803099A (en) * 2019-12-18 2020-02-18 奇瑞汽车股份有限公司 Night intelligent high beam control system and method
CN211880469U (en) * 2020-03-19 2020-11-06 广汽蔚来新能源汽车科技有限公司 Light filling control circuit, DMS camera, fatigue driving monitoring system and automobile
CN215284766U (en) * 2021-07-06 2021-12-24 成都意逸无线科技有限公司 STM 32-based night vehicle safe driving system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1565889A (en) * 2003-06-13 2005-01-19 刘忠奎 Intelligent type automatic controller for upper/lower beam of night vehicle
CN2748329Y (en) * 2004-11-12 2005-12-28 王道武 Vehicle light automatic changeover unit
US20130135132A1 (en) * 2011-11-30 2013-05-30 Sitronix Technology Corp. Analog-to-digital converter
US20170267175A1 (en) * 2014-12-03 2017-09-21 Koito Manufacturing Co., Ltd. Vehicular lighting device
CN104742796A (en) * 2015-03-13 2015-07-01 安徽天健环保车辆部件有限公司 Automatic lamplight controller
CN106778538A (en) * 2016-11-28 2017-05-31 上海工程技术大学 Intelligent driving behavior evaluation method based on analytic hierarchy process (AHP)
CN207416682U (en) * 2017-09-30 2018-05-29 宝沃汽车(中国)有限公司 A kind of vehicle head lamp control circuit and vehicle
CN110281839A (en) * 2019-07-05 2019-09-27 台州学院 A kind of automobile long-and-short distant light automatic control system based on Bluetooth technology
CN110803099A (en) * 2019-12-18 2020-02-18 奇瑞汽车股份有限公司 Night intelligent high beam control system and method
CN211880469U (en) * 2020-03-19 2020-11-06 广汽蔚来新能源汽车科技有限公司 Light filling control circuit, DMS camera, fatigue driving monitoring system and automobile
CN215284766U (en) * 2021-07-06 2021-12-24 成都意逸无线科技有限公司 STM 32-based night vehicle safe driving system

Similar Documents

Publication Publication Date Title
CN215284766U (en) STM 32-based night vehicle safe driving system
CN109782764A (en) A kind of unmanned logistics distribution system of intelligent solar, control method and dispensing vehicle
CN113370985A (en) STM 32-based night vehicle safe driving system
CN209426573U (en) A kind of pure electric vehicle controller
CN208889287U (en) A kind of vertical billboard of intelligence
CN109017226B (en) Novel vehicle-mounted aromatherapy machine for vibration detection
CN114089769A (en) Control method for automatic operation electric sweeper
CN202703407U (en) Automobile high beam light and low beam light automatic switching and obstacle early warning system
CN208063533U (en) Power carrier type load control circuit
CN105430798A (en) Daytime running outline marker lamp system of motor vehicle
CN216362702U (en) Lawn lamp for assisting plant production
CN105150919A (en) Rear-end collision preventing system and method
CN209852259U (en) Anti-collision and anti-theft alarm system for automobile
CN214822884U (en) Intelligent light-off protection system for automobile
CN103439899A (en) Low-power-consumption multifunctional infrared sensing garbage can circuit and control method
CN204506691U (en) A kind of automatic light controller
CN2823046Y (en) Intelligent radar for backing car
CN112213637B (en) Intelligent network automobile fault detection device
CN205374005U (en) Analogue means of on -vehicle light modulator
CN203951663U (en) Bicycle Tail Light intelligence instruction control system
CN205844530U (en) A kind of electric-power metering special operation engineering truck superelevation anti-collision alarming device
CN211905513U (en) Current alarm test circuit with feedback signal and priority test sequence
CN111278196A (en) Tunnel emergency lamp detection control method and system
CN2300184Y (en) Passive infrared sensing automatic switch
CN212698853U (en) Driver driving state detection system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination