Tuesday, November 18, 2008

A123 Lithium Battery Testing (DC9280)


Last night I decided to start testing my lithium batteries in preparation of building a battery pack for the Twike. I have a RC Electronics Watts Up Meter and a West Mountain Radio Computerized Battery Analyzer. I previously found a way to purchase A123 M1 cells (new) in dewalt packs for $6.50/cell so I have 120 cells to build my first pack. I'm going to go with 112 batteries per pack in series (112s1p) to best match the voltage requirements of the Twike, and then parallel multiple packs to get range. The old setup with NiCad batteries was 280 cells in series. That gave a lower voltage cutoff of 280 volts (1.0v/cell) and a upper charge limit of 420 volts (1.5 * 280). In my case, the A123 cells wants a upper charge limit of 3.64 volts so my 112 cells will need to reach 408 volts to fully charge. The low voltage cutoff for a A123 cells is 2.5 volts so this works out to 280 (which happens to match NiCad). So, that is my design target. I took apart my first pack of 8 cells using a T10 security bit (get a long skinny one or drill part of the case). I clipped off the two black wires and one red wire to the internal BMS which I am not going to use. After disconnecting the per cell balancing connectors, I could extract the cells. I had charged them once on the standard Dewalt charger so I knew the cells were all reasonably ok. It will detect and fail to charge a pack if any cell is below 2.5 volts (a possibly harmful condition for a cell if that way for long). A quick check with a meter showed them all pretty close in voltage. I did a 3 amp discharge down to 20 volts (2.5 * 8) to measure cell capacity and see if I had any bad cells. Came out to 2.1 Ah (and 52.8 Wh) which is fine given I did not have it on the charger for several weeks. Both CBA and the Watts UP meter gave the same numbers for Ah and Wh delivered from the pack. I then measured each cells voltage and found them pretty close. No need to do more balancing. I then used a regulated supply to charge the pack back up to 29.12 volts (8 * 3.64) at 3 amps. Took 58.4 Wh (2.156 Ah) to charge it back up. Looks good to me. Now on to pack and BMS design and purchasing more lithium packs. NOTE: I figure the Twike uses about 80Wh/mile so that one pack of 112 cells gives me about 10 mile range (and weights about 17 lbs). I'd like to get to 40 miles range to cover 98 % of my daily trips so I can use it to commute daily to work so I'm looking at building 4 packs (with 448 cells).

Twike BMS emulation in Software


It's been a while since I have posted, but I have not been idle. I have just about given up with trying to get the old BMS boards working (looks like a marginal design when exposed to the elements of the batteries). I'm not sure I have any working boards out of the 5 I have. But, because I must get 2 BMS boards (or something that looks like them) to get the Twike controller firmware happy, I decided to play to my strengths and write a software emulation of the BMS. Documentation of the protocol is non existent from the manufacturer but I found a german open source project doing some of the same things to support running Lithium-Ion battery packs. Armed with a RS485 converter, the knowledge of the fact it runs at 2400 baud and a reference code base to answer some of the hard questions, I coded up a program that allows me to emulate all the operations of the firmware based BMS. I should test it this week now that I am done coding it. If this works, I will be able to try putting a partial charge on one of the battery packs and drive the car around the block. Also, I can verify all the electrical devices and switches and see which need more attention. Also, I have the twike service program (version 3.6) which is a DOS application that does all kinds of magic in talking to the BMS. To debug my program, I installed vmware server and booted DOS 6.22 on a floppy image. I installed the service program to the floppy image and could then run the service program in a window talking to a COM port. Next, I downloaded a trial version of "Virtual Serial Port Driver". This program creates pairs of COM ports connected via a virtual null modem. This lets me connect the Twike DOS service program to my C# BMS emulation program. Very cool. When I was done, the service program was completely happy so I hope the controller in the Twike will be also. Highly recommended technique.

Monday, October 6, 2008

Status Update on batteries

Status update. I've got more batteries (up to 4 or 5 sets now) and 3 BMS boards not in batteries. I've got two batteries that appear at first glance to at least work (red LED flashes) but one of them has many broken battery connections. I got my rs485 to RS232 converter working (had to supply 9v to it) at 2400 baud and running the Twike Battery service program, I can see real BMS traffic between the controller and the batteries. Unfortunately, I'm still stuck at the controller trying to download BMS software state. I suspect both of my working batteries are programmed to the same ID. Once I get my setup able to transmit over RS485 (just passive monitoring mode for now), I'll try setting the ID in both boards and see if that make the controller software happy. I'm getting to be a real expert on all the electrical wiring in the vehicle (I've decoded much of the BMS board and most of the system board). I also just found a way to order A123 M1 cells for about $7/cell so I put in a big order yesterday (should arrive next Tuesday). I've decided to go LiFePO4 and A123 M1 cells seem to be the least risky cells to get (not the cheapest but I don't want to risk dropping lots of $$ on TS or other cells only to have them die in 3 months). The EV Discussion List is always bringing up the TS group buy disaster. I've just about got the German battery service program translated to English making the job of testing batteries/BMS board and reverse engineering the BMS protocol much easier.

Tuesday, July 29, 2008

More on charging

I've been busy and have not blogged my progress lately. I'm trying to get a second working battery (which the TWIKE firmware requires for operation) to be recognized. At this point, I have tried two different BMS boards in three batteries to no avail. I'm afraid the BMS is bad in both batteries. Not surprising given the amount of stuff I found growing on them (mold, etc). I'm stuck with either pulling the BMS boards and doing a component level debug or trying to swap for some other unknown batteries. Not sure what I will do. I did get my order from digikey which gives me a set of connectors for all the 3 connector types used by the batteries. With those, I made a set of extension cables so now I can debug the batteries outside the card. Very handy and much safer I might add. If anyone wants the digikey part numbers for the connectors drop me an email (I'm also in the process of setting up a english based wiki for the twike where I can post such technical details for other to find and to share). More on that when I finish getting it setup. I now also have the means to spy on the RS485 bus to decode the BMS protcol. This is all in advance of attempting to build my own Lithium based battery pack (will have to emulate BMS responses to make car firmware happy). I have the battery service program which will give me a let up on decoding the protocol. The program is all in German but I'm part way through in translating all the screens to english. I'll post that on the Wiki when I'm done. So enough for tonight.

P.S. I'm on vacation for the next 3 weeks so I probably won't have any updates for a while.

Monday, July 21, 2008

Charging update


Last Saturday, my son Paul and I spent half a day working on the twike batteries. After several hours of charging, the Battery2 was at 320 volts and slowly climbing (a good sign) but Battery1 was only at 110 volts. A closer inspection revealed numerous cell venting events and the black areas indicated some fires. I assume these happened over the years when the previous owner tried to revive the batteries. I did get one cell to vent myself when I let a group of 20 cells draw 5A for 100 seconds while trying a technique to revive it. Ok, give up on that battery. We pulled it and decided to replace it with one of the spares that has good looking cells (clean ends, no discoloration) but is lacking a BMS card. I proceeded to drain all the cells to zero in the old pack before beginning the process of unsoldering the BMS to move it to the new batteries. A couple of hours later we had the old board out and soldered into the new battery. I put it back in the Twike and powered up and monitored the voltage. The charger/controller is very smart and will only apply a small current until the voltage comes up to about 340 volts. I'll need to get both packs to that voltage to get the built-in charger to give the batteries a full charge (410 to 420 volts). I'll either have to jump start the cells again (will less current this time) or be patient to see if the cells will get to 340 on their own with the charger. Peter Zeller from Switzerland has been very helpful in answering some questions about the batteries and such. At this point, I have no hope to make the battery pack have a useful range, but I just want it to get to the point I can check out all the operations of the Twike. I need to fix anything that is broken before proceeding. I might have a problem with one of the relays since I notice the DC/DC led stays on even after I push down the red button. The docs I have say this is supposed to remove all power except for the batteries themselves. If so, then why is the LED on? Oh well, more to learn.

Wednesday, July 16, 2008

First attempt at charging


Tonight the epoxy on the console repair was ready to I mounted the console and switch panel back into the vehicle. At that point, everything was ready to power up for the first time. I was not sure what to expect as the batteries are 10 year old (Ni-Cad) and have been setting fully discharged for a long time. I plugged it into the wall and lights blinked, the fans came on, and generally it seems to power up. It put some error message in german on the screen and looped on displaying 4 different screens over about 3 minutes. Once I dug out the user manual, I figured out how to get it to speak English. It is complaining the BMS's need new firmware downloaded (yup, batteries were dead) and it was waiting for the 12V to stabilize. I let it run in this mode for a while to see if it would put any energy into the batteries in this state. The BMS in each battery runs of just the batteries so they have to have some charge to bring up the BMS. Meanwhile, I looked through all the settings I can reach easily and found it has only 58 miles on it. I guess that means not too many parts are worn out (except the abused batteries). After an hour of charge, I pulled the 120v plug and low and behold, it kept running for a while. After another 2 hours on the charger, I measured the voltage of both batteries with a meter. With 280 C sized Ni-Cad cells in series, the voltage is supposed to stay between 280 and 410. Battery 1 showed a voltage of only 90 volts. Battery 2 showed a more healthy 289 volts. I have two other batteries (one without BMS that I can take cells from) that with some luck will let me come up with 2 working packs. This would let me debug the rs485 BMS protocol so I can emulate it if I need to (if I go with Lithium). It also would let me try out the motor and all the electrical devices and see if they work. Not sure why it still thinks the 12v is not stable but may be because of the 90v battery. I'm going to try to build a set of cable extenders for the batteries so I can debug them outside the vehicle (much safer and easier). Please be careful if you are dealing with high voltages such as this. I bought some 500v lineman's gloves so I won't get hit with a fatal voltage if I get across the battery voltage while working on it. I'm off to look up Molex connect numbers.

Monday, July 14, 2008

Purchase and transporting to its new home


On Friday night July 11, 2008, I finalized the deal to purchase a used Twike from its current owner. It was hot and the trailer was just the right size so that with a little padding it was safely on its way to its new home. If you ever need to transport a Twike, the 5' x 9' open trailer from U-Haul (the OA metal one) is a perfect fit. I measured it with a tape measure before I rented it just to be sure. I also used their blanket pads and a inner tube to cushion the Twike for the ride. Right now it is resting at the home of the nice folks at Synkromotive in Northwest Portland. They are the hotbed of EV activity in Portland! It's structure is solid but has a couple of problems. The batteries are shot (10 year old Ni-Cad batteries that were not properly cared for) and some minor parts need fixing/upgrading. The first step is to get some sort of working battery setup to see that all the electronics (controller, charger, battery management system, etc) all work. To that end, I will be trying to condense 4 bad packs into 2 working ones. Tonight I glued back together the two wood pieces that hold the display and keypad. I will reinforce it before I reinstall it to prevent the design flaw that caused the problem in the first place. Once that is done, I can reconnect the display and attempt to charge the existing battery packs. More photos in an album at Fotiki. I also scanned and uploaded photos taken in 1998 in Switzerland by Kent H about the time this Twike was built.