12-24-2016, 02:43 PM
|
#2911 (permalink)
|
EcoModding Lurker
Join Date: Oct 2016
Location: INDIA
Posts: 11
Thanks: 20
Thanked 0 Times in 0 Posts
|
I was able to get hold of some IGBT at reasonable price. Finding a film cap is getting painful. Is there an alternative, how good are elcaps? If I use elcaps, what precautions needs to be taken?
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
12-24-2016, 03:02 PM
|
#2912 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Electrolytic caps have a higher ESR and stray inductance, and lower ripple current rating, but should be fine for an inverter. It might be a good idea to add a snubber cap or 2 along with the electrolytic, and don't run too high a voltage. Maybe for 600v IGBTs, 300 or 350v max?
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
12-25-2016, 01:35 PM
|
#2913 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
Hello from norhtern sweden!
I have been reading this thread for some time now.
I ordered a populated and tested card from Paul a little while ago. Version 0.3.
I have a few questions.
The board has CAN-bus pins on it, is that supported in software? Or is it a future feature?
I have read the latest firmware source codes i could find (may 2016) and i couldnīt find anything about CAN in them.
Also, it has 2 pins called Voltage, is this actual HV voltage?
I wish to use this controller in my Think City -08. That car has a Vehicle Control Unit to control instrumentation. It would be great if this controller could send CAN messages directly to that VCU.
An other possibilty is to use the RS232 to talk to an other microcontroller that gathers all information and sends CAN to the VCU. is that doable?
Also the voltage input i wish to get data from, it would be great to use it for SOC.
Thank you all for all your effort on this controller, i cant wait to put in my car
I am building the batterypack now. 176 LEV50-cells, Lithium instead of the broken zebra-battery that orginally came in the car
|
|
|
12-26-2016, 01:02 AM
|
#2914 (permalink)
|
EcoModding Lurker
Join Date: Oct 2016
Location: INDIA
Posts: 11
Thanks: 20
Thanked 0 Times in 0 Posts
|
Quote:
Originally Posted by MPaulHolmes
Electrolytic caps have a higher ESR and stray inductance, and lower ripple current rating, but should be fine for an inverter. It might be a good idea to add a snubber cap or 2 along with the electrolytic, and don't run too high a voltage. Maybe for 600v IGBTs, 300 or 350v max?
|
Thanks Paul. I am planning on 600V 2000uF elcap and 600V 2uF snubber.
Do I need a pair of these set or just one elcap+snubber is good enough?
I am planning to run a 220VAC motor for test purposes.
Also I assume I can use a pot instead of a hall-effect throttle. If so, can you suggest me a pot that I can use with the board.
Update: Ok, this is what I got 450V 2200uF elCap and 1.5uF 1000V snubber caps (2 of them). Hope it is ok for an IGBT 600V 400A (mitsubushi- powerex)
Last edited by kalidasbala; 12-26-2016 at 12:45 PM..
Reason: update on purchase
|
|
|
12-26-2016, 01:01 PM
|
#2915 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Quote:
Originally Posted by motorulf
Hello from norhtern sweden!
|
Hej Hej!
Quote:
Originally Posted by motorulf
I have a few questions.
The board has CAN-bus pins on it, is that supported in software? Or is it a future feature?
I have read the latest firmware source codes i could find (may 2016) and i couldnīt find anything about CAN in them.
Also, it has 2 pins called Voltage, is this actual HV voltage?
|
I haven't done the software for it yet. Well, I have, but it was for a different context, so it would be relatively easy to cut and paste the code. Although, there's no support right this second for specific CAN frame parsing or whatever. It's just "send data to the universe, and whoever has the mask to accept it, accept it! And I can also receive bytes!"
The voltage pin takes the stepped down voltage from the high voltage DC bus. It must be stepped down to 0-2v or 0-3v max. For example, if you are using 600vDC (176 lithium batteries in series, rounded to 600 to make the math easier), you would need a 300k resistor that can handle 600*600/300,000 watts, so maybe three 100k, 1watt resistors in series. Like this:
+600v ---------- 300kOhm 2watt or 3watt ---------------- Voltage + pin.
600v ground ------------------------------------------- Voltage negative pin.
Yes, you can use the high voltage data and use it for SOC. That's also something that would have to be added to the software, but wouldn't be too big of a deal.
-Paul
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
12-26-2016, 01:10 PM
|
#2916 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
|
Quote:
Originally Posted by kalidasbala
Also I assume I can use a pot instead of a hall-effect throttle. If so, can you suggest me a pot that I can use with the board.
Update: Ok, this is what I got 450V 2200uF elCap and 1.5uF 1000V snubber caps (2 of them). Hope it is ok for an IGBT 600V 400A (mitsubushi- powerex)
|
YOu can try it out, and if under heavy load, the capacitor gets too hot, you could always add another. 1 test is worth a thousand theories!
Yes, to use a pot instead of a hall effect throttle, you would include R101 (maybe 1k or whatever), and use a 4.7k or whatever resistor for R73. Then, you could use a 0-5k pot or 0-10k pot, or whatever. YOu would then use the pin labeled "OUT" on the HALL connection, as well as the pin labeled POT that is just sitting outside the HALL connection. You would have no use for +5v and gnd for a pot. You just need the 2 wires "out" and "pot".
|
|
|
The Following User Says Thank You to MPaulHolmes For This Useful Post:
|
|
12-27-2016, 01:01 PM
|
#2917 (permalink)
|
EcoModding Lurker
Join Date: Oct 2016
Location: INDIA
Posts: 11
Thanks: 20
Thanked 0 Times in 0 Posts
|
Quote:
Originally Posted by arber333
Well i hope you all had merry christmas and i wish you happy transition to new year 2017, to be close to your families and successful.
Right now i use 2x 100uF 800V in paralel. FFVE6B0107KJE AVX Film Capacitors 800volts 100uF 10% (1 PER) | eBay
They are AVX film caps, very fast and one can sustain 90A in DC link function. I put them in my car instead of two elcaps 4700uF 500V in series and i can see difference instantly. Theres more energy available for instant acceleration, otherwise no special difference.
And of elcaps... if you use them, try making a good rail connection, not wire from elcap to rail. Once my wires from caps to rail melted due to my overzealous testing of low voltage motor operation. I threw elcaps out and i use exclusively film caps now connected with at least 1mm x 15mm copper rails.
Snubbers i use 3x 2uF 1200V. RoT is cca 0,6uF per 100A of IGBT. They have to be fitted directly to IGBT +/- rail contacts to be of any use.
|
Merry Christmas!
I will get another snubber, as it is a direct fit to the IGBT. I am unable to find film caps here - still searching. As a backup let me get another elcap as well, until I find a decent film cap.
Yes the plan is to use the copper rail for now. Still searching for the current sensor, & contactor, hope to get hold of them soon.
|
|
|
12-30-2016, 01:41 PM
|
#2918 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
I see there is an unused input on the dsPIC, as i understand the code it was planned for use as a regen throttle input but i was never used because the PIC cannot read both this and the neighboring temperature input, at least not if both are analog inputs.
So i am thinking, that pin could be used as a digital input for controlling reversing, a feature i really wish to have
So, i was poking around in the code a bit and edited it for my liking.
Im not shure about this though, im am not a programmer or an EE nor have i fully understood the currentRadiusRefRef variable and the sign variable.
I just posting this as an idea for people to have thoughts on, or maybe laugh at
Do NOT USE the code!
Do you guys think this will work?
Also an other idea i had late last night was to build a small board with connector that fits on the icsp header, instead of using the regen_throttle input. This board would use 2 pins (PGC/PGD), one for input of reverse switch, and one for a relay output.
My car has an gear lever that has a solenoid in it, so it can not move between different gears at the wrong moment.
Actually this is just a BIG switch as there is only 1 gear in the box, and all control is done in SW in the original controller...
anyway... thats what the relay is for
Pros with this: it simple to build an extension board that plugs in to existing controller board.
Cons: by using these pins you can not do debugging via icsp anymore. at least not as long the pins are defined as I/O in SW.
that is how i understand it, but i am wrong quite often
Code:
if (RPS_times16 < 8) { // if less than 0.5 rev per second, make sure there's no regen. Also allow changing into reverse
if (currentRadiusRefRef < 0) currentRadiusRefRef = 0;
if (I_PORT_REGEN_THROTTLE == 0) { //check input for reverse switch
reversing = 1;
{
else{
reversing = 0;
}
}
}
if (reversing = 0){
if (currentRadiusRefRef < 0) {
currentRadiusRefRef = -currentRadiusRefRef;
sign = -1;
}
else {
sign = 1;
}
}
if (reversing = 1){
if (currentRadiusRefRef > 0) {
currentRadiusRefRef = -currentRadiusRefRef;
sign = -1;
}
else {
sign = 1;
}
}
|
|
|
The Following User Says Thank You to motorulf For This Useful Post:
|
|
12-30-2016, 01:53 PM
|
#2919 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
...also, i guess i need to invert the throttle value somewhere in the code to control the reversing. I havenīt figured it out yet.
Maybe not the throttle, maybe the IqRefRef or some other refref.
reff reff, voff voff, bark bark... Paul, throw me a bone haha
|
|
|
The Following User Says Thank You to motorulf For This Useful Post:
|
|
12-31-2016, 03:31 PM
|
#2920 (permalink)
|
EcoModding Lurker
Join Date: Dec 2016
Location: northern sweden
Posts: 33
Thanks: 17
Thanked 20 Times in 17 Posts
|
Ok, now i have been hacking away at Pauls code some more.
Now actually think this would work.
As the code is now, it uses maximum regen as maximum reverse. Not very elegant, i know, this will be a separate variable in the future. I thought it would be enough to test it out anyway.
Test it at your own risk, be shure that you understand what this will do before trying it. I havent tested this myself yet, there are probably some errors, both in my thinking and my code... you have been warned.
I marked the code with *'s where i have been touching it.
Code:
// Is there a throttle fault?
if (throttle <= savedValues.throttleFaultPosition) {
faultBits |= THROTTLE_FAULT;
}
if (savedValues2.throttleType == 1) {
throttle = 1023 - throttle; // invert it.
}
// I think I'll work my way left to right. ThrottleFaultVoltage < ThrottleMaxRegen < ThrottleMinRegen < ThrottleMin < ThrottleMax
if (throttle < savedValues.maxRegenPosition) { //First clamp it below.
throttle = savedValues.maxRegenPosition;
}
else if (throttle > savedValues.maxThrottlePosition) { // And clamp it above!
throttle = savedValues.maxThrottlePosition;
}
if (throttle < savedValues.minRegenPosition) { // It's in regen territory. Map it from [savedValues.maxThrottleRegen, savedValues.minThrottleRegen) to [-maxMotorCurrentNormalizedRegen, 0)
throttle -= savedValues.minRegenPosition; // now it's in the range [maxThrottleRegen - minThrottleRegen, 0)
// Do this if we are reversing *******************************
if (reversing = 1){ //Dont invert it, as regen.brake now will mean a forward rotating force *******************************
throttle = __builtin_divsd(((long)throttle) * maxMotorCurrentNormalizedRegen, savedValues.maxRegenPosition - savedValues.minRegenPosition); //*******************************
}
else{ //Do what you did before *******************************
throttle = -__builtin_divsd(((long)throttle) * maxMotorCurrentNormalizedRegen, savedValues.maxRegenPosition - savedValues.minRegenPosition); //*******************************
}
}
else if (throttle <= savedValues.minThrottlePosition) { // in the dead zone!
throttle = 0;
}
else { // <= throttle max is the only other option! Map the throttle from (savedValues.minThrottlePosition, savedValues.maxThrottlePosition] to (0,maxMotorCurrentNormalized]
throttle -= savedValues.minThrottlePosition;
if (reversing = 1){ //Invert the signal and map it so max regen is maximum reverse. This needs its own value defined in code *******************************
throttle = -__builtin_divsd(__builtin_mulss(throttle, maxMotorCurrentNormalizedRegen), savedValues.maxThrottlePosition - savedValues.minThrottlePosition); //*******************************
}
else{ //Hands off! dont touch Pauls code *******************************
throttle = __builtin_divsd(__builtin_mulss(throttle, maxMotorCurrentNormalized), savedValues.maxThrottlePosition - savedValues.minThrottlePosition); //*******************************
}
}
if (temperatureBasePlate > THERMAL_CUTBACK_START) { // Force the throttle to cut back.
temperatureMultiplier = (temperatureBasePlate - THERMAL_CUTBACK_START) >> 3; // 0 THROUGH 7.
if (temperatureMultiplier >= 7)
temperatureMultiplier = 0;
else {
// temperatureMultiplier is now 6 to 0 (for 1/8 to 7/8 current)
temperatureMultiplier = 7 - temperatureMultiplier;
// temperatureMultiplier is now 1 for 1/8, 2 for 2/8, ..., 7 for 7/8, etc.
}
}
else {
temperatureMultiplier = 8; // Allow full throttle.
}
currentRadiusRefRef = __builtin_mulss(throttle,temperatureMultiplier) >> 3; // scale back the current command based on temperature. *******************************
if (RPS_times16 < 8) { // if less than 0.5 rev per second, make sure there's no regen. Also allow changing into reverse *******************************
if (currentRadiusRefRef < 0) currentRadiusRefRef = 0;
if (I_PORT_REGEN_THROTTLE == 0) { //check input for reverse switch, This input is pin 27 (or pin 10 if you use the 40-Pin PDIP verion) *******************************
reversing = 1; //This guy is not defined yet, define him already *******************************
{
else{
reversing = 0; //*******************************
}
}
}
if (reversing = 0){ //We are moving forward, keep up the good work //*******************************
if (currentRadiusRefRef < 0) {
currentRadiusRefRef = -currentRadiusRefRef;
sign = -1;
}
else {
sign = 1;
}
}
if (reversing = 1){ // Now we wanna go backwards, only give it power while rotating backwards. //*******************************
if (currentRadiusRefRef > 0) {
currentRadiusRefRef = -currentRadiusRefRef;
sign = -1;
}
else {
sign = 1;
}
}
Last edited by motorulf; 12-31-2016 at 03:46 PM..
Reason: usage warning
|
|
|
The Following User Says Thank You to motorulf For This Useful Post:
|
|
|