Bcharge(1)
2008-01-09 20:18:12
忽然对前天提到的Bcharge的实现感兴趣: 它是怎么实现通过USB给Blackberry充电的呢?通过查看libusb和Bcharge的代码和资料检索,我把我的资料、观点和疑问写在下面:
首先把问题域搞清楚:
Bcharge通过USB给Blackberry充电
-> Bcharge在Linux下通过USB给Blackberry充电
-> Bcharge在Linux下通过USB给Blackberry的电池充电
再根据现有的资料和时间、精力把问题细化:
* Blackberry 7230手机电池
* 电池充电的原理
* USB充电的原理
* Bcharge通过USB给Blackberry 7230手机电池充电
Blackberry 7230手机电池
我买的7230手机电池上没有规格说明,根据Blackberry官方网站的资料,7230带的是一块锂离电池(Lithium-ion, or Li-ion), 960 mAh, 3.7V。
Lithium-ion是锂电池发展而来的。以前照相机的扣式电池就属于锂电池。锂电池的正极材料是锂金属。负极材料是碳材。Lithium-ion的正极材料是钴酸锂,负极材料是碳材。电池通过正极的锂离子在负极碳材 的键入与迁出来实现电池的充放电过程。
Lithium-ion电池的优点是:
* They're generally much lighter than other types of rechargeable batteries of the same size. The electrodes of a lithium-ion battery are made of lightweight lithium and carbon. Lithium is also a highly reactive element, meaning that a lot of energy can be stored in its atomic bonds. This translates into a very high energy density for lithium-ion batteries.Here is a way to get a perspective on the energy density. A typical lithium-ion battery can store 150 watt-hours of electricity in 1 kilogram of battery. A NiMH (nickel-metal hydride) battery pack can store perhaps 100 watt-hours per kilogram, although 60 to 70 watt-hours might be more typical. A lead-acid battery can store only 25 watt-hours per kilogram. Using lead-acid technology, it takes 6 kilograms to store the same amount of energy that a 1 kilogram lithium-ion battery can handle. That's a huge difference [Source: Everything2.com].
* They hold their charge. A lithium-ion battery pack loses only about 5 percent of its charge per month, compared to a 20 percent loss per month for NiMH batteries.
* They have no memory effect, which means that you do not have to completely discharge them before recharging, as with some other battery chemistries.
* Lithium-ion batteries can handle hundreds of charge/discharge cycles.
Lithium-ion电池的缺点是:
* They start degrading as soon as they leave the factory. They will only last two or three years from the date of manufacture whether you use them or not.
* They are extremely sensitive to high temperatures. Heat causes lithium-ion battery packs to degrade much faster than they normally would.
* If you completely discharge a lithium-ion battery, it is ruined.
* A lithium-ion battery pack must have an on-board computer to manage the battery. This makes them even more expensive than they already are.
* There is a small chance that, if a lithium-ion battery pack fails, it will burst into flame.
电池充电的原理
充电时电池和外接电源不是同时供电的。即有外接直流电时,用外接直流供电;无外接直流时,用电池供电。 其设计原理是:有一个可以称之为电池保护电路在起作用,当然这 不会损害电池的了。电池保护电路由两部份组成:充电电路与电池切换电路组成。 在有外接直流电时,用外接直流供电,并可以对电池进行充电操作
充电电池其实里面是用的化学溶液产生的一种反映,将这种溶液装入容器里,通过 里面产生的电子的饱和状态可以检测出电池的电量剩余多少,所以说这种电池是一种智能电池,现在很多的数码产品都能显示电池的使用状况,来确定大概还能用多长时间。其原理就是:溶液产生的电子一直处于活动状态,当有用电器需要供电时,大量电子通过导线传输给用电器,这是电池的失电状态,就是通常所说的放电,而充电就是向电池里输送电子,因为电池能长时间提供供电说明它有储存电子电荷的能力,所以是可以充电的。电池里使用的化学溶液不同,所以产生电子电荷 数量不同,使用时间也不同。如果电池800ma, 充电器是150ma的,那么大约是 800/150=5个小时左右可以充满. MP3的充电器应该是有两个指示灯的,绿色的为正 在充电(此灯灭了表示电已充满),红色为电源有无状态.
其他回答:比如你的电池容量是600mAh的,那么1C就是600mA,1/10C就是60mA。以 1C充电,1小时左右应该充饱了.当然以1/10C充充满电需要10多个小时。结合 充电器的电流,和电池的容量就可一算出来。
USB充电的原理
USB接口的正常输出电压为5V,输出电流最大可以达到500mA(According to USB 2.0 Spec:1个单位负载为100mA (最大)。任何设备允许吸取的最大电流为5个单位 负载),这符合标准锂电池的充电要求。
注:低功率USB端口提供电压4.4V 至5.25V,电流100mA;高功率USB端口提供电压4.75V至5.25V,电流500mA.由于USB电缆和连接器上的电压降,USB设备必须能工作至4.35V;USB设备必须保证其最大工作电流低于l00mA,直到通过软件被配置为高功率为止. 当设备首次连接到USB端口时,有一个列举程序识别设备以确定它所需要的负载,此时设备只允许驱动一个单元负载,运行列举程序後,如果主机电源管理软件允许,高功耗设备才被允许用大电流驱动。这也就是BCharge要做的事情!
大多数手机都是使用3.6V的电池,一般这种电池要求充电电压上限在4.5V左右,如果直接用5V电压进行充电的话,很可能会损坏手机电池,一般的手机原配充电器常 用4.3V对手机电池进行充电。因此要用USB接口给手机充电,必须要降压。我想这个应该是手机的内部电路来处理的而不是通过用特殊的USB线。
标准的USB接口有四条线组成:
VBus 红色 电源线
Ground 黑色 电源线
D+ 绿色 数据线
D- 白色 数据线
两边较长的为数据线而中间触点较短的为电源线 (这样设计是为了每次在插入时先接通数据线再通电,而拨出时先切断电源才断掉 数据线,因此热插拨时就不容易出错和损坏),电压为+5V和0。当与电脑相连时有四条线工作,而充电时只有两条电源线工作。
手机上那个USB口叫Mini USB接口(see http://wiki.ccw.com.cn/index.php/USB)
这我有个问题:像我以前用的Moto V3,可以通过在手机上设置USB配置,使得手机插上USB后可以处于充电状态或者被当作存储设备,这里的细节我没有想得太明白,但是应该是设置不同的配置导致的。
Bcharge通过USB给Blackberry 7230手机电池充电
Bcharge通过libusb来访问USB那段的Blackberry设备。libusb用它官方网站上的话说: It's aim is to create a library for use by user level applications to access USB devices regardless of OS.
(关于Bcharge的代码我们以后细说...)
Showing posts with label Bcharge. Show all posts
Showing posts with label Bcharge. Show all posts
2008-01-15
Subscribe to:
Posts (Atom)