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

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 01-04-2017, 03:21 PM   #2951 (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
OK good. I was worried that there was a short on one of the IGBTs.

Are all 3 current sensors oriented just like current sensor #3? (so that the 4 prong plug is on the side closest to the IGBT) So that the arrow on the top of the current sensor points away from the IGBT?

One scary possibility is the current sensor could be damaged if the pins were swapped before. I've destroyed one doing that once, but I've also done it before and then the sensor still worked.

__________________
kits and boards

Last edited by MPaulHolmes; 01-04-2017 at 03:26 PM..
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
motorulf (01-04-2017)
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 01-04-2017, 03:33 PM   #2952 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
Yes, all the sensors are as you describe them.

I messured the sensors when given 5V and ground. All measures at 2.5v.
I will try to test them individually while hooking a cable up to a dummy load.
  Reply With Quote
Old 01-04-2017, 04:33 PM   #2953 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
I tested all sensors with a AC load, as i do not have a working DC load with more than 1 amp.
All of the sensors measured the same.
My vacuum cleaner did not consume more than 8 amps, but still i got a value out of the sensors. They show 0.016V in AC, 2.5V in DC, all of them...
I am guessing they are either all broken or all still working.

I think they are working.
Any other suggestions?
  Reply With Quote
Old 01-04-2017, 08:23 PM   #2954 (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 PI values did you get when it said it passed the test? Could you try (at least for now)
rotor-time-constant 30
And make sure you have the good Kp and Ki that you found from the PI test. Also make sure it has the correct 2 pole pairs. If you don't type "save" it will go back to defaults.

Also, just to make sure, could you do the following:

stream-mechanical-speed 1
data-stream-period 1000

Then, twist the motor shaft by hand and see which way it thinks is positive rotation, and also verify that it is giving a good value for revolutions per minute. Just to make sure the encoder is working right. Then turn it the other way to verify that it shows negative rpm. Does all of that work?
__________________
kits and boards
  Reply With Quote
Old 01-05-2017, 12:57 PM   #2955 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
I started the controller with a current sensor disconnected, so it wont draw to much power. Here are my values:
Code:
AC controller firmware, ver. 1.0
High pedal lockout fault.  Ignore this for now.  It's not really a fault.  haha.
There was some hardware caused fault, not originating on the microcontroller (not set
 by me!
config
motor-type=1
kp=41478 ki=00669
current-sensor-amps-per-volt=0320
max-regen-position=0050
min-regen-position=0060
min-throttle-position=0800
max-throttle-position=0820
fault-throttle-position=0020
max-battery-amps=0015 amps
max-battery-amps-regen=0015 amps
max-motor-amps=025 amps
max-motor-amps-regen=025 amps
precharge-time=0050 tenths of a sec
rotor-time-constant=005 ms
pole-pairs=002
max-rpm=06000 rev/min
throttle-type=0
encoder-ticks=0256 ticks/rev
pi-ratio=062
raw-throttle=0369
So then i changed rotor-time-constant to 30, saved, turned off, connected the current sensor, and power it up.
Now the motor spins slowly, not vibrating any more, still makes a humming sound though, and still draws 60A. and as usual just when the contactor closes.

So now i am back at the "original" values:
Code:
motor-type=1
kp=03333 ki=00050
current-sensor-amps-per-volt=0320
max-regen-position=0050
min-regen-position=0060
min-throttle-position=0800
max-throttle-position=0820
fault-throttle-position=0020
max-battery-amps=0015 amps
max-battery-amps-regen=0015 amps
max-motor-amps=025 amps
max-motor-amps-regen=025 amps
precharge-time=0050 tenths of a sec
rotor-time-constant=005 ms
pole-pairs=002
max-rpm=06000 rev/min
throttle-type=0
encoder-ticks=0256 ticks/rev
pi-ratio=062
I tried the stream-mechanical-speed 1.
Rotating the shaft clockwise gives me positive numbers.
Negative while turning the other way.
i try to rotate at around 1 revoultion / sec and then it shows me around 60 rpm.
Seams to work...

Now with these settings the motor is standing still, I can hear a high pitched noise so i believe it is trying to do something. drawing about 0.3 amps.
  Reply With Quote
Old 01-05-2017, 01:43 PM   #2956 (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
OK the Kp 41,000 is way too big. It is probably resulting in some overflows in software. Are you sure that was the result of a PI test? It is supposed to stop at like 17,000 or something like that. I better check the code on that. Stick with The 3333, 50 for this second. It is most likely too small of a value, since the lower the voltage the higher the Kp and Ki required, but let's just see if they work for now.

reconfigure the throttle.

For throttle, if minimum is 300 and maximum is 600, do the following:

max-regen-position 300
min-regen-position 400
min-throttle-position 500
max-throttle-position 600

That will give a good sized deadzone of 401 to 499. Then, if the throttle will stay naturally in the dead zone (no spring pulling it to zero?), type the following:

stream-idref 1
stream-iqref 1
stream-id 1
stream-iq 1
stream-percent-volts 1
stream-raw-throttle 1
stream-mechanical-speed 1
data-stream-period 1000

Then, slowly give it some throttle until it gets into the 500-600 range. Does it spin? Let data stream for a second while in that range. Could you post that data? It can be saved to file, and pasted into excel (comma delimited), or you coudl just get a screenshot of the streaming data.

EDIT: You found a software bug in the run-pi-test! I'm going to fix that.
__________________
kits and boards

Last edited by MPaulHolmes; 01-05-2017 at 01:53 PM..
  Reply With Quote
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
kalidasbala (03-24-2017), motorulf (01-05-2017)
Old 01-05-2017, 03:11 PM   #2957 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
Yes, now itīs working.
I have control over the motor now.
As you can see in the file, i just had to play around with it a bit.
Drawing a maximum of 8-9 amps from battery.

first_run.xls
first_run.csv
  Reply With Quote
The Following User Says Thank You to motorulf For This Useful Post:
MPaulHolmes (01-05-2017)
Old 01-05-2017, 03:28 PM   #2958 (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
__________________
kits and boards
  Reply With Quote
Old 01-05-2017, 03:29 PM   #2959 (permalink)
EcoModding Lurker
 
motorulf's Avatar
 
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
Hahaha!!!

By the way, this is the motor at zero throttle. in the dead zone.

video
The video suffers from VVS (vertical video syndrom) sorry...
  Reply With Quote
Old 01-05-2017, 03:30 PM   #2960 (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 kp and Ki are actually tracking pretty well, but are probably too small. While at zero throttle, I would try
run-pi-test2
(while using those 3333, 50)
and graph the result to see how fast the convergence is.

__________________
kits and boards
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
motorulf (01-05-2017)
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