That is very cool.
I am desperate for a converter plate and coupler solution for the Karmann Ghia/Leaf project I am working on. How did you do yours? Or did you change the transmission also?
Best wishes,
Edd
That is very cool.
Have a look at this thread;KarmannLeafBlower wrote: ↑Fri May 22, 2020 10:51 am I am desperate for a converter plate and coupler solution for the Karmann Ghia/Leaf project I am working on. How did you do yours?
Yeah... sometimes we make this stuff way to complex... so much depends on your skills and the approvals regime you're operating inKarmannLeafBlower wrote: ↑Fri May 22, 2020 12:52 pm What's your reference to KISS? Keep it simple, stupid?
See PMKarmannLeafBlower wrote: ↑Fri May 22, 2020 10:51 amThat is very cool.
I am desperate for a converter plate and coupler solution for the Karmann Ghia/Leaf project I am working on. How did you do yours? Or did you change the transmission also?
Best wishes,
Edd
Fantastic mackoffgrid. Thanks for confirming that for us I was pretty close to the mark at 195v left in the pack to trigger the error. I'm focussing on getting the full Leaf pack in. If I get a chance, I'll add a few more 12v in the system just for a test spin.mackoffgrid wrote: ↑Tue Jun 23, 2020 3:47 am I bench tested my Leaf Gen1 / VCU using rectified mains power. I determined that the Inverter throws an error when the voltage drops at about 175 - 185 volts.
It's not hard to imagine a prius battery plus voltage drop drooping enough to trigger an error when you called for extra current.
Add an extra 12 volt battery (or 2) in series to help if necessary.
Code: Select all
//////timers//////////////////////////////
Metro timer_Frames10 = Metro(10);
Metro timer_Frames100 = Metro(100);
Metro timer_wifi = Metro(1100);
Metro timer_hv = Metro(1000);
int inv_volts_local;
int16_t final_torque_request = 0;
#define INVERTER_BITS_PER_VOLT 2
#define INVERTER_BITS_PER_RPM 2
Code: Select all
//////timers//////////////////////////////
Metro timer_Frames10 = Metro(10);
Metro timer_Frames100 = Metro(100);
Metro timer_wifi = Metro(1100);
Metro timer_hv = Metro(1000);
float Version=2.00;
uint16_t loopcount=0;
unsigned long startime=0;
unsigned long elapsedtime=0;
uint port=0;
uint16_t datarate=500;
int inv_volts_local;
int16_t final_torque_request = 0;
#define INVERTER_BITS_PER_VOLT 2
#define INVERTER_BITS_PER_RPM 2
Code: Select all
void setup()
{
Can0.begin(CAN_BPS_500K); // Inverter CAN
Can1.begin(CAN_BPS_500K); // Vehicle CAN
//Can0.watchFor(0x1da); //set message filter for inverter can. Note sure if I can use two seperate values here. it might just pick 1!
Can0.watchFor();
Can1.watchFor(0x1ff); //just a blank message to block receive from e46 messages.
Serial.begin(115200); //Initialize our USB port which will always be redefined as SerialUSB to use the Native USB port tied directly to the SAM3X processor.
Serial2.begin(19200); //Serial comms with ESP32 WiFi module on serial 2
// Timer3.attachInterrupt(Msgs10ms).start(10000); // 10ms CAN Message Timer
// Timer4.attachInterrupt(Msgs100ms).start(100000); //100ms CAN Message Timer
pinMode(led, OUTPUT);
pinMode(Brake, INPUT);
pinMode(IN1, INPUT); //T15 input from ign on switch
pinMode(IN2, INPUT);
pinMode(OUT1, OUTPUT);
pinMode(OUT2, OUTPUT);
pinMode(OUT3, OUTPUT);
Code: Select all
void setup()
{
Can0.begin(CAN_BPS_500K); // Inverter CAN
Can1.begin(CAN_BPS_500K); // Vehicle CAN
//Can0.watchFor(0x1da); //set message filter for inverter can. Note sure if I can use two seperate values here. it might just pick 1!
Can0.watchFor();
Can1.watchFor(0x1ff); //just a blank message to block receive from e46 messages.
Serial.begin(115200); //Initialize our USB port which will always be redefined as SerialUSB to use the Native USB port tied directly to the SAM3X processor.
Serial2.begin(19200); //Serial comms with ESP32 WiFi module on serial 2
Sensor.begin(port,datarate); //Start ISA object on CAN 0 at 500 kbps
// Timer3.attachInterrupt(Msgs10ms).start(10000); // 10ms CAN Message Timer
// Timer4.attachInterrupt(Msgs100ms).start(100000); //100ms CAN Message Timer
pinMode(led, OUTPUT);
pinMode(Brake, INPUT);
pinMode(IN1, INPUT); //T15 input from ign on switch
pinMode(IN2, INPUT);
pinMode(OUT1, OUTPUT);
pinMode(OUT2, OUTPUT);
pinMode(OUT3, OUTPUT);
Code: Select all
Serial2.print("v");//dc bus voltage
Serial2.print(Sensor.Voltage);//voltage derived from ISA shunt
Serial2.print(",i");//dc current
Serial2.print(Sensor.Amperes);//current derived from ISA shunt
Serial2.print(",p");//total motor power
Serial2.print(Sensor.KW);//Power value derived from ISA Shunt
Serial2.print(",m");//motor rpm
Serial2.print(inverter_status.speed);
Serial2.print(",o");//motor temp
Serial2.print(inverter_status.motor_temperature);
Serial2.print(",r");//inverter temp
Serial2.print(inverter_status.inverter_temperature);
Serial2.print("*");// end of data indicator
Code: Select all
Serial2.print("v");//dc bus voltage
Serial2.print(Sensor.Voltage3);//voltage derived from ISA shunt
Serial2.print(",i");//dc current
Serial2.print(Sensor.Amperes);//current derived from ISA shunt
Serial2.print(",p");//total motor power
Serial2.print(Sensor.KW);//Power value derived from ISA Shunt
Serial2.print(",m");//motor rpm
Serial2.print(inverter_status.speed);
Serial2.print(",o");//motor temp
Serial2.print(inverter_status.motor_temperature);
Serial2.print(",r");//inverter temp
Serial2.print(inverter_status.inverter_temperature);
Serial2.print("*");// end of data indicator
Code: Select all
void readPedals()
{
ThrotVal = analogRead(Throttle1); //read throttle channel 1 directly
ThrotVal = constrain(ThrotVal, 145, 620);
ThrotVal = map(ThrotVal, 145, 620, 0, MaxTrq); //will need to work here for cal.
if(ThrotVal<0) ThrotVal=0; //no negative numbers for now.
if(digitalRead(Brake)) ThrotVal=0; //if brake is pressed we zero the throttle value.
//Serial.println(ThrotVal); //print for calibration.
}
Can someone confirm why this is? Does it have anything to do with direction control?james@N52E01 wrote: ↑Fri Jul 03, 2020 6:18 pm Currently it doesn’t look like the code accepts negative torque commands.
Code: Select all
inv_volts_local = (inverter_status.voltage / INVERTER_BITS_PER_VOLT);
if (T15Status && !Pch_Flag) //if terminal 15 is on and precharge not enabled
{
digitalWrite(OUT3, HIGH); //inverter power on
if (inv_volts_local <190)
{
digitalWrite(OUT1, HIGH); //precharge on
Pch_Flag = true;
}
}
if (T15Status && !HV_Flag && Pch_Flag) //using inverter measured hv for initial tests. Will use ISA derived voltage in final version.
{
if (inv_volts_local>190)
{
digitalWrite(OUT2, HIGH); //main contactor on
HV_Flag = true; //hv on flag
}
}
Where precisely are you measuring these control signals? The contactor drivers in the VCU are open collector, active low, so you'd expect them to be 12V when inactive and ~0V when active;Cookie6000 wrote: ↑Sat Aug 15, 2020 10:20 am When I put the meter across the 12v trigger wires in the HVJB for precharge, neg and main, I can see the pch and neg have 12v triggering them but 0.6v on the Main+ showing the command hasn't been initiated on the VCU.
Yep, I remember that from when I was trying to get it up and running the last time. I need to double check again at the VCU board instead of at the HVJB but pretty sure I was taking measurements on the + side of the contactors. WIll be going at it again tomorrow to check the functions on the board.Kevin Sharpe wrote: ↑Sat Aug 15, 2020 11:32 amWhere precisely are you measuring these control signals? The contactor drivers in the VCU are open collector, active low, so you'd expect them to be 12V when inactive and ~0V when active;Cookie6000 wrote: ↑Sat Aug 15, 2020 10:20 am When I put the meter across the 12v trigger wires in the HVJB for precharge, neg and main, I can see the pch and neg have 12v triggering them but 0.6v on the Main+ showing the command hasn't been initiated on the VCU.
viewtopic.php?f=4&t=179&start=110#p10163
Checked it over and over, top to bottom, even reterminated some connectors. BMS not hooked up yet so, that it out of the equation at the mo. I did notice some small strands of copper from when I was making a connector that were sitting on the board. Not sure if they would have shorted something. I'll just work my way back through the board again and see if there is anything doing what it shouldn't be doing.Kevin Sharpe wrote: ↑Sat Aug 15, 2020 11:32 am Are you sure the main contactor signal wiring/connector is ok? Maybe the driving the car has dislodged a connection.
Is the Leaf BMS connected to the cars CAN network? Could it be shutting down the inverter somehow?