Good evening everyone.
First thank you all for all those amazing work done one this Global Project. I've tried to read everything to avoid asking stupid question =).
Here is the status of my personal project (getting gear indicator , temperature and angle/accel on my phone) :
My Program is working well, bluetooth connection OK and phone App OK. The remaining is the communication with the bike and there is the reason I'm posting this message. I had few messages on Youtube with Trib (thank you again ! ) , after one twited L9637D, I received a new one and still not working. So I tried to simplify the system at maximum :
One additional thing : The Programme is working very well with the ECU emulator from Trib.
We don't see it very well on the picture , but there is 470 Ohms pull up resistance (to +12V) and 100nF capacitor (to GND).
First question : is it a problem that I use 470 Ohm resistor instead of 510~550 Ohm ? (I would be surprise if it's the case...but I prefer to ask).
2nd question : I see on Firsts trib post that 5V isn't connected to the L9637D. Is it working without +5V :

Otherwise I will buy again new chip to be sure I didn't break this one ..
Below my (very simplified ) program using SimpleKDS.h library : to be short : If NOT connected --> Turn on the led (13) if connected turn it off :
#include <SimpleKDS.h> // Include KDS library
byte voltage_req[] = {0x80, 0x11, 0xF1, 0x02, 0x21, 0x0A, 0xAF};
bool ECUconnected = false; // Initially the ECU is not connected (reset flag)
const int resbufsize = 100; // 100 bytes is sufficient to hold all responses
byte resbuf[resbufsize]; // Allocate the byte array in memory
byte resState; // Initialize the state for communication
int i=1; // Counter for number of connection attempts
float voltage; // Float for the battery voltage (in Volts)
SimpleKDS KDS(resbufsize); // Initialize an object of the KDS class
// Setup
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
KDS.setTiming(5, 0, 0, 55); // Set the timing parameters for KDS communication
delay(3000); // Short delay that allows the motorcycle to settle
}
// Infinite loop
void loop() {
// Continuously try to initialize communication with the ECu and show the number of attempts on the screen
if (!ECUconnected) {
digitalWrite(LED_BUILTIN, HIGH);
i++; // Increase counter
ECUconnected = KDS.initECU(); // Attempt to initialize the ECU (usually one attempt is sufficient)
// If the communication is OK, request and parse the desired values from the ECU
} else {
digitalWrite(LED_BUILTIN, LOW);
// Request battery voltage
KDS.sendRequest(voltage_req, sizeof(voltage_req));
resState = BUSY;
while (resState == BUSY) resState = KDS.getResponse(resbuf);
if(resState == SUCCESS) {
// Request completely received, convert the data byte to a voltage
voltage = (float) resbuf[6]/12.75;
} else {
// Something went wrong, reinitialize the ECU
ECUconnected = false;
}
}
}
If you think you see any mistake , don't hesitate ! I'll give it a try. I'm out of solution... Only buy new L9637D...
Thank you again !