Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 03-16-2016, 01:20 AM   #2641 (permalink)
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
Holy mackeral! A lot has happened in the last few days! I need to check in more often! I've been so busy with my job, I haven't been keeping up. Shaggy, could you tell us what the name plate says on your motor? It's a 3 phase motor? What is the kw rating? What voltage rating? What does
run-pi-test

do? does it just say the test failed? This is sort of hard to debug. There's a lot of unknowns.

__________________
kits and boards
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 03-16-2016, 01:25 AM   #2642 (permalink)
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
Quote:
Originally Posted by tajman View Post

Also, is there still a way to contribute to the development? I saw there was a donation link very early in the thread but it doesn't seem functional anymore.

Tarquin.
YES!!! HAHA. you can send a donation to paulandsabrinasevstuff@gmail.com. Not to sound too needy or anything. LOL. (that was one of the kindest posts I've ever read. It was very encouraging! thank you!!) If you email me, I can send you all the schematic/pcb files. I need to post them to our website or something.

Also, yes, you can disable the resolver circuit on the new board by bringing the chip select pin high.
__________________
kits and boards
  Reply With Quote
Old 03-16-2016, 02:14 AM   #2643 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
Holy mackeral! A lot has happened in the last few days! I need to check in more often! I've been so busy with my job, I haven't been keeping up. Shaggy, could you tell us what the name plate says on your motor? It's a 3 phase motor? What is the kw rating? What voltage rating? What does
run-pi-test

do? does it just say the test failed? This is sort of hard to debug. There's a lot of unknowns.
Hello Paul the motor is 3 phase motor rated for 230v or 380v. I'm using the motor in 230v configuration and it has 8.4A nominal current and the power factor of 0.78.

When I run the pi test I can hear tick tick noise but the motor just remains blocked.. It does not rotates like in many videos that I have seen on thingstodo' channel during the pi test..

Would you please send me a code for pwm testing... Like driving the motor in open loop to be sure that pwm are OK?
  Reply With Quote
Old 03-16-2016, 02:55 AM   #2644 (permalink)
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
The PI test isn't supposed to move the motor. It's supposed to find the right Proportional and Integral constants that let Id and Iq converge fast to IdRef and IqRef. Does it say that the test was a success?
__________________
kits and boards
  Reply With Quote
Old 03-16-2016, 03:00 AM   #2645 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
The PI test isn't supposed to move the motor. It's supposed to find the right Proportional and Integral constants that let Id and Iq converge fast to IdRef and IqRef. Does it say that the test was a success?

No it says pi test failed...
  Reply With Quote
Old 03-16-2016, 03:14 AM   #2646 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
The PI test isn't supposed to move the motor. It's supposed to find the right Proportional and Integral constants that let Id and Iq converge fast to IdRef and IqRef. Does it say that the test was a success?
this is what i got...

run-pi-test
No values passed the test.
Try the following:
pi-ratio 63
run-pi-test
pi-ratio 64
run-pi-test
pi-ratio 65
run-pi-test
Just keep going. If nothing passes the test after you have tried pi-ratio all the way to, say, 200,
it may be that the PI test is too stringent for your motor. Email me at paulandsabrinasevstuff@gmail.com.
config
config
motor-type=1
kp=00062 ki=00001
current-sensor-amps-per-volt=0013
max-regen-position=0390
min-regen-position=0490
min-throttle-position=0510
max-throttle-position=0610
fault-throttle-position=0005
max-battery-amps=0008 amps
max-battery-amps-regen=0008 amps
max-motor-amps=008 amps
max-motor-amps-regen=008 amps
precharge-time=0005 tenths of a sec
rotor-time-constant=005 ms
pole-pairs=001
max-rpm=03000 rev/min
throttle-type=1
encoder-ticks=2048 ticks/rev
pi-ratio=062
raw-throttle=0499
  Reply With Quote
Old 03-16-2016, 11:43 AM   #2647 (permalink)
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
What is your DC input? Do you have current sensors on all 3 lines? Try changing this piece of code:

Code:
				if (myPI.error_q < -120/*-80*/) {  // if it overshot the target by 80, move on to the next one.  We don't want overshoot.
					MoveToNextPIValues();
				}
				else if (myPI.error_q > IqRef + 200) {  //  IqRef is a constant 511.  If Iq swung to -200, that's bad.  Move on.  Iq shouldn't go below zero much.
					MoveToNextPIValues();
				}
				else if (myPI.zeroCrossingIndex == -1 && myPI.iteration > myPI.maxIterationsBeforeZeroCrossing) {  // myPI.zeroCrossingIndex == -1 means it hasn't crossed zero yet.
					MoveToNextPIValues();  // CONVERGENCE TOO SLOW!!!  Move on!
				}
				else if (myPI.error_q > 120/*80*/ && myPI.zeroCrossingIndex >= 0) {  // it already crossed zero, but now is way back up again.  This is oscillation.  move on!
					MoveToNextPIValues();
				}
Where it says -120 and 120, change those to -200 and 200. Maybe the noise on your current sensors is higher.

Also, find this piece of code:
Code:
void InitPIStruct() {
	myPI.Kp = (long)savedValues.Kp;
	myPI.Ki = (long)savedValues.Ki;
	myPI.error_d = 0l;
	myPI.pwm_d = 0l;  
	myPI.errorSum_d = 0l;

	myPI.error_q = 0l;
	myPI.pwm_q = 0l;  
	myPI.errorSum_q = 0l;

	myPI.testFinished = 0;
	myPI.testFailed = 0;
	myPI.testRunning = 0;
	myPI.ratioKpKi = 62; //savedValues2.ratioKpKi;
	myPI.zeroCrossingIndex = -1; // initialize to -1.
	myPI.iteration = 0; // how many times have you run the PI loop with the same Kp and Ki?  This is used in the PI auto loop tuning.
	myPI.maxIterationsBeforeZeroCrossing = 20; //20
	myPI.previousTestCompletionTime = counter10k;
}
and change myPI.maxIterationsBeforeZeroCrossing to maybe 100. If you can't get the PI loop tuned, nothing is going to work. The goal right now is to just get the test to pass, and then slowly make it more restrictive.
__________________
kits and boards
  Reply With Quote
Old 03-16-2016, 11:51 AM   #2648 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
What is your DC input? Do you have current sensors on all 3 lines? Try changing this piece of code:

Code:
				if (myPI.error_q < -120/*-80*/) {  // if it overshot the target by 80, move on to the next one.  We don't want overshoot.
					MoveToNextPIValues();
				}
				else if (myPI.error_q > IqRef + 200) {  //  IqRef is a constant 511.  If Iq swung to -200, that's bad.  Move on.  Iq shouldn't go below zero much.
					MoveToNextPIValues();
				}
				else if (myPI.zeroCrossingIndex == -1 && myPI.iteration > myPI.maxIterationsBeforeZeroCrossing) {  // myPI.zeroCrossingIndex == -1 means it hasn't crossed zero yet.
					MoveToNextPIValues();  // CONVERGENCE TOO SLOW!!!  Move on!
				}
				else if (myPI.error_q > 120/*80*/ && myPI.zeroCrossingIndex >= 0) {  // it already crossed zero, but now is way back up again.  This is oscillation.  move on!
					MoveToNextPIValues();
				}
Where it says -120 and 120, change those to -200 and 200. Maybe the noise on your current sensors is higher.

Also, find this piece of code:
Code:
void InitPIStruct() {
	myPI.Kp = (long)savedValues.Kp;
	myPI.Ki = (long)savedValues.Ki;
	myPI.error_d = 0l;
	myPI.pwm_d = 0l;  
	myPI.errorSum_d = 0l;

	myPI.error_q = 0l;
	myPI.pwm_q = 0l;  
	myPI.errorSum_q = 0l;

	myPI.testFinished = 0;
	myPI.testFailed = 0;
	myPI.testRunning = 0;
	myPI.ratioKpKi = 62; //savedValues2.ratioKpKi;
	myPI.zeroCrossingIndex = -1; // initialize to -1.
	myPI.iteration = 0; // how many times have you run the PI loop with the same Kp and Ki?  This is used in the PI auto loop tuning.
	myPI.maxIterationsBeforeZeroCrossing = 20; //20
	myPI.previousTestCompletionTime = counter10k;
}
and change myPI.maxIterationsBeforeZeroCrossing to maybe 100. If you can't get the PI loop tuned, nothing is going to work. The goal right now is to just get the test to pass, and then slowly make it more restrictive.
Hello my bus voltage is outlet 230vac rectified... But I'm using 300 watt bulb in series with an input.. To be sure if there is some problem they will protect my hardware

I will do these modifications and let you know if it works..

Another question after pi tuned it can work with encoder disconnected?
Thanks again Paul
  Reply With Quote
Old 03-16-2016, 12:02 PM   #2649 (permalink)
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
So, the DC has a 300w bulb attached? It's not going to work. The current is going to be +/- 1 amp at its absolute maximum. But the controller commands current rather than voltage. And the DC input is going to vary all over the place. It would be much easier to test if you just used maybe 4 12v lead acid batteries for your DC input. The encoder is required with this code.
__________________
kits and boards
  Reply With Quote
Old 03-16-2016, 12:25 PM   #2650 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
The encoder is attached in series with Ac input not in series with DC bus voltage...

  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul & Sabrina's cheap DIY 144v motor controller MPaulHolmes Open ReVolt: open source DC motor controller 7381 08-02-2023 11:55 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 10:09 PM
Contest! Name Paul & Sabrina's controller MetroMPG Forum News & Feedback 120 10-22-2011 02:59 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com