How to design a constant current source controller using the C8051FF330D microcontroller

Publisher:温雅如风Latest update time:2016-09-12 Source: eefocusKeywords:C8051FF330D Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
      In the rapidly developing electronic and telecommunication technology systems, the quality of the power supply determines the performance and life of telecommunication equipment to a certain extent. Although the digital control constant voltage technology on the market is relatively mature, digital control voltage source products have also developed towards the trend of intelligence and miniaturization, and the price is getting cheaper and cheaper.
      With C8051FF330D single-chip microcomputer as the control core, and using the I2C serial bus of C8051FF330D to expand peripheral devices, a program-controlled constant current source is designed with modular design method. Moreover, the whole power supply also has the characteristics of low power consumption, small size, small current ripple, high control accuracy and stable operation.
 

Tools/Raw Materials

  • C8051FF330D microcontroller, JTAG interface, LED digital tube, circuit diagram, keyboard
     
 

Steps/Methods

  1. The overall structure of the system: The 10-bit current-type digital-to-analog converter and current/voltage conversion circuit inside the C8051FF330D microcontroller are used to output an analog value of 0 to 4 V, and then this voltage signal is used to control the output current of the constant current source so that it changes according to a given value.How to design a constant current source controller using the C8051FF330D microcontroller? - mme2003 - Tomorrow's Eye Programming
     
  2. Output interface circuit: The 0-1 mA current signal output by the digital-to-analog converter in the internal circuit of C8051F330D is converted into a 0-2 V voltage signal through a reference resistor, and then converted into a 0-4 V standard signal output through an amplifier circuit. The analog output signal conversion circuit is shown in the figure.How to design a constant current source controller using the C8051FF330D microcontroller? - mme2003 - Tomorrow's Eye Programming

     
  3. Power-off protection circuit: To prevent the system from powering off, this design uses FM24CL04 as a non-volatile memory to protect system parameters and other intermediate data. Unlike EEPROM, FM24CL04 can be written at bus speed. It uses an industrial standard two-wire I2C interface. Figure 3 shows the power-off data protection circuit included with this power system.How to design a constant current source controller using the C8051FF330D microcontroller? - mme2003 - Tomorrow's Eye Programming
     
  4. Keyboard and display circuit; Using ZLG7290B dedicated chip can also simplify circuits and programs, and reduce the debugging burden of circuits. Moreover, as an industrial-grade display driver chip, ZLG7290B also has strong anti-interference ability. Figure 4 shows the schematic diagram of the keyboard and display driver circuit composed of C8051F330D microcontroller and ZLG7290B dedicated display driver chip.How to design a constant current source controller using the C8051FF330D microcontroller? - mme2003 - Tomorrow's Eye Programming
     
  5. Main program design: C language is used for software design to realize various functions of the system. The system application adopts modular structure design, mainly including main program, parameter call modification subroutine, DAC0 initialization program, etc. Figure 5 shows the main program flow chart.How to design a constant current source controller using the C8051FF330D microcontroller? - mme2003 - Tomorrow's Eye Programming
     
  6. Module function programming:
    Void DAC_Init (void)
      {
      REF0CN =0X30; /*Internal bias generator and voltage reference buffer work, reference is output from VREF pin*,
      ID0CB =0XF2;
      }
      The memory write function is as follows:
      Viod EEPROM_ByteWrite ( uchar i2caddr,uchar addr, uchar dat )
      {
      While (smb_busy)
      Smb_busy = 1;
      Target = i2caddr;
      Smb_w =write;
      Smb_sendwordaddr = 1;
      Smb_randomread = 0;
      Smb_ackpoll =1;
      Word_addr = addr;
      Smb_singlebyte_out = dat;
      Psmb_data_out =&smb_singlebyte_out;
      Smb_data_len =1;
      Sta = 1;
      }
      ……
     
 

Precautions

  • Be sure to follow the above steps during the production and configuration process
     
  • After the final success, some debugging is still required
Keywords:C8051FF330D Reference address:How to design a constant current source controller using the C8051FF330D microcontroller

Previous article:51 single chip microcomputer to make infrared remote control
Next article:315M MCU Wireless Decoding--HS2262

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号