That's right, it's payback time! I've broken 3000 miles and instead of doing my first oil change I'm going to add up all the payback I've made so far from this car project after bleeding into it for two years.
We'll start with mileage. I've driven about 3200 miles so far, and when you compare the cost of electricity to the cost of gas, I save $0.205 for every mile I drive when compared to driving my Jeep Cherokee. So that's $656 so far saved in gas! Not too shabby. There are a few people who've turned their nose up at the prospect of saving money with an electric car, but let's think about it. The real thing to compare is what's being consumed that's different between the two cars. In a gasoline powered car, you pay for gas and oil. Gas currently costs about $3.50/gal, and at 16 mpg in my jeep, that's $0.219/mile. If you spend $30 on an oil and air filter change every 5000 miles, that's another $0.006/mile. In an electric car you pay for electrons and eventually your batteries will need to be replaced. I pay $0.08 per kWhr and consume an average of 250 Whr per mile. So that costs me $0.020/mile. The battery pack cost about $5500, so the break even point is when I drive 26,830 miles. According to the literature, if taken care of, these batteries should have 80% of their original capacity after 2000-3000 discharge cycles. In my 3200 miles I've recharged the batteries 132 times, indicating I should get 50-75,000 miles of use out of the pack. And even then my range should still be enough to get me to and from work. If I assume the price of gas doesn't go up in the next 5 years, I should still at least break even if I compared my car to one that got 32 mpg.
In addition to the fuel savings, I've had a few unexpected perks from work. I won a contest for "commuter of the year" worth $50. And I also have scored a free covered parking spot for driving an alternative fuel vehicle two years now. Those spots go for about $400 each, and worth every penny during the summer when you can hop into a relatively cool 115 °F car rather than one in the sun at a blistering 150 °F! (not a joke)
So in all, the car has paid me back $1506 in the first year of driving. Not too shabby!
Speaking of blistering heat, last time I was talking about getting my AC running. I had to mount a few fans to the condenser, install a new receiver/drier, mount the compressor, and wire it all up. And I'm glad to say it all went pretty smoothly! Except that the fans didn't want to fit, the receiver/drier had the wrong fittings because it's an aftermarket AC system, and the compressor...well, that actually was just fine. Luckily the weather decided to stay in the 70s and 80s for a couple more weeks and I got all this done.
Here's the compressor and the third belt I bought that finally fit.
And here are the two condenser fans.
Last step is to charge it up and see what happens. I've never done this, so I refer to my friend, Ed, for help. To start, I'm not doing this the "correct" way. As an engineer and a cheapskate, I like to do things just well enough, so I keep the whining to yourself if you want to tell me all the things I did "wrong" here.
Before you do anything, you need to get all the lines flushed out. Well, I've already got a problem here because you're supposed to flush each component individually and you can't flush through the expansion valve. The expansion valve on my car is buried so deep that I couldn't even get to it with the dashboard removed. I decide I'm not gonna flush the evaporator or those lines, I'll just do the condenser. Now, you're also supposed to use a special AC system solvent that will clean out any oils completely. I'm sure those work great and all, but it's way easier to hook a hose to it and blast everything out that way! A little compressed air and it all comes out.
Okay, the system needs a certain amount of oil in it. I'm not sure what exactly the oil does, but I think the main function is keeping the compressor lubricated. It spreads itself throughout the whole system, so you need a certain amount for the compressor, and another certain amount for the rest of the volume of the system. Unfortunately, I can't figure out how much my specific, special, aftermarket system needs, so I guess it's about 6 oz. There are also a number of different types of oil you can use. The old R12 systems use mineral oil. My plan is to switch to R134a, which typically uses an oil that is completely incompatible with mineral oil. Since I didn't flush the whole system out, there's bound to be some left, so I use ester oil, which is supposed to be good for that. There are all different opinions on where in the system you should put the oil at first, and there's a really convenient drain hole on the top of the compressor (to drain the shipping oil) that's just asking for me to fill it. Of course, when I start pouring the hole is too small to pour fast so oil spills everywhere. And now I really have no idea how much oil I've put in. So it's a good thing I had no idea how much to put in in the first place because it really doesn't make a difference!
The receiver/drier's function is to filter the refrigerant and absorb any water in the system. Because of the water part, you can't take the caps off until you're ready to charge or it'll quickly fill with moisture from the air. I wait until the morning of, and of course I have problems getting it hooked up. The current style fittings are all o-rings. The old style fittings are flared fittings (what I have on the compressor). And the really old style is barbed fittings. The barbed fittings are supposed to have these clips that keep the hose clamps from blowing off under pressure. The hose clamps have the clip, but the drier doesn't have the tang that it grabs onto. Oh well, what's the worst that can happen? They'll just blow off if the pressure gets too high right?
I'm not sure who's bright idea this was, but the drier is located in the front passenger wheel well.
Next step is the old R12 fittings should be replaced with R134a fittings. Of course, the high pressure fitting doesn't fit on this compressor. But luckily the low pressure fitting does. Ed has all the connections you could want with his gauges, so no problems there. After that you put a vacuum on the system. This does two things. First, you can see if it's leaking if you can't get the vacuum down low enough. And second, it evaporates any water in the system, which I assume is bad for the compressor and could create vapor bubbles if it turns to a gas. The vacuum drops quickly to 30 inches of mercury, so that's good, and we keep it there 30-40 minutes.
Now's the moment of truth. Is it going to work or not? We prime the system and spin up the motor. Once again, we don't know the size of the system so we don't know exactly how much refrigerant to put in. After running it a while, the high pressure is good, but the low pressure side is reading low. Apparently this indicates a stuck expansion valve. I'm not exactly sure what the expansion valve is doing, but here's the quick story on how the system works. The compressor spins and compresses the freon, and in the process, the freon becomes hot. After this, you want the freon to be as cool as you can get it, so it passes through the condenser. That's the thing in front of your radiator, and one or more fans blows over it to try and get it down to ambient temp. Then this medium temp, high pressure freon travels to the expansion valve. The valve is a big restriction in the system (like if you pinch off a garden hose) and the pressure just past the valve is low. According to the laws of thermodynamics, the temperature has to drop significantly when the freon goes through this rapid pressure drop. Now you have very cold freon that goes through your evaporator that looks like a mini radiator. The fan inside your car blows over the cold evaporator, the air becomes cold, and if you're lucky, it's cold enough that you don't sweat your balls off on the drive home from work. The freon is warmer now and returns to the compressor for another go around.
So this expansion valve is a variable orifice that (I think) changes depending on the flow to try and get something near 30 °F coming out. The pressure on the low side on mine is lower than it's supposed to be, indicating the restriction is too high and the freon is "too cold" when it comes out. The only real problem here is that you will be prone to having ice form on the evaporator. Lucky for me, it's dry heat right now, so icing probably won't happen on my 20 minute commute.
After looking at the gauges for a while we hop in the car and realize it's freezing inside, though it was only about 75 degrees outside at the time so it's not a fair test. But luckily it was still nice and cold a week later when it was 95 out, and hopefully it'll stay that way when it's 115.
Well, you've wasted another chunk of your life reading my blog that you'll never get back so I'll finish it up for now. So long and good luck staying cool!
Restoration and conversion of a Porsche 924 to being a fully electric vehicle.
Sunday, May 18, 2014
Monday, March 17, 2014
Air Conditioning Part 1 and BMS Repair Part 1 Too Many
I've had more trouble by far with one part of the car, and that's the battery monitoring system (BMS). Two weeks or so ago over the weekend we had a big rainstorm here and I think my leaky hatch allowed a little water to drop on the two rear BMS slave boards. Monday morning rolls around and the BMS checks the first 24 batteries and stops. I'm not too concerned because I've had an intermittent issue with the power supply to the rear boards, so I just drive it in to work. On the way home I have the hatch open to stow the sun roof so I wiggle the wires in hopes of bringing it back to life. Well it came back to life, but now it's alerting me that something is wrong. It does such a good job at getting my attention that I have to unplug the whole system to drive home cause it's so dang annoying!
I get home and take a closer look and it doesn't look good. Lots of scorched areas (or carbon scoring if you're a Star Wars fan).
Yikes! Most of that carbon scoring was superficial and must have been water boiling from current passing through it or something. I get it all cleaned up and check all the parts that are easy to check and remarkably it seems like most everything is working. I hook it back up, and alas, everything is not working. 8 of the cell voltages read as zero volts. Long story short I figure out one of the traces was vaporized, so I replaced it with this jumper cable.
I hook it back up, and now the 8 cells read correctly, but there's another one reading too high. I eventually deduce that a resistor somehow must be slightly low. In fact, the resistance must have changed so slightly that it would be difficult to measure that change while on the board. I was able to correct that by desoldering the resistor, cleaning it, and resoldering, and bam, it's all working again! Amazing I was able to do that in just a few days and without an order to Mouser!
So now I need to make sure that never happens again so I have to figure out a way to ensure water can't get on there. I scour the garage and come up with a plastic storage bin that, with a little whittling, fits perfectly over the top of those two boards. And here there are!
I get home and take a closer look and it doesn't look good. Lots of scorched areas (or carbon scoring if you're a Star Wars fan).
Yikes! Most of that carbon scoring was superficial and must have been water boiling from current passing through it or something. I get it all cleaned up and check all the parts that are easy to check and remarkably it seems like most everything is working. I hook it back up, and alas, everything is not working. 8 of the cell voltages read as zero volts. Long story short I figure out one of the traces was vaporized, so I replaced it with this jumper cable.
I hook it back up, and now the 8 cells read correctly, but there's another one reading too high. I eventually deduce that a resistor somehow must be slightly low. In fact, the resistance must have changed so slightly that it would be difficult to measure that change while on the board. I was able to correct that by desoldering the resistor, cleaning it, and resoldering, and bam, it's all working again! Amazing I was able to do that in just a few days and without an order to Mouser!
So now I need to make sure that never happens again so I have to figure out a way to ensure water can't get on there. I scour the garage and come up with a plastic storage bin that, with a little whittling, fits perfectly over the top of those two boards. And here there are!
Now a lot of people ask me if I have AC, and my answer is always no, but it will by summer. Well if you live in Arizona like me, you'll realize that summer is nearly upon us! We hit the 80's a month ago, the 90's could easily be just around the corner, and if we're unlucky it could break 100 in a month. I have no idea how long this is gonna take, so I probably should have started this 6 months ago.
In all fairness to myself, I have actually done a fair amount of work on the AC over the last 18 months. In fact, when I started when I took the dashboard out nearly 2 years ago. The problem is that the AC is an aftermarket unit (i.e. not covered by the manuals), it broke some time ago, and a previous owner left a mess of wires with numerous cut ends in there to confuse me. If you turn the system on, nothing happens. No fans, no clicks, nothing. I decide to start by trying to get the blower fan working. Of course, that's buried in a (hopefully) watertight kick panel that holds the evaporator. When I had the dash out I never was able to figure out how to get it out so I could have a look at where the wires go, so here I am trying to figure it out again.
Luckily, with a fresh look, and a few years to mull it over in the back of my head, the wiring is actually pretty straight forward. There's one mystery green wire that ends near the fuse box, which I correctly guess is the power supply for everything. It actually turns on a relay, and I can make the relay click by applying 12v to green. Now there's a 10 gauge dark blue wire coming from the relay over to a control box. The controls are a slider that changes fan speed (0-4) and an ambiguous "cooler" slider that goes follows a tapered line. I'm not sure if the coldest setting is setting "cooler" to the thin or thick end, but I can figure that out later. The "cooler" slider mechanism has a temperature probe that goes into the evaporator to measure the refrigerant temp, and turns the compressor clutch on and off through a white wire leaving it. I haven't checked yet, but hopefully that wire goes live when everything turns on. The fan slider clicks in 1 of 5 positions, and there are a bundle of wires going off from it. To control the fan speed, this switches in a series resistor to reduce the amount of current going through the fan motor. The resistors are fairly low values and must run hot because the resistors are actually inside the AC ducts to keep them cool!
So that's where my problems show up. I get 12v going to the switch, but the fan doesn't spin. I figure out that one of the wires has a bad connection somewhere, so I cut the connectors off and put new ones on. That's fixed, but the fan still doesn't spin. I trace all the wires and can verify that I get 12v all the way to the last wire that I assume goes into the fan itself. 12v going in and no spinning must mean there's either another connection that's bad or the ground isn't hooked up. Like I said before, it's really hard to see anything in there so I scour the forums for over an hour to try and find a clue on what's going on. I never found the answer there, but I did eventually get on my back with my face pressed into the firewall and found what I was looking for! There's a grommet on the left (driver's) side of the box that houses the fan and evaporator, and there's a red and black wire coming out of it. And guess what??? The black wire isn't connected to anything. I attach that to a convenient screw and the fan is roaring back to life!
Now that I know that's working, I only have one more major hurdle, and that's putting some electric fans on the condenser and shrouding it. I've already built a mount for the compressor and have the belt and pulleys. So a little wrench turning with a new compressor, a few wires, and I'll be ready to evacuate and charge the system and cross my fingers. With a little luck I'll be cruising home with the windows UP before I know it!
Sunday, February 23, 2014
Vacuum Brake Improvement
A while back I posted about the inexpensive vacuum pump I cobbled together from a rotary vane pump and a 12v motor. Today I'm gonna show you how I improved my efficiency by hooking it up to a vacuum switch. One of my biggest issues with these commercial vacuum pumps made for EV cars is they're super expensive. I finally found this reasonably priced ($25) vacuum switch at a website set up for applying veneers.
http://www.veneersupplies.com/products/Vacuum-Pressure-Controller-18-NPT.html
What's really nice is it's got built in hysteresis and an adjustable setpoint. I teamed it up with a vacuum accumulator. If you don't know what that is, it's basically a tank that stores vacuum. Why do we want to do that? The tank allows you to push the brake pedal 4-5 times before the pump has to run again for a few seconds. The whole goal here is to have the vacuum pump run as little as possible because it draws up to 15 amps, and the less it runs, the more efficient my car will be.
So here's my accumulator. It's got two 1/2 inch barbed fittings that I threaded in with a pipe thread that I tapped into the end cap. Then that black thing in the middle is the vacuum switch. To seal it all up I used some silicone. At one time I figured out how much of a tank I needed, but that calculation is long gone. So I'll just have to let you know how it works!
Here's another view. That bulge in the other tube is a check valve. The reason for this is when the pump turns off, you don't want air to rush back into the tank. The valve only allows flow from right to left, out towards the pump.
After I got it all hooked up, I tested it out, and naturally it wasn't wired right. The switch has a great feature that allows you to hooks something up normally on or normally off to suit your needs. Of course, this just means I get to swap wires and try again.
There's a knob on the top that changes the load on a spring inside the switch. This causes the switch to flip at a different pressure. The pump is supposed to be adjustable between 1.5 and 28 inches of mercury (FYI, a perfect vacuum is around 30 inches of mercury). I set it in the middle and tested the brakes. Still a little soft, so I crank it out a bit. Ah, much better! The pump goes back on after 4 pushes on the pedal, so that seems good, and it only runs about 3 seconds before it turns back off again. That's really good! It should reduce my overall power consumption by 3-4%, and give me a corresponding improvement in range. Maybe someday I'll actually test that...
http://www.veneersupplies.com/products/Vacuum-Pressure-Controller-18-NPT.html
What's really nice is it's got built in hysteresis and an adjustable setpoint. I teamed it up with a vacuum accumulator. If you don't know what that is, it's basically a tank that stores vacuum. Why do we want to do that? The tank allows you to push the brake pedal 4-5 times before the pump has to run again for a few seconds. The whole goal here is to have the vacuum pump run as little as possible because it draws up to 15 amps, and the less it runs, the more efficient my car will be.
So here's my accumulator. It's got two 1/2 inch barbed fittings that I threaded in with a pipe thread that I tapped into the end cap. Then that black thing in the middle is the vacuum switch. To seal it all up I used some silicone. At one time I figured out how much of a tank I needed, but that calculation is long gone. So I'll just have to let you know how it works!
Here I've got it installed in the car. Attached to that lower tube I've got a relay zip tied on. The reason for that is the switch is only rated for a mere 10 amps, and I don't want it to burn up when the pump kicks on. So the vacuum pump drives the relay, which in turn drives the pump.
Here's another view. That bulge in the other tube is a check valve. The reason for this is when the pump turns off, you don't want air to rush back into the tank. The valve only allows flow from right to left, out towards the pump.
After I got it all hooked up, I tested it out, and naturally it wasn't wired right. The switch has a great feature that allows you to hooks something up normally on or normally off to suit your needs. Of course, this just means I get to swap wires and try again.
There's a knob on the top that changes the load on a spring inside the switch. This causes the switch to flip at a different pressure. The pump is supposed to be adjustable between 1.5 and 28 inches of mercury (FYI, a perfect vacuum is around 30 inches of mercury). I set it in the middle and tested the brakes. Still a little soft, so I crank it out a bit. Ah, much better! The pump goes back on after 4 pushes on the pedal, so that seems good, and it only runs about 3 seconds before it turns back off again. That's really good! It should reduce my overall power consumption by 3-4%, and give me a corresponding improvement in range. Maybe someday I'll actually test that...
Tuesday, February 18, 2014
Danger: High Voltage
Lots of stuff going on for me lately. I'm rebalancing the battery pack after 9 months or so, making some modifications to the controller parameters, and there's another car show at work to prepare for.
It wasn't long after getting the BMS up and running that the BMS started shutting down the charger because of cells reaching max voltage (rather than the whole pack reaching its desired voltage). It's been doing that for two weeks now, so it's time to rebalance the batteries. Any BMS typically draws some amount of current from the batteries, even when it's not turned on, so it's known that they can misbalance your cells. I attempted to put some balance resistors on mine to minimize this, but I forgot to consider there are two banks of just 7 rather than 8 cells. As a result, two cells are discharged slower than others. Two times I've plugged in a 2 ohm resistor to bleed off some power to keep those cells from going overvoltage. I think soon I'll try hooking in an extra resistor to each and see if that keeps them in balance longer.
I finally got around to balancing this weekend. That involves doing a full charge like normal, then using a balance charger to top off every cell to 3.65 volts. I was surprised at how long it took, but after 3 days I'm finally done! The worst offender was nearly 4 amp-hours out of sync with the others, which was more than I thought there would be. That effectively reduces my range by 7.5%! Obviously my balancing resistors aren't quite configured right. I'll either have to fix that or rebalance more often. Here's a picture of the balancing process.
Last weekend, Joe came over and we had a chance to tinker with some of the controller parameters. As I've boosted the max motor current, the pedal become more and more sensitive. I'm to the point now that when I start up, it's very difficult to keep the car bouncing forward and backwards, making it look like I'm a kid learning to drive a stick shift. We were able to back off on the current rise rate, and seems to have mostly corrected the problem. If it gets worse with higher currents, we may have to make a more serious modification to the controller code to make it less sensitive at short pedal throw.
We also put a little circuit in the controller to measure the voltage spikes coming off it. If you remember back to some of the posts on the controller design, you want to arrange some of the parts so that you minimize any stray inductance. Stray inductance causes voltage spikes, and high voltage kills the electronic parts in your controller. It's time to see how good my design really is. At 600 amps, the voltage peaks out at a mere 265 volts. At 600 amps, the pack voltage could be anywhere from 210-230 volts, so about 50v volt peaks. This is good! The components are rated to 600v, so I shouldn't have to worry about them wearing out early for voltage related issues. For reference, a low voltage controller usually has 200v components and tells you to limit the pack to 150v, and these are typically 500 amp controllers. So I feel I'm right on par, but with room to grow.
A couple weeks ago, we got an email at work saying we'd be having another employee car show. This will be fun since last time I had to tow the car into the parking lot, and drive it the last half mile in with just 1 Hp. I'll have lots of progress to show people. The other good thing about a show is you want your car to look good, giving you some motivation to finish up a few of those cosmetic things you've been ignoring for a while. I made a list of things to do. So far I've put a new crank arm for the driver's side window, added rear seatbelts, and a few other things. However, the thing I'm most proud of is the addition of a couple of stickers! I wanted a couple "danger high voltage" stickers to put on anything where you could access the batteries and came across this beauty that's now displayed in my rear window.
I also got someone on Etsy to print off a couple custom stickers since nobody had the right voltages in DC.
It wasn't long after getting the BMS up and running that the BMS started shutting down the charger because of cells reaching max voltage (rather than the whole pack reaching its desired voltage). It's been doing that for two weeks now, so it's time to rebalance the batteries. Any BMS typically draws some amount of current from the batteries, even when it's not turned on, so it's known that they can misbalance your cells. I attempted to put some balance resistors on mine to minimize this, but I forgot to consider there are two banks of just 7 rather than 8 cells. As a result, two cells are discharged slower than others. Two times I've plugged in a 2 ohm resistor to bleed off some power to keep those cells from going overvoltage. I think soon I'll try hooking in an extra resistor to each and see if that keeps them in balance longer.
I finally got around to balancing this weekend. That involves doing a full charge like normal, then using a balance charger to top off every cell to 3.65 volts. I was surprised at how long it took, but after 3 days I'm finally done! The worst offender was nearly 4 amp-hours out of sync with the others, which was more than I thought there would be. That effectively reduces my range by 7.5%! Obviously my balancing resistors aren't quite configured right. I'll either have to fix that or rebalance more often. Here's a picture of the balancing process.
Last weekend, Joe came over and we had a chance to tinker with some of the controller parameters. As I've boosted the max motor current, the pedal become more and more sensitive. I'm to the point now that when I start up, it's very difficult to keep the car bouncing forward and backwards, making it look like I'm a kid learning to drive a stick shift. We were able to back off on the current rise rate, and seems to have mostly corrected the problem. If it gets worse with higher currents, we may have to make a more serious modification to the controller code to make it less sensitive at short pedal throw.
We also put a little circuit in the controller to measure the voltage spikes coming off it. If you remember back to some of the posts on the controller design, you want to arrange some of the parts so that you minimize any stray inductance. Stray inductance causes voltage spikes, and high voltage kills the electronic parts in your controller. It's time to see how good my design really is. At 600 amps, the voltage peaks out at a mere 265 volts. At 600 amps, the pack voltage could be anywhere from 210-230 volts, so about 50v volt peaks. This is good! The components are rated to 600v, so I shouldn't have to worry about them wearing out early for voltage related issues. For reference, a low voltage controller usually has 200v components and tells you to limit the pack to 150v, and these are typically 500 amp controllers. So I feel I'm right on par, but with room to grow.
A couple weeks ago, we got an email at work saying we'd be having another employee car show. This will be fun since last time I had to tow the car into the parking lot, and drive it the last half mile in with just 1 Hp. I'll have lots of progress to show people. The other good thing about a show is you want your car to look good, giving you some motivation to finish up a few of those cosmetic things you've been ignoring for a while. I made a list of things to do. So far I've put a new crank arm for the driver's side window, added rear seatbelts, and a few other things. However, the thing I'm most proud of is the addition of a couple of stickers! I wanted a couple "danger high voltage" stickers to put on anything where you could access the batteries and came across this beauty that's now displayed in my rear window.
I also got someone on Etsy to print off a couple custom stickers since nobody had the right voltages in DC.
Sunday, January 19, 2014
Battery Monitoring System Fully Functional
It's been a long road, but I'm very happy to say that my battery monitoring system is finally fully functional! There have been quite a few things that happened recently, so here's the whole timeline.
April-May 2013 - Installed all the wires that lead to the + and - terminals of all the batteries.
June-July - I completed the schematics for the BMS, ordered all the parts, and built the circuit boards.
August - Completed the preliminary code for the system and tested it on the bench.
Sept-Oct - Installed the BMS in the car and routed all the necessary wires. Continued to work on the code. Got the code working, but there's too much noise for it to work.
November - I was able to filter enough of the noise to get the BMS to work while the charger is running, but still won't work if the throttle is pressed at all. I decide to reroute the signal wire (master bus) inside the car to shield it from the high voltage cables. Just before I reroute the wires, something happens and I have some fried parts on the circuit boards.
Thanksgiving break - I figure out that two of the microcontrollers on the slave boards have shorted out. In the process of testing I burn up a couple other parts on the boards. I order new parts.
Early December - I get the new parts and install them. The BMS is working again, but rerouting the wires did nothing to improve the EMI (noise) problem.
Christmas Break - I relocate the master board to see if that helps with the noise and it doesn't. Then I try hooking up just the slave board at the front of the car (so it doesn't need the long wires going to the back of the car). In the process I accidentally hook up two wires that shouldn't have touched and poof! two microcontrollers blow up! Interesting enough, it's the same two micros that stopped working just before Thanksgiving...hmm, I might be onto something. I think about it a bit and realize that I have two wires in a bundle that have around 150v differential between them. It's conceivable that the insulation on the wires is not rated for that kind of voltage, so that could have been the reason why those two micros fried. Luckily I had the foresight to order a few spares so I have just enough parts to rebuild the boards. I retest with just the front slave board (careful not to cross the wires I did last time) and it works! I'm successfully able to drive the car around and monitor 24 batteries! Joe has an idea for me on how to fix the problem for the other 46 batteries, so it's time for another parts order.
Early January - And here we are now (so you know that it must have worked). Joe's brilliant idea is that the noise is coming from the wires that go the length of the car (acting like antennae) that are directly connected to the master board. There is a +12v, ground, and signal wire that do this. His theory is that if these are completely isolated from the master board that the noise won't propagate in. So I build a simple circuit that provides isolated power for the slave boards (that's what the 12v and ground was for), and has an optocoupler that isolates the signal. I hook that up and bam, works like a charm! Here's a couple pictures of the prototype board:
After I could tell it was working I soldered all the parts to an actual PCB and mounted it in the car.
Here's that baby in action! It shows the min, average, and max cell voltages, the temperature for the three battery clusters, the BMS allowable charge current (x10), and the cell number that it's currently checking. I changed something on each of the circuit boards and the calibration is off a bit. That's why it's reading a range of 0.15 volts. They're actually quite a bit closer than that.
I also wired up the necessary wires to get the BMS to talk to the charger. The purpose is that the BMS makes sure no individual battery goes over 3.65v. If one gets up there, it tells the charger to slow down and/or shut off to protect it. At first when I got this hooked up, I had some "nuisance faults." This is a different data line than the master bus line, so I added a capacitor and that helped a lot, but not enough. So I changed the code on the charger. The way it works, the BMS sends a square wave to the charger. The lower the frequency, the more current it's allowing, and vice versa. If the charger waits too long, it thinks the BMS came disconnected or stopped working and shuts down. If there's a really short time period (like from noise on the line) it will think one of the voltages is too high and could shut down. To fix this, I did two things. To deal any errant short pulse I make the charger average 8 signals before making a change. To deal with a long pulse that sneaks in (I'm not sure how this happens), I make it require 4 bad signals like that to happen in a minute for it to shut down. I don't have to worry about it taking too long because 8 signals is still a small fraction of a second. I tested it out by disconnecting a wire and it instantly shuts off.
So after having the car out of commission for a while, I'm finally back in business! I plan to drive in to work again tomorrow morning. Woo hoo!
April-May 2013 - Installed all the wires that lead to the + and - terminals of all the batteries.
June-July - I completed the schematics for the BMS, ordered all the parts, and built the circuit boards.
August - Completed the preliminary code for the system and tested it on the bench.
Sept-Oct - Installed the BMS in the car and routed all the necessary wires. Continued to work on the code. Got the code working, but there's too much noise for it to work.
November - I was able to filter enough of the noise to get the BMS to work while the charger is running, but still won't work if the throttle is pressed at all. I decide to reroute the signal wire (master bus) inside the car to shield it from the high voltage cables. Just before I reroute the wires, something happens and I have some fried parts on the circuit boards.
Thanksgiving break - I figure out that two of the microcontrollers on the slave boards have shorted out. In the process of testing I burn up a couple other parts on the boards. I order new parts.
Early December - I get the new parts and install them. The BMS is working again, but rerouting the wires did nothing to improve the EMI (noise) problem.
Christmas Break - I relocate the master board to see if that helps with the noise and it doesn't. Then I try hooking up just the slave board at the front of the car (so it doesn't need the long wires going to the back of the car). In the process I accidentally hook up two wires that shouldn't have touched and poof! two microcontrollers blow up! Interesting enough, it's the same two micros that stopped working just before Thanksgiving...hmm, I might be onto something. I think about it a bit and realize that I have two wires in a bundle that have around 150v differential between them. It's conceivable that the insulation on the wires is not rated for that kind of voltage, so that could have been the reason why those two micros fried. Luckily I had the foresight to order a few spares so I have just enough parts to rebuild the boards. I retest with just the front slave board (careful not to cross the wires I did last time) and it works! I'm successfully able to drive the car around and monitor 24 batteries! Joe has an idea for me on how to fix the problem for the other 46 batteries, so it's time for another parts order.
Early January - And here we are now (so you know that it must have worked). Joe's brilliant idea is that the noise is coming from the wires that go the length of the car (acting like antennae) that are directly connected to the master board. There is a +12v, ground, and signal wire that do this. His theory is that if these are completely isolated from the master board that the noise won't propagate in. So I build a simple circuit that provides isolated power for the slave boards (that's what the 12v and ground was for), and has an optocoupler that isolates the signal. I hook that up and bam, works like a charm! Here's a couple pictures of the prototype board:
After I could tell it was working I soldered all the parts to an actual PCB and mounted it in the car.
Here's that baby in action! It shows the min, average, and max cell voltages, the temperature for the three battery clusters, the BMS allowable charge current (x10), and the cell number that it's currently checking. I changed something on each of the circuit boards and the calibration is off a bit. That's why it's reading a range of 0.15 volts. They're actually quite a bit closer than that.
I also wired up the necessary wires to get the BMS to talk to the charger. The purpose is that the BMS makes sure no individual battery goes over 3.65v. If one gets up there, it tells the charger to slow down and/or shut off to protect it. At first when I got this hooked up, I had some "nuisance faults." This is a different data line than the master bus line, so I added a capacitor and that helped a lot, but not enough. So I changed the code on the charger. The way it works, the BMS sends a square wave to the charger. The lower the frequency, the more current it's allowing, and vice versa. If the charger waits too long, it thinks the BMS came disconnected or stopped working and shuts down. If there's a really short time period (like from noise on the line) it will think one of the voltages is too high and could shut down. To fix this, I did two things. To deal any errant short pulse I make the charger average 8 signals before making a change. To deal with a long pulse that sneaks in (I'm not sure how this happens), I make it require 4 bad signals like that to happen in a minute for it to shut down. I don't have to worry about it taking too long because 8 signals is still a small fraction of a second. I tested it out by disconnecting a wire and it instantly shuts off.
So after having the car out of commission for a while, I'm finally back in business! I plan to drive in to work again tomorrow morning. Woo hoo!
Saturday, November 9, 2013
Let me spin you a story about Headlight Repair
Last week I got off work a bit after 5 o'clock and it was getting a little dark out. Suddenly I'm reminded of something I've been ignoring for months, that my headlights don't work all the time. The problem isn't that the lights don't go on, it's that the motor doesn't always want to lift the lights up. No big deal, the sun has just set and there should be plenty of light to make it home.
About halfway home I get a call from my wife. She say we're going to have quesadillas for dinner tonight, and you know what make a good quesadilla right? Tortillas. So now I've got to stop at the grocery store and now I'm not sure I have enough time to make it home before it's too dark. Well, the motor doesn't work immediately, but sometimes if I leave them on long enough they'll suddenly pop up a few minutes later. Maybe that'll work for me. I rock the switch into the first position, the parking lights go on, and two miles later the headlights decide to go up. Perfect! Now I can just leave them up when I go into the store.
I get to the store and realize I've never really used the headlights, so I'm not sure if they'll want to stay up when I turn off the car. I park, turn off the ignition, and toggle the switch back to off and the headlights stay up, but the parking lights stay on. Funny, but I can probably get in and out of the store before my battery runs dry. I run in, grab the tortillas, and I'm back to the car in 10 minutes. I hop in the car, toggle the switch back to parking lights only, turn on the car, then flip on the headlights...and the headlights flip back down. Dang it! First of all I'd apparently flipped the headlights ON before I went into the store and the lights apparently don't work anymore either, then when I thought I was turning them back on I actually turned them off and now they're stuck down. But I hadn't quite put this together yet.
Well, I've got a ways to go through the parking lot before I actually get on the street, so maybe they'll pop up before I get there. They don't. But there's no traffic, it's not terribly dark, and I'm only two miles from home, so what the heck. I pull out on the street and finally get a stroke of luck. The lights pop up in a quarter mile and the headlights actually turn on this time! I make it to within 100 feet of the house and the lights suddenly flick off again. Sheesh, time to fix the headlights!
Amazingly, I find a website where a guy goes into tons of detail on how to rebuild the motor on a 944 and it looks identical to mine. Here's the motor with the first dust cover removed and manual knob pulled off.
The whole thing is covered in this rubber dust boot, and amazingly it's totally soft still. I figured it would want to just crack and fall apart.
Two screws removed and the case comes off. You can see the commutator (the copper colored thing) is pretty grooved and not very smooth.
The whole rotor assembly comes out if you remove one screw with green goop on it. I chuck it up in my drill press and sand it down with some fine grit paper.
There, nice and shiny!
Next step is the switches (which is actually the real problem. How do I know it's the real problem you say? Well, I actually put the motor back together and reinstalled it in the car only to find that it worked exactly as it had before. That's why!). You can see the switch contacts on the right that ride against this plate on the left. There are plastic "interrupters" at the end points of travel that turn them off and on. There was a little bit of tarnish and a few rough spots on the plate, but not much. I sanded it down really nice and applied a really light film of dielectric grease to the surface. The switch contacts had a small amount of stuff built up on them, so I cleaned those too. I honestly didn't think this would make things any better, but it worked perfect after cleaning this stuff up! By the way, don't lose the tiny ball bearing that's in the center of the plate on the right.
Apparently the required number of screwdrivers to complete this job was 5. As time goes by, more and more tools make their way onto the workbench and don't get put away and I eventually clean the whole thing up. There was one time when I counted how many screwdrivers I picked up and it was 18! Apparently that's my favorite tool.
Woo hoo, the lights flip up! Crap, the lights didn't switch on! Well, at least I'll have something to do over the weekend right?
About halfway home I get a call from my wife. She say we're going to have quesadillas for dinner tonight, and you know what make a good quesadilla right? Tortillas. So now I've got to stop at the grocery store and now I'm not sure I have enough time to make it home before it's too dark. Well, the motor doesn't work immediately, but sometimes if I leave them on long enough they'll suddenly pop up a few minutes later. Maybe that'll work for me. I rock the switch into the first position, the parking lights go on, and two miles later the headlights decide to go up. Perfect! Now I can just leave them up when I go into the store.
I get to the store and realize I've never really used the headlights, so I'm not sure if they'll want to stay up when I turn off the car. I park, turn off the ignition, and toggle the switch back to off and the headlights stay up, but the parking lights stay on. Funny, but I can probably get in and out of the store before my battery runs dry. I run in, grab the tortillas, and I'm back to the car in 10 minutes. I hop in the car, toggle the switch back to parking lights only, turn on the car, then flip on the headlights...and the headlights flip back down. Dang it! First of all I'd apparently flipped the headlights ON before I went into the store and the lights apparently don't work anymore either, then when I thought I was turning them back on I actually turned them off and now they're stuck down. But I hadn't quite put this together yet.
Well, I've got a ways to go through the parking lot before I actually get on the street, so maybe they'll pop up before I get there. They don't. But there's no traffic, it's not terribly dark, and I'm only two miles from home, so what the heck. I pull out on the street and finally get a stroke of luck. The lights pop up in a quarter mile and the headlights actually turn on this time! I make it to within 100 feet of the house and the lights suddenly flick off again. Sheesh, time to fix the headlights!
Amazingly, I find a website where a guy goes into tons of detail on how to rebuild the motor on a 944 and it looks identical to mine. Here's the motor with the first dust cover removed and manual knob pulled off.
The whole thing is covered in this rubber dust boot, and amazingly it's totally soft still. I figured it would want to just crack and fall apart.
Two screws removed and the case comes off. You can see the commutator (the copper colored thing) is pretty grooved and not very smooth.
There, nice and shiny!
Next step is the switches (which is actually the real problem. How do I know it's the real problem you say? Well, I actually put the motor back together and reinstalled it in the car only to find that it worked exactly as it had before. That's why!). You can see the switch contacts on the right that ride against this plate on the left. There are plastic "interrupters" at the end points of travel that turn them off and on. There was a little bit of tarnish and a few rough spots on the plate, but not much. I sanded it down really nice and applied a really light film of dielectric grease to the surface. The switch contacts had a small amount of stuff built up on them, so I cleaned those too. I honestly didn't think this would make things any better, but it worked perfect after cleaning this stuff up! By the way, don't lose the tiny ball bearing that's in the center of the plate on the right.
Apparently the required number of screwdrivers to complete this job was 5. As time goes by, more and more tools make their way onto the workbench and don't get put away and I eventually clean the whole thing up. There was one time when I counted how many screwdrivers I picked up and it was 18! Apparently that's my favorite tool.
Woo hoo, the lights flip up! Crap, the lights didn't switch on! Well, at least I'll have something to do over the weekend right?
Monday, November 4, 2013
BMS Testing and Troubleshooting
Wow, it's been a long time since the last post, though there isn't that much I've been doing other than driving the car and enjoying the nice weather. I've racked up 870 miles so far and still going well!
A while back my 12v battery started to show signs of age. Before I hooked up the DC-DC converter, I had to charge it up with a regular automotive charger every night. I noticed the voltage was getting low even after just one day of driving, then when I hooked up the converter, I realized it was causing a much higher load on the main battery pack than I was expecting. Just to refresh you, the DC-DC converter takes power from my big 230 volt pack and turns it into 13.9 volts to run all the original electronics on the car. Power in equals power out, so when my gauges told me that 5.2 amps at 230 volts was going in, that seemed really high. In fact, that equates to 77 amps, so something's definitely not right (230 x 5.2 / 13.9 x 90% efficiency = 77). I checked the actual current coming out with a clamp meter and saw 45 amps going into the battery and only 16.5 amps coming out. After the battery charges up a bit, that drops off, but it seems to always want to take at least 10 amps to float at 13.9 volts. The biggest problem with this is it seriously eats into my efficiency. 4 amps or so turns into 4 Ah at the end of the day, which is about 20% more than I was using before I hooked up the DC-DC converter. Time for a new battery.
The battery in all gas powered cars needs to be big enough to pump out 600 amps or so to get the engine started. I don't need that, so I saved some weight with a little 18 Ah AGM deep cycle battery. That should be enough to drive for 45 minutes normally on just the battery, and around half that with the headlights on in case of some sort of problem. And here it is! Isn't it cute?
Here's the original for comparison.
After hooking it up, the current draw is down to 18.5 amps in, 16.2 amps out, which seems about right. From the HV pack it's around 2.1 amps, and today on my first drive with the new battery I saw a 3 Ah improvement in my power consumption. My next efficiency improvement will be a vacuum switch that will shut off the pump 95% of the time. That should cut the current draw to about 0.7 amps and I should be pretty close to the original efficiency I was enjoying this summer.
So the whole purpose of this post was to talk about my BMS and I haven't even got there yet. Sheesh, I can't believe you're still reading. Another quick refresher on the BMS is that it keeps track of the voltage of all the batteries and makes sure they stay between about 2.60 to 3.65 volts. I started designing the system about 8 months ago, got the wires in place about 5 months ago, finished the circuit boards 4 months ago, and finally got it all hooked up about 2 weeks ago. I came across a post from back in June where I was optimistic it'd be working within a few weeks, ha!
Apparently I'm way behind on showing you this stuff, so here's a quick summary of where I've come. Here's the master and 3 slave boards all hooked up to the LCD. I'm testing a 3 cell battery on it.
Here's what I spent a few nights working on, it's the code for the system. The master has it's own code, then the 9 microprocessors on the slaves (3 each) have their own. Unfortunately, due to a number of reasons, the #6 and #9 micros have a slightly modified code from the others.
Like I said, I got it all hooked up a couple weeks back and started to test it out. Initially I couldn't get it to work at all, but I soon realized that in the process of modifying and cleaning up Joe's code (his isn't quite the same hardware as mine), I made it a little "too clean" and it didn't work. I almost forgot, that since I don't have a laptop I had to drag a spare desktop computer out and set it up on a table next to the car in order to program everything! And pretty soon it got really annoying after doing it for the 5th evening in a row, but now it's all working and calibrated...well, sort of.
I works great when the car isn't on, but when you start up the motor there's so much electronic noise being emitted that the signal is totally messed up. I've got shielded wire, but that doesn't seem to be helping enough. Joe lent me his oscilloscope and I tried to find the problem.
Here's what the signal looks like when everything is working fine. Not super clean, but clean enough.
Here's what it looks like when the motor is running. You can't even tell it's a square wave.
And here it is with the charger running. Definitely a square wave, but kind of dirty looking, which must be confusing the master board. A simple filter should fix this.
I hooked up a 4.7 uF capacitor to the master bus line and it didn't seem to do anything, so I bumped it up to 47 uF and then 100 uF. Then I took another look at the schematic and realized I hooked them up in the wrong spot...doh! I fixed the connections on the cap and got a flat line...too much capacitance. I backed off to 4.7 uF and this is what I get. You can see the wave never actually gets up to 5 volts even with a long space in between the pulses. Still too much capacitance.
Here I've backed off to 0.1 uF and I still have the shark fins running across the screen.
Unfortunately, the next size smaller capacitor I have is 20 pF, which is 4 orders of magnitude smaller than the last one. Here you can see it's not enough capacitance because it doesn't look much different than before.
Tomorrow I'll have to stop in to radio shack to find a few caps to fill the gap in my hoard. I'm doubtful my $1.30 purchase will be very exciting for them, and they probably won't know what a capacitor is even though they'll insist on helping me, but somehow they'll still stay in business. Well, that's enough rambling for one evening. I'll try not to go 6 weeks before the next one!
A while back my 12v battery started to show signs of age. Before I hooked up the DC-DC converter, I had to charge it up with a regular automotive charger every night. I noticed the voltage was getting low even after just one day of driving, then when I hooked up the converter, I realized it was causing a much higher load on the main battery pack than I was expecting. Just to refresh you, the DC-DC converter takes power from my big 230 volt pack and turns it into 13.9 volts to run all the original electronics on the car. Power in equals power out, so when my gauges told me that 5.2 amps at 230 volts was going in, that seemed really high. In fact, that equates to 77 amps, so something's definitely not right (230 x 5.2 / 13.9 x 90% efficiency = 77). I checked the actual current coming out with a clamp meter and saw 45 amps going into the battery and only 16.5 amps coming out. After the battery charges up a bit, that drops off, but it seems to always want to take at least 10 amps to float at 13.9 volts. The biggest problem with this is it seriously eats into my efficiency. 4 amps or so turns into 4 Ah at the end of the day, which is about 20% more than I was using before I hooked up the DC-DC converter. Time for a new battery.
The battery in all gas powered cars needs to be big enough to pump out 600 amps or so to get the engine started. I don't need that, so I saved some weight with a little 18 Ah AGM deep cycle battery. That should be enough to drive for 45 minutes normally on just the battery, and around half that with the headlights on in case of some sort of problem. And here it is! Isn't it cute?
Here's the original for comparison.
After hooking it up, the current draw is down to 18.5 amps in, 16.2 amps out, which seems about right. From the HV pack it's around 2.1 amps, and today on my first drive with the new battery I saw a 3 Ah improvement in my power consumption. My next efficiency improvement will be a vacuum switch that will shut off the pump 95% of the time. That should cut the current draw to about 0.7 amps and I should be pretty close to the original efficiency I was enjoying this summer.
So the whole purpose of this post was to talk about my BMS and I haven't even got there yet. Sheesh, I can't believe you're still reading. Another quick refresher on the BMS is that it keeps track of the voltage of all the batteries and makes sure they stay between about 2.60 to 3.65 volts. I started designing the system about 8 months ago, got the wires in place about 5 months ago, finished the circuit boards 4 months ago, and finally got it all hooked up about 2 weeks ago. I came across a post from back in June where I was optimistic it'd be working within a few weeks, ha!
Apparently I'm way behind on showing you this stuff, so here's a quick summary of where I've come. Here's the master and 3 slave boards all hooked up to the LCD. I'm testing a 3 cell battery on it.
Here I've got the master and one slave hooked up to the all the cells under the hood. They're all out of calibration right now.
Here's what I spent a few nights working on, it's the code for the system. The master has it's own code, then the 9 microprocessors on the slaves (3 each) have their own. Unfortunately, due to a number of reasons, the #6 and #9 micros have a slightly modified code from the others.
Like I said, I got it all hooked up a couple weeks back and started to test it out. Initially I couldn't get it to work at all, but I soon realized that in the process of modifying and cleaning up Joe's code (his isn't quite the same hardware as mine), I made it a little "too clean" and it didn't work. I almost forgot, that since I don't have a laptop I had to drag a spare desktop computer out and set it up on a table next to the car in order to program everything! And pretty soon it got really annoying after doing it for the 5th evening in a row, but now it's all working and calibrated...well, sort of.
I works great when the car isn't on, but when you start up the motor there's so much electronic noise being emitted that the signal is totally messed up. I've got shielded wire, but that doesn't seem to be helping enough. Joe lent me his oscilloscope and I tried to find the problem.
Here's what the signal looks like when everything is working fine. Not super clean, but clean enough.
Here's what it looks like when the motor is running. You can't even tell it's a square wave.
And here it is with the charger running. Definitely a square wave, but kind of dirty looking, which must be confusing the master board. A simple filter should fix this.
I hooked up a 4.7 uF capacitor to the master bus line and it didn't seem to do anything, so I bumped it up to 47 uF and then 100 uF. Then I took another look at the schematic and realized I hooked them up in the wrong spot...doh! I fixed the connections on the cap and got a flat line...too much capacitance. I backed off to 4.7 uF and this is what I get. You can see the wave never actually gets up to 5 volts even with a long space in between the pulses. Still too much capacitance.
Here I've backed off to 0.1 uF and I still have the shark fins running across the screen.
Unfortunately, the next size smaller capacitor I have is 20 pF, which is 4 orders of magnitude smaller than the last one. Here you can see it's not enough capacitance because it doesn't look much different than before.
Tomorrow I'll have to stop in to radio shack to find a few caps to fill the gap in my hoard. I'm doubtful my $1.30 purchase will be very exciting for them, and they probably won't know what a capacitor is even though they'll insist on helping me, but somehow they'll still stay in business. Well, that's enough rambling for one evening. I'll try not to go 6 weeks before the next one!
Subscribe to:
Posts (Atom)