智能充电器设计参考资料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外文资料原文
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
智能充电器设计目录第一章绪论 (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软件 设计
毕业设计(论文)-智能快速充电器设计[管理资料]
智能快速充电器摘要:本文介绍了一种智能快速充电器的设计过程。
该充电器基于Motorola公司的MC68HC908SR12单片机为控制核心,将SR12特有的模拟电路模块、高精度A/D转换、I2C总线接口以及高速PWM等功能运用到充电控制中,详细讲述了其硬件和软件的设计过程,并从元器件筛选、PCB板绘制和软件设计等方面介绍了该充电器抑制和防电磁干扰的措施。
关键词:单片机A/D转换I2C总线传感器电磁干扰1、引言随着便携式设备不断小型化、轻量化和高性能化,作为其电源的二次电池的使用率日益提高。
我单位于1998年在对充电器市场调研后,设计开发了“ZXG-99型智能快速充电器”,1999年设计定型,同年投入生产,截止到2001年底,已经累计生产了5000多部,取得了一定的社会效益和经济效益。
今年又签定了几千部的生产合同,但是随着产量的逐年增加,以及二次电池市场的不断变化,该产品在设计中的不足越来越明显。
主要有以下几点:a.“ZXG-99型智能快速充电器”的中央微处理器选择的是OTP型单片机,不具有片上FLASH存储器,程序固化后不能更改,这在产品批量生产时十分不便,而且随着市场上二次电池的充电特性不断变化,设计人员要及时更改充电控制参数或开发新的充电算法,这样对已出厂的产品只能更换新的MCU,增加了生产成本;b.“ZXG-99型智能快速充电器”只能对镍镉电池(Nicd)和镍氢电池(NiMH)充电,没有涉及锂离子电池,主要原因是当时锂离子电池的普及率低,价格高。
但是锂离子电池具有较高的能量重量比和能量体积比、无记忆效应、可多次重复充电、使用寿命长等优点,促进了便携式产品向更小更轻的方向发展,使得选用单节锂离子电池供电的产品越来越多,同时其价格也越来越低。
今后二次电池的主流将是锂离子电池,作为一个完整的产品应该将其纳入到设计中;c.该OTP型单片机的A/D采样值只有8位,在对电池进行-△V检测中精度不够,不能对充电过程实行更精确的控制。
智能型充电器设计毕业设计
一、原始依据充电器在日常生活中非常普遍。
无论是手机、MP4都需要电源供电。
这里设计一款智能型充电器,一方面将所学专业知识应用于实际;另一方面,为我们的生活带来便利。
二、参考文献1. 张迎辉,贡雪梅,赵润林,栾良龙. 单片机实训教程. 北京大学出版社,2005年9月2.陈明莹等. 8051单片机课程实际实训教材. 清华大学出版社,2004年3.罗晓沛. 计算机综合应用知识第二版. 清华大学出版社,2002年4.金春林、邱慧芳、张皆喜编著A VR系列单片机C语言编程与应用实例清华大学出版社20035.武锋、陈新建编著PIC单片机C语言开发入门北京航空航天大学出版社20056.陆坤、奚大顺等编著电子设计技术19977.卢胜利主编智能仪器设计与实现重庆大学出版社20038.王兆安、黄俊主编电力电子技术(第四版) 机械工业出版社2002摘要□□×××××××××(内容采用小四号宋体)LCD液晶显示已经是人机界面的关键技术。
本文对基于单片机的LCD液晶显示器控制系统进行了研究。
首先在绪论中介绍了本课题的课题背景、研究意义及完成的功能。
本系统是以单片机的基本语言汇编语言来进行软件设计,指令的执行速度快,节省存储空间。
为了便于扩展和更改,软件的设计采用模块化结构,使程序设计的逻辑关系更加简洁明了。
使硬件在软件的控制下协调运作。
正文中首先简单描述系统硬件工作原理,且附以系统硬件设计框图,并介绍了单片机微处理器的发展史,论述了本次毕业设计所应用的各硬件接口技术和各个接口模块的功能及工作过程, 并具体描述了8052、8279及SED1520外接电路接口的软、硬件调试。
其次阐述了程序的流程和实现过程。
本文撰写的主导思想是软、硬件相结合,以硬件为基础,来进行各功能模块的编写。
最后对我所开发的用单片机实现LCD液晶显示器控制原理的设计思想和软、硬件调试作了详细的论述。
智能型充电器的设计
一、概述随着电子技术的飞速发展,各种各样的电子产品也向着便携式和小型轻量化的方向发展,更多的电子产品都是基于电池供电。
因此对充电电池的性能和工作寿命的要求不断地提高,需要对充电过程进行更精确地监控,从而缩短充电时间,达到最大的电池容量,延长电池工作寿命。
本设计是一种基于单片机的锂离子电池充电器,主要介绍了的硬件设计的充电控制电路和光耦隔离电路以及电池的充电过程。
二、充电控制电路设计充电芯片MAX1898的内部电路包括电压检测器、充电电流检测器、输入电流调节器、定时器、温度检测器和主控器。
图1是MAX1898芯片外围充电控制电路,MAX1898配合外部晶体管可以组成完整的单节电锂离子(Li+)电池充电器。
MAX1898芯片能提供用于监视充电状态的输出、输入电源是否与充电器连接的输出指示和充电电流指示。
MAX1898芯片能提供精确的恒流/恒压充电,电池电压调节精度为±0.75%,提高了电池性能并延长了使用寿命。
充电电流由用户设定,采用内部检流,无需外部检流电阻。
最大的特点是在不使用电感的情况下仍能保持很低的功率耗散,可以实现预充电,具有过压保护和温度保护功能以及为锂电池提供二次保护。
三、光耦隔离电路的设计要实现51单片机对MAX1898的智能控制,必须加入光耦进行电器隔离,才能方便设计实现。
光耦隔离电路的设计部分主要核心元件是6N137,光耦隔离电路如图2所示,U10为光耦隔离芯片6N137,其输入为LM7805产生的5V电压,输出为经过隔离的5V电压,芯片的2脚和单片机的P2.1相连,由单片机控制适时地关闭充电电源。
该部分主要作用是在充电完成后实时的切断电源,防止电池的过温过压损坏电池。
四、电池充电过程锂离子电池的特点是具有较高的能量重量比、能量体积比,具有记忆效应,可重复充电多次,使用寿命较长、价格也越来越低。
然而,锂离子电池的不足之处在于对充电器要求比较苛刻,需要保护电路。
有效利用电池容量,需将锂离子电池充电至最大电压,可是过压充电会造成电池损坏。
智能充电器的设计.
智能充电器的设计智能充电器的设计电瓶,也叫蓄电池,蓄电池是电池的一种,它的工作原理就是把化学能转化为电能。
通常,人们所说的电瓶是指铅酸蓄电池。
即一种主要由铅及其氧化物制成,电解液是硫酸溶液的蓄电池。
二、常用的蓄电池分类及特点1)普通蓄电池;普通蓄电池的极板是由铅和铅的氧化物构成,电解液是硫酸的水溶液。
它的主要优点是电压稳定、价格便宜;缺点是比能低(即每公斤蓄电池存储的电能)、使用寿命短和日常维护频繁。
2)干荷蓄电池:它的全称是干式荷电铅酸蓄电池,它的主要特点是负极板有较高的储电能力,在完全干燥状态下,能在两年内保存所得到的电量,使用时,只需加入电解液,等过20-30分钟就可使用。
3)免维护蓄电池:免维护蓄电池由于自身结构上的优势,电解液的消耗量非常小,在使用寿命内基本不需要补充蒸馏水。
它还具有耐震、耐高温、体积小、自放电小的特点。
使用寿命一般为普通蓄电池的两倍。
市场上的免维护蓄电池也有两种:第一种在购买时一次性加电解液以后使用中不需要维护(添加补充液);另一种是电池本身出厂时就已经加好电解液并封死,用户根本就不能加补充液。
三、电瓶的工作原理它用填满海绵状铅的铅板作负极,填满二氧化铅的铅板作正极,并用22~28%的稀硫酸作电解质。
在充电时,电能转化为化学能,放电时化学能又转化为电能。
电池在放电时,金属铅是负极,发生氧化反应,被氧化为硫酸铅;二氧化铅是正极,发生还原反应,被还原为硫酸铅。
电池在用直流电充电时,两极分别生成铅和二氧化铅。
移去电源后,它又恢复到放电前的状态,组成化学电池。
铅蓄电池是能反复充电、放电的电池,叫做二次电池。
它的电压是2V,通常把三个铅蓄电池串联起来使用,电压是6V。
汽车上用的是6个铅蓄电池串联成12V的电池组。
普通铅蓄电池在使用一段时间后要补充硫酸,使电解质保持含有22~28%的稀硫酸。
四、电瓶的主要用途铅酸蓄电池产品主要有下列几种,其用途分布如下:起动型蓄电池:主要用于汽车、摩托车、拖拉机、柴油机等起动和照明;固定型蓄电池:主要用于通讯、发电厂、计算机系统作为保护、自动控制的备用电源;牵引型蓄电池:主要用于各种蓄电池车、叉车、铲车等动力电源;铁路用蓄电池:主要用于铁路内燃机车、电力机车、客车起动、照明之动力;储能用蓄电池:主要用于风力、太阳能等发电用电能储存;由于铅酸蓄电池维护简单、价格低廉、供电可靠、使用寿命长,广泛作为汽车、飞机、轮船等机动车辆或发电机组的启动电源,也在各类需要不间断供电的电子设备和便携式仪器仪表中用作一些电器及控制回路的工作电源。
智能充电器的设计
5仪器的综合评价
该仪器具有测量0l射线与^v射线的两重功能,采用 高分辨率的仅射线与1射线探测器来实现,该仪器是以
ARM微控制器为核心的智能辐射防护检测仪。经过改进,
仪器的工作性能稳定可靠、功耗低、检测精度高、稳定性
好。重量约2kg,整机功耗小于1.5W,采用7.2V(4.4Ah)免 维护可充电电池,充电一次可连续使用20小时以上。对
充电电流通过电流传感器MAX471转换为电压值。 电流采样的电压值和电池组的端电压值两者经过模拟 开关CD4051,再经过电压跟随器输入到AD574,分别进 行转换,其结果由单片机读取,并进行存储和处理。主要 的电路连接如图2所示。 1.3控制器
控制器采用脉宽调制(PWM)方式控制供电电流的大
小。PWM发生器由另一个20MHz的单片机构成,主控制 器和它采用中断的方式进行通讯,控制其增大或减小脉 宽。PWM信号通过光电隔离驱动主回路上的MOSFET。 开关管、二极管、LC电路构成开关稳压电源。用PWM方 式控制的开关电源可以减小功耗,同时便于进行数字化 控制,但母线的纹波系数相对较大。PWM控制电路如图 3所示。 2智能充电器的软件设计 2.1数据测量
这里选用型号为USl8650的SONY锂离子电池,其 额定容量为1800mAh;经过测量,电池在4.2V左右时的 内阻约为0.3Q。取恒流充电电流为l/3C=0.6A,截止电 压为4.2V,充电结束标志电流为0.06A,进行充电试验。 图5为充电过程的电压、电流和电容量的曲线。
充电时间约为240分钟,如果需要进一步缩短充电 时间,只需在初始化时设定更大的充电电流即可。因为 采用PWM控制器,所以电源供电的效率高,从供电电源 到充电电池的工作效率,最低时在85%左右。充电电流 波动较大,波动系数约为5%。 3.2智能充电器通用性试验
智能充电器的设计
智能充电器的设计1.研究背景与意义智能充电器是近年来充电相关技术的重要创新,随着移动设备的普及和功能的不断增加,对充电器的要求也越来越高。
传统的充电器存在一些问题,如充电时间长、充电效率低、安全性差等。
因此,设计一种智能充电器,能够解决这些问题,并具备更多的智能功能,具有重要的研究意义和实用价值。
2.设计目标与功能2.1设计目标(1)提高充电效率,缩短充电时间;(2)提供多种充电模式,适应不同设备的充电需求;(3)实现智能化管理和控制,提高安全性;(4)具备电池管理功能,延长电池寿命。
2.2设计功能(1)采用快速充电技术,提高充电效率;(2)支持无线充电和有线充电两种模式,提供多种充电接口;(3)配备智能芯片,实现智能化管理,如智能识别设备、智能调节充电电流等;(4)配备智能电池管理系统,提供电池充放电状态监测、剩余电量显示等功能;(5)设计安全保护机制,如过流保护、过热保护等。
3.技术路线与实现方法3.1快速充电技术采用先进的快速充电技术,如快速充电协议、快速充电电路等,能够显著提高充电效率和充电速度。
3.2多种充电模式提供无线充电和有线充电两种充电模式,为用户选择提供方便。
其中,无线充电采用无线能量传输技术,有线充电支持多种接口,如USB-C、Micro USB等,以适应不同设备的充电需求。
3.3智能芯片和智能电池管理系统采用嵌入式芯片,实现智能化的管理和控制。
通过智能识别设备,动态调整充电电流,提高充电效率。
智能电池管理系统能够监测电池的充放电状态,并实时显示剩余电量,提醒用户及时充电。
3.4安全保护机制引入安全保护机制,如过流保护、过热保护等,确保充电的安全性。
当充电电流超过安全范围时,自动切断电源,以避免对设备和用户造成损害。
4.实施计划4.1前期准备(1)研究市场需求和竞争情况,明确设计目标;(2)调研相关技术,确定实现方法;(3)确定项目时间表和预算。
4.2设计与制造(1)进行电路设计,包括快速充电电路和智能芯片的设计与制造;(2)设计充电器外壳和接口,确保充电器的稳定性和兼容性;(3)进行系统集成和测试,确保功能的正常运行。
智能充电器设计_毕业设计论文 推荐
摘要随着便携式电子设备的普及和充电电池的广泛应用,充电器的使用也越来越广泛,但其性能却跟不上电池的发展要求,其电路设计存在较大的缺陷。
针对目前市售充电器的技术缺陷,本文应市场需求设计了一款智能镍氢电池充电器。
本智能充电器具有检测镍氢电池的状态;自动切换电路组态以满足充电电池的充电需要;充电器短路保护功能;以恒压充电方式进入维护充电模式;充电状态显示的功能。
本文充分考虑了国内外的设计方案,在设计中针对市场需求,在功能上进行了适当调整,以满足用户对高性价比的需要。
功能适用、价格低廉、电路简化是本设计的重点。
关键词:维护充电、充电电池、智能充电AbstractAlong with the prevalence of the portable devices and cells used widely, chargers are implicated in more fields than before. But the performance of the chargers is far too behind the requirement of the developing cells. With the demerit of the available chargers, this paper designs an intelligent Ni-Mn cells charger. The features of the intelligent charger are depicted as follows, detecting the state of the recharge cells, automatically switching the module of the circuit to meet the demand of the cells, short protection for the charger, maintenance charge module with constant voltage and current, state showing. This paper considers designations from home and abroad fully and adjusts a few functions of the circuit to satisfy the user requirement of high performance-price ratio. The focus of this designation in this paper is proper function, low-cost, and simplified circuit.KeyWords:maintenance charge module、Rechargeable batteries、intelligent charge目录1 绪论 (1)1.1概述 (1)1.1.1 充电器的设计背景 (1)1.1.2 常见充电电池特性及其充电方式 (2)1.1.3 市场需求情况及发展趋势 (3)2 镍氢电池特性 (5)2.1镍氢电池化学特性 (5)2.2镍氢电池重要参数 (6)2.3镍氢\镉电池的充放电特性 (6)2.4镍氢电池的充电状态 (7)3 设计方案分析 (8)3.1最普通的充电器电路 (8)3.2多功能充电器 (9)3.3智能充电器典型电路 (10)3.4本设计采用的充电器设计方案 (10)4 硬件电路设计 (12)4.1系统功能模块分析 (12)4.2充电器工作原理 (13)4.3硬件电路实现 (13)5 硬件电路参数分析 (18)5.1 智能充电器硬件参数分析 (18)5.1.1 市电输入保护电路 (18)5.1.2 电压变送电路 (19)5.1.3 电流输出控制电路 (21)5.1.4 电压检测电路 (24)5.1.5 过流保护和显示电路 (25)总结 (26)谢辞参考文献附录1充电器电路全图附表2元器件的数量、规格、封装1 绪论1.1 概述1.1.1 充电器的设计背景如今,随着越来越多的手持式电器的出现,对高性能、小尺寸、重量轻的电池充电器的需求也越来越大。
智能充电器毕业设计
智能充电器毕业设计背景和介绍:现代社会日益普及各种智能移动设备,这些设备的使用时间越来越长,充电需求也越来越高。
但是,传统的充电器会存在一些问题,比如充电速度慢、充电不稳定、过度充电等。
因此,设计一款高效、智能的充电器对于满足人们的充电需求非常重要。
本文提出一款智能充电器的设计方案,旨在解决现有充电器存在的问题。
方案:1. 采用快充技术,提高充电速度。
快充技术能够在短时间内为设备充电,同时也能够保持充电稳定,不会对设备造成损害。
因此,本设计方案采用快充技术来提高充电速度。
2. 引入智能控制系统,达到自适应充电。
该系统能够智能调节电流、电压等参数,根据设备的需求进行充电。
此外,智能控制系统还可避免过度充电等问题,保护设备的电池寿命。
3. 具备多重保护功能,确保充电的安全。
充电时可能会出现过电流、过温等问题,这些问题会对设备和使用者造成危害。
因此,本设计方案还加入了多重保护功能,如短路保护、过载保护、温度保护等,确保充电的安全。
4. 稳定可靠的外部电源和充电线材。
在保证充电器内部电路设计的同时,外部的电源和充电线材也至关重要。
本设计方案将选择稳定可靠的产品,并采用高质量的线材,以确保充电器的质量和使用寿命。
实施:为实现这一设计方案,需要进行以下步骤:1. 确定充电器的电路图和元件,采用适宜材料。
2. 编写控制程序,实现充电器的智能控制和保护功能。
3. 确定充电器的机械构造和外观设计,选择合适的电源和充电线材。
4. 进行充电器的制造和测试,完善不足之处。
结论:通过本实验,我们证明了智能充电器的设计方案的可行性和实用性。
该充电器通过快充技术、智能控制系统、多重保护功能等,能够快速、稳定、安全地为各种智能移动设备提供电力支持,满足人们日益增长的充电需求。
智能电池充电器设计参考
智能电池充电器设计参考绪言通常来说,简易充电器是不能够为不同工艺所制造的电池或者是相同工艺但是容量,电压不同的电池充电的。
用简单的充电器为上述不同电池充电,轻则造成电池充电不当,重则会酿成一系列的安全事故。
用微控制器则可以解决上述问题。
将微控制器用于电池充电的场合,除了智能控制的的优势之外,还具有成本低、结构简单等特点。
使用微控制器能够在很短的周期内开发出可应用于各种场合,功能完善的智能充电器。
另外微控制器也能够轻松实现串行通信、实时数据记录和监测。
简易电池充电器用模拟电路来实现它的功能,而用微控制器则能够使充电器智能化微控制器的优点* 轻松解决各种工艺、电压、容量电池的充电问题*可产生可变电压*为多种电池组充放电*高分辨率A/D采集PICREF-2总览Microchip Technology公司的“PICREF-2智能充电器设计参考”提供一个现成的智能充电器解决方案。
这份设计参考的目标是一台应用于摄像机、便携音频设备、移动电话、便携电动工具等设备充电场合的充电器。
参考“PICREF-2”,用户可以通过以下步骤轻松完成智能充电器系统的设计。
1、从模块化源代码的到智能充电器所需要的功能2、对应于具体应用,得到精确的电池组参数,修改全局常量充电器提供相应的硬件电路来支持充放电算法、充电终止判断。
还有RS-232通信模块。
模块化的程序源代码是用C程序编写的,包括“充电算法以及充电终止判断算法”模块,“放电算法”模块,“芯片间通信以及RS-232通信”模块PC上位机的软件提供一种显示电池状态信息的方式PICREF-2主要功能*兼容各种工艺的电池充电*低成本*友好的开发环境*高充电速率*大电流充电*大电流放电调节*实时纠错*数据记录*用户可选择的充电终止算法目录系统总览-----------------------------------------------------------------------------------------------------------------------------------------3 硬件总览-----------------------------------------------------------------------------------------------------------------------------------------4 软件总览----------------------------------------------------------------------------------------------------------------------------------------10 Ni-Cd电池测试结果--------------------------------------------------------------------------------------------------------------------------24 Ni-Mh电池测试结果-------------------------------------------------------------------------------------------------------------------------25 PICREF-2与PC接口软件总览------------------------------------------------------------------------------------------------------------26 设计背景----------------------------------------------------------------------------------------------------------------------------------------32 设计修正----------------------------------------------------------------------------------------------------------------------------------------35 附录A:系统规范------------------------------------------------------------------------------------------------------------------------------37 附录B:最小系统电路原理图---------------------------------------------------------------------------------------------------------------38 附录C:标准系统电路原理图---------------------------------------------------------------------------------------------------------------39 附录D:软件列表------------------------------------*-----------------------------------------------------------------------------------------42 附录E: PICREF-2与PC接口协议--------------------------------------------------------------------------------------------------------43 附录F:PCB电路板图-------------------------------*----------------------------------------------------------------------------------------55 附录G:材料清单------------------------------------------------------------------------------------------------------------------------------56 附录H:充电器演示系统---------------------------------------------------------------------------------------------------------------------59声明工程总工程师: Robert Schreiber, Microchip公司.参考设计文档工作: Beth McLoughlin, Microchip公司系统以及代码开发: 商标Duracell 是Duracell公司商标Windows 是微软公司的商标Microsoft 是微软公司的注册商标Yuasa 是Yuasa公司商标I2C 是菲利普公司的注册商标开发模式PICREF-2提供一个开发模式用来开发软件。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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。