The content of the invention
When the present invention solves the voltage that traditional approach exports to multi-channel dc power supply module while detected, circuit design is multipleThe problem of miscellaneous, and detection detection limit value of the circuit by software set voltage of the present invention, it is not necessary to design changing for hardware circuitIt is dynamic, and can realize that the voltage real-time online exported to the voltage module to break down detects.
Technical scheme provided by the invention:The detection circuit that a kind of voltage to the output of multiple power supplies module is detected,Stating detection circuit includes power selection circuit, sample circuit, control circuit and cue circuit, wherein:
The control circuit is electrically connected with the power selection circuit, to send and need to the power selection circuitNumbering corresponding to the power module of test;
The power selection circuit is electrically connected with each power module for needing to test, the power selection circuit gatingPower module corresponding with the numbering that the control circuit is sent, institute is sent to by the voltage signal of the power module of the gatingState sample circuit;
The voltage signal that the sample circuit is sent to the power selection circuit samples, the voltage that sampling is obtainedValue is sent to the control circuit;
The control circuit judges whether the magnitude of voltage exceeds corresponding to the numbering in voltage range, described in judgementMagnitude of voltage exceeds corresponding to the numbering during voltage range, controls the cue circuit to carry out alarm.
Optionally, the control chip in control circuit, which prestores, is stored with voltage model corresponding with each power module respectivelyEnclose.Here voltage range can be stored in advance in control chip, can also reprogram write-in as needed.
Optionally, i in the operating condition, is initialized as 1 by the control circuit, and it is pre- to judge whether i-th of numbering is more thanDefinite value, when i-th of numbering be not more than the predetermined value, send described i-th to the power selection circuit and number, by i+1,Continue executing with it is described judge i-th of numbering the step of being more than predetermined value, until i-th of numbering is more than the predetermined value, then terminate.
Optionally, the control circuit in a debug state, determines selected numbering, is sent out to the power selection circuitSend the numbering.
Optionally, the control circuit is included by least two selecting switch that form of switch, the control circuit according toThe open and-shut mode of inductive switch is determined whether to enter working condition in the selecting switch, or whether enters debugging mode, it is describedControl circuit determines the selected numbering according to the open and-shut mode respectively switched in the selecting switch.
Optionally, the quantity of the power module for needing to test is 16, and the selecting switch includes five switches, eachSwitch connects with the corresponding input port of the control chip in the control circuit respectively, when first switch is opened, the controlIn running order one kind with debugging mode of control chip in circuit processed, when first switch closes, the control electricityThe in running order another kind with debugging mode of control chip on road, is adjusted when the control chip in the control circuit is inDuring examination state, the control chip determines selected numbering according to the open and-shut mode combination of remaining four switches.
Optionally, it is described need test power module output nominal voltage be respectively ± 5V, ± 9V, ± 12V and3.3V, the selecting switch include four switches, and each switch is corresponding with the control chip in the control circuit defeated respectivelyInbound port connects, when first switch is opened, the control chip of the control circuit is in running order and debugging mode inOne kind, when first switch closes, the in running order another kind with debugging mode of control chip of the control circuit,When the control chip in the control circuit is in debugging mode, opening and closing shape that the control chip switchs according to its excess-threeState combination determines selected numbering.
Optionally, the cue circuit includes several warning lights, and each warning light is electrically connected with the control circuit;
The control circuit is when judging that the magnitude of voltage exceeds voltage range corresponding to the numbering, control and the volumeWarning light bright light corresponding to number.
Optionally, the sample circuit is after the voltage selected the power selection circuit samples, after samplingVoltage carry out A/D conversions, the magnitude of voltage after conversion is sent to the control circuit by data-out port, and eachAfter conversion end, conversion end signal is sent to the control circuit by signal output port;
The control circuit receives the magnitude of voltage that the sample circuit is sent and is replaced storage, turns receiving every timeChange after end signal, read the magnitude of voltage of storage.
Optionally, the quantity of the power module for needing to test is 16, and the power selection circuit includes first choiceDevice, second selector and third selector, the first selector and the second selector are eight to select a selector, describedThree address ports and an address port of the third selector and institute of first selector and the second selectorThe numbering output port for stating control unit is connected.
For the present invention in addition to it can carry out detection alarm to multiple power supplies module output voltage simultaneously, circuit is provided with workAnd debugging mode, under mode of operation, circuit is realized to multiplexer channel machine cycle detection by monolithic, can be passed through under debugging modeDIP switch manual selects corresponding sense channel, it is not necessary to which borrowing instrument and meter can, sense channel is corresponding directly selected by readingThe concrete numerical value of power module output voltage.Debugging is convenient, reduces workload.
It should be appreciated that the general description and following detailed description of the above are only exemplary, this can not be limitedInvention.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related toDuring accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodimentDescribed in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appendedThe example of the consistent apparatus and method of some aspects being described in detail in claims, of the invention.
Fig. 1 is the detection detected to the voltage of multiple power supplies module output provided in one embodiment of the inventionThe structural representation of circuit, the detection circuit include power selection circuit 110, sample circuit 120, control circuit 130 and promptingCircuit 140.
Control circuit 130 is electrically connected with power selection circuit 110, to be sent to power selection circuit 110 for indicatingNeed the numbering of power module tested.
In order to ensure that the voltage that can be exported to multiple power modules is tested, for the electricity of each power module outputPressure value is probably different situations, be stored with the control chip in the application in control circuit 130 respectively with each power supplyNumbered corresponding to module, and the voltage range corresponding with each power module.
Optionally, by the numbering corresponding with power module, the voltage of power module in the control chip in control circuit 130The one-to-one binding storage of scope.
Optionally, the numbering corresponding with power module stored in the control chip in control circuit 130 is not power supplyThe exclusive identification code of module, simply corresponded with being currently needed for the power module of test.For example, the electricity if desired testedSource module is 16, then encodes the character string being made up of tetrad, the corresponding power module of each character string.AgainFor example, the power module if desired tested be 8, then coding be by triad array into character string, each wordThe corresponding power module of symbol string.
Optionally, the quantity for the power module tested as needed, can be by Software Coding mode to control circuit 130In control chip in the numbering corresponding with power module that stores set.
Optionally, can be by Software Coding mode to control circuit 130 according to the nominal voltage of the output of power moduleIn control chip in voltage range corresponding to each power module for storing set and changed.
Power selection circuit 110 needs the power module tested to be electrically connected with each, the gating of power selection circuit 110 withPower module corresponding to the numbering that control circuit 130 is sent, sample circuit is sent to by the voltage signal of the power module of gating120。
The voltage signal that sample circuit 120 is sent to power selection circuit 110 samples, the magnitude of voltage that sampling is obtainedIt is sent to control circuit 130.
Whether the decision voltage value of control circuit 130 exceeds corresponding to the numbering in voltage range, exceeds in decision voltage valueDuring beyond corresponding to numbering in voltage range, control cue circuit 140 carries out alarm.
Here cue circuit 140 can carry out alarm by indicator lamp, can also be carried out by Audio PlayersAlarm, alarm can also be carried out by word or graphic alphanumeric display, alarm of the present embodiment to cue circuit 140 carriesThe mode shown is without limiting.
For the ease of understanding the detection circuit of the application offer, with reference to Fig. 2 to Fig. 6 to detection circuit and detection electricityThe testing process on road illustrates.In actual applications, the detection circuit that the application provides can be carried out to multiple power supplies moduleDetection, below the road power modules of Yi Dui 16 carry out detection and be illustrated.
Shown in Figure 2, it is the schematic diagram of the power selection circuit provided in one embodiment of the invention, the power supplyThree selectors (first selector N4, second selector N5 and third selector N6 can be designated as) are included in selection circuit, theOne selector N4 and second selector N5 is eight to select a selector, than AD7501KQ chips as shown in Figure 2.
First selector N4 eight input port S1-S8 are respectively connected to eight road power modules, and the eight of second selector N5Individual input port S1-S8 is respectively connected to eight road power modules.
First selector N4 three address ports A0, A1 and A2 and second selector N5 three address port A0,Numbering output ends of the A1 and A2 and third selector N6 address port A0 with the control chip in control circuit 130Mouth (i.e. control chip D2 P20-P23 ports in Fig. 4) is connected.Control chip so in control circuit 130 can be by fourThe coding that string of binary characters is formed is sent to power module selection circuit 110, realizes from 16 battery core modules and selects an electricityCore module.
Optionally, third selector N6 can be with first selector N4 and second selector N5 identical chips, thanSuch as it is AD7501KQ chips.
Third selector N6 determines it is gating first selector N4 institutes according to the binary system value in precalculated position in the codingThe power module of connection, or the power module that gating first selector N5 is connected.First selector N4 and first selectorN5 then determines which power module accessed gated by its excess-three binary system value in the coding.For example, withThe power module that the coding of four binary systems formation, first binary system value are accessed by 0 gating first selector N4, theExemplified by the power module that one binary system value is accessed by 1 gating first selector N4, when being encoded to 0000, it is determined that gatingPower module be first selector N4 first access interface access first via power module;When being encoded to 0001, reallySurely the first via power module that second access interface that the power module gated is first selector N4 accesses;It is encoded to 1000When, it is determined that the first via power module that first access interface that the power module of gating is second selector N5 accesses;CodingFor 1001 when, it is determined that gating power module be second selector N5 second access interface access first via power supply mouldBlock.
In actual applications, after the voltage of the power module per road is normalized to 1.5V respectively by divider resistance, then lead toThe voltage follower that power module selection circuit 110 is sent to chip N7AD712 amplifiers composition is crossed, rear class is sent to and uses circuit120 are sampled.
Sample circuit 120 is carried out after the voltage selected power selection circuit 110 samples to the voltage after samplingA/D is changed, and the magnitude of voltage after conversion is sent into control circuit 130 by data-out port, and each conversion end itAfterwards, conversion end signal is sent to control circuit 130 by signal output port.
Shown in Figure 3, it is the schematic diagram of the sample circuit provided in one embodiment of the invention, and this uses circuit130 sampling A/D chip selects MC14433 chips, and MC14433 chips are the 3 1/2 biproduct parting A/ made using CMOS technologyD converters.
± 5V dual power supplies are used in sample circuit 120,10,11 pin connect 300K Ω resistance, to produce insideClock signal.4th, the external 470K Ω of 5,6 pin integrating resistor and a 0.1uF integrating capacitor, indirect one of 7,80.1uF offset compensation electric capacity, MC14433 chip operation power supplies are ± 5V, and positive supply connects VDD, analog portion negative supply terminationVEE, simulation ground VAG and digitally VSS are connected to common ground end.
In order to improve the antijamming capability of power supply, positive and negative power supply holds phase through the μ F and VSS (VAG) of decoupling capacitor 0.1 respectivelyEven.The A/D transformation results of MC14433 chips are exported using dynamic scan, on the one hand by Q4~Q1 4 BCD of output, while byDS4~DS1 exports 4 position gating signals, on the P1 mouths for the control chip AT89C51 they being connected in control circuit 130.SeparatelyOutside, 2V benchmark job voltage is provided in sample circuit 120 using chip AD680 for chip MC14433.
Chip MC14433 EOC ends export the conversion end signal for indicating A/D conversion ends, and A/D is changed each timeAt the end of, EOC ends all export the pulse of 1/2 clock period wide.The EOC ends and the control chip in control circuit 130AT89C51 P33 is connected.
When the DU ends to chip MC14433 input a positive pulse, transformation result (the i.e. Q1- of current A/D change-over periodsThe data that Q4 and DS1 to DS4 is exported) by the output latch in the control chip AT89C51 being sent in control circuit 130Device, exported through variable connector, otherwise by transformation result original in output latch.So DU ends are connected with EOC ends, with selectionContinuous conversion regime, the output latch that each transformation result is all delivered in control chip AT89C51, positive pulse signal conductAT89C51 INT1 interrupt request singal, after the CPU response interrupt requests in control chip AT89C51, it can determine whether to be sent to P1Whether the data on mouth have a gating signal, if there is position gating signal, are just stored in the data on Q4~Q1 output linesCorresponding data field is preserved.
Kilobit is corresponded to the signal at DS1 ends, the signal at DS2 ends is corresponding hundred, and the signal at DS3 ends is corresponding ten, DS2 ends, then will be from Q4~Q1 output lines when control chip AT89C51 determines to receive the signal at DS1 ends exemplified by corresponding position of signalOn the data that receive be stored in the data field of kilobit and preserved;When control chip AT89C51 determines to receive the letter at DS2 endsNumber when, then the data received from Q4~Q1 output lines are stored in the data field of hundred and preserved;Work as control chipWhen AT89C51 determines to receive the signal at DS3 ends, then the data received from Q4~Q1 output lines are stored in the number of tenPreserved according to area;When control chip AT89C51 determines to receive the signal at DS4 ends, then will be connect from Q4~Q1 output linesThe data field that the data received are stored in a position is preserved.
Here set the voltage value data after conversion to be stored in 20H, 21H unit of control chip AT89C51 internal RAMs, latticeFormula such as Fig. 4.Initialization program opens CPU and interrupted, it is allowed to the interrupt requests of external interrupt 1, puts external interrupt 1 to jump along triggering sideFormula.Each A/D conversion ends, are all interrupted to CPU request, and CPU responses are interrupted, and perform interrupt service routine, read A/D conversionsAs a result.
A/D conversion routines:
Control circuit 130 is receiving the magnitude of voltage of the transmission of sample circuit 120 and is being replaced storage, turns receiving every timeChange after end signal, read the magnitude of voltage of storage, i.e., control circuit 130 by from DS1-DS4 and Q1-Q4 line receivers toVoltage value data is replaced storage, and according to from EOC line receivers to conversion end signal, read the magnitude of voltage number of storageAccording to.
In actual applications, in order that the detection mode of detection circuit is diversified, the detection circuit in the application providesTwo kinds of detection modes, a kind of is the automatic detection mode when the control chip of control circuit 130 is in running order, anotherIt is that the control chip of control circuit 130 is in the mode detected during debugging mode to selected voltage module.
In order to realize that the state to control chip adjusts, the control circuit 130 in the application also includes by least twoThe selecting switch of individual switch composition, control circuit 130 can determine whether according in selecting switch to the open and-shut mode of inductive switchInto working condition, or whether enter debugging mode, control circuit 130 can be according to the open and-shut mode respectively switched in selecting switchDetermine selected numbering.
Shown in Figure 5, it is the schematic diagram of the control circuit and cue circuit provided in one embodiment of the invention,Control chip in the control circuit 130 is AT89C51, in addition, also including switching the choosing formed by four in control circuit 130Select switch S2.
If desired when the nominal voltage for the power module output tested includes 7 kinds, for example it is respectively ± 5V, ± 9V, ± 12VAnd 3.3V, selecting switch S2 here can include four switches, each switch respectively with the control chip in control circuit 130Corresponding input port P34-P37 connections.
If desired when the quantity for the power module tested is 16 kinds, selecting switch S2 can include five switches, Mei GekaiClose and connected with the corresponding input port of the control chip in control circuit 130.
In actual applications, the control for opening or closing state, determining in control circuit 130 of any one switch can be utilizedWhether coremaking piece enters working condition, or whether enters debugging mode.Determined with first switch control in control circuit 130Exemplified by the state of control chip, when first switch is opened, the control chip in control circuit 130 is in running order and debugsOne kind in state, during first switch closure, the control chip of control circuit is in running order and debugging mode in it is anotherIt is a kind of.
When the control chip in control circuit is in debugging mode, rest switch of the control chip in selecting switchOpen and-shut mode combination determine selected numbering.
Such as when second of selecting switch switch is closure, the 3rd switch and the 4th switch are opening, controlChip determines that selected numbering is 001.
Shown in Figure 6, it is that the voltage to the output of multiple power supplies module provided in one embodiment of the invention entersThe flow chart of row detection, testing process are as follows:
Step 601, control chip is initialized;
During the initialization said here, including the initialization to numbering and voltage range, and will subsequently need to useI values initialized, for example be initialized as 1.Obviously, in actual applications, can be with according to the rule of Software Coding programI values are initialized as 0, contrast is without limiting in the application.
Step 602, whether control chip enters working condition;
Here whether can be 1 by the value for the P3.4 for judging control chip to determine whether control chip enters workState.
Obviously, P3.4 value is determined by the open and-shut mode of first switch of selecting switch here, this implementationIn example when the P3.4 values for being are 1, then control chip enters working condition, i.e. step 603, and otherwise, control chip, which enters, to be adjustedExamination state, i.e. step 612.
Step 603, control chip enters working condition;
Step 604, control chip determines i-th current of numbering;
Step 605, control chip judges whether i-th of coding is more than predetermined value;
Here predetermined value tests the quantity of power module to determine by i initialization value and needing, such as, iInitialization value is 1, it is necessary to which it is 16 to test power module, then predetermined value is 16.Also for example, i is initialized as 0, it is necessary to testPower module is 16, then predetermined value is 15.
Obviously judgement body here can also be:Judge whether i-th of coding is equal to predetermined value.In this case, when etc.When predetermined value, then perform and once the gating of power module, sample circuit are sampled to the voltage of the power module of gatingIt is sent to after control chip, control chip last time judges whether the magnitude of voltage exceeds voltage range corresponding to the codingInterior, if the magnitude of voltage exceeds voltage range corresponding to the coding, control cue circuit carries out alarm, detection of end streamJourney;If the magnitude of voltage exceeds voltage range corresponding to the coding, detection of end flow.
Step 606, when i-th of numbering is not more than predetermined value, control chip sends i-th of volume to power selection circuitNumber;
When i-th of numbering is not more than predetermined value, then show that power module corresponding to this i-th numbering is not yet detected,Now control chip sends this i-th numbering to power selection circuit, to control power selection circuit selection and this i-th numberingCorresponding power module.
When i-th of numbering is more than predetermined value, then show that all power modules have finished after testing, now detection of endFlow.
Step 607, power selection circuit gates power module corresponding to i-th of numbering;
Step 608, sample circuit carries out voltage sample to the power module of gating;
Step 609, whether control chip judges the magnitude of voltage of sampling beyond the corresponding voltage range of selected numbering;
Step 610, when control chip judges the magnitude of voltage of sampling beyond selected numbering corresponding voltage range, electricity is promptedRoad carries out alarm;
When control chip judges the magnitude of voltage of sampling beyond selected numbering corresponding voltage range, show that the numbering is correspondingThe magnitude of voltage of power module output exist abnormal, now then control cue circuit to carry out alarm.
When control chip judges the magnitude of voltage of sampling without departing from voltage range corresponding to selected numbering, then show the numberingThere is no exception in the magnitude of voltage of corresponding power module output, now then perform step 612.
Step 611, i+1 is continued executing with step 605 by control chip;
Step 612, control chip enters debugging mode;
Step 613, control chip determines to number according to the open and-shut mode of selecting switch;
Step 614, control chip sends the numbering to power selection circuit;
Step 615, power selection circuit gates power module corresponding to the numbering;
Step 616, sample circuit carries out voltage sample to the power module of gating;
Step 617, whether control chip judges the magnitude of voltage of sampling beyond the corresponding voltage range of selected numbering;
Step 618, when control chip judges the magnitude of voltage of sampling beyond selected numbering corresponding voltage range, electricity is promptedRoad carries out alarm.
It will be apparent that in above-mentioned flow, can also be to i value if there is the power module that several need not be detectedIt is controlled, to exclude the numbering for the power module that need not be detected, this is the programming that those skilled in the art can realizeAlgorithm, just repeat no more here.
In order to realize the alarm to multiple power supplies module, when alarm mode is to be prompted by warning lightWhen, in the present embodiment, P0.0, P0.1, P0.2, P0.3, P0.4 of control chip pass through D4SN54LS05 inverter drives respectivelyFive LED lights of H1, H2, H3, H4, H5, according to the height of P0 mouth level, the light on and off of upper 5 LEDs of P0 mouths can be driven,According to the light on and off state of 5 LEDs, the abort situation of power supply can be known.Obviously, if during 16 road power module,Above-mentioned indicator lamp can also only select 4.In practical application, power module that the selection of indicator lamp quantity detects as neededQuantity determines.The radix-minus-one complement of numbering is given to other external modules by D5 direction devices, contrast relationship is shown in Table 1 simultaneously.
Table 1
So that detected output voltage values are ± 5V, ± 9V, ± 12V and 3.3V seven kinds of power modules as an example, failure reportAlert voltage (i.e. voltage span) is set to nominal value U (1 ± 10%), and when circuit power breaks down, LED light isIndicated, the relation of numbering corresponding to power module and light emitting diode is as shown in table 2 below.
Table 2
In summary, the detection electricity that the output voltage provided in an embodiment of the present invention to multiple power supplies module is detectedRoad, in addition to it can carry out detection alarm to multiple power supplies module output voltage simultaneously, circuit is provided with work and debugging mode,Under mode of operation, circuit is realized to multiplexer channel machine cycle detection by monolithic, and hand can be switched by DIP under debugging modeIt is dynamic to select corresponding sense channel, it is not necessary to it is defeated to borrow instrument and meter can directly sense channel corresponding power module selected by readingGo out the concrete numerical value of voltage.Debugging is convenient, reduces workload, and circuit structure is simple, reduces manufacturing cost.
Those skilled in the art will readily occur to the present invention its after considering specification and putting into practice the invention invented hereIts embodiment.The application be intended to the present invention any modification, purposes or adaptations, these modifications, purposes orPerson's adaptations follow the general principle of the present invention and the common knowledge in the art do not invented including the present inventionOr conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by followingClaim is pointed out.
It should be appreciated that the invention is not limited in the precision architecture for being described above and being shown in the drawings, andAnd various modifications and changes can be being carried out without departing from the scope.The scope of the present invention is only limited by appended claim.