Wednesday, July 14, 2010

Controller Grounding

After wiring up the controller, we found that the chassis was being grounded somewhere. We weren't sure if this was normal or not or good or not so I researched it.

Kelly User Manuals:
Version 2.3 of the Kelly user manual specifically mentions not connecting B- to GND on pages 10 and 11 (sideways footnote), but in this instance, I believe they are referring to the GND pin on the front and rear panels which is simply a ground connection for input and output sensors. So this doesn't answer my question. However, version 3.1 of the Kelly user manual specifically mentions it being preferable to wire B- to the chassis on page 9.

The Forums:
I signed up for ElMoto.net recently and today I was in the chat room when a couple guys joined: RC and Guff. We got to talking about my bike and I asked about this issue. Each said their bike has neither the low-voltage system (12 volts) nor the high-voltage system (72 volts in my case) grounded to the chassis. When I asked about how to accomplish that with respect to the high-voltage components, at least two solutions were mentioned. I guessed that plastic screws / washers were required, because that's what Lennon did. However, RC mentioned using polycarbonate board, which serves as an insulator. Without using special hardware, a component can be mounted to a sheet of polycarbonate or something like "garolite" and the sheet then mounted to the chassis. This isolates the two, so even if the component isn't internally isolated from its outer casing that won't leak on the bike chassis. For the low-voltage components, I've read posts about running new ground wires to the lights and horn instead of using the chassis.

After chatting with them a while, I searched more and found these threads agreeing with their input
Additional threads:
  • ElMoto.net, Thread 2167 - Main high-voltage components / grounding
  • DIY Electric Car, Thread 14817 - Kelly KDH14500 wiring / grounding
  • V is for Voltage, Thread 4066 - Kelly refund & exchange policies / testimonials
That last thread mentions something interesting: The author of post #5 in states that High-voltage Kelly controllers are not insulated from the chassis ground while low-voltage controllers are insulated from the chassis ground. That might have been the case in July of 2008, but I'm not sure it is still reliable information, and I don't know which controllers he's considering high or low-voltage.

The issue:
Safety is the main deciding factor here. If the bike chassis is grounded to the pack, then (depending on exactly what you touch) you could complete a circuit with your body or with a tool and damage yourself and your bike. I don't feel great about ignoring what the controller manual says, but I'd rather the bike be safe to work on than dangerous because of what could be a poor translation in the manual.

For the record:
Strangely, while researching, I stumbled upon a thread about using a Kelly controller in some Z20 model scooter, and then a completely separate thread referencing the first, concerning (rather questioning) Kelly, their product and their service.
  1. V is for Voltage, Thread 3714 - Moving to a Kelly controller for Z20b
  2. DIY Electric Car, Thread 16961 - Kelly controller quality
I guess the guy whom started that thread on DIY was in a hurry or failed to notice the picture was not of a Kelly manufactured model, but of some controller being provided for electric scooters by some dealer. Anyway, for the record, I've had no problem with Kelly, nor with my Kelly controller (it's been in use for one week). While chatting on ElMoto.net, one member mentioned his Kelly controller has been working just fine for 6 months. My only complaint is about the lack of clarity within Kelly's manual and wiin replies to questions via email. I've emailed sales@kellycontroller.com a couple times regarding both sales and technical wiring support and have always received quick responses. If you can be patient and don't mind reading and thinking a bit, I imagine Kelly will do right by you. If you do email them, use direct and very clear language to ask individual questions. That's what has worked for me. I haven't read about any instances of faulty Kelly controllers, though you do have to seriously study the user manual provided. Even in cases where a controller gets cooked because of user error, it seems they often replace the controller or offer to repair it, usually only for the cost of shipping.

On another side note, ElMoto.net has been a great resource so far. The users seem down to earth and willing to help newbies like myself. There's a lot to figure out, and it seems every bike is slightly different. Starting a thread for my project has helped quite a bit already.

-Colby

Tuesday, July 13, 2010

Rotation

It was a big day for the bike.
The motor turned for the first time today.

I've been making good progress at figuring out wiring details in the past weeks and we finally got to a point where we could pretty safely test the contactor, controller, motor and throttle. It seems to work, which is really exciting. The controller was programmed to greatly limit is output and after minor troubleshooting, the controller's LED showed it was ready and without errors. It's a bit jerry-rigged at the moment, but we'll be making more permanent connections soon in order to do test runs and get it inspected.

Here are a couple pictures of the controller. Like I said, jerry-rigged for testing!

Rear Panel:



Front Panel:



-Colby

Tuesday, June 22, 2010

Pre-Charge Resistors

The name itself says a lot, but honestly, until I went to wire up my motor controller for the first time, I had no idea I needed one, nor why.

What:
The pre-charge resistor does just that - it allows for charging of the capacitors in the motor controller prior to the closing of a of high-current switch or contactor.

How:
Simply put, the pre-charge resistor allows the motor controller capacitors to be in a circuit with the main battery pack even though the contactor is open (not completing a circuit). This by-passing of the contactor allows the motor controller capacitors to stay charged, sometimes called "fully formed". There's a catch involved here related to the importance of selecting the correct resistor for a certain system, so please read this entire post to be aware of important details.

Where:
The pre-charge resistor is wired "across" the main terminals of the contactor. That is (equivalently), one end of the resistor on the battery's positive terminal and the other end of the resistor on the controller's positive battery terminal. Being in parallel with the contactor allows for the "bypassing" (as I call it) of the contactor. Check the documentation on your own motor controller as some may already have a pre-charge resistor internally, but my Kelly KD72401 does not.

Why:
When a contactor "closes" (to complete a circuit), the amount of current which immediately tries to pass between the contacts affects the life of those contacts. In the case of EVs, uncharged capacitors in a motor controller can draw such an in-rush of current, the contacts will arc, creating pits in their surface (which reduces usable contact surface) or perhaps even welding the contacts together. Furthermore, the capacitors themselves can be damaged by such an in-rush current. On the other hand, capacitors that have been mostly pre-charged will draw a much smaller in-rush current, which limits arcing of the contacts and increases the longevity, reliability and performance of the contactor as well as the motor controller.

Don't miss the point:
It is possible to render this component useless so please still be cautious. This is exactly why I like to know what each component does and how...

Many builders put a master on/off switch (in addition to the contactor) capable of handling 300+ amps for manually opening the main battery circuit as a safety measure or convenience. If such a master switch is present, it will of course allow the motor controller capacitors to discharge over time, which is probably normal. The only dangerous part is when the system is wired such that the contactor can be closed while the master switch is off. With the capacitors uncharged, if the contactor and then the master switch is closed, then the pre-charge resistor will not have an opportunity to function. The path of least resistance will be from the batteries, through the master switch, through the closed contactor, and straight into the capacitors. Those capacitors will attempt to charge almost instantaneously and may be damaged in the process.

One fix in this situation is to install another pre-charge resistor, this time for the master switch. This will allow the motor controller capacitors to always be charged and ready - making the contactor's job (and the controller's job) less stressful.


What exactly:
Now that we know their purpose and value, lets take a practical example for application to your own project.

According to the Alltrax Lessons Learned document, the resistance of the pre-charge resistor should be selected based upon battery pack voltage. In my case, 72 volts implies a 1000 ohm, 10 W resistor. The resistor with which Kelly Controllers provided me is only a 300 ohm, 10 W resistor. To know whether or not that will suffice, I checked the following calculations:

Peak in-rush current can be determined by battery pack voltage divided by Equivalent Series Resistance (ESR) of the capacitor bank. This might be measurable on the controller with a digital ohm-meter. Assuming the bank is made of 10 capacitors, each with a resistance of .05 to .5 ohms, the bank's total ESR would be .005 to .05 ohms. Thus, without the pre-charge resistor, 72 volts / .005 ohms = 14,400 amps. The capacitors probably aren't rated for that, so even though it's just the peak and only experience for an instant, it could cause one or more capacitors to short-out internally.

With the pre-charge resistor, the peak in-rush current is 72 volts / 300.005 ohms = .24 amps. Therefore, the peak dissipation in the pre-charge resistor is 72 volts * .24 amps = 17.28 watts.
That's almost twice the 10 watt rating of the provided resistor, but it might be alright since that's just the peak dissipation which falls quickly from 17.27 to 10 watts in around .275 seconds.

Using the rule of thumb that a capacitor is 99.3% charged after 5RC seconds lets us estimate how much time the motor controller capacitors should be given to be (close to) fully charged, where R is resistance and C is capacitance. Assuming the motor controller has a total capacitance of 3300 uF, 5RC = 5 * 300 ohms * (3300*10^-6 farads) = 4.95 seconds.

One member of the diyelectriccar forum suggested selecting the pre-charge resistor based on the size of the battery pack - that is, based on its voltage. He stated a resistor with 1 ohm for every 1 volt of potential difference will result in a current of 1 amp (72 volts / 72 ohms = 1 amp). Also then, 72 volts * 1 amp = 72 watts, which sure sounds like a lot more power dissipation. I don't know much about the chemistry and makeup of resistors, but the guy stated that because the pre-charge was going to take so little time, a sand-filled 10W resistor would probably work. The time calculation checked out, as 5RC = 5*72 ohms *.003300 farads = 1.19 seconds, but I don't know for sure that the resistor I was given is sand-filled. Then again, I'm not sure about my motor controller's total capacitance either, so there are still plenty of variables.

Conclusion:
In the end, the objective is to protect your investment, as well as your own well-being. The critical issue is to make sure the controller always has an opportunity to pre-charge (at an appropriate rate and as completely as practical) to full drive power before closing that last high-current switch.

References:

Graphing / Analysis of RC Circuits

Wednesday, June 16, 2010

Bike Week

Bike Week was great. I took off a few days from work and spent them working strictly on the bike.


We definitely made great progress:
  • new front "dash" created from scratch
  • LED headlight is mounted
  • LED turn signals are mounted
  • gauge cluster is mounted
  • battery cables created / used
  • Kelly controller programmed
  • throttle connected for the first time
The bike hasn't rolled under its own power just yet. Several questions and uncertainties were brought to light regarding exactly how to wire the controller, so we concentrated on other things and made the best use of our time. The following issues or questions came up:
  • wiring my controller specifically
  • pre-charge resistors
  • contactor coil diodes
  • contactor behavior / operation
  • battery installation / maintenance
  • charging standards / connectivity
  • throttle resistance readings
  • language barrier surrounding Kelly controllers
These still remain to be tackled:
  • Tank component mounting
  • Turn signal lighting
  • All wiring
  • Testing / tweaking
  • Insurance
  • Registration
  • Inspection
I'll try and cover some of these as individual posts in the near future to organize what we have now learned first-hand, and that of others. It was fun investing time into this and figuring out how to overcome some pretty tricky design challenges. I'm really looking forward to finalizing in great detail my understanding of all the components and how they work - That and taking a spin around the block on my own, custom electric motorcycle.
-Colby

Saturday, June 5, 2010

Quick Update

I've got a new picture of the bike.
As you can see, the seat has been shortened, the fuel tank is back (innards reworked), the chain mounted, and the electronic throttle is attached.



I love the way this looks, to be honest. It's extremely close to what I envisioned almost two years ago.

Nothing has been wired up just yet, but that should change in about one week's time. I've taken a few days off from work in order to concentrate on the bike with my dad. The next primary objective is to get it running under it's own power. The secondary objective is to get it as close to inspection-ready as possible.

In preparation, I did a bit more research on inspection requirements and ordered a Truck-lite 7" round LED headlight. As far as I know, this is the only DOT approved LED headlight on the market. It's pretty important to me that at least this be completely legal. It was expensive, but I think it will be worth it. I also think it'll look just fine on the front of the bike, but we'll find that out soon enough. The turn signals and license plate bracket are another issue. I'm not sure I'll be able to get parts delivered on time, but we can work on mounting points even without the exact components present. The license plate also needs a light and a place for an inspection sticker, come to think of it.

I'll be thrilled to get the thing rolling on its own and wired up a bit. We'll worry about the specifics of insurance and registration when we get there.
-Colby

Monday, May 24, 2010

Wiry Information

I've been doing a fair amount of research on wiring in the past week. It's not a simple task, figuring out what will work safely and reliably. Even now I am not absolutely confident in my decision, but at least I feel like I know what to try and what not to try.

Note: What I discuss here applies to DC and may only partially apply to AC systems.

What I found out:
I went looking for a chart saying voltage X with a maximum amperage Y requires wire Z. That doesn't really exist - mainly, because every situation is unique. There are several charts that do give you a sense of the tolerances, but please use that information carefully. A minimal list of factors that affect the accuracy of any figures you may find are as follows:
  • AC vs. DC
  • length of the wire
  • Amps / circular mils
  • Insulation rating
  • The immediate environment of the wire
  • Acceptable voltage drop
  • Voltage rating of the wire
My questions from my last post were in regard to the chart at http://www.powerstream.com/Wire_Size.htm I was asking two main questions about main drive system wiring.

The wiring can vary on either side of the controller. Because the motor controller is just a power-converter, it takes in just as much power as it puts out. The key is that it does its input and its output over different, and varying lengths of time. The battery-side of the controller will not be handling large amperages (maybe 70 amps max for me) while the motor-side could see much higher current (limited to no more than 300 amps for 1 minute by my motor). This is most obvious at peak numbers of course, but still applicable at the continuous ratings for my components. The point is: Yes, different kinds of wire could be used to handle the different kinds of power on either side of the controller. Each wire or set of wires could be size appropriately to its own set of influencing factors. You don't have to though. You could use one size as long as it is rated for the most strenuous parts of the system. It means carrying around a little bit more weight and maybe spending a few cents more for both the wire and hardware to couple it to the battery pack, but that's about all it impacts.

As for what gauge to use, now that's kind of tough to answer. As you may know, I'm basing most of my bike on Lennon Rodger's eMoto. Naturally, I looked at his page and found that he used 4 gauge (AWG) welding cable. When I looked up the specs for 4 gauge wire on the PowerStream chart, I was confused. Firstly, there were multiple amperage ratings, but reading a bit helped. The left amperage column is called "maximum amps for chassis wiring" and the preceding paragraph explains that it is A) a conservative rating and B) for wiring in air, not bundled with other wires. Meanwhile, the "maximum amps for power transmission" column is based on the700 circular mils per amp rule.

What the heck is the 700 circular mils per amp rule?
Let me try to build up to it...
Mils does not mean millimeters. Mils means thousandths of an inch (.001 inches). Circular mils can be abbreviated CM and is used as a unit for measuring circular area, but there's a twist in the definition:
  • Circular mils refers to a circular area in terms of the square having sides with length equal to the diameter of said circle.
I suppose a picture would help a lot right about now:
Source RF Cafe

So basically, it's a very rough expression of the area of a circle. We now know that the area of a circle expressed in circular mils is not the exact area of that circle at all. It's an approximation that avoids reference to Pi. And just for the sake of confusion, (somehow) MCM means thousands of circular mils. That is, an area of 400 MCM = 400,000 CM.

Applying our new understanding:
The rule is talking about how much surface area is present for current to flow through. Obviously, since we're talking about circular surface areas, it is in reference to the cross-sectional area of the wires. You may find information about surface areas in regard to a wire with AC, but be careful, as that may be in reference to the longitudinal or "skin" surface area, instead of the "face" or "end" surface area of the wire which I've been describing here.

The 700 circular mils per amp rule, therefore, means that 700 CM of cross-sectional area are being taken into consideration for each amp in the wire. In other words, each amp of load adds roughly .0007 square inches to the cross-section of the wire.

Take a specific example:
PowerStream shows 1 AWG wire as being capable of carrying almost 120 amps according to 700 CM per amp rule. It shows 1 gauge as being .2893 inches in diameter. Since 1 CM is .001 inches, we can divide .2893 by .001, indicating 1 gauge wire is 289.3 mils in diameter. Using our picture and definition, we can put that in terms of CM simply by squaring it. Thus, 289.3 mils * 289.3 mils = 83694.49 squared-mils or CM. Now, we check to see how many amps we can put through a wire with that kind of cross-section by dividing it by 700 CM. 83694.49 CM / 700 CM per amp = 119.56 amps. Cool beans.

Cross-referencing our earlier statement, if each of the 120 amps adds .0007 square-inches (according to the 700 CM rule) to the wire, then the wire's cross-section has an area of .084 square-inches. The chart stated the diameter of 1 gauge as .2893 inches, so we see that .2893 inches * .2893 inches does in fact give us .08369 square-inches. Double cool. That's all without using Pi, so even though it is nice that it matches, do remember that it's not a precise measurement of the cross-sectional area.

After all that, you should know that 700 CM per amp is a "very, very conservative" rule of thumb. Additionally, the shorter the wire, the less area you have to provide for each amp. For my bike, hopefully I'll be dealing with no more than two-foot lengths of high-power wiring. I've read that with such short distances, a rule more like 200 or 300 CM per amp is acceptable. If that's true, then we can safely use a slightly smaller wire. Given that my motor is rated for a continuous load of 125 amps, if I used the 250 CM per amp rule, 125 amps * 250 CM / amp = 31250 CM. Since 1 CM = .000001 square inches, that is .03125 square inches. The diameter of a wire with that surface area is then the square-root of .03125 square-inches, which is .17677 inches. Referencing the PowerStream chart once again, that does fall pretty close to 5 gauge, which is a reasonably accurate result considering Lennon's choice of 4 gauge.

Voltage drop:
The voltage drop along a wire depends on the resistance between the source and the load. All wire resists charge flow and this resistance reduces the amount of voltage being provided further down the circuit. It comes down to how electrons flow through the wire really, so considering water flowing through pipes can help here. The longer the wire, the more electrons there are in the way causing increased resistance. However, the wider the wire, the more electrons are available to carry the current and therefore decreased resistance. Furthermore, all materials have their own unique makeup so the exact resistivity and operating temperature of the conductor in use will definitely have an impact.

These factors are represented by the relationship R = p L / A, where R is the resistance of the wire in ohms, p (rho) is the specific electrical resistance of the conductor in ohm-meters, L is the length of the wire in meters, and A is the cross section area of the wire in square meters. Keep in mind that voltage is actually a potential difference, so L is usually twice the one-way distance between source and load so as to incorporate the losses to and from the load. Also note that temperature will affect the electrical resistivity of the metal.

The amount of voltage drop obeys V = I R, where R is the resistance of the wire in ohms, I is the load current in amps and V is the resulting voltage drop in volts. Based on that relationship, we know how voltage drop will fluctuate, given the details of the circuit. As an example, when the current flowing into or out of the controller varies, we know the voltage drop will vary. Similarly, as the wire heats and cools, it's resistivity will change, resulting in slight variances in voltage drop.

Having a larger amount of supply voltage doesn't change the resistance of the wire, nor the current drawn and therefore does not affect voltage drop. What a larger supply voltage does affect is the percent voltage drop, because it is a ratio of voltage available to the load versus source voltage. That is, if 72 Volts is supplied, and the wire causes a drop of 1 volt, then the ratio is 1/72 which is .01388. In terms of voltage loss, that's 1.38 % which, according to my reading, would usually be very acceptable.

Most of what I found on voltage drop spoke about limiting the percent voltage drop to an acceptable level. The idea is that the load device should be provided an acceptable voltage after the drop caused by the wires. Outside of that acceptable input-voltage range, you're probably sacrificing device life or efficiency or both.

Insulation:
Insulation protects a wire, but can only stand so much heat. If more heat is being generated than the insulation handle, then obviously, it will fail (melt). Apparently, most battery cable has PVC insulation. Most welding cable has rubber insulation and may handle 600 volts. Then there's locomotive-grade DLO cable which may handle 2000 volts. I looked up a few specs for battery cable available at a local auto-parts store only to find that the insulation was rated for a maximum of 60 volts. I know 72 isn't too much of a stretch, but as usual, I'd rather be safe than sorry. I'll probably go with a welding cable instead of at least 4 gauge.

Ideally, wires would be rated for some overall power, instead of just a maximum current. However, as we've seen there are a lot of factors which make that kind of rating difficult to determine. In the end, I'll probably go with two sizes of cable, for the two sides of the controller. Something like 4 or 5 gauge welding cable on the battery-side, and 3 or 4 gauge welding cable on the motor-side of the controller.

References used:
Other news:
Hooper Imports served me well. I got my parts and they look great. I'll have to report back one more time when I get a chance to actually put them on the bike. The point is they sent exactly what I ordered, and they did so quickly, with no fuss and no issues.

Tuesday, May 18, 2010

Back on Track

The Spring semester is over. It went well. Now where was I?

Oh right - So here's the deal:
  • I'm about ready to wrap this project up.
  • It's summer time and I don't have school to worry about.
  • The bike is more or less mechanically, ready.
  • The really detailed work is what remains.
...So I do believe there's plenty left to learn.

The foam gas-tank replacement didn't pan out. Although aesthetics wasn't a huge concern, using that shell and arriving at something functional and appealing just felt afar off. We turned back to the original tank and my Dad did some intricate metal-work in order to have something compact, workable, and down-right nice looking in minimal time. This is the space that will contain the chargers, DC converter, motor controller, main contactor and a fuse or breaker.

So, now that serious electrical wiring needs to be done, I have several questions concerning the new electrical system being installed on the bike:

What gauge wire should I use for my bike?
Lennon used #4 welding wire, which should be the same as size 4 AWG. But how come all the charts I find out there for AWG show very conservative numbers? For example, this site shows #4 wire being capable of only 135 or 60 amps, depending on use (what's the difference between chassis wiring and power transmission, anyway?). A good point my Dad brought up was that there's only so much surface area at our disposal on the controller terminals and that will absolutely place an upper limit on the size of wire we can expect to need.

Will the battery side of the controller need a different gauge than the motor side?
I haven't posted yet about how my motor controller works, but I some-what understand the principle at work, and that the battery side won't (or shouldn't) see more than maybe 140 Amps, while the motor side could see 300+ Amps. I know selecting too large a gauge is not a serious problem, so I guess I'm asking whether or not there's a reason (and what that reason is) to use separate gauges for each side of the controller.

Can my proposed charging system be implemented?
This is not a question of how well will it balance the batteries, but rather, can it work at all. The chargers have been tested and seem to work fine. We just aren't perfectly clear about whether or not we can leave them connected when the bike is being driven, or if we should add a component or place an existing component such that some charging circuit is broken in order to operate the vehicle. I expect it depends on the exact method in which the chargers are wired to the batteries as well as how the chargers are wired internally, so we're just still researching and figuring this out.

Here's what remains to be done:
  • Sort out a wiring diagram for our specific bike.
  • Research, select and install electric drive system wiring
  • Adjust and install drive chain
  • Test throttle switch
  • Program controller
  • First test of electric drive system
  • Break-in the motor
  • Install PakTrakr
  • Re-cloth modified seat
  • Remove and/or treat rust
  • Finish and paint component shelves.
  • Final paint and assembly

Oh, I did want to mention how I found a supplier of certain Lifan parts. Lifan being Chinese makes it kind of a big deal to have a good supplier of parts here in the US. I ordered parts from Hooper Imports. They're in Redmond, Washington and seem to be very genuine and rather-closely tied to both Lifan and American Lifan out of Dallas, Tx. Trust me, I would have ordered parts from American Lifan, considering their convenient location, but their online parts-store has been "coming soon" for quite some time now. I suppose I could have called, but I didn't have part numbers to reference. I feel good about my order to Hooper Imports, and I look forward to verifying I ordered and received the correct items.

I wish I had an image or two to show the state of the bike, but I'll be sure to snap a few in the coming weeks. I may take a few days off work to help get as much of this done as possible. Maybe by the end of June, we'll have something ridable and almost licensable.

-Colby