• Precise program control current supply design and application

        Abstract: The precise program control current supply uses the USB correspondence pattern, has the temperature survey and the output current misalignment temperature compensation function, the output current accuracy is high, the stable property is reliable. In the article introduces this current supply the circuit design, the control software design and the application.

        Key word: USB main line misalignment temperature compensation temperature survey XTR110

    1 system survey

    The program control current supply has the output current scope width, the accuracy to be high, power big and so on characteristics, is the composition automated test system and the verification system’s essential instrument, widely uses in war industry and so on Industrial and mining establishment, scientific research national defense equipment and so on unit’s in metering devices, automated demarcation. This article introduced precise program control current supply besides the above characteristic, but also has the USB main line correspondence, the temperature survey and the output current misalignment temperature compensation function.

        System gross structure as shown in Figure 1, the precise program control current supply by the micro controller (MCU) the unit, the USB connection unit, the temperature survey unit, the output current calibration unit, the signal output unit and the power source unit is composed. The MCU unit realizes through the USB connection unit with the superior machine correspondence, obtains the control command from the superior machine and returns to the corresponding data, simultaneously analyzes the superior machine order control signal output signal, completes the final electric current output. Temperature survey unit and the output current calibration unit completes the output current together the misalignment temperature compensation. The power source unit provides to other units needs the power source. The precise program control current supply also includes units and so on overflow examination, system self-check, relay isolation output, further enhanced system’s intelligence and the reliability.

    2 system circuit designs

    2.1 USB connection unit

    The precise program control current supply through the USB main line and the superior machine connection, the USB connection’s heat inserted pulls out, high speed and namely inserts namely simplified the system design greatly with the characteristic, has facilitated the current supply and the superior machine correspondence, USB connection unit electric circuit as shown in Figure 2.

    In the chart, FT232AM completes the USB main line to the MCU serial port holding wire’s transformation, so that the superior machine hypothesized can become USB traditional the serial port, thus simplified the driver, is advantageous realizes the USB main line and the MCU correspondence. In order to avoid disturbance between the USB signal and the supply oscillator, selects the light pair component (in chart U29) to realize it with the MCU isolation, sharpens system’s antijamming ability.

    2.2 MCU and external connection units

    Micro controller MCU is the precise program control current supply core control unit, it with temperature survey unit and output current calibration unit’s interface circuit as shown in Figure 3.

    The MCU unit selects at89C51 monolithic integrated circuit construction movement environment, completes to the current supply system’s control, including exterior expands ROM, exterior to expand RAM, the hardware watch-dog, the hardware address decoder and so on.

    Figure 2

        Considered the component input level along with the temperature change, MCU external connection temperature survey unit and the output current calibration unit completes the output current the misalignment temperature compensation, its principle is the output current calibration unit preserves in various temperature range between the different hypothesis magnitude of current and the actual value of exports error, this error obtains through the actual survey, is called the correction coefficient. When system work, may obtain the current operating temperature through the temperature survey unit, is multiplied by the correction coefficient with this operating temperature correspondence’s hypothesis magnitude of current, then completes the output current the misalignment temperature compensation, enhances the electric current greatly the output precision.

    The temperature survey unit’s core component is high accuracy digit temperature survey electric circuit AD7416 (in chart U19), it uses the IC main line and at89C51 connection, the survey ambient temperature scope for - 10℃~ 50℃, design MCU measures the temperature by the hexadecimal system form output.

    The output current calibration unit by M24C64 64k Bit the EEPROM constitution, uses for to store the current supply revision system value. MCU may carry on the read-write operation conveniently through the I2C main line to it, and defers to the invariable current supply the communication protocol to read in by 8 decimal digit forms with the read-out correction coefficient, thus has guaranteed to the output current precise misalignment temperature compensation.

    2.3 signal output unit

    The signal output unit completes the precise program control current supply the electric current to produce with outputs, including take 12 high accuracy DAC-HK12BGC DAC as the core DAC switching circuit and the level switching circuit which is composed after the TI Corporation’s precise voltage/commutator. MCU decodes the first superior machine instruction, then reads in the specific data to the DAC switching circuit to control its output the analogue voltage value. The latter level switching circuit receives the analogue voltage value which the DAC switching circuit outputs to complete the voltage to the electric current transformation, afterward outputs the superior machine hypothesis the electric current. Signal output unit electric circuit as shown in Figure 4.

    Figure 3

        In the chart, AT89C51 data line D0-B7 controls its analog output through two piece of 74HC573 and the DAC-HK12BGC connections, the controlled process is as follows: AT89C51 starts DAC through CS_DA and the 51_WR signal, when DAC low byte choice holding wire CS_DAL and the monolithic integrated circuit write enable the line 51_WR constitution the combinatory logic is effective, to DAC reads in the low 8 bit data, then reads in the high 4 bit data by the same way. To further increase the precision, the DAC out-port company has potentiometer W1, W2, uses for trimming Man Pianhe separately zero-bias.

    After DAC output analogue voltage signal DA_OUT turning on, level transformation electric circuit XTR110, provides the input first through its internal metallic film resistance network the reproduce by pantograph proportion and the electric current displacement, completes the voltage to the electric current transformation, then through IRF7104 field effect tube output current. XTR110 has 14 conversion accuracies, 0.005% misalignment, have guaranteed the conversion accuracy. Potentiometer W3, W4 use for the trimming output current separately zero-bias and, further increase the precision completely.

    3 monolithic integrated circuit control procedure design

    Has designed the complete communication protocol in the current supply system software, had stipulated current supply control command character which and corresponding returns data value obtains from the superior machine. The systems control procedure takes the control core by at89C51 monolithic integrated circuit, uses the assembly language compilation, divides into the master routine and the serial port interrupt handling routine 2 parts.

    3.1 master routine designs

    The master routine mainly completes the system parameters initialization, the system self-check, the serial port interrupt disposition and so on, flow as shown in Figure 5.

    Figure 4

        On after system electricity, MCU starts from address 0000H to carry out, the master routine entry point address is 0050H. System initialization including initialization storehouse, initialization DAC, initialization serial port, initialization register, initialization watch-dog and so on. The partial master routines are as follows.

    MOV SP,#58H; Initialization storehouse indicator

    MOV A,#00H

    MOVX @DPTR, A; Initialization DAC

    NOP

    MOV A,#20H; Initialization timer 1, pattern 2

    MOV A, PCON

    ORL A,#80H

    MOV PCON, A; Hypothesis serial port wave line rate 19200

    SETB MODE; Establishes the system self-check

    SETB R_EN; Initialization self-checking relay

    MOV TX_PNT,#40H; Initialization serial port transmission buffer indicator

    MOV RX_PNT,#30H; Initialization serial port receive buffer indicator

    CPL WDI; Initialization watch-dog

    SETB TR1; Operates the timer 1

    SETB REN

    SETB ES; Opens the serial port interrupt

    SETA EA; Opens the monolithic integrated circuit interrupt

    MOV STATUS,#01H; Enters the running status

    3.2 serial port interrupt handling routine

    The serial port interrupt handling routine is the monolithic integrated circuit control procedure hard core, the serial port receive superior machine order character, simultaneously analyzes the order to control the hardware circuit work, flow as shown in Figure 6.

    Take establishes the electric current to output this most important order as the example, the serial port interrupt handling routine receives the hypothesis the magnitude of current (16 to enter system number expression first by 3), then by the monolithic integrated circuit through the I2C main line read current temperature value and the correction coefficient, is multiplied by the correction coefficient by the system software control hypothesis magnitude of current to obtain the actual value, thus completes the misalignment temperature compensation, the monolithic integrated circuit may act according to the actual value to establish the DAC output voltage, the control final electric current output, in the monolithic integrated circuit serial port interrupt handling routine main code is as follows:

    ; *********************;

    SET_V:MOV A,37H; Obtains the hypothesis magnitude of current highest order

    ANL A,#0F0H

    CJNE A,#30H, PACK1 ……

    PACK1:MOV A,37H

    CLR C

    SUBB A,#37H

    PACK2:MOV R2, A; The highest order deposits R2

    MOV A,38H

    ANL A,#0F0H

    CJNE A,#30H, PACK3 ……

    PACK3:MOV A,38H

    CLR C

    SUBB A,#37H

    PACK4:MOV R1, A; The sandwich digit stores R1

    MOV A,39H

    ANL A,#0F0H

    CJNE A,#30H, PACK5 ……

    PACK5:MOV A,39H

    CLR C

    SUBB A,#37H

    MOV R0, A; The most low position stores R0

    MOV A, R1

    SWAP A

    ORL A, R0

    MOV R0, A; Most low position and sandwich digit merge

    MOV DPTR,#CS_DAH

    MOV A, R2

    MOVX @DPTR, A

    MOV DPTR,#CS_DAL

    MOV A, R0

    MOVX @DPTR, A

    MOV DPTR,#CS_DA; Establishes the DAC output

    MOV A,#00H

    MOVX @DPTR, A; Renews DAC

    RET

    ; ************************************************;

    The monolithic integrated circuit through the I2C main line read current temperature value and correction coefficient’s procedure with it, here only gives the read temperature value procedure:

    ; Read A Byte From AD7416 E2RPOM

    ACALL RDBYTE; Read temperature value top digit

    MOV R1, A; Stores R1

    CLR TMSDA; ACK

    NOP …… ; NOP instruction

    SETB TMSCL

    NOP ……

    CLR TMSCL

    NOP ……

    SETB TMSDA

    ACALL RDBYTE; Read temperature value low position

    MOV R0, A; Stores R0

    SETB TMSDA; N0 ACK

    NOP ……

    SETB TMSCL

    NOP ……

    CLR TMSCL

    NOP ……

    CLR TMSDA

    NOP ……

    SETB TMSCL

    SETB TMSDA; Stop

    ; Read A Byte From AD7416 E2PROM

    RDBYTE:MOV R0,#08H

    RDBIT:SETB TMSCL; SCL maintains the high level

    MOV C, TMSDA

    RLC A

    CLR TMSCL; SCL maintains the low level, the SDA level change

    NOP ……

    DJNZ R0, RDBIT; Read off the conclusion

    RET

    4 concluding remark

    The above introduction’s precise program control current supply output current is 0~20mA, the programming step-by-steps the electric current for 100μA, the current error is smaller than 50μA, obtained the very good application in some aircraft-borne signal conditioner automation calibration system. Should automate each kind of input signal which the calibration system may the simulated signal regulator need, and uses the recuperation signal which the gathering equipment signal conditioner outputs, then carries on analyzes and completes the aircraft-borne signal conditioner’s automatic detection and the demarcation, may increase the examination precision greatly, the examination efficiency and reduces the personnel work load.

    Share/Save/Bookmark

    Sunday, January 4th, 2009 at 19:14
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3