Monday, July 30, 2007

Debugging, Debugging, Debugging...

Okay, things don't seem to be working too well. We have three issues:

1. The controller simply cuts out at high acceleration (bad)

2. Many times the controller doesn't even start up at all

3. There's very little power from the system, I can't go much above 30mph

After sending error logs to Azure Dynamics, they came back with the following:

"Vehicles with improper or substandard grounding and shielding sometimes exhibit nuisance errors flagged as EE3LastError = 16. Once every measure for improving the grounding and shielding has been taken, it is OK to disable this error if the problem persists. This can be achieved by setting EE2DisableChargedError = 1."

It's very true that I forgot to add the grounding strap to the DMOC controller that ElectroAuto provided. So I added the strap with anti-corrosion compound and made sure to scrape the metal clean on the bottom side of the bolt on the chassis to make a good contact.

Here's the grounding strap provided by ElectroAuto bolted in. Unfortunately, this didn't help much with the problem. I found that turning down IdsMax from 400 amps to 380 amps did help the problem. Also turning down the MaxAccelTorque from 100Nm to 85nM helped too.
Given that the car has not a lot of power to start with, I set the EE2DisableChargedError to 1 to get past the issue with all the original settings.

Okay, next up is the problem with things just not starting at all. I logged more variables and saw that the ISR2CarDirection status register was zero when the car failed to start and 1 when the car worked. This pointed to the "Forward" signal on pin 29 of the DMOC controller not getting properly grounded.

I double checked the connections on the neutral-start relay in the engine compartment and everything looked fine. I even looked at the contacts to make sure they were in the right place. It turns out when I wiggled the wires on pins 6 and 9 ("ground" and "forward"), the CarDirection bit randomly toggled between zero and one.

To debug further, I took two other wires with crimps and measured the resistance between the two contacts on the relay. The resistance was often infinite or around 5-10 ohms. This really caught me off guard since I put a lot of faith in relays, especially Potter and Brumsfeld's. I'm probably going to take the relay out tomorrow and see if I can open it up to see if something is damaged. I would have suspected my own wiring, but not the relay... (sigh).

I have to show off the car tomorrow to a bunch of friends and I can tap the neutral start relay now to get things running.

That leaves the problem of not having a lot of power. I could get up to about 30mph on residential streets in 2nd gear, but not much past that. I'm guessing I'll have to shift up and take the torque hit.

The power thing was really confusing to me because the current measurements as listed in the controller ccShell diagnostic tool said 400 amps. I wasn't seeing a huge voltage drop, so I didn't believe the controller, at least from a DC-current point of view. Sooooooo, I ran out to my favorite overpriced EV hardware store: WestMarine. They had a 150 amp shunt-based ammeter there for $90 (ouch).

This is the 150 amp ammeter shunt. It's in the place of the most-positive battery terminal in the fuel compartment. The shunt is remarkably small compared to the pictures I've seen of the ElectroAuto shunt. Also, placing it in the fuel compartment makes it much closer to the dashboard, so there will be less signal loss over the shorter wires to the dash.

Here's the ammeter dial itself (the camera flash whites out the background). It seemed to work quite well. At full acceleration, it pegs at 80 amps almost all the time. This is a lot less than the 400 that the ccShell window states. I suspect that the 400 amps is some internal calculated number of instantaneous current going through the stator instead of an actually measured value.

After messing around with several parameters, the only ones that affected the current draw were the EE?MinPowerAccel, EE?NormPowerAccel and EE?MaxPowerAccel. Since I haven't hooked up the dashboard switches and dials, the controller was operating in maximum power mode, so tweaking EE?MaxPowerAccel would limit the current to 40amps or raise it up to 95. I took a chance and bumped up the MaxPower from 31000 to 50000. I'll have to double check the power spec of the AC24 motor before using this too much.

Okay, enough for today. The kit requires the 12V accessory battery to run the exhaust fans while the car charges overnight, so I altered the circuit to use an external 12V laptop supply instead so I wouldn't drain the accessory battery.

Here's my temporary charging setup. The Zivan charger is in low-current mode (12 amps) and I have the 12V laptop supply also plugged in to run the exhaust fans.

Tomorrow: taking a break
Wednesday: dissecting the neutral-start relay and figure out why it doesn't work.
(I can replace it with the front charger interlock relay in the short term...)

No comments: