智能充电器设计参考资料APPlication note

合集下载

智能充电器设计初稿

智能充电器设计初稿

绪论1项目研究背景随着电子技术的不断发展,便携式设备不断涌现,丰富和方便了人们的生活。

现在,移动电话、笔记本电脑、数码相机等便携式设备已经成为人们生活的一部分,而且有着更为广阔的市场前景和发展空间。

今后,还会有更多的便携式设备出现。

便携式设备的发展,对电池产业提出了更高的要求。

低成本、高能量密度、高电压、轻型化、使用温度宽、循环寿命长、安全性好的全新的绿色电池,特别是可重复使用的可充电电池备受关注[1]。

目前,市场上的电池品种繁多,按电池的应用范围可分为专用电池(如各种手机锂电池,笔记本电脑锂电池)和通用电池(如各种电动玩具所用的镍氢电池),也可按电池是否循环使用分为不可充电电池(如各种酸性锰锌化学电池)和可充电电池(如镍镉,镍氢电池以及铅蓄电池)。

不可充电电池,(特别是含有重金属汞的电池),由于对环境的污染而遭到普遍的批评,各电池生产厂商把业务的重点转移到可充电电池上,这样可充电电池的充电问题就成了当前各生产厂商首先要解决的问题。

然而大多数设备中的电池,只能使用专用的充电器,而且普通的充电器大多充电时间长,无法判断其充电参数和剩余的充电时间。

电子技术的快速发展使得各种各样的电子产品都朝着便携式和小型轻量化的方向发展,也使得更多的电气化产品采用基于电池的供电系统。

目前,较多使用的电池有镍镉(Ni- Cd)电池、镍氢(Ni-Mh)电池、锂离子(Li-Ion)及铅酸电池(Lead-acid)。

它们的各自特点决定了它们将在相当长的时期内共存发展。

由于不同类型电池的充电特性不同,通常对不同类型,甚至不同电压、容量等级的电池使用不同的充电器,但这在实际使用中有诸多不便。

现在,我国市场上的充电器普遍存在以下问题:(1)不具备对智能电池的充电功能,扩展性差;(2)故障率高,而且维修困难,影响便携式设备的正常工作;(3)对同类电池充电缺乏自适应性,充电控制策略落伍,导致了电池的寿命短、效率低和可维护性差;(4)体积大,效率低,对电网污染大,不能满足电磁兼容等要求;(5)充电电流小,充电时间长。

智能充电器毕业设计

智能充电器毕业设计

基于MAX1898的智能充电器设计在人们日常工作和生活中,充电器的使用越来越广泛。

从随身听到数码相机,从手机到笔记本电脑,几乎所有用到电池的电器设备都需要用到充电器。

充电器为人们的外出旅行和出差办公提供了极大的方便。

单片机在电池充电器领域也有着广泛的应用,利用它的处理控制能力可以实现充电器的智能化。

充电器各类繁多,但从严格意义上讲,只有单片机参与处理和控制的充电器才能称为智能充电器。

1实例说明随着手机在世界范围内的普及使用,手机电池充电器的使用也越来越广泛。

本章将通过一个典型实例介绍51单片机在实现手机电池充电器方面的应用。

实例所实现的充电器是一种智能充电器,它在单片机的控制下,具有预充、充电保护、自动断电和充电完成报警提示功能。

实例的功能模块如下。

・单片机模块:实现充电器的智能化控制,比如自动断电、充电完成报警提示等。

・充电过程控制模块:采用专用的电池充电芯片实现对充电过程的控制。

・充电电压提供模块:采用电压转换芯片将外部+12V电压转换为需要的+5V电压,该电压在送给充电控制模块之前还需经过一个光耦模块。

・C51程序:单片机控制电池充电芯片实现充电过程的自动化,并根据充电的状态给出有关的输出指示。

2设计思路分析要实现智能化充电器,需要从下面两个方面着手。

(1)充电的实现。

它包括两部分:一是充电过程的控制;二是需要提供基本的充电电压。

(2)智能化的实现。

在充电器电路中引入单片机的控制。

2.1 为何需要实现充电器的智能化充电器实现的方式不同会导致充电效果的不同。

由于充电器多采用大电流的快速充电法,在电池充满后如果不及时停止会使电池发烫,过度的充电会严重损害电池的寿命。

一些低成本的充电器采用电压比较法,为了防止过充,一般充电到90%就停止大电流快充,而采用小电流涓流补充充电。

手机电池的使用寿命和单次使用时间与充电过程密切相关。

锂电池是手机最为常用的一种电池,它具有较高的能量重量比、能量体积比、具有记忆效应,可重复充电多次,使用寿命较长,价格也越来越低。

智能充电器的设计(毕业设计)

智能充电器的设计(毕业设计)

毕业设计附件题目:智能充电器的设计姓名:王研学号:16学院:信息学院专业:电子信息工程指导教师:萍协助指导教师:2011年5月23日目录开题报告 (1)翻译外文资料及译文 (2)程序清单和图纸 (3)北京联合大学毕业设计(论文)开题报告题目:智能充电器的设计专业:电子信息工程指导教师:萍学院:信息学院学号:16班级:0708030303 :王研一、课题任务与目的任务:针对电动车常用的动力电池的特点,以单片机作为控制芯片,结合国内外现行的各种充电技术和充电器设计方案,设计一款基于单片机控制的智能充电器,以达到最佳的充电效果,使智能充电器具有良好的性能指标,电路简单可靠。

研究目的:随着能源的日益紧缺和大气污染的加剧,作为新型交通工具的电动车的研究日益受到重视,从我国国情和人们的消费水平出发,电动车具有广阔的发展前景。

作为电动车核心部件的电池及其充电器,其性能的优劣,直接影响电动车的质量状况。

针对电动车充电技术的要求,为了使电动车充电器获得良好的性能指标,必须寻找最佳的充电模式,我要设计一款基于单片机控制的智能充电器,涓流充电、大电流充电、过充电和浮充电组合起来的充电方式,这种充电方式经理论和实践表明,可达到最佳的效果,使得蓄电池具有较高的使用容量和较长的循环寿命,可满足不同电动车动力电池的复杂充电要求,为提高蓄电池的性能和可靠性提供有效的途径,对环保、节能型电动车和充电器的设计和开发具有重要的意义,同时,研制性能良好的智能充电器,会带来显著的经济效益和良好的社会效益。

二、调研资料情况1 电动车用电池的现状和发展趋势电池作为电动车动力来源,目前应用于电动车的可充式二次电池主要有:铅酸(Lead Acid)电池、镍福(Nickel Cadmium)电池、镍氢(Nickel Metal Hydride)电池和锂(Lithium)电池[1]。

(1)镍一氢电池(Ni-MH )此类蓄电池的比能量高,寿命长,有较高的比功率,污染轻等优点,被认为是较好的电动车用蓄电池。

智能型充电器的电源和显示的设计资料-附录2外文资料原文

智能型充电器的电源和显示的设计资料-附录2外文资料原文

The design of the lithium battery chargerIntroductionLi-Ion rechargeable batteries are finding their way into many applications due to their size, weight and energy storage advantages.These batteries are already considered the preferred battery in **puter applications, displacing NiMH and NiCad batteries, and cellular phones are quickly becoming the second major marketplace for Li-Ion. The reason is clear. Li-Ion batteries offer many advantages to the end consumer. In **puters,Li-Ion battery packs offer longer run times over NiCad and NiMH packs for the same form factor and size, while reducing weight. The same advantages are true for cellular phones. A phone can be made smaller and lighter using Li-Ion batteries without sacrificing run time. As Li-Ion battery **e down, even more applications will switch to this lighter and smallertechnology. Market trends show a continual growth in all rechargeablebattery types as consumers continue to demand the convenience of portability. Market data for 1997 shows that approximately 200 million cells of Li-Ion will be shipped, compared to 600 million cells of NiMH. However, it is important to note that three cells of NiMH are equivalent to one Li-Ion cell when packaged into a battery pack. Thus, the actual volume is very close to the same for both. 1997 also marked the first year Li-Ion was the battery type used in the majority of **puters, displacing NiMH for the top spot. Data for the cellular market showed a shift to Li-Ion in the majority of phones sold in 1997 in Europe and Japan.Li-Ion batteries are an exciting battery technology that must be watched. To make sense of these new batteries, this design guide explains the fundamentals, the charging requirements andthe circuits to meet these requirements.Along with more and more the emergence of the handheld electric appliances, to the high performance, baby size, weight need of the light battery charger also more Come more big.The battery is technical to progress to also request continuously to refresh the calculate way **plicatedly is fast with the realization, safety of refresh.Therefore need Want to carry on the more accurate supervision towards refreshing the process, to shorten to refresh time and attain the biggest battery capacity, and prevent°from the battery Bad.The A VR has already led the one step in **petition, is prove is perfect control chip of the next generation charger. The microprocessor of Atmel A VR is current and can provide Flash, EEPROM and 10 ADCses by single slice on the market Of 8 RISC microprocessors of the tallest effect.Because the saving machine of procedure is a Flash, therefore can need not elephant MASK ROM Similar, have a few software editions a few model numbers of stock.The Flash can carry on again to weave the distance before deliver goods, or in the PCB Stick after pack carry on weaving the distance through an ISP again, thus allow to carry on the software renewal in the last one minute.The EEPROM can used for conservancy mark certainly coefficient and the battery characteristic parameter, such as the conservancy refreshes record with the battery that raise the actual usage Capacity.10 A/ Ds conversion machine can provide the enough diagraph accuracy, making the capacity of the good empress even near to its biggest capacity. And other project for attaining this purpose, possible demand the ADC of the exterior, not only take up the space of PCB, but also raised the system Cost.The AVR is thus deluxe language but 8 microprocessors of the designs of unique needle object" C" currently.The AT90S4433 reference The design is with" C" to write, the elucidation carries on the software design's is what and simple with the deluxe language.Code of C this design is very Carry on adjust easily to suit current and future battery.But the ATtiny15 reference design then use edit collected materials the language to write of, with Acquire the biggest code density.An electric appliances of the modern consumption mainly uses as follows four kinds of batteries:** completely the sour battery of lead( SLA)** battery of NiCd** NiMHhydrogen battery( NiMH)** battery( Li- Ion)At right choice battery and refresh the calculate way need to understand the background knowledge of these batteries. **pletely the sour battery( SLA) of lead **pletely the sour battery of lead to mainly used for the more important situation of the cost ratio space and weights, such as the UPS and reportto the police the backup battery of the system.The battery of SLA settles the electric voltage to carry on , assist limits to avoid with the electric current at refresh the process of early battery lead the heat.Want ~only the electricity .The pond unit electric voltage does not exceed the provision( the typical model is worth for the 2.2 Vs) of produce**pany, the battery of SLA can refresh without limit.The battery of NiCd battery of NiCd use very widespread currently.Its advantage is an opposite cheapness, being easy to the usage;Weakness is from turn on electricity the rate higher.The battery of NiCd of the typical model can refresh 1,000 times.The expired mechanism mainly is a pole to turn over.The first in the battery pack drive over.The unit that all turn on electricity will take place the reversal.For prevent°froming damage the battery wrap, needing to supervise and control the electric voltage without a break.Once unit electric voltage Descend the 1.0 Vs must shut down.The battery of NiCd carries on refresh in settling the electric current by forever . The NiMH hydrogen battery( NiMH) holds to shoot the elephant machine such as the cellular phone, hand in the hand that the importance measure hold equipments, the etc. NiMHhydrogen battery is an usage the most wide.This kind of battery permit.The quantity is bigger than NiCd's.Because lead to refresh and will result in battery of NiMH lose efficacy, carry on measuring by the square in refresh process with.Stop is count for much in fit time.Similar to battery of NiCd, the pole turn over the battery also will damage.Battery of NiMH of from turn on electricity the rate and is probably 20%/ month.Similar to battery of NiCd, the battery of NiMH also settles the electric current to refresh .Other batteries **pare in lithium battery( Li- Ion) and this texts, the lithium battery has the tallest energy/ weight to compare to compare with energy/ physical volume.Lithium batterySettle the electric voltage to carry on refresh with , want to have the electric current restrict to lead the heat in the early battery of refresh the process by avoid at the same time.When refresh the electric currentDescend to produce the minimum electric current of the enactment of company will stop refresh.Leading to refresh will result in battery damage, even exploding.The safety of the battery refreshes the fast charge machine( namely battery can at small be filled with the electricity in 3 hours, is usually a hour) demand of the modern.Can to the unit electric voltage, refresh theelectric current and the battery temperatures to carry on to measure by the square, avoid at the time of being filled with the electricity because of leading to refresh.Result in of damage.Refresh the method SLA battery and lithium batteries refreshes the method to settle the electric voltage method to want to limit to flow for the ever ; The battery of NiCd and battery of NiMHs refresh the method.Settle the electric current method for the ever , and have severals to stop the judgment method for refresh differently. Biggest refresh the electric current biggest refresh the electric current to have relation with battery capacity( C).Biggest usually refresh the electric current to mean with the number of the battery capacity.For example, The capacity of the battery for 750 mAhs, refresh the electric current as 750 mAs, then refresh the electric current as 1 C(1 times battery capacity).If The electric current to flow refresh is a C/40, then refreshing the electric current for the battery capacity in addition to with 40.Lead the hot battery refresh is the process that the electric power delivers the battery.Energy by chemical reaction **e down.But is not all.The electric powers all convert for the sake of the chemistry in the battery ability.Some electric power conversions became the thermal energy, having the function of the heating to the battery.When electricity.After pond be filled with, if continue to refresh, then all electric powers conversion is the thermal energy of the battery.At fast charge this will make the battery.Heat quickly, if the hour of can **pare with stop refresh and then will result in battery damage.Therefore, while design the battery charger, to the temperature.It is count for much that carry on the **bine to stop refresh in time.The discretion method battery stopped refresh of different and applied situation and work environment limitted to the choice of the method that the judgment stop refresh.The sometimes temperature allow of no.Measure easily, but can measure electric voltage, or is other circumstances.This text takes the electric voltage variety rate(- dV/ dt) as the basic judgment to stopThe method for refresh, but with the temperature and absolute electric voltage be worth for assistance and backup.But the hardware support that this text describe speaks as follows.The method of the havings of say.Time of t – this method that is the decision when stop refresh most in ually used for spare project of the hour of fast charge.Sometimes also be .Refresh(14- 16 Hour) basic project of the method.Be applicable to various battery.Stop refresh when the electric voltage of V –be the electric voltage to outrun the upper ually with the forever settle the electric current refreshes the match usage.The biggest electric current is decide by the battery, usually For the 1 C.For prevent°froming refresh the electric current leads to causes battery lead greatly hot, the restrict of the electric current at this time very key.This method Is a lithium battery basic to refresh and stop project. The actual lithium battery charger usually still continues into after attain biggest electric voltage Go the secondstage refresh, to attain 100% battery capacity. For battery of NiCd and battery of NiMHs are originally method can Be the spare judgment stops refreshing the project. - The method exploitation that this judgment of the dV/ dt – electric voltage variety rate stops refresh negative electric voltage variety rate.For the battery of some types, be the battery to be filled with the subsequence Refreshing continuously will cause electric voltage descend. At this time this project was very fit.This method usually useds for the ever to settle the electric current to refresh, Be applicable to to the fast charge of the battery of NiCd and battery of NiMH. The electric current of I –is to refresh the electric current small in a certain the number that set in advance stop refresh. Usually used for the ever to settle the electric voltage to refresh the method.Be applicable to the SLA Battery and lithium battery.The T – temperature absolute zero can be the basis that battery of NiCd and battery of NiMHs stop refresh, but even suited for to be the backup project.Any battery for temperature to outrun initial value have to stop refresh.The basis that the dT/ dt – temperature rising velocity fast charge variety rate of the temperature of hour can be to stop refresh.Please consult the norm that the battery produces **pany( battery of NiCdOf typical model be worth for the 1 oC/ min) the – be applicable to the battery of NiCd and battery of NiMHs.Need to stop refresh when the DT –outrun the temperature value of the environment temperature to be the bad battery temperature and the environment temperature to exceed the certain threshold.This method can be the battery of NiCd and The project that battery of SLA stops refresh.While refreshing in the cold environment this **pares the absolute zero to judge the method better.Because bigMost systems usually only have a temperature to stretch forward, have to will refresh the previous temperature to be the environment temperature.DV/ dt=0 –s zero electric voltages differ this method with- the method of dV/ dt is very and similar, and more accurate under the condition that electric voltage will not go up again. Be applicable to the NiCd Battery and battery of NiMH.This reference **pletely carried out the battery charger design of latest technique, can carry on to various popular battery type quicklyRefresh but need not to modify the hardware soon, a hardware terrace carries out a charger product line of integrity.Need only Want to will refresh the calculate way to pass lately the ISP downloads the processor of FLASH saving machine can get the new model number.Show very muchHowever, this kind of method can shorten time that new product appear on market consumedly, and need a kind of hardware of stock only.This design provide The in keeping with SLA, NiCd, NiMH of the integrity and the database function of the battery of Li- Ion.。

智能充电器设计

智能充电器设计

由于镍氢电池具有功率密度高、可快速充放电、循环寿命长以及无记忆效应、无污染、可免维护等优点,在便携式电子产品中的应用越来越广泛。

如何合理的对镍氢电池进行充电管理是目前电池领域中研究的热门课题。

基于这样的背景下我们设计开发了快速智能充电器。

本智能充电器可以同时对1~4节镍氢电池进行充电管理,并根据待充电电池的电压和温度情况,进行合理的充电电流设置。

图1 充电器系统框图系统结构如图1所示。

硬件设计1 单片机选择SH69P48 是一种先进的CMOS 4位单片机。

它具有以下特性: 4K 双字节OTP ROM, 253 个半字节RAM空间, 8位定时/计数器, 10位A/D转换器, 8+2位高速PWM 信号输出, 内建振荡器时钟电路, 内建看门狗定时器, 低电压复位功能且支持省电方式以节约电能。

10位A/D转换器可以使得Delta-V的检测精度达到2mV/cell;利用单片机自带的PWM端口结合TL494控制充电电流;用8位定时/计数器进行0.5s定时,在出现坏电池时,LED进行1Hz闪烁指示。

系统时钟采用单片机内部的4MHz的RC时钟,降低系统的成本,但由于RC时钟的偏差会比较大,所以0.5s定时会存在误差。

内建看门狗定时器可用软件控制以加强单片机的抗干扰能力。

在软件出现问题时,可以对单片机进行复位,重新执行程序,防止程序死锁现象的发生。

2 单片机脚位安排根据功能的要求,对单片机的管脚安排如表2。

3 PWM技术控制充电电流因单片机的工作频率为4MHz,单片机自带的PWM可以达到的最大频率为15.625 kHz,无法满足对充电电流的控制精度,所以采用了外部硬件PWM与单片机 PWM 进行结合处理的方法。

外部PWM控制芯片选择TL494,其PWM频率可以达到200 kHz 以上,对充电的电池可以进行恒流和限压处理。

设计时用外部PWM芯片控制充电电流的精度,用单片机自带的PWM去控制TL494电流比较器输入端口上的电压,从而控制总充电电流的大小。

智能充电器设计设计.doc

智能充电器设计设计.doc

智能充电器设计目录第一章绪论 (1)1.1引言 (1)1.2蓄电池充电理论 (1)1.3蓄电池种类 (3)1.4设计要求 (4)第二章系统设计思路分析 (6)2.1智能化的实现 (6)2.2充电方式分析 (6)2.3芯片选用及介绍 (8)第三章系统硬件设计 (12)3.1主要器件 (12)3.2原理图及说明 (14)第四章系统软件设计 (16)4.1程序流程图 (16)4.2程序设计及说明 (17)结论与体会 (20)主要参考材料: (21)附录1:系统原理图 (22)第一章绪论1.1 引言中国是全球蓄电池的产销大国,蓄电池已有200多年的历史,是一种应用广泛的动力电源。

具有原材料易得、价格低廉、可靠性好等优点,目前约有95%的市场占有率。

蓄电池作为稳定电源和主要的直流电源,需求广泛,用量巨大,与我们的社会生活息息相关。

由于蓄电池维护简单、价格低廉、供电可靠、使用寿命长,广泛作为汽车、飞机、轮船等机动车辆或发电机组的启动电源。

随着经济的发展,大容量蓄电池的应用迅速增加,人们希望能快捷、安全的对蓄电池进行充电。

因此,为了适应市场需求,我们需要设计一种对于蓄电池的只能充电器。

首先,目前市面上的充电器有许多的不足和缺陷,由于充电器多采用大电流的快速充电法,在电池充满后如果不及时停止会使电池发烫,过度的充电会严重损害电池的寿命。

而且,流行的铅酸密封蓄电池充电器大多采用三段式充电方法,充电时间长,效率低,对电池保护差,容易发生过充电或者充电不足的现象。

过充电,可使蓄电池发热,电解液失水;充电不足,可使蓄电池内化学反应不充分,并且长期充电不足会导致容量下降。

以上两种情况都会降低蓄电池的使用寿命。

由此可见,充电气性能的好坏都会直接影响到蓄电池的使用效果和使用寿命。

1.2 蓄电池充电理论上世纪60年代中期,美国科学家马斯开口对蓄电池的充电过程做了大量的试验研究,并提出了以最低出气率为前提的蓄电池可接受充电曲线,如图所示。

智能充电器设计知识点

智能充电器设计知识点

智能充电器设计知识点一、背景介绍随着科技的快速发展,智能充电器成为人们生活中必不可少的电子设备。

智能充电器不仅具备快速充电功能,还能通过智能控制技术实现诸如过充保护、电流控制等安全功能。

本文将介绍智能充电器设计中的关键知识点。

二、智能充电器原理智能充电器的基本原理是根据被充电设备的需求自动调节输出电流和电压,实现高效充电。

智能充电器通常采用开关电源技术,具备高频变压器和开关管等部件。

通过调整开关管的导通时间,可以实现不同电压和电流的输出,从而满足被充电设备的需求。

三、关键技术知识点1. 功率因数校正技术:智能充电器设计中,功率因数校正技术可以提高电源的利用率,减少无功功率损耗,并符合能源的节约要求。

2. 温度控制技术:智能充电器应具备过温保护功能,以防止因温度过高导致损坏或安全隐患。

温度控制技术可以通过感温器和控制电路实现智能充电器的自动断电保护功能。

3. 过充保护技术:过充保护是智能充电器设计中的重要一环,通过监测电池电压和电流等参数,当电池充满时自动停止充电,避免因过充导致电池寿命缩短或安全问题。

4. 电流控制技术:电流控制是智能充电器设计时需要考虑的关键因素之一。

通过合理设计充电电路,可以根据被充电设备的电流需求,控制输出电流的大小,并保证充电速度和安全性。

5. 通信技术:智能充电器往往带有与被充电设备进行通信的功能,可以实现双向信息传递和控制。

通信技术可以通过串口、USB、蓝牙等方式实现。

四、智能充电器设计流程智能充电器的设计流程通常包括需求分析、电路设计、样机制作、测试验证等步骤。

在需求分析阶段,需要明确充电器的功能需求、输出电压和电流要求等;在电路设计阶段,需要根据需求进行电路设计,选择合适的元器件和配置;之后制作样机,并经过测试验证,确保充电器的性能和安全性。

五、智能充电器应用领域智能充电器广泛应用于各个领域,例如智能手机、平板电脑、电动车和无人机等。

随着物联网的不断发展,智能充电器将在更多领域得到应用,为人们的生活和工作带来便利。

一款手机智能充电器的设计

一款手机智能充电器的设计
器具 有一定 的借鉴 意义 。
O~5V.电 压 电流 测量 原理 如 图 l所 示 。所测 电压 电流 可 由单片 机
控制 显示 出来。
参考 文献
I.5充 电原 理
[1】卢敏,伍玉杰 .智能省电型手机充电器的研究与实现 【J】.机械工程
开关 管 Q1的 开通 是 通过单片 机 输出的 Pw M 波 形来控 制的 ,
目前 手 机锂 电池待 机 时间 短 ,基 本一 天 一充 ,手 机 充满 电仍
长 时间 插在 充电器上 ,浪 费 电能 ,减 少锂 电池寿 命,因此对 充电器
设 计提 出 了新要 求 。本 文 提 出一 款 智 能充 电 器,通 过 单片 机 采 用
合 适 的 充电控 制 算 法,对 充 电的 过程 有 更准 确的 监测 ,缩 短 充 电
一蔓—l 二————— 一I … f_ =L 二—_】J
本要 求是 特 定 的 充电 电流 和 充 电电压 ,从 而 保证 电池 安全 充 电 ,
其 中包 括 给 过放 电的 电池使 用 涓流 充 电、电池 电压检 测 、输 入电
流 限制 、充 电完 成 后关 断充 电器、电池部 分 放 电后 自动 启动 充电
田 2充电 原理 圈
STC 系列 单片 机 支持 串 口程 亭烧 写 ,对开 发设 备的 要求 很低 ,开
2锂 电池 充电 的原理
发时 间也 大大缩 短 ,适合做 智能充 电器的 主控 单元。
锂 离子 电池 的充 电过 程 可 以分 为旧 个 阶段 :涓 流 充 电 (低压
预 充 )、恒 流 充 电 、恒 压 充 电 以及 充 电终 止。锂 电 池充 电器 的 基
等 。
3软件 设计
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

8-bit Microcontrollers Application Note Rev. 8080A-AVR-09/07AVR458: Charging Lithium-Ion Batteries withATAVRBC100Features•Fully Functional Design for Charging Lithium-Ion Batteries •High Accuracy Measurement with 10-bit A/D Converter •Modular “C” Source Code •Easily Adjustable Battery and Charge Parameters•Serial Interface for Communication with External Master •One-wire Interface for Communication with Battery EEPROM •Analogue Inputs for Reading Battery ID and Temperature •Internal Temperature Sensor for Enhanced Thermal Management • On-chip EEPROM for Storage of Battery and Run-Time Parameters 1 IntroductionThis application note is based on the ATAVRBC100 Battery Charger reference design (BC100) and focuses on how to use the reference design to charge Lithium-Ion (Li-Ion) batteries. The firmware is written entirely in C language (using IAR ® Systems Embedded Workbench) and is easy to port to other AVR ® microcontrollers.This application is based on the ATtiny861 microcontroller but it is possible to migrate the design to other AVR microcontrollers, such as pin-compatible devices ATtiny261 and ATtiny461. Low pin count devices such as ATtiny25/45/85 can also be used, but with reduced functionality.2 AVR458 8080A-AVR-09/072 Theory of OperationBattery charging is made possible by a reversible chemical reaction that restores energy in a chemical system. Depending on the chemicals used, the battery will have certain characteristics. A detailed knowledge of these characteristics is required in order to avoid inflicting damage to the battery.2.1 Li-Ion Battery TechnologyLithium-Ion batteries have the highest energy/weight and energy/space ratios of modern rechargeable batteries /1/ (See “References” section on page 29). It is currently the fastest growing battery system on the market, with end applications such as notebook computers, cell phones, portable media players, Personal Digital Assistants (PDA), power tools and medical devices. Compared to traditional, rechargeable batteries, Li-Ion batteries have low internal resistance, high cycle life, fast charge time, low self-discharge, low toxicity and no maintenance requirements. For example, lithium-ion cells with cobalt cathodes hold twice the energy of a nickel-based battery and four-times that of lead acid /2/. Lithium-ion is a low maintenance system, an advantage that most other chemistries cannot claim. There is no memory effect with lithium-ion and the battery does not require scheduled cycling to prolong its life. Lithium-ion has a low self-discharge and is environmentally friendly. Disposal causes minimal harm. Drawbacks of Li-Ion batteries include low tolerance of overcharge and the need for embedded protection circuitry. An electrical short can result in a large current flow, a temperature rise and thermal runaway in which flaming gases are vented. 2.1.1 SafetyLithium-ion batteries are safe, provided certain precautions are met when charging and discharging. In addition, battery manufacturers ensure a high level of reliability by adding three layers of protection, as follows: 1. The amount of active material is limited to achieve a workable equilibrium of energy density and safety. 2. Various safety mechanisms are included within each cell. 3. An electronic protection circuit is added inside the battery pack. Cell protection devices work as follows: • A PTC (positive temperature coefficient) device acts as a protection to inhibit high current surges. • The CID (circuit interrupt device) opens the electrical path if an excessively high charge voltage raises the internal cell pressure. • The safety vent allows a controlled release of gas in the event of a rapid increase in cell pressure.AVR45838080A-AVR-09/07 The electronic protection circuit works as follows: • A solid-state switch is opened if the charge voltage of any cell reaches a given threshold.• A fuse cuts the current flow if the skin temperature of the cell approaches 90°C (194°F).• The current path is cut when cell voltage drops below a given threshold. This is in order to prevent the battery from over-discharging.Today, lithium-ion is one of the most successful and safe battery chemistries available with billions of cells being produced every year.2.2 Charging Li-Ion BatteriesThere is only one way to charge lithium-based batteries /3/. Manufacturers of Lithium-Ion cells have very strict guidelines in charge procedures and the packs should be charged as per the manufacturers "typical" charge technique.Li-Ion batteries are charged using constant voltage, with current limiter to avoid overheating in the initial stage of the charging process. Charging is terminated when the charge current drops below a threshold set by the manufacturer. The battery takes damage from overcharging and may explode if overcharged.2.2.1 SafetyStatic electricity or a faulty charger may destroy the battery's protection circuit and turn solid-state switches to a permanent ON position. This may happen without the user knowing. A battery with a faulty protection circuit may function normally but does not provide protection against abuse.Consumer grade lithium-ion batteries cannot be charged below 0°C (32°F). If charged at cold temperatures, battery packs may appear to be charging normally but chemical reactions inside the cells may cause permanent damage and can compromise the safety of the pack.The battery will become more vulnerable to failure if subjected to impact, crush or high rate charging.The battery must remain cool. A battery pack that gets hot during charge should not be used.2.2.2 Priming & Charge IntervalsUnlike many other types of rechargeable batteries, Lithium-Ion batteries do not need priming. The first charge of a Li-Ion battery is no different than the 10th or the 100th charge.Lithium-ion batteries may be – and should be – charged often. The battery lasts longer with partial rather than full discharges. Full discharges should be avoided because of wear.The battery loses capacity due to aging, whether used or not.4 AVR458 2.2.3 Charge StagesThere are two charge stages of a Lithium-Ion battery, as follows: 1. Constant current. Charging of a Li-Ion battery starts with applying constant current to the battery. The size of the charge current is battery-dependent and given by the manufacturer. This stage is complete when battery voltage has reached the threshold given by the manufacturer. 2. Constant voltage. After battery threshold voltage has been reached the charger will switch from supplying constant current to supplying constant voltage. This stage is complete when charge current has dropped below the threshold given by the manufacturer. The below figure illustrates voltage and current of a lithium-ion battery during charging. Figure 1-1. Charge stages and limits of a Varta PoLiFlex ® cellIn the figure above, “Overcharge” is the level at which cell protection circuitry cuts in and opens a solid-state switch and discontinues the charge current path. After this, battery voltage typically needs to drop several hundred millivolts before the current path is restored. “Overdischarge” is the level at which the current path is cut in order to prevent the battery from over-discharging. Recommended battery operating voltage is typically a margin away from overcharge and discharge limits.8080A-AVR-09/07AVR45858080A-AVR-09/07 2.2.4 Typical Charge Characteristics Battery specifications should always be verified from manufacturer’s data sheets. Below is a summary of typical lithium-ion battery charge characteristics. Actual parameters may vary. Table 1-1. Typical Charge CharacteristicsParameter Typical Value Charge time3 hours Charge current1 C Charge efficiency99.9 % Charge current threshold0.03 C Charge voltage4.20 V Charge voltage tolerance (per cell)± 0.05 V Temperature range0 … +45 °C Humidity range 65 ± 20 RH2.2.5 Typical Battery CharacteristicsThe table below summarises manufacturer’s data for the batteries types used in this application. Other types of batteries may be used, but may require adjustments to software and/or hardware. Table 1-2. Manufacturer’s data for Varta PoLiFlex range of lithium-ion batteries /4/ ParameterPLF 443441 PLF 383562 PLF 503562 2P/PLF 503562 Unit Rated capacity (typical)550 750 1000 2000 mAh Nominal voltage3.70 V Operating voltage range2.75 … 4.20 V Charge voltage4.20 V Charge voltage tolerance± 50 mV Charge current520 720 955 955 mA Charge cut-off time3 3 34 hours Charge cut-off current10 14 19 38 mA RID (resistor ID) 3.9 6.8 10 24 k Ω NTC 10 k Ω B-value 3435 K Overcharge detection4.35 V Overdischarge detection 2.20 V6 AVR458 8080A-AVR-09/072.3 Battery ChargerThis application note is based on the ATAVRBC100 Battery Charger reference design by Atmel ®. The reference design is rather complex and has loads of features but this application focuses on the low end of the design, only. For more information on the BC100, please see AVR451 - BC100 Hardware User's Guide /5/. 2.3.1 MicrocontrollerThe BC100 hosts two microcontrollers; a master (ATmega644, by default) and a slave (an ATtiny25/45/85 or ATtiny261/461/861, by default). The master microcontroller is outside the scope of this application but it may be noted that the microcontrollers are capable of communicating with each other such that the master may request data from the slave at any time. The slave microcontroller is fully capable of handling all tasks related to battery charging and it does not require a master microcontroller to be present. It constantly scans the connectors for batteries and, if found, charges them when required. The slave microcontroller also constantly monitors the hardware for any anomalies. 2.3.2 Power supplyThis application note does not focus on the power supply. It may, however, be noted that the firmware constantly monitors the input voltage levels in order to make sure operation is reliable. 2.3.3 Buck switchesThe firmware on the slave microcontroller controls any of the three buck switches on board the BC100. The default is to use a high-frequency PWM output of the microcontroller to adjust the voltage and current flow to the battery. The voltage (and current) of the buck switches are directly proportional to the duty cycle of the PWM signal.AVR45878080A-AVR-09/07 3 Battery Charger Hardware This application note is based on the ATAVRBC100 Battery Charger reference design. A detailed hardware description will not be provided in this document. Please see AVR451 - BC100 Hardware User's Guide for detailed information.3.1 ConfigurationThe ATAVRBC100 Battery Charger reference design must be configured as detailed below.3.1.1 MicrocontrollerThe hardware should be populated as follows:• Make sure socket SC300 is empty• Populate socket SC301 with an ATtiny861It is possible to use other AVR microcontrollers but this application has been optimised for using ATtiny861. Pin compatible replacements such as ATtiny261 and ATtiny461 /6/ may be used if the compiled code size is decreased. This can be done by increasing the optimisation of the compiler and by removing unwanted features from the firmware.Other microcontroller options include ATtiny25, ATtiny45 and ATtiny85 /7/. These (as well as other 8-pin AVR microcontrollers) use the SC300 socket on BC100. It should be noted that due to reduced pin count the 8-pin microcontrollers provide less features than the default 20-pin.3.1.2 Programming ConnectorThe microcontroller can be programmed via 6-pin connector J301, using either SPI or debugWIRE.Please note that in some hardware revisions of BC100 it may be necessary to remove R303 and disconnect pin 15 of U202. This procedure frees the /RESET line for use by external programmer or debugger but removes the possibility for the master microcontroller to reset the slave. Do not engineer the board unless required. Alternatively, the microcontroller can always be programmed off-board.3.1.3 JumpersThe jumpers should be configured as follows:• J400, J401, J407 & J408: Set jumpers to use Buck Switch C (20V / 1A) • J405 & J406: Set jumpers to 1/4 (max measurable voltage 10V)Other configurations are possible, but may require firmware changes. See variable VBAT_RANGE in file ADC.h.8 AVR458 3.1.4 BatteryThis application uses a particular type of lithium-ion batteries and all configurations presented here are based on manufacturer’s data. Other lithium-ion batteries may naturally be used but it is up to the user to look up battery data from manufacturer’s data sheets and make sure necessary adjustments are done to firmware and hardware. See section 4.5.1 and file battery.h. The figure below illustrates connection pads of the lithium-ion batteries used in this application. Figure 1-2. Connection pads of a Varta PoLiFlex cell.The battery is connected to the battery charger as follows. Table 1-3. Connecting battery to charger Battery Connector Charger Connector Note - (minus) BATTERY- NTC NTC/RID Battery temperature measurement ID SCL RID, Battery identification resistor + (plus) BATTERY+ 3.1.5 Data EPROMSome batteries are equipped with an embedded EPROM for storing charge and manufacturing data. This application supports the use of EPROM via a one-wire interface. The default is a DS2502 EPROM connected as follows. Table 1-4. Connecting external EPROM DS2502 to charger EPROM Pin Charger Connector DATA 1-WIRE/SDA GND BATTERY- If an EPROM is not connected to the battery charger the application will simply disregard its absence.8080A-AVR-09/07AVR45898080A-AVR-09/07 3.1.6 Supply Voltage The higher the supply voltage, the higher the minimum current the buck switches can provide. For example, if supply voltage is about 9 V and buck charger C is used to charge a battery at 4.20 V then the minimum attainable current is about 80 mA. At this point the smallest decrease in PWM duty cycle (i.e. reducing the contents of OCR1B by 1) will effectively turn off the current to the battery.It is recommended to use a supply voltage some three volts above battery charge voltage. In this application the battery is being charged at 4.20 V and the recommended supply voltage is therefore 7.5 V.Another method to lower the minimum charge current the hardware can provide is to use a buck switch with a large inductor. In BC100 this means Buck Switch A.10 AVR458 8080A-AVR-09/07 4 Battery Charger SoftwareThe firmware is written in C language using IAR Systems Embedded Workbench, version 4.20. Since the firmware has been written entirely in C, it should not be a difficult task to port it to other AVR C-compilers. Some compiler specific details may, however, need to be rewritten. In the table below are listed the files that are relevant to the compiler project. Table 1-5. Project files (see IAR EW workspace file BC100_tiny.eww) File Type Note ADC.c C source code ADC.h Header file Functions related to A/D converter AVR458.c AVR458.h Functions related to the different states and charging battery.c C source code battery.h Header file Battery-specific definitions and functions related to battery control & data acquisition main.c C source code main.h Header file Main program / Program entry point menu.c C source code menu.h Header file State machine definitions OWI.c C source code OWI.h Header file Functions related to one-wire interface PWM.c C source code PWM.h Header file Functions related to generating pulse-width modulated output time.c C source code time.h Header file Functions related to timekeeping and measurement of time USI.c C source code USI.h Header file Functions related to serial interface 4.1 OverviewThe firmware integrates all functions required to charge two lithium-ion batteries. Batteries are connected to separate ports such that one may be charged while the other is idle. The firmware is fully automated and capable of stand-alone battery monitoring and charging but it may also be used together with a master microcontroller, such as the one implemented in BC100. By default, the firmware fits into an ATtiny861 (build option: debug) or an ATtiny461 (build option: release). Memory requirements of the firmware are summarised in the table below.AVR458Table 1-6. Memory requirements of firmwareBuild option Memory Approximate valueCODE (Flash) 5800 bytes DATA (SRAM) 270 bytes DebugXDATA (EEPROM) 130 bytes CODE (Flash)3900 bytes DATA (SRAM) 270 bytes ReleaseXDATA (EEPROM)130 bytes4.2 State MachineThe state machine is rather simple and resides in the main() function. It simply looks up the address of the next function to execute and then jumps to that function. The flow chart of the state machine is illustrated in the figure below. Figure 1-3. Flow chart of main function, including the state machineUpon return, the state machine expects the function to indicate the next state as a return argument. The recognised return codes are described in the table below.Table 1-7. State machine codes (see source code, menu.h)Label (1)Related Function (2)DescriptionINIT Initialize() Entry stateBATCON BatteryControl() Check hardware and batteries PREQUAL Charge() Raise battery voltage, safety check SLEEP Sleep() Low power consumption mode CCURRENT Charge() Charge with constant current CVOLTAGE Charge() Charge with constant voltage ENDCHARGE Charge() End of successful charge DISCHARGE Discharge()ERROR Error()Resolve error, if possibleNotes:1. Name of label, excluding leading “ST_”2. Function name, as declared in source code1112 AVR458 State functions are described in the following sections.4.2.1 Initialize()The initialisation function is the first state function that will be executed after devicereset. The flow chart of the function is shown in the figure below.Figure 1-4. Flow chart of initialisation functionThe initialisation function always exits with the same return code, pointing to the statefunction for battery control.4.2.2 BatteryControl()The battery control function verifies that jumpers are set correctly and then checks tosee if there are any enabled batteries present that require charging. The program flowis illustrated in the figure below.AVR458Figure 1-5. Flow chart of battery control function4.2.3 Charge()The charge function contains the charging algorithm divided into stages. For this application, it has four stages:•Prequalification - during which the battery is charged with a constant current until a sufficient charge voltage is reached. If this happens within a given time limit, the battery is considered good and the charger may continue on the next stage. If time runs out before the voltage is reached, or battery temperature goes out of limits, the battery is considered bad and charging is halted.•Constant current charge - during which the battery is charged with a higher, battery-specific current until the battery voltage reaches its maximum. If this happens within the battery’s maximum charge time limit, the charger goes to the next stage. If the time limit expires, or battery temperature goes out of limits, the battery is considered bad and charging is halted.•Constant voltage charge – during which the battery is charged at the maximum battery voltage until the charge current sinks beneath a battery-specific cut-off limit, or the maximum charge time limit expires. Here too, charging is halted if battery temperature goes out of limits.•End charge – in which the charger decides whether to go into the sleep state, or to attempt a charge of the other battery.ChargeParameters and HaltParameters are central variables in this function. The program flow of this state function is illustrated in the figure below.1314 AVR458 Figure 1-6. Flow chart of the charge state function4.2.4 Discharge()This function has not been implemented.AVR4584.2.5 Sleep()The application enters sleep mode when all batteries have been fully charged. It wakes up at regular intervals to check the current status of the batteries. Sleep mode is terminated as soon as any battery requires charging. Sleep mode is illustrated in the flow chart below. Figure 1-7. Flow chart of sleep function4.2.6 Error()Program flow is diverted here when an error has occurred. The error handler contains some simple algorithms that try to resolve the most common problems. Program execution will exit the error handler when all sources of error have been cleared. The program flow is illustrated in the figure below.1516AVR458Figure 1-8. Flow chart of error handlerAVR458174.3 Charging FunctionsThese functions are called by Charge() after all parameters have been set.4.3.1 Constant Current/VoltageThese two functions are similar, apart from what ADC measurements they try to keep within limits. Therefore, only the flow chart for ConstantCurrent() is illustrated in the figure below. They both make use of the variable ChargeParameters.If a Master microcontroller is present, it may temporarily stop the charging by flagging a charge inhibit. This is to prevent battery damage during prolonged serial transfers.18AVR458Figure 1-9. Flow chart for ConstantCurrent()4.3.2 Charge Halt DeterminationCharge halt is determined by HaltNow(). This function is called by ConstantCurrent() and ConstantVoltage() every time they loop, to decide if a stage of charging is done. With the variable HaltParameters the user can specify at what terms the charging should be halted, and if an error should be flagged if f.ex. the time limit expires. An error flag will also result in ST_ERROR being set as the next state, thereby abortingAVR45819the charge. If no errors are flagged, the next desired state, set earlier in Charge(), will apply.Lastly, the function checks if temperature is within limits, if the battery is OK and if mains voltage is above minimum. Should any of these tests fail, the next state is set to an appropriate error handler (ST_ERROR, ST_INIT or ST_SLEEP) and charging is aborted.Figure 1-10. Flow chart for HaltNow() part 1.20 AVR458AVR458Figure 1-11. Flow chart for HaltNow() part 221 8080A-AVR-09/0722 AVR458 Figure 1-12. Flow chart for HaltNow() part 38080A-AVR-09/07AVR458Figure 1-13. Flow chart for HaltNow() part 44.4 Other FunctionsThe program flow is mainly state-based, but some processing takes place in the background. This includes A/D conversion, time keeping and serial interface handling. All of these functions are interrupt-driven.4.4.1 A/D ConversionThe A/D converter uses the multiplexer to read in data from several channels. At the end of a conversion the ADC Interrupt Service Routine (ISR) is called, as illustrated in238080A-AVR-09/0724AVR458the flow chart below. After the ISR is complete program execution will return to normal.Figure 1-14. Flow chart of ADC interrupt service routine8080A-AVR-09/07AVR4584.4.2 Master-Slave CommunicationThis application is designed to work as stand-alone but it also supports co-operation with other microcontrollers. The Universal Serial Interface (USI) can be used for communication between microcontrollers. The basic protocol for this interface has been developed but some functions need to be finalised. Figure 1-15. Flow chart of USI overflow interrupt service routine4.5 ImplementationThis section describes how to configure, create and download the software.4.5.1 ConfigurationThe most important compile-time constants are discussed in the table below. See file battery.h for more program constants.258080A-AVR-09/0726AVR4588080A-AVR-09/07Table 1-8. Battery-related compile-time constants (see source file battery.h)Label Description BAT_CELL_NUMBERThe number of cells in the battery. Each of the defined cell voltages gets multiplied by this, to defineBAT_VOLTAGE_MAX, _LOW, _MIN and _PREQUAL. CELL_VOLTAGE_SAFETY In case unmatched batteries are to be charged, this constant is subtracted from CELL_VOLTAGE_MAX for every extra cell in the battery, ie. BAT_CELL_NUMBER – 1. CELL_VOLTAGE_MAX The voltage at which a cell should be charged.CELL_VOLTAGE_LOWThe lowest voltage at which a cell is considered charged. Charging will start when voltage drops below this level. CELL_VOLTAGE_MINThe lowest voltage at which charging may be initiated. Should generally be set to the voltage limit under which further discharge of batteries will cause damage. CELL_VOLTAGE_PREQUAL The voltage to which a cell should be charged to during prequalification.BAT_TEMPERATURE_MAX The highest battery temperature allowed. Charging will stop / not start if above this.BAT_TEMPERATURE_MINThe lowest battery temperature allowed. Charging will stop / not start if above this.BAT_CURRENT_PREQUAL Charge current during prequalification mode. BAT_CURRENT_HYST Charge current hysteresis. Current will not be adjusted when within plus or minus this value from target.BAT_VOLTAGE_HYST Charge voltage hysteresis. Current will not be adjusted when within plus or minus this value from target.BAT_VOLTAGE_PREQUAL Target voltage during prequalification stage. If this voltage is not achieved the battery will be marked as exhausted. BAT_TIME_PREQUAL Maximum amount of time to spend in prequalification stage. DEF_BAT_CAPACITY Default battery capacity.DEF_BAT_CURRENT_MAX Default maximum charge current. DEF_BAT_TIME_MAX Default maximum charge time. DEF_BAT_CURRENT_MIN Default cut-off charge current.ALLOW_NO_RID If defined, batteries without RID (or not matching the lookup-table) will cause the charger to use the battery defaults. Otherwise, charge is halted.RID[].Low and RID[].High Assume RID resistance match if value within these limits. RID[].Capacity Battery capacity for given RID. RID[].Icharge Charge current for given RID. RID[].tCutOff Maximum charge time for given RID. RID[].IcutOff Charge termination current for given RID. NTC[]Temperature look-up table.4.5.2 CompilationBefore compiling the code the following configurations should be made.AVR458Table 1-9. Compiler configurationSection TabField Value Processor configuration ATtiny861(1)TargetMemory model Small Data stack 0x40 Return address stack24General OptionsSystemEnable bit definitions …SelectedC/C++CompilerLanguageRequire prototypesSelected Output FormatOther: ubrof8LinkerExtra OptionsCommand Line-y(CODE)-Ointel-extended,(DATA)=$EXE_DIR$\$PROJ_FNAME$_data.hex -Ointel-extended,(XDATA)=$EXE_DIR$\$PROJ_FNAME$_eeprom.hexNotes: 1. Other options possible. See section 3.1.1 on page 7 for more information.4.5.3 ProgrammingThe compiled code is conveniently downloaded to the target device usingAVR Studio ® and a debugger or programming tool of choice, such as the JTAGICE mkII.Note that the compiled code contains EEPROM data that must be loaded to the target for the software to work. Answer OK when AVR Studio asks if EEPROM contents should be loaded. This is illustrated in the figure below. Figure 1-16. Loading initialised data to EEPROMThe program expects the use of the internal oscillator and that the clock signal is not prescaled. Some fuse bits must be programmed to ensure proper program execution. The fuse bit settings that deviate from the default are listed in the table below. Table 1-10. Non-default fuse bit settingsFuse Bit Setting DescriptionCKDIV8 1 (unprogrammed) Do not divide clock by eightCKSEL3 00010Use internal oscillator278080A-AVR-09/07。

相关文档
最新文档