




免费预览已结束,剩余13页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
An 80C31-Controlled Power SupplyEven if you are a novice, its pretty easy to control the power supplied to the circuits youre working on. In this article, noel introduces us to an 80C31-controlled power supply, which is a circuit that enables you to monitor and alter voltage and current levels.Every very engineer, technician, and hobbyist needs a stable power supply to power up the circuits theyre working on. However, it would be nice if you could vary the potential to accommodate many circuits. It also would be pleasant if you could vary the current supplied to the circuit, which would limit the power delivered in case something is wrong. The circuit featured here is an 80C31-controlled power supply that has voltage and current limits that you can change to suit your needs (see Photo 1). Its voltage ranges from 0 to 22 V, and its current ranges from 0 to 2.5 A.In most power supplies, you turn a knob to adjust the voltage and current. The 80C31 CPS, however, has a keypad for entering the voltage and current, as well as Set Voltage and Set Current buttons so you can change the voltage and current immediately by moving through a few menus. Additionally, you can monitor the voltage and current delivered by the power supply with the 80C31 CPSs built-in voltmeter and ammeter .The voltage and current is displayed using an LCD.Photo 1Take a look at the front panel of the 80C31-controlled power supply.CIRCUIT DESCRIPTION The brain of the circuit is the popular 80C31 microcontroller, which is the version of the 80C51 without ROM. The 80C31 is a widely available (its produced by several manufacturers) and high-quality microcontroller for embedded design considering its instruction set and price.The 80C31 has 128 bytes of RAM, two external interrupt pins, two timer/counters, and serial ports (see Figure 1). It has 32 I/O pins, but doesnt have ROM, so some of the ports (namely ports 0 and 2) are used for the address bus and data bus. A few of the pins of port 3 are also used to interface to other devices like ADCs and DACs. The pins serve as read and write signals for proper bus operation like the read cycle and write cycle. So, after interfacing the ROM, ADCs, and DACs, youre left with 14 I/O pins. Port 1 is used to interface and read the keypad. Some of the pins in port 3 are used for the Set Voltage and Set Current buttons, while others are used to control the relay and analog switches to read the voltage and current to be fed to the ADC.Figure 1The 80C31 has 128 bytes of RAM, two external interrupt pins, two timer/counters, and serial ports.U2 74HC373 is a transparent latch (see Figure 2). Its used to obtain the address because the address bus and data bus are multiplexed on port 0 to conserve pins coming out of the IC.The address is obtained after the address latch enable, or ALE, is asserted.U3 is an 8 KB 8 UV EPROM(27C64) that stores the program that sets the voltage and current and reads the ADC. I chose the 27C64 EPROM because its inexpensive, available, and the firmware will fit in it. You can actually use larger EPROMs like the 27C512, but theyre a waste of space, money, and time because youll have to wire the added address pins. The 4K 8 EPROM can also be used but its hard to obtain.U4 ADC0820 is a successive approximation analog-to-digital converter that converts an analog input voltage to an 8-bit equivalent value. Its fast and provides the necessary handshaking pins to interface to the three-bus architecture without glue logic. U4 ADC0820 also converts the analog voltage to an 8-bit equivalent value.U7 CD4053 is a triple one-of-two switch. It is used to select between the voltage and current. Wondering why I said current? Using a high-side current detector, the current flowing through a sense resistor is converted into a suitable voltage to be read by the ADC.U5 and U6 AD7524 are digital-to-analog converters. They convert a digital value to an equivalent analog current. Theyre chosen because they provide the hardware needed to interface to the system bus. In addition, theyre fast and behave like RAM memory.U9 LM358 and the adjustable resistors form a pair of current-to-voltage converters. U8 74HC138 is an address decoder thats used to access the ADC,DAC, and LCD. The MOVX memory space is divided into 8 parts of 8 KB each. I used this scheme so that you can also insert an 8-KB RAM just in case its needed. Actually, the MOVX instruction generates the read and write signals whenever its executed, so you can read and write to external devices connected to the bus.LCD1 is an LCD module based on the popular HD44780. Its interfaced to the three-bus system using four NAND gates. Because the LCD is slow, the busy flag is read after an operation to see if it is busy or not. Failing to poll the busy flag will result in erratic operation or no display at all. In order to interface the LCD properly, youll often need two signals at one time to perform an operation. Namely, the decoded signal like a chip select signal and the read signal for a read operation. The two signals must be turned on at the same time for a proper read operation. The same principle applies to the write cycle.C9 and R4 form the RC time delay for proper reset. The specifications require several clock cycles during which the reset is high until the clock generator is stable. D2 serves to discharge the capacitor after the power is removed. C5 to C14 serve as an immediate source of voltage because the supply rail drops as a result of the internal switching of the transistors. The voltage drop is caused by the inductances in the wire or traces of the PCB. And as you know, the current cannot change immediately when there is an inductor present in the circuit.Rectifier diodes D2, D3, D5, and D7 1N5400 convert alternating current to pulsating DC (see Figure 3). C1 filters the pulsating DC to smooth DC. C7,C8, D17, and D18 are configured as a charge pump that serves as a source for the negative voltage needed by the high-side current detector.Zener diode D1, R1, R6, and Q1 provide a constant current source for the thermal sensor. Q8 serves as a thermal sensor and limits the base current to the series pass transistor after it reaches a certain temperature. The collector current increases as the junction temperature increases even if the base current is constant. This works in theory, but it has not been tested because I dont have a thermocouple thermometer. I did use, however, a 4 4 heavy-duty heatsink.D12, D13, C4, and C5 form a split supply power source thats used to power the logic circuit, ADC reference, and the negative supply for the DAC reference. U1 78L05 and U3 79L05 serve as pre-regulators for the voltage references. U2 7805 is the voltage regulator for the logic circuit. C2, C3, and C6 are filter capacitors used to make the regulators more stable.R5, R27, and D4 LM336-2.5 form the ADC voltage reference. The variable resistor R27 trims the voltage to 2.55 V. R20 and D14 LM336-2.5 form the voltage reference needed by the DAC ICs. R26 is used to bias the Darlington transistor, which is a series pass element comprised of Q5 and Q6, which form the Darlington transistor. The series pass element acts as a variable resistor to change the output of the power supply.R10, R21, R22, R23, R24, and U7 MC4741 act as a high-side current detector. Essentially, its a subtractor that gives a voltage in proportion to the ratio of the resistor and voltage difference. The current moving across R10 produces a voltage drop thats detected by the subtractor, and then its amplified according to the ratio of the resistances. A 2.5-A current produces a 2.5-V potential. This potential is compared to the voltage generated by the DAC. The comparator U5 LM358 controls the series pass element in order to regulate the current output of the power supply. R11 and R15 are a sampling element of the output voltage. The two resistors form a voltage divider and scale the voltage by 10. Thus, a 23-V potential becomes 2.3 V. The comparator U5 LM358 compares this potential to the voltage generated by the DAC and in addition to controlling the series pass element, which regulates the output voltage of the power supply.D15 and D16 isolate the two opamps. D8, D9, D10, and D11 protect the analog switch and ADC when there is an error and the sampled voltage or current rises above 5 V or drops below zero. C10 and C11 serve as filter caps to smooth the sampled voltages. R14 and R18 limit the current from the sampling points. R28, R29, D19, and D20 act as a regulator to limit the voltage going to U7 MC4741. If the circuit is unloaded, the B+ potential can reach as high as 31 V. And if this reaches U7, it will suffer electrical overstress, or EOS.The firmware, which can be downloaded from the Circuit Cellar web site, is written in assembly language using a Metalink assembler. One thing to note is why the reference is 2.55 V. The reason is that the ADC and DAC values go from zero to 255. Therefore, if you use 2.55 V you wont need to compute the values needed to obtain a desirable voltage or the reading obtained by the ADC. With this scheme, you can simply read the ADC and move the decimal point. For example, a 100 reading from the ADC is equivalent to a 10-V potential. And with an 8-bit value, the resolution of the voltage is 100 mV and the resolution of the current is 10mA. To program a 1-A current you can send 100 to the current DAC. To program 1 V, simply send 10 to the voltage DAC.CONSTRUCTION AND ASSEMBLYYou can construct the digital part of the power supply by using point-to-point wiring. I built a PCB for the analog component, however, the one I made was not that great because its only purpose was to verify if the circuit works (see Photo 2). For the digital part, I used ordinary IC sockets and wrapping wire to connect the circuit. You should also use IC sockets so you can remove the IC if its defective.Before inserting the ICs, be sure to look for the presence of 5 V at the VCC pins. Also, check if the ground pins are indeed grounded. Its a good idea to use different colored wires so you can trace the signals of different pins.If youre going to make a PCB for the analog part, try to be sure the sampling network is close to the output connector or pads. Make the traces wide for nets carrying power from pulsating AC to DC. To calibrate the power supply, burn the calibrate program into to the 27C64 EPROM and then power up the circuit. Adjust variable resistors R2 and R3 until you read 2.55 V on pins 1 and 7 of U9 LM358. Also, adjust variable resistor R27 until you get a reading of 2.55 V going to pin 12 of U4 ADC0820. Key in 5.0 for voltage and adjust variable resistor R11 of the analog portion until you get a 5-V reading.Photo 2heres a view from above the 80C31-controlled power supply. The digital part is constructed using point-to-point wiring. I used a ready-made PCB for the analog part.TROUBLESHOOTINGThe only way youll know if the circuit is wired correctly is if you can see messages coming out of the LCD module. The program will work even if the ADC or DACs are absent from the circuit. However, this is not the case with the LCD module. The program will hang if the LCD module is not present with dps.bin or dps.hex loaded in the 27C64 EPROM. This is because the BUSY pin of the LCD module is polled to check if the LCD is busy or not.If the circuit doesnt work, then check for the presence of 5 V at the VCC pins. You should also look to see if the ground pins are connected to ground, and if the reset circuit works. Use a logic probe or an oscilloscope to verify this. Additionally, always make sure the crystal and pins X1 or X2 of the microcontroller are in good shape. If theres no output on the LCD, then reassess your wiring.You should also watch for the activity of enable E, RS, and R/W pins. Adjust variable resistor R1 for good contrast so you can see the characters. If Enable E is not pulsating, inspect the NAND gate (U10). Check if the *RD and *WR signals are pulsating at the pins of the NAND gate. Another good idea is to verify whether or not the LCD is being selected. To do this, probe pin 12 of the U8 address decoder U8.Key in 5.0 for voltage. If the reading is zero, look to see if the VRDG from the analog portion is connected to the digital portion, which can be confirmed by inspecting pin 12 of the U7 CD4053. You should read 0.5 on a multimeter.You should always make sure that you wired the U4 ADC0820 correctly. Look for the *RD signal, *WR signal, and chip select pulse at the pins of U4. Key in 0.05 for current and connect a 4.7-, 5-W resistor across the output terminals. The reading for current should be 0.05 A on the LCD. If it isnt, check for a 0.05-V reading on a multimeter on pin 13 of the U7 CD4053. If that doesnt work, check if the IRDG signal from the analog part is connected to the digital part.The U7 MC4741 of the analog part should be wired correctly and the IC itself should be in good shape. If both voltage and current readings are the same, see if the SELECT signal at pin 11 of U7 CD4053 of the digital portion is pulsing. If during the calibration phase there is not 2.55 V at the U9 LM358, even if you adjust variable resistors R2 and R3, then inspect your DAC wiring.Scan for the presence of *WR pulse at the pins of the U5 and U6 AD7524. In addition, you should check to see if the chip select signals are pulsating at pin 12 of U5 and U6 of the AD7524. If they arent, take a peek at the 74HC138 address decoder U8.And dont forget to verify the condition of the LM358 U9. If you dont find 2.55 V at pin 12 of ADC0820 U4,then make sure the LM336-2.5 D4 is wired correctly. Finally, if you dont have 2.5 V at pin 15 of U5 and U6 of the AD7524, check the wiring of LM336-2.5 D14. If the programmed voltage and current are not correct, even if the voltage DAC and current DAC have correct outputs, take a look at the LM358 U5 of the analog part.USING THE POWER SUPPLYTo achieve an output of 700 mV, key in .7. For an output of 5 V, use 5.0. It will detect the number of keystrokes needed by the position of the decimal point. Therefore, to output 10mA you need to press 0.01 or .01; and to output 500mA, use 0.50 or.50. To output 1 A youll have to key in 1.00, and so on. Remember to press the Set Voltage button first in order to set the voltage, and then press the Set Current button to program the current.ADDITIONAL USESThe 80C31-controlled power supply has many uses. You can power numerous circuits on your workbench or charge a 6-V gel cell for constant voltage charging and to limit the peak current. In addition, youll find that you can use the 80C31 to charge your NiCd batteries by setting the voltage higher than the battery potential and the current to 50mA.由80C31单片机控制的电源即使你是一个新手,控制供给你使用的电路的电功率也是很容易的。这篇文章中,诺埃尔向我们介绍一种80C31控制的电源,一种使我们能够监视且改变电压和电流数值的电路。每一位真正的工程师、技师和爱好者都需要一个稳定的电源来给他们使用的电路供电。无论如何,如果能改变供应很多电路的电位是很振奋的。若能改变提供给电路的电流也将是另人欣慰的,这样在出现故障时就能够限制其给定电功率。此种电路是用80C31控制的电源,能够根据你的需要来调节电压和电流的限幅值(见照片1)。其电压的范围是0到22伏,其电流范围是0到2.5安培。多数的电源,都是扭转一个旋钮就能调节电压和电流。然而,80C31的CPS有一个输入电压和电流值的键盘区,既有设置电压键又有设置电流键,这样你就能根据菜单切换直接改变电压和电流。另外你能够用镶嵌在80C31的CPS中的电压表和电流表监视电源提供的电压和电流。其电压和电流显示在一个LCD显示器上。照片1由80C31控制的电源控制面板一览电路说明电路的核心部分是熟知的80C31微控制器,是80C51没有ROM的版本。从其指令设置和价格方面考虑80C31对于嵌入式设计来说是一种广泛使用的(几个厂家都在生产)且高质量的微控制器。80C31有一个128字节的RAM,两个外部中断引脚,两个定时/记数器和一个串行通讯口(见图1)。它有32个I/O端口,但是没有ROM,所以一部分端口(也就是P0和P2)作为数据和地址总线。P3端口的一部分引脚也能用作和其他设备连接比如ADC或DAC之类的芯片。这些引脚为固有的像读循环和写循环之类的总线指令提供读和写的信号。所以,在接入ROM,ADC芯片,和DAC芯片之后,就剩下14个可用的I/O端口了。P1端口一般用作接入和读取键盘区。当其他端口用作控制继电器和模拟开关来读取进入到ADC中的电压和电流的时候,P3端口的一部分引脚用作电压设置键和电流设置键。图18031的128字节的RAM, 两个外部中断引脚,两个定时/计数器, 和一系列并行输出口。74HC373(U2)是一个数据的锁存器(见图2)。它是用来获取地址的,因为在P0口中数据总线和地址总线是共用保存自IC中出来的数据。地址锁定开启后,即ALE端有效,获得地址信号。U3是8 KB 8的一个存储设置电压和电流且能读取ADC数值的程序的紫外EPROM(27C64)。我选择27C64 EPROM是因为它经济,实用,且硬件将适合它。事实上你也可以选用更大的EPROM像27C512,它们在空间、金钱和时间上是一种浪费,因为你还必须的接入额外的地址引脚。也可以用4K8 EPROM可它很稀缺。ADC0820(U4)是一个逐次逼近的数字模拟转换器,它能够将输入电压的模拟量转换成一个相应的8位数值。它非常快并且提供必要的握手引脚来连接无胶连逻辑三总线架构。ADC0820也是能把模拟电压信号转换成8为相应数值的转换器。 CD4053(U7)是一个三端二选一开关。它是用来选择电压和电流的。想知道我为什么说电流吗?使用一个高边电流检测器,电流流经一个电流检测电阻转换成一个能被ADC读取的合适的电压。U5和U6为AD7524是数字模拟转换器。它们能把数字量转换成相应的模拟电流。选择它们是因为它们提供所需的能够接入系统总线接口的硬件。另外它们很快而且性能像RAM存储器。LM358(U9)和可调电阻组成一对电流电压转换器。74HC138(U8)是一个用作访问ADC,DAC,和LCD的地址译码器。MOVX存储器被划分成每部分8KB的8个区域。我之所以用这种结构是方便你在需要时也能插入一个8KB的RAM。事实上,每当MOVX指令执行时就生成读和写的信号,所以你可以读写连接在总线上的外部设备。LCD1是基于熟知的HD44780是一个LCD模块。它用4个NAND门连接到三总线系统。因为LCD慢,繁忙标志是在看见它繁忙与否的一个操作之后读取。测验繁忙标志的失败将导致操作不稳定或根本不显示。为了正确地接入LCD,在执行一次操作的时间里你需要两个信号。即译码信号像片选信号和为读取操作的读信号。对于一个固有的读取操作来说两个信号必须同时开启。写入周期也是同样的道理。C9和R4组成RC延迟是为了恰好复位。具体要求在复位接通直到时钟发生器达到稳定的期间若干时钟周期里。电容能量移除后经D2释放。C5到C14作为瞬时的电压源是因为由于晶体管内部开关提供栅极的压降。此压降是在PCB板中的金属或线路中产生电感所致。正如你知道的电路中存在电感时其电流不能马上改变。整流二极管D2、D3、D5和D7 1N5400把交变电流转换成脉动的直流电(见图3)。C1把脉动的直流电经滤波成为平滑的直流电。C7、C8、D17和D18配置作为高边电流检测器需要的负向电压来源的电荷泵。齐纳二极管D1、R1、R6和Q1为热量传感器提供一个恒定的电流源。Q8作为一个热量传感器并且达到特定温度后限制一系列流经晶体管的基极电流。即使基极电流恒定,集电极电流也会因结温的增加而增加。这个过成理论上存在,不过我没有测试因为我没有热电偶温度计。然而,我使用了一个4 4的超强高效散热片。D12、D13、C4和C5组成一个分离器用于供应逻辑电路,ADC参考端,和DAC负向供应参考端电能的电源。78L05(U1)和79L05(U3)作为参考电压的稳压器。7805(U2)是供应逻辑电路的稳压器。C2、C3和C6为用于稳压器更平稳的滤波电容。R5,、R27和D4 LM336-2.5组成ADC的参考电压。可变电阻R27把电压调制成2.55 V。R20和D14 LM336-2.5构成DAC芯片需要的参考电压。R26用作把偏压加于达林顿晶体管,它是由一系列Q5和Q6的通过元件组成,构成达林顿晶体管。一系列通过元件作为改变电源输出电压的可变电阻动作。R10、R21、R22、R23、R24和U7 MC4741作为高边电流检测器动作。本质上来说,它是一个输入电压与电阻之比和电压差异为线性关系的减法器。电流流经R10产生一个被减法器察觉的压降,并且此时根据电阻的比例是放大的。2.5A的电流产生2.5V的电势。此电势与DAC产生的电压进行比较。比较器LM358(U5)控制一系列通过元件是为了校准电源的输出电流。R11和R15是输出电压的采样元件。两个电阻组成一个电压除法器且电压比为10。这样23V的电势变为2.3V。比较器LM358(U5)除控制一系列通过元件外还把这个电视与DAC产生的电压做比较,为了校准电源的输出电压。D15和D16隔离开两个运算放大器.D8、D9、D10和D11保护模拟开关和ADC当那里出错时或者采样电压或电流超过5V或低于0V时。C10和C11作为滤波电容使采样电压平滑。R14和R18限制来自采样点的电流。R28, R29, D19, D20作为整流器起对进入MC4741(U7)的电压进行限制的作用。如果电路空载,则B+处电势可高达31V。如果它接近U7点则将承受过载电压或EOS。与硬件对应的软件能从Circuit Cellar网站下载,是使用Metalink公司
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年中职美术面试题库及答案
- 浙江省温州市龙港地区2026届英语九年级第一学期期末复习检测试题含解析
- 山东省济宁市嘉祥县2026届化学九年级第一学期期中联考试题含解析
- 2026届吉林省长春市朝阳区化学九年级第一学期期中质量跟踪监视试题含解析
- 广西河池市两县2026届九上化学期中质量检测试题含解析
- 高级管理人员劳动合同解除与离职交接协议
- 离婚案中夫妻共同人寿保险权益分割及处理协议
- 跨国公司驻华代表处员工招聘及文化交流合同
- 离婚协议书:离婚后财产分割及共同债务清偿协议
- 私立小学教师绩效管理及职业发展规划合同
- 2025黑龙江伊春市铁力市招募公益性岗位人员备考练习题库及答案解析
- 铁路车间职工思政课课件
- 2025年汽车租赁公司车辆托管及运营管理合同
- 情感营销培训课件
- 企业向个人还款合同范本
- 儿童组织细胞坏死性淋巴结炎诊疗共识解读
- 钢模板安全知识培训课件
- 新学期三年级班主任工作计划(16篇)
- 2025广东汕尾市海丰县公安局招聘警务辅助人员50人备考题库及答案解析
- 消防政府专职队培训课件
- 6.1 包饺子(教案)北师大版数学三年级上册
评论
0/150
提交评论