Saturday, October 6, 2007

Getting the Tachometer and Lights Working

After receiving an updated .css file (ccShell config file) from Azure Dynamics for the DMOC445, I was able to access the EE1SpeedoDiv variable. After setting this to a non-zero value, I attached a scope to pin 25 of the main DMOC connector and (yay!) got a pulse train corresponding to the RPM of the motor.

Here's the pulse train on the oscilloscope. It has a 50% duty cycle and swings the full 12V range. This makes it ideal to drive the 914 tachometer.

Since pin 25 wasn't one of the original wires brought out of the wiring harness by Electro Automotive, I had to modify the DMOC445 connector. This proved to be easier than I thought. Since I had modified the regenerative braking system to not drive the brake lights, I had three extra wires left over. I'll use these to tap into DMOC monitoring functions to drive the tachometer and the red/green indicator lights on the dash.

Here's the main DMOC connector removed from the DMOC. To open up this connector, I used an icepick to lightly bend aside the two small black holding tabs on either end. It was then relatively easy to pop off the red cover.

Here's the same connector with the red cover popped off. You can see the pins that were previously installed by Electro Auto. If you use an ice pick to pry apart the two holding tabs under any pin, that pin will release and slide out the back of the connector.

With my prior modifications, I didn't need the blue, yellow, black/yellow or brown/blue wires, so I pulled them out of the connector and put them back in to new places. Note that your colors may be different from mine. I kept the black/yellow line at pin 19 to act as a ground. I put the blue wire to pin 11 (the READY led) and the yellow wire to pin 34 (the FAULT led). The brown/blue wire went to pin 25 (SPEEDO_BUF) to drive the tachometer.

Now, I was concerned that the tachometer would pull way too much current and possibly short out the DMOC driving signal, so I created a simple 555 timer circuit to drive the tach input signal (black/purple wire in the main wiring harness). The 555 timer doesn't drive that hard and I didn't see any degradation in its output signal. Given that, I simply tied the SPEED_BUF signal from the DMOC directly into the tachometer input wire and (voila!) the tach started working!

Here's the tachometer at around 2600 RPM. I had to adjust the EE1SpeedoDiv parameter inside the DMOC so that the tachometer matched the ISR2Hertz RPM value shown on the laptop. My calibration value for EE1SpeedDiv was 70, but that might vary with different gauges.

Next up was tying the READY and FAULT output lines into the green oil light indicator and red generator light indicator. The original kit doesn't use the red light and the green light is simply grounded. The READY/FAULT output signals on the DMOC are unbuffered 3.3V digital logic outputs. Since the indicators on the dash already have one side tied to the 12V supply, I simply used a 2N2222 transistor (buy a pack of them at Radio Shack) to drive the two indicators. The 3.3V DMOC signals drive the base of the transistor through a 1K ohm resistor. The collector is tied directly to the indicator light and the emitter is tied to ground. When the signal goes high, the transistor turns on, pulling current down through the indicator bulb.

Here's my simple test setup. I just used simple alligator clips to attach everything. By trying different resistor values, I found a reasonable base drive resistor empirically that doesn't load down the DMOC signal but still provides enough current to turn on the transistor.

After making the test circuit, I took a breadboard from Radio Shack and soldered all the components together with some quick-connect solder connectors. The circuit worked fine and the two dashboard indicators now show all the codes that were listed in a previous post.

Here's a simple schematic to show how the transistors and tachometer are hooked up. Click to enlarge the image.

Next up: replacing the pilot bearing in the flywheel and putting the whole thing back together.

1 comment:

Josh said...

Here is another solution:

Designed specifically for EVs and very easy to install.