I've got a Honda IMA inverter and planning on using it on a small motorbike project.
The actual IGBT connections and current sensor data are well documented by Tom and Chaz over on diyelectriccar.com
https://www.diyelectriccar.com/threads/ ... ma.163650/
And summarised in this document. However I noticed there is an unexplored optio-isolated data link going from the high voltage to low voltage control logic. After hooking up a scope then a logic analyser for some investigation spotted it was asynchronous serial signal. 8 Bit data, Parity bit, 50000 Baudrate.
A really helpful thing is that the bus voltage is separately controllable so I could very easily identify which two pairs of bytes were responsible for them by attaching a variable PSU and winding it up and down.
This is the output from a cheap 24MHz 8CH Saleae clone logic analyser (£7 from China) and some open source software, PulseView which decoded the serial data and gave a guessed baudrate once I had selected a suitable sampling frequency. 0.0V on the main power bus, Bytes 7 & 8 both zero.
25.0V on the main power bus, Bytes 7 & 8 both both reading accordingly.
Some quick arduino code later and I was able to workout the scaling factor and display IGBT1 and IGBT2 as true voltages (no voltage signal from IGBT3) Oddly IGBT2 voltage output is numerically 20% lower than IGBT1. I have no idea why it should be like this other than maybe some sort of error or fault checking feature.
The screen cap shows the 16 byte data packet with one (or two) start bytes 13 data bytes and one checksum byte followed by the extracted voltages and recalculated checksum. I also recreated the checksum which will eventually be used to discard any false readings generated such as at power up and power down.
I then identified heatsink or IGBT temperature bytes in a similar manner by blasting the heatsink with a hot air gun and observing which bytes were changing. Once identified I put the whole thing in the freezer at -10C and let it warm up to room temperature and then heated with the heat gun to 60C whist monitoring the temperature bytes and actual heatsink temperature with a thermocouple. This allowed me to workout a scaling and offset factor.
The relationship between data bytes and real values are
Code: Select all
V_IGBT2 = (bytes[7] * 8 + bytes[8]) / 4.095;
V_IGBT1 = (bytes[5] * 8 + bytes[6]) / 3.089; // 20% LOWER than IGBT1
temp = -((bytes[11] * 8 + bytes[12])- 631) * 0.6414;
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
int incomingByte = 0;
long timest = micros();
int bytes[16];
int checksum = 0;
int bytecount = 0;
float V_IGBT2 = 0;
float V_IGBT1 = 0;
float temp = 0;
void setup() {
Serial.begin(115200);
while (!Serial) {
}
Serial.println("IMA Internal Serial Monitor");
mySerial.begin(50000);
for (int n = 0; n < 16;n++){
bytes[n] = 0;
}
timest = micros();
}
void loop() {
if (mySerial.available() && bytecount != -1){
timest = micros();
incomingByte = mySerial.read();
bytes[bytecount] = incomingByte;
if (bytecount != -1 && bytecount != 15){
checksum += incomingByte;
}
bytecount ++;
Serial.print(incomingByte, HEX);
Serial.print(" ");
}
if ((micros() - timest) > 3000){ //Think of a better way of detecting the end of the frame
//Default to error if not a frame & checksum
// 1] Count bits then checksum check
// 2] Fail if over XX Miliseconds without incoming byte or frame end.
Serial.print(" IGBT2=");
V_IGBT2 = (bytes[7] * 8 + bytes[8]) / 4.095;
Serial.print(V_IGBT2);
Serial.print("V IGBT1=");
V_IGBT1 = (bytes[5] * 8 + bytes[6]) / 3.089; // 20% LOWER than IGBT1
Serial.print(V_IGBT1);
Serial.print("V ");
temp = -((bytes[11] * 8 + bytes[12])- 631) * 0.6414;
Serial.print(temp);
Serial.print("C ");
Serial.print(" CHK=");
checksum = 0xFF & checksum; //Truncate to 8 bits.
Serial.print(0xFF - checksum + 1, HEX); //Why is +1 needed here.
Serial.println();
bytecount = 0;
checksum = 0;
timest = micros();
}
}
The idea is to somehow get these numbers into the open inverter firmware rather than make my own isolated voltage measurement or temperature measurement using a small microprocessor as a bridge.
I'm not sure if the open inverter hardware can accept serial readings for voltage or temperature so I plan on using a small micro to covert these readings back into an analogue 0-3.3V signal so the stock firmware and more importantly any future updates are compatible with this installation with zero faffing about when that time comes.