by StuartL » Thu Jan 22, 2009 10:03 am
by StuartL
Thu Jan 22, 2009 10:03 am
To expand slightly on Matt's explanation of the battery charging issues:
The ADC (analogue to digital converter) used by the CM-5 board to sense the battery voltage is only accurate to 20mV. To charge a NiCd pack safely you need much more accuracy than this.
As Matt has said the Robotis code does what my code originally did, and that's wait until the battery voltage stops increasing. The problem with this is that at 20mV resolution it stops increasing surprisingly early in the charging cycle and you end up with a partially charged pack.
The code I developed was intended to 'guess' when the battery was fully charged by optimistically keeping the charging circuit running for a preset time after the battery voltage stops increasing. For a few weeks it seemed to work very nicely. Then the accrual of repeated overcharging caused a major failure of one of the NiCd packs and it caught fire.
Fortunately Matt heard the noise and managed to deal with the problem before the fire spread, not without damage to the CM-5 plastic case.
If you wish to use the charging code in the library it would be trivial to retune it to be more paranoid, however I strongly recommend that you invest money in a different (LiPo 3-cell) battery pack and remove the large charging diode in the charging circuit to prevent the CM-5 attempting to charge it.
Don't assume that disabling the code is enough to disable the charging circuit as the circuit (being so stupidly designed) actually gets turned on when the CM-5 boots up and only gets turned off when the port is initialised. This means that there's a very brief interval where the charging circuit runs every time the CM-5 starts up. I suspect that this would be disastrous for a LiPo pack.
We circumvent this problem by feeding the LiPo straight into the power rail, we don't use the battery connector. This also has a huge advantage for the BiPed in that there's a power distribution board hidden in the old battery compartment that allows much higher current down each limb by avoiding the inherent current limit of the battery connector and distribution wiring inside the CM5.
The drop-in-CM5 replacement Matt and I are talking about is VERY likely to have a multi-cell LiPo balancing charger built in. However LiPos are fickle beasts and we MUST recommend that you do not charge LiPos in anything other than a fire-proof container and away from anything flammable/expensive. Your robot qualifies
![Smile :)](images/smilies/icon_smile.gif)
To expand slightly on Matt's explanation of the battery charging issues:
The ADC (analogue to digital converter) used by the CM-5 board to sense the battery voltage is only accurate to 20mV. To charge a NiCd pack safely you need much more accuracy than this.
As Matt has said the Robotis code does what my code originally did, and that's wait until the battery voltage stops increasing. The problem with this is that at 20mV resolution it stops increasing surprisingly early in the charging cycle and you end up with a partially charged pack.
The code I developed was intended to 'guess' when the battery was fully charged by optimistically keeping the charging circuit running for a preset time after the battery voltage stops increasing. For a few weeks it seemed to work very nicely. Then the accrual of repeated overcharging caused a major failure of one of the NiCd packs and it caught fire.
Fortunately Matt heard the noise and managed to deal with the problem before the fire spread, not without damage to the CM-5 plastic case.
If you wish to use the charging code in the library it would be trivial to retune it to be more paranoid, however I strongly recommend that you invest money in a different (LiPo 3-cell) battery pack and remove the large charging diode in the charging circuit to prevent the CM-5 attempting to charge it.
Don't assume that disabling the code is enough to disable the charging circuit as the circuit (being so stupidly designed) actually gets turned on when the CM-5 boots up and only gets turned off when the port is initialised. This means that there's a very brief interval where the charging circuit runs every time the CM-5 starts up. I suspect that this would be disastrous for a LiPo pack.
We circumvent this problem by feeding the LiPo straight into the power rail, we don't use the battery connector. This also has a huge advantage for the BiPed in that there's a power distribution board hidden in the old battery compartment that allows much higher current down each limb by avoiding the inherent current limit of the battery connector and distribution wiring inside the CM5.
The drop-in-CM5 replacement Matt and I are talking about is VERY likely to have a multi-cell LiPo balancing charger built in. However LiPos are fickle beasts and we MUST recommend that you do not charge LiPos in anything other than a fire-proof container and away from anything flammable/expensive. Your robot qualifies
![Smile :)](images/smilies/icon_smile.gif)