Tuesday, June 4, 2013

The Master

I had an evening at home with the kids so I decided to watch a movie with them and put together the BMS master board.  

So, master board, what what's a typical day look like for you?  
Well, I take the battery info and give it to the charger and driver.
So you physically take the battery info and give it to the charger?
Well, no, I have cables that do that for me.
So, what is it that you actually do do?
I've got lots of IO's!  I know how to talk with an LCD!  I've got processing power, can't you understand that?  What the hell is wrong with you people?!


In other news, I finished top charging all the batteries, so now the total pack voltage is around 246 volts.  Time to take it for a spin!


There's a 35 mph zone in the neighborhood, so that's my first stop.  One mile up and back and I've got the need, the need for speed.  Out on the open road (well, Gilbert road at any rate) I do a 2.5 mile loop, max out at 50 mph and return home for a total of around 4 miles!  Now's a good chance to see if any of those connections are a little loose, which you can do by touching each one to see if it's hot (with your other hand in your pocket to avoid a deadly shock of course).  Everything seems in order.  The laptop battery wasn't cooperating, so no data from the controller.

The next day I can't help but boost the current to the motor.  Previously I'd had the motor current set to a value of 3, which corresponds to 3 / 8 x 500 x 5 / 3 = 312.5 amps of course.  This time around I toggle it up to 4, or 416.7 amps max to the motor.  The battery limit is still set to a value of 100, which anyone knows corresponds to 166.7 amps, right?  I take a spin around a 4 mile block and check the stats.  Controller temp has reached 102 °F (39 °C), both the motor and battery currents maxed out, I consumed an approximate 1 kWh, and I've got a huge grin on my face!  The battery current limit is actually limiting me to around 55 Hp, so I'll have to bump that up next time around.  Booya!

Tuesday, May 21, 2013

Motor Controller Part 5: The controller strikes back

Last time I was working on doing wiring on all the batteries.  I'd run out of time to finish it before our friends Toni and Warren visited us from Germany.  But between beers and while the girls were playing video games, Warren and I snuck out to get a little work done.  We started by finishing the routing of the 2/0 cables.  I got the cables securely tied up under the car so there's no chance of a stray stick snagging it.  Warren is sitting here with a phone in his hand.  He punched in 9-1, and if the car falls on me he'll just have to hit 1 again.


After finishing the large cables, it was time to finish the small wires.  You can see all the BMS wires are hooked up in the front and we got all the connectors pinned out.  I also wired up the the B- contactor and the vacuum pump.


Here's a close up of those connectors I keep mentioning.  There are three that plug into the BMS boards.  I'm also using them to initially top charge the batteries.


Here are the two clusters of wires coming out the back end of the car.  Finally the spaghetti of wires are neatly bundled into wire looms and all fitted into connectors.  Now I just need to drill a hole into the cargo cubby hole that's behind the wheel well  and stuff the wires in there.


Alright, what's next?  Hmm, can't think of anything else that needs to be done...I guess it's time to test out that controller again!  Just a reminder, I've driven the car about 3 miles on 1/3 of the battery pack.  That's about 80 volts.  Well, a lot of the reason for the custom controller is that I wanted to run higher voltage than 150v, so I really haven't proven anything yet.  An 80v 300 amp controller is pretty common out there, but a 230v nominal controller, that's special and seems to cost $2400-$3800.

Well, no more lollygagging, let's see what happens.  I flip the manual disconnect and that connects the positive side through the precharge resistor.  Next I flip the ignition to engage the B- contactor and that closes the loop and allows the capacitors to charge up.  If something blows, the voltage here probably will be less than the pack voltage, but since the 1k ohm precharge resistor is the only path for current to flow, the current is limited to 1/4 amp and the damage can be minimized.  Once that's bypassed by closing the contactor, the controller determines the amount of current, and if that fails closed it'll be a couple thousand amps.  Booya, 235 volts!

Okay, don't get too excited, it's possible that something still hasn't surfaced yet.  I opened up the manual disconnect and discharge the capacitors by pushing the pedal.  0 volts, so that checks out.  I decide to redo that cycle a couple times just to make sure there's no problem with the caps charging and discharging with no problems.  In the pic below I had opened the manual switch for a while and the voltage reading actually drained the charge a bit to 231 volts.  So now for the real test.  At this point I also hit the "start" button to close the B+ contactor and remove any limitations on battery pack current other than what the controller does.  I put the car in neutral to avoid a runaway and push the pedal...


Aaaahhhhhhhh!  Oh the humanity!  At least I've got insurance now.

 

Just kidding...the motor just spun like it's supposed to.  Though the picture above represents some of the nightmares I've been having over the last couple weeks.  Here's what the car really looks like now.  After slowly working my way up to it, I drove a whopping 0.1 miles to pick up my daughter from a friend's house and successfully made it home!  Woo hoo!


Next up, time to start installing instrumentation and get ready to take it to the DMV!

Wednesday, May 15, 2013

Wires, wires, and more wires

The batteries are all finally mounted in the car.  To get here I spent months designing, fabricating, fitting, modifying, refitting, and finally bolting in the battery racks.  It was a lot more difficult than I imagined it would be, but I guess that's par for the course for such a custom car.  Now that the batteries are strapped in place it's time to wire them all up.  Each of the rear battery clusters has 23 batteries, 46 bolts, 92 washers, 1 fuse, 2-4 copper bars, 22 bus bars, 3 twisted pair wires, and 24 BMS wires.  The next step in wiring these all up is to build the BMS wires.

The BMS wires serve two purposes.  When the BMS functions, a very small amount of current is flowing through the wires while the circuit board monitors the voltage across each cell.  The current flowing out of one cell is not exactly the same as all the other cells in the cluster, and I'm estimating after 3 months, some will be around 1.5% more discharged than others (about 1 Ah).  Eventually, this will cause the charger to stop charging prematurely and the cells will need to be re-balanced.  The BMS boards each have three balance charging ports, and a balance charger will send current through those little BMS wires to do just that.

Each wire comprises a ring terminal where it is bolted to the battery, a 4 amp fuse, and the wire.  To put these wires together I had to crimp the terminal to the fuse and solder it in place.  Without the solder joint, there's a chance that the crimp could come loose and cause some faults.  How do I know this you ask?  Well, I'll just say that Joe highly advised the solder joint.  So clip the fuse to size, crimp on the ring terminal, solder the fuse lead, solder the wire to the fuse, cut the wire to length, heat shrink over the fuse connections.  That should be too bad right?  Only a couple minutes and you're done.  If you add it all up, that took about six and a half minutes.  Multiply by 73 and that's how long it took to make all these dang wires!


Ok, the next step is to hook it all up.  One of the terminals on each battery is aluminum.  When you put aluminum and copper together you have the potential for galvanic corrosion.  To get around this, you put a little conductive anti-corrosion paste and rub it in with a wire brush.  After I got everything installed, this is what it looks like:


To keep things straight I got some sticker number flags and put one on both ends of each wire.  Amazingly some places want to charge you $20 for a sheet of these stickers, but luckily I found some on Amazon for just a couple bucks.


Yeah yeah yeah, I know I'm missing one wire and I forgot to put the fuse in (if you look two pics up).  And no, I swear I didn't do the exact same thing to the battery pack on the other side...I was up until 12:30 last night getting this done, so cut me some slack!  So far, so good.  Now I bundled all the wires together, zip tied them about 700 times, and collected all the ends.  They're not all the same length anymore, so I have to retag them and cut them all down to the right length.  I've gotta be really careful though because each of these are live wires!  If I'm unlucky enough to touch two wire tips together I'll have to spend another 13 minutes making new wires plus another 30 minutes swapping them out.  That also means don't clip more than one wire at once!  So I clip, strip, then crimp a connector pin onto the end of each and now I've got three plugs to go into the plugs of the BMS circuit boards.  I've got all the wires mounted on the batteries, but only 1/3rd of those connectors have been pinned out so far.  Oh yeah, and I'm missing one wire.

I also got all the large 2/0 cables measured, cut, and crimped with lugs, so theoretically I'm all set to test out the controller on 230v.  I just have to screw it all together.  I'm a little battery weary and we've got friends visiting this weekend, so I'm not gonna push it an do something stupid in the testing phase.  So after a weekend of R&R I'll be back next week to see if I can keep the magic smoke in the controller!

Friday, May 10, 2013

Need more volts

Previously I've been driving the car around on just 1/3 of the batteries, or about 80v, but now it's time to put the rest of the batteries in there.  In the back of the car below the floor I have two battery racks that hold 23 cells.  Actually, they're big enough for 23 each, but I only bought enough for 23.  I guess if later on I want 2/70ths more range I can buy two more cells.  At any rate, the way the batteries are tied down, I can't just leave that empty space open so I need a battery "blank" to fill it in.  My father in law has a ton of scrap wood and woodworking tools, so he helped me put a pair of these together.


As part of the battery monitoring system I added the capability to monitor the temperature of the cells, three spots in each cluster of batteries.  To do that I've got some thermistors, which are resistors that vary resistance as a function of temperature.  Here's one of them soldered onto a wire.


Apparently there's a lot of debate of how to "properly" monitor the temp of your cells.  Some people attach the thermistor to the posts on the cell since they're wetted in the electrolyte.  Other people using lead acid batteries will actually put the thermistor inside the battery so it's directly touching the electrolyte.  I'm going simple and just taping it to the side of the battery like this.


Then I loaded all the batteries in those nice racks in the back and clamped and strapped them down the same way I did with the front batteries. 


Pretty clean look from underneath.  You can see the threads on the four eyebolts that are really easy to access here.  Too bad the aluminum clamps are super difficult to get to, but oh well.


Well that's it for now.  This weekend I'll start wiring it all up!


Thursday, May 9, 2013

Charger Part 3 Plus Other Stuff

I'm moving along pretty fast now and the next thing I want to do is get the batteries charged before I mount them in the car.  Once they're in the car, it'll be a lot more difficult to do without the big charger, and most of them are not balanced.  Here are the remaining 46 batteries hooked up to the mini charger.  Just 30 hours and they should be ready to go!


The batteries already in the car have already been balanced as a set, so I can charge them all at once if I have a charger big enough to do that.  Last time I started smoking the charger due to a short circuit through the inductor's magnetic field that created an inductive heater.  In this picture you can see the metal bracket that holds the inductors in place loops right through them and the screws complete the circuit with the case.  It's gotta go!

 Here you can see my solution.  I've taken a plastic pipe and used it to hold the inductors in place.  All fixed, at least I hope so!

I realized I ever showed a full picture of the charger, so here it is.  Due to some rework, the "Batt" and "AC" labels are unfortunately backwards.

The big capacitor is one of the few remaining parts to be strapped down in the charger, and here's how I plan to do that.  You can also see the fan that'll blow directly onto the inductors to keep them cool.

Apparently after this I didn't take any pictures, so you'll have to take my word for it.  I hooked the charger back up to the car and plugged her in.  After a few minutes charging at 2 amps, still no smoke so I ramp it up a bit.  Over the course of 20 minutes I get the courage to boost it to 7.5 amps into the battery pack and so far so good!  The inductors are a little warm to the touch, but not bad.  Should be better when the fan is blowing on them.

The way these batteries work, they are close to 3.3 volts over most of their charge/discharge cycle.  During charge, the voltage will get up to 3.37 volts for ages.  As they approach a full charge, the voltage will start to rise faster and faster.  Since I have no BMS hooked up, if one of the batteries happen to be more charged than the others, the voltage on that one will start to rise while the others are still stalled out around 3.37 volts.  To avoid having some batteries start smoldering, I was checking to voltages every minute or so.  The charger is programmed to raise the entire pack voltage to 3.45 volts per cell.  Once it gets to that point, the charger will back off on the current to maintain that voltage.  The current will slowly decrease and the charger will turn itself off after it drops to 2 amps.  Amazingly, that's what happened!

So that's not even close to how far I've gotten on the car since last time, but I've been picked away at this post for 3 days so it's time to POST!  Maybe next time I'll be testing the car on 230v...

Sunday, April 21, 2013

Charger Part 2

It's been a while since the last post, but as usual that doesn't mean I haven't been working.  Last time I showed you the circuit board for the battery charger full of pieces.  Well I've come a long ways since then.  If you can see through the next of wires in this picture, you can see the charger half assembled.  Actually, almost all the important stuff is there, it's just missing a couple sides of the case.  Joe has written some basic code and we're testing out the boost and buck phases.


Yikes!  It's plugged into a standard 110 VAC outlet!  But it works!


Initially, we're pumping current into a space heater element, but once that works for a while, I drive the car up and we hook it up to the 80v pack in the car.  It works!  We've pumped 8 amps into the pack with no problems...so far...


Here's the nifty LCD for the charger that will display stuff like the current, pack voltage, etc.


I'm not exactly sure what the point of this one was, but I think it's the outputs of the boost and buck phases.


Next I start working on the battery monitoring system (BMS).  The purpose of this is to keep track of the voltage on each battery to make sure that it doesn't get over charged or over discharged.  It comprises a "master" circuit board and three "slave" boards.  Each slave will be hooked up to 23 or 24 batteries.  It will have three microprocessors that check 7 or 8 cells, reports those voltages back to the master board, takes one temperature reading, sends that to the master, then tells the next micro that it's their turn.  Here's the bare  PCB that I designed and just got in the mail.


After a couple hours of working on them, this is what all three of the boards look like.  It's pretty hard to tell, but I've soldered in around 350 surface mount resistors that are a mere 0.080 x 0.040 inches big.  More on these later.


Ahhh, what have I done?!  I sliced two gaping holes in the floor of the car!  Just below these holes are the two rear battery racks.  Initially I was imagining mounting all the batteries in the racks, then lifting them into place.  After a while I determined there was no way I could make that work because the racks were hard enough to bolt up with no weight in them.  So to make it easier I sliced some access holes in the floor that I can drop the batteries into and hook all the wires up through. I'll put some covers over these later, and the floor will still look like it always did.  No holes to lose my groceries through.


Here's a close up of one of the holes with some batteries in place.  Nice rack!


I'm sure you picked up on it earlier, that I've done some more work on the charger that didn't go so well.  The first test charging the batteries was pretty quick.  Just yesterday we were hoping to fully charge that pack and see if the charger would automatically shut off on its own, but we didn't get that far.  After a short time, Joe noticed a funny smell.  I tried blaming it on every piece of electronics in the room, but it was pretty obvious that it was the charger when a small plume of smoke started to rise from it.  After disconnecting the power, we determined the smoke was coming off the inductors, but strangely they weren't hot at all.  Even stranger was the sheet of aluminum that the inductors were mounted to was smoking hot!

Long story longer I figured out we'd accidentally built an induction heater.  It turns out you can't run a continuous electric circuit through an inductor without creating a single winding transformer.  The alternating current through the inductor induces a voltage in the bracket that goes through it, and since there's very little resistance, the current is fairly high, which makes heat...and eventually smoke.  Good thing is I think I can fix the mounting without too much trouble to eliminate the circuit loop.

Next up I'll be pulling the battery racks out to clean and paint.  Meanwhile I'll charge all the batteries and get them mounted in the car.  Wiring will be a project since I need to hook up an extra wire to each cell to check the voltage with.  I'll also finish up the BMS and do some more testing on the charger.  Then a couple dozen more things and I'm done!

Wednesday, March 6, 2013

Battery Charger Part 1

Last time I told you I was going to remove a battery amp limitation from the controller and report back. Well, I changed it from 17 to 170 amps and what a difference it made!  It's like driving a real car!  Right now I'm set to 170 battery amps max and 300 motor amps max and acceleration is really pretty good.  Like as good as any typical passenger car.  Someday I'll see how 833 motor amps feels like...

Back to the topic of the day; the charger.  Part of the reason I don't have all my batteries installed in the car yet is that I have no way of charging them.  In order to save money (and have more fun!) I'm building my own!  Luckily I have a good friend who's blazed the trail on this one and already has a circuit designed for me.  He ordered some printed circuit boards (PCBs) that he designed and now it's time to put everything on them.  The boards cost more the bigger they are, but you get a real break in the price if you stick to a certain size, so Joe used a few surface mount parts to keep it within the size limit.  If you don't know what those are, it's the tiny little pieces that you might see on a computer mother board that's typically placed and soldered on with a machine.  Luckily we had pretty good success putting these on and here you can see the nearly finished board next to a bare PCB.  You might ask why I've got two of these and that's because Joe wanted one and the minimum order is 4 boards.


The controller works like this.  You plug either 115 vac or 230 vac into the controller.  It rectifies the signal coming in, then boosts the voltage up to about 350 volts with a boost converter.  After that is a buck converter stage that reduces the voltage to whatever is required to drive a certain amount of current into the batteries.  The charger continues to do this until a peak voltage is reached.  In my case it will be about 250 volts.  Then the charger will vary the current going into the batteries to maintain that voltage.  The current will slowly drop off, and when it goes below a certain threshold the charger will shut off.

What's a boost and buck converter?  Look it up on Wikipedia.  Both require a large inductor.  In fact, the inductors are big enough, it would be difficult to find one that you could purchase directly.  So what to do?  Make your own of course!  Here are the supplies: 14 gauge magnet wire and a magnetic core.  I'm using 14 gauge wire because I'd like to charge the batteries fast, and that requires a lot of current.  14 gauge wire with 90 °C rated insulation is good up to 25 amps and this has 150 °C insulation so I'm guessing I should be good to over 30 amps.  With a 230 volt 30 amp circuit I can get into the low 20's of amps, but I need to wire up that outlet before I can do that.  At 20 amps, I could complete most of the charge for fully discharged batteries in 3 hours.  After a round trip to work it would be less than half that.


Here's my 4 year old daughter helping me wind out the wires.  26 feet of wire is a lot to handle on your own!


And about an hour later, here they are!  30 amp rated 900 milli-Henry inductors!  Man, my fingers hurt.  And even though I'm writing this a day later...they still hurt.


Next up, finishing and testing the charger, and designing the battery monitoring system (BMS).  I've also got to finish those dang battery boxes!  So many details...