A kind of embedded device multiple feed device
Technical field
The utility model discloses a kind of embedded device multiple feed device, be specially a kind of multiple feed device being formed by solar panels, civil power and storage battery, relate to the power supply control technology field of embedded device.
Background technology
For some outdoor uses, unattended real-time information collection or the real-time important embedded device of controlling, the reliability of its power supply is most important, if power supply interrupts suddenly, very easily cause the loss of important information or cause the collapse of whole control system, cause irremediable loss.Adopt the mode of multiple feed can improve well the reliability of embedded device power supply.In addition, for the untouchable outdoor embedded device of some civil powers, adopting with the power supply of solar panels and storage battery is a kind of solution preferably; For some civil powers can and outdoor embedded device, adopt taking solar panels as main power supply, storage battery as the solution of stand-by power supply power supply, the emergency power supply of civil power under abnormal conditions can environmental protection and energy saving.In existing technological means, the electric supply installation of embedded device, the type of its power supply is often more single, and great majority are directly powered for civil power passes through step-down; Also some utilizes the solar powered equipment as power supply, but its selection and switching to power supply lacks corresponding Based Intelligent Control means.Meanwhile, in prior art, lack the Real-Time Monitoring means to embedded device electric supply installation, cannot pinpoint the problems and deal with problems in advance by examination and controlling timely.
Utility model content
Technical problem to be solved in the utility model is: for the defect of prior art, a kind of embedded device multiple feed device is provided, " seamless " intelligence that realizes solar panels, storage battery, three kinds of power supplies of civil power is switched, and taking storage battery as stand-by power supply, the mode of power supply is filled up the power supply gap of handoff procedure; Simultaneously can carry out Based Intelligent Control to the process of storage battery charge and discharge, solve all powerup issues of embedded device in unavailable situation of solar panels and civil power.
The utility model is for solving the problems of the technologies described above by the following technical solutions:
A kind of embedded device multiple feed device, comprise solar panels, 220V civil power AD/DC modular converter, storage battery, photosensitive circuit, the first voltage detection module, second voltage detection module, tertiary voltage detection module, the first branch road power supply state detection module, the second branch road power supply state detection module, accumulator electric-quantity detection module, sampling resistor (R1), metal-oxide-semiconductor switch, the first Schottky diode (D1), the second Schottky diode (D2), the 3rd Schottky diode (D3), the first relay (K1), the second relay (K2), the 3rd relay (K3), drive circuit, power bus module, multi-voltage grade output module, embedded MCU,
The input of output respectively with the first voltage detection module of described solar panels, one end of the first Schottky diode (D1), the first input end of the first branch road power supply state detection module is connected, photosensitive circuit is connected with solar panels, the output of photosensitive circuit, the output of the first voltage detection module, the output of the first branch road power supply state detection module is connected with embedded MCU respectively, the second input of the other end respectively with the first branch road power supply state detection module of the first Schottky diode (D1), one end of the first relay (K1) is connected, the other end of the first relay (K1) is connected with power bus module, the input of the first relay (K1) is connected with embedded MCU through overdrive circuit,
The output of described 220V civil power AD/DC modular converter respectively with the input of second voltage detection module, one end of the second Schottky diode (D2), the first input end of the second branch road power supply state detection module is connected, the output of second voltage detection module is connected with embedded MCU, the second input of the other end respectively with the second branch road power supply state detection module of the second Schottky diode (D2), one end of the second relay (K2) is connected, the other end of the second relay (K2) is connected with power bus module, the input of the second relay (K2) is connected with embedded MCU through overdrive circuit,
The charging input end of described storage battery is connected with one end of metal-oxide-semiconductor switch, the other end of metal-oxide-semiconductor switch is connected with power bus module, the input of metal-oxide-semiconductor switch is connected with embedded MCU through overdrive circuit, the electric discharge output of storage battery respectively with the input of tertiary voltage detection module, the first input end of accumulator electric-quantity detection module, one end of sampling resistor (R1) is connected, the output of the 3rd branch road power supply state detection module is connected with embedded MCU, one end of the other end the respectively with three Schottky diode (D3) of sampling resistor (R1), the second input of accumulator electric-quantity detection module is connected, the output of accumulator electric-quantity detection module is connected with embedded MCU, the other end of the 3rd Schottky diode (D3) is connected with one end of the 3rd relay (K3), the other end of the 3rd relay (K3) is connected with power bus module, the input of the 3rd relay (K3) is connected with embedded MCU through overdrive circuit,
Described power bus module is connected with multi-voltage grade output module.
As further preferred version of the present utility model, described multiple feed device also comprises the gsm module, buzzer and the LCD display that are connected with embedded MCU.
As further preferred version of the present utility model, the output voltage signal grade of multi-voltage grade output module comprises 24V, 12V, 9V, ± 5V, ± 3V.
As further preferred version of the present utility model, described branch road power supply state detection module comprises first to fourth accurate adjustable resistance (R4, R5, R6, R7), the first amplifier (U1), the second amplifier (U2);
One end of described the first accurate adjustable resistance is connected with the positive pole of Schottky diode, one end of the other end respectively with the second accurate adjustable resistance of the first accurate adjustable resistance, the positive input terminal of the first amplifier is connected, the other end ground connection of the second accurate adjustable resistance, the 3rd one end of accurate adjustable resistance and the negative pole of Schottky diode are connected, one end of the other end of the 3rd accurate adjustable resistance the respectively with four accurate adjustable resistance, the negative input end of the first amplifier is connected, the other end ground connection of the 4th accurate adjustable resistance, the output of the first amplifier is connected with the negative input end of the second amplifier, the output of the second amplifier is connected with embedded MCU, the positive input terminal input reference voltage of the second amplifier.
As further preferred version of the present utility model, the output voltage of described solar panels is 24V.
As further preferred version of the present utility model, described embedded MCU is STM32F107VCT6.
As further preferred version of the present utility model, described first, second amplifier is INA129.
The utility model adopts above technical scheme compared with prior art, there is following technique effect: " seamless " intelligence that the utility model has been realized solar energy, civil power, storage battery three kinds of power supplies is switched, preferentially power with that extensively exist, clean solar energy, fill up the power supply gap of handoff procedure in battery-driven mode, detect the scope of power supply voltage, guarantee that power supply is normal, cut off in time abnormal power supply, improved reliability and the fail safe of power supply.The utility model is for solving the reliable power supply of outdoor unattended embedded device, and especially for solving, civil power is unreachable, the reliable power supply problem of important embedded device has obvious advantage under sunshine sufficient environment.
Brief description of the drawings
Fig. 1 is the utility model the general frame.
Fig. 2 is in the utility model embodiment, branch road power supply state detection module connection layout.
Fig. 3 is in the utility model embodiment, battery tension, electric quantity detecting circuit connection layout.
Embodiment
Voltage detecting circuit in the utility model, the voltage that detects power supply whether in normal scope, guarantees that supply voltage enough can normally work to power bus power supply, system; Branch road power supply state detection module, detects whether civil power and solar energy are abnormal power supply state, and provides the failure diagnosis information of solar powered branch road in conjunction with photosensitive circuit module; Accumulator electric-quantity testing circuit, the real-time electric weight of detection storage battery; Storage battery charging management circuit, according to the dump energy control of storage battery whether to charge in batteries, and charging precision and speed; The electric weight of storage battery detects and Charge Management forms a negative feedback loop, and Embedded MCU realizes accurate, the safe charging of storage battery by control algolithm; Multi-voltage grade output circuit, the direct voltage of the exportable 24V of system, 15V, 12V, 9V, ± the 5V, ± different brackets such as 3.3V, meet the multiple voltage demand of different embedded devices, simultaneously each grade output is provided with power supply state indicator light, conveniently judges whether power supply is normal; LCD demonstration, TFT LCDs is for showing current power supply branch road, supply power voltage, the charging and discharging state of storage battery, the real-time electric weight of storage battery, fault alarm information etc.; Buzzer warning, in the time that power supply branch road breaks down, device sends buzzing alarming in time, reminds field personnel; Gsm module, in the time that power supply branch road breaks down, sends note by gsm module in time, notifies maintenance personal to repair as early as possible fault.
Described branch road power supply state detection module adopts the mode of the Schottky diode of connecting on power supply branch road, can prevent that power bus is to power supply reverse charging on the one hand, and another reverse side judges according to the voltage difference at diode two ends whether this branch road power supply is normal.The conduction voltage drop that if voltage difference approaches diode while normally working, this branch road power supply is normal; Otherwise this branch road abnormal electrical power supply, needs to cut off in time this power supply branch road.
Described accumulator electric-quantity testing circuit adopts the mode of the sampling with high precision resistance of connecting on power supply branch road, after once charging starts, the flow through electric current of sampling resistor and the integration of time obtains the electric weight of storage battery flowing into, add the electric weight before this time charging of storage battery, can obtain the electric weight of current storage battery.Electric weight before storage battery once charges obtains by electric weight and the voltage relationship estimation of storage battery.Because storage battery is connected on power bus as stand-by power supply always, its electric weight is relatively sufficient, therefore can judge relatively accurately electric weight according to voltage how many.
Described storage battery charging management circuit is made up of embedded MCU and metal-oxide-semiconductor switch control switch.Embedded MCU is exported precision and the speed of the Duty ratio control charging of PWM ripple by control.In the time that accumulator electric-quantity is less, increase the duty ratio of PWM ripple, strengthen output current with quick charge; In the time that accumulator electric-quantity is more sufficient, reduce the duty ratio of PWM ripple, reduce output current slowly to charge.The duty ratio of adjusting PWM ripple can also suppress excessive charging current, avoids the infringement to storage battery.
Below in conjunction with accompanying drawing, the technical solution of the utility model is described in further detail:
The utility model the general frame as shown in Figure 1, described embedded device multiple feed device, comprise solar panels, 220V civil power AD/DC modular converter, storage battery, photosensitive circuit, the first voltage detection module, second voltage detection module, tertiary voltage detection module, the first branch road power supply state detection module, the second branch road power supply state detection module, accumulator electric-quantity detection module, sampling resistor R1, metal-oxide-semiconductor switch, the first Schottky diode D1, the second Schottky diode D2, the 3rd Schottky diode D3, the first relay K 1, the second relay K 2, the 3rd relay K 3, drive circuit, power bus module, multi-voltage grade output module, embedded MCU, the input of output respectively with the first voltage detection module of described solar panels, one end of the first Schottky diode D1, the first input end of the first branch road power supply state detection module is connected, photosensitive circuit is connected with solar panels, the output of photosensitive circuit, the output of the first voltage detection module, the output of the first branch road power supply state detection module is connected with embedded MCU respectively, the second input of the other end respectively with the first branch road power supply state detection module of the first Schottky diode D1, one end of the first relay K 1 is connected, the other end of the first relay K 1 is connected with power bus module, the input of the first relay K 1 is connected with embedded MCU through overdrive circuit, the output of described 220V civil power AD/DC modular converter respectively with the input of second voltage detection module, one end of the second Schottky diode D2, the first input end of the second branch road power supply state detection module is connected, the output of second voltage detection module is connected with embedded MCU, the second input of the other end respectively with the second branch road power supply state detection module of the second Schottky diode D2, one end of the second relay K 2 is connected, the other end of the second relay K 2 is connected with power bus module, the input of the second relay K 2 is connected with embedded MCU through overdrive circuit, the charging input end of described storage battery is connected with one end of metal-oxide-semiconductor switch, the other end of metal-oxide-semiconductor switch is connected with power bus module, the input of metal-oxide-semiconductor switch is connected with embedded MCU through overdrive circuit, the electric discharge output of storage battery respectively with the input of tertiary voltage detection module, the first input end of accumulator electric-quantity detection module, one end of sampling resistor R1 is connected, the output of the 3rd branch road power supply state detection module is connected with embedded MCU, one end of the other end of sampling resistor R1 the respectively with three Schottky diode D3, the second input of accumulator electric-quantity detection module is connected, the output of accumulator electric-quantity detection module is connected with embedded MCU, the other end of the 3rd Schottky diode D3 is connected with one end of the 3rd relay K 3, the other end of the 3rd relay K 3 is connected with power bus module, the input of the 3rd relay K 3 is connected with embedded MCU through overdrive circuit, described power bus module is connected with multi-voltage grade output module.
Described embedded device multiple feed device adopts solar panels, civil power and three kinds of Power supplies of storage battery, and whether the sunlight that detects solar panels reception by photosensitive circuit is sufficient; Detect power supply voltage whether in rational scope by voltage detecting circuit; Whether the branch road that detects civil power and solar energy by branch road power supply state detection module occurs that power bus voltage is greater than the branch road abnormal electrical power supply situation that power supply voltage causes; Check the electric weight of storage battery by electric quantity detecting circuit; By drive circuit, control signal is connected to the coil of relay, to control the break-make of power supply branch road; By the output of I/O port, PWM controls metal-oxide-semiconductor switch on and off, to control precision and the speed to charge in batteries; MCU by embedded device receives LCD display by SPI, shows information and the warning message of power supply, power supply branch road, storage battery.Three-way power parallel connection is linked into power bus, and after multi-voltage grade output circuit is adjusted, exports multiple voltage gradation, for embedded device and peripheral circuit.
The voltage on R3 is as the sampled signal of the ADC of microprocessor STM32F107VCT6 (hereinafter to be referred as STM32) after R2, R3 dividing potential drop for the voltage that described voltage detecting circuit is got power supply, and STM32 calculates the supply power voltage of power supply branch road according to sampled value.
In the utility model embodiment, branch road power supply state detection module connection layout as shown in Figure 2.Described branch road power supply state detection module judges that by the pressure drop at Schottky diode two ends whether branch road power supply state is normal.Conduction voltage drop when Schottky diode D1 normally works is 0.18V.No. 1 pin of D1 is received the V of amplifier U1 (INA129) after by accurate adjustable resistance R4 and R5 dividing potential drop
in+(No. 3 pin), No. 2 pin of D1 are received the V of amplifier U1 (INA129) after by accurate adjustable resistance R6 and R7 dividing potential drop
in-(No. 2 pin) be output voltage V after U1 amplifies
out(No. 6 pin).V
outreceive the IN of comparator U2 (LM358)
-(No. 2 pin), the 0.1V being separated by bleeder circuit by 5V is as the input reference voltage V of U2
ref, receive the IN of U2
+(No. 3 pin).The V of U1
outand V
refthe low and high level of exporting more afterwards a standard is connected to the pin of STM32, as external interrupt signal.As the V of U1
outbe more than or equal to V
reftime, U2 exports high level, illustrates that this branch road power supply is normal; As the V of U1
outbe less than V
reftime, U2 output low level, illustrates this branch road abnormal electrical power supply.STM32 judges according to external interrupt signal, and the branch road of extremely powering in time cuts off.Due to the single-phase conducting principle of diode, diode can also prevent the power supply reverse charging of power bus to this branch road.
In the utility model embodiment, battery tension, electric quantity detecting circuit connection layout are as shown in Figure 3, described accumulator electric-quantity testing circuit obtains the electric weight of the storage battery of inflow by flow through after the starting electric current of sampling resistor and the integration of time of charging once, and obtain the electric weight before charging starts in conjunction with the supply power voltage estimation of storage battery, obtain the electric weight of current storage battery.Connect in the storage battery power supply branch road sampling with high precision resistance R 1 of a 50m Ω, gets 1 pin of R1 and the voltage difference △ V of 2 pin
r1make a decision, when to charge in batteries, △ V
r1for negative; When battery discharging, △ V
r1for just.The voltage at sampling resistor two ends is connected to the V of amplifier U5 (INA129) after dividing potential drop
in+(No. 3 pin) and V
in-(No. 2 pin) exports V after amplifying
out(No. 6 pin) is connected to the ADC of STM32
4the IN of port and comparator U6
-(No. 2 pin).STM32 converts analog voltage to digital voltage, and the charging and discharging currents value while calculating every sub-sampling draws the electric weight of the storage battery of inflow by the integration of electric current and time.Meanwhile, the output V of amplifier
outreference voltage V with U6
ref' output after is relatively connected to the I/O of STM32
1port, as the interrupt signal of MCU.
The break-make that described storage battery charging management circuit is exported PWM ripple control metal-oxide-semiconductor switch by MCU realizes.STM32, according to accumulator electric-quantity, adjusts duty ratio in time, controls precision and the speed of charging.In the time that accumulator electric-quantity is less, increase the duty ratio of PWM ripple, strengthen output current with quick charge; In the time that accumulator electric-quantity is more sufficient, reduce the duty ratio of PWM ripple, reduce output current slowly to charge.The duty ratio of adjusting PWM ripple can also suppress excessive charging current, avoids the infringement to storage battery.
By reference to the accompanying drawings execution mode of the present utility model is explained in detail above, but the utility model is not limited to above-mentioned execution mode, in the ken possessing those of ordinary skill in the art, can also under the prerequisite that does not depart from the utility model aim, make a variety of changes.