View Single Post
Old 07-23-2009, 03:33 PM   #16 (permalink)
Join Date: Feb 2009
Location: phx
Posts: 260
Thanks: 0
Thanked 48 Times in 38 Posts
Ran into a new problem that I think is purely software.

First, some background. I have my battery volt meter across the controller battery inputs, B+ and B-. Thus, I'm essentially reading the voltage at the controller. This is nice because I can watch the voltage on the caps rise as they precharge, but that's really about it.

Also, I have my contactor wired to the throttle pot switch. I set it up so that the contactor is open when my foot's off the pedal, but closes once it's depressed. It seems that most people have the contactor close for the trip duration, but I like the reassurance that the battery gets disconnected when I step off the pedal. If something goes wrong, my first instinct - to get off the gas - will be a first line of defense in breaking the circuit. The precharge resistor keeps the caps charged when I'm off the throttle.

SO - the issue. I noticed my voltage drop to zero and then rise slowly again like the caps were precharging. This happens when I take my foot off of the throttle too fast.

What's happening, I'm pretty sure, is due to the throttle ramp rate. I take my foot of the pedal, the contactor opens, but the PWM signal hasn't yet gone to zero. So, the controller is still sending power to the motor, but the battery is no longer connected, and the caps get drained to zero.

I'm pretty sure increasing the ramp rate (at least the ramp down rate) will solve this, so it's an easy fix, but a problem I definitely didn't foresee!

I posted this in the other forum...

Testing temperature update!

My probe thing is whacked!

I brought out the rice cooker filled with water and put in a temp probe from my handy clamp meter and the 4th unused probe from my hacked together POS, turned it on and recorded the two values as the water temp rose.

at an actual temp of 58C, my probe read 102C
at an actual temp of 75C, my probe read 152C

I knew it was a little off at lower temperatures, but it's way off at higher temps!

So, firstly, if the top of the mosfet cases are only ~60C, and maybe it's a bit warmer at the junction, that might be ok. It was only a 4 mile trip around the block, so we'll have to see what happens on longer runs or harder accelerations.

secondly, i'd like to fix my frickin code! I didn't necessarily plan my circuit too well and ended up with quite a ridiculous ADC to Temp curve that's 3rd order. Straight from excel, I was using this:

tempfine=0.00000041*(ADC^3) - 0.00055497*(ADC^2) + 0.35803595*ADC - 6.14221231;

where tempfine was initialized as float. I'll admit that I really don't know how this works for microcontrollers - I initially coded it up and loaded it, saw a value that was roughly room temperature, then squeezed a probe in my hand and saw another number that was roughly body temp and concluded it was good! Obviously it isn't!

Any ideas?
ReVolt AZ testing thread:
  Reply With Quote