View Single Post
Old 05-27-2015, 01:39 PM   #1864 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
I think I found why it wasn't working... My guess is the voltage is low enough that the following fault is happening:

Code:
	if (pi_Id.pwm > MAX_VD_VQ*1024L) {
		pi_Id.pwm = MAX_VD_VQ*1024L;
		faultBits |= PI_OVERFLOW_FAULT;
	}
	else if (pi_Id.pwm < -MAX_VD_VQ*1024L) {
		pi_Id.pwm = -MAX_VD_VQ*1024L;		
		faultBits |= PI_OVERFLOW_FAULT;
	}
	if (pi_Iq.pwm > MAX_VD_VQ*1024L) {
		pi_Iq.pwm = MAX_VD_VQ*1024L;
		faultBits |= PI_OVERFLOW_FAULT;
	}
	else if (pi_Iq.pwm < -MAX_VD_VQ*1024L) {
		pi_Iq.pwm = -MAX_VD_VQ*1024L;		
		faultBits |= PI_OVERFLOW_FAULT;
	}
You don't have enough voltage, so it is ramping up the pwm beyond what it should go to to vainly attempt to achieve 20amps on a line. Evidently, that 39 or 40v point is right on the edge. I should either reduce it to 10 amps for tuning the loop, or increase voltage. I can email you a 10amp version (that is hard wired into the code) if you want to go that route, but I think higher voltage would be better.
__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (05-27-2015)