Show Posts
Pages: [1] 2 3 ... 90
1  Topics / Device Hacking / Re: Bike interface OBD on: May 28, 2014, 10:12:40 pm

 I am not sure how to fix your code without making lengthy changes but, I can give you an idea.

In my code I had two sets of variables. The first set, was constant and they defined what byte contained the information I wanted such as: RPM, Engine Temperature, Throttle Position, etc.

 The second set of variables, contained the results of the bytes. For instance, I used lower case letters to tell the difference between the two sets. Below would be an example.

rpm = byte result RPM
temperature = byte result  Engine Temperature
throttle = byte result Throttle Position

I want to help you with your array problems but, they are not my strength. You may have to practice using arrays in a separate code for testing, and ask for help in the programming problems section.

2  Topics / Device Hacking / Re: Playstation controller hack with Arduino MINI and nRF24L01 on: May 28, 2014, 02:11:35 pm
Very nice write-up! thanks for sharing!
3  Using Arduino / Microcontrollers / Re: Updated Bobuino design. on: May 20, 2014, 08:43:38 pm

 Sounds real good!
4  Using Arduino / Microcontrollers / Re: Updated Bobuino design. on: May 20, 2014, 05:20:05 pm

 Teckel and I were working on making ToneAC work and here is an old message I sent you that shows the pins required. They were not all available on the Bobuino.

My old message to you through PM.
am working with Teckel on ToneAC and I am looking for pin 30 on the board. I know that it used for CS with the SDcard but, I am can not find another pin that is connected.

 Here is the chip pin names that I need:

 D8 = OC1A\ PD5
 D30 = OC1B\PD4

I found pin 8 but, not pin 30 except for at the buffer chip.
5  Using Arduino / Microcontrollers / Re: Updated Bobuino design. on: May 19, 2014, 09:42:24 am
C rossroads,

The board sounds interesting! One suggestion, is make the pins available for Tone AC library to use. On the previous board a pin was used by the SD card. Here is a link to the library
6  Development / Other Software Development / Re: New TFT Extension Library on: May 18, 2014, 10:36:40 pm


 Would you mind sharing some of your switch case code? I am wanting to learn how to put the buttons and gauges to use but, I haven't figured it out yet.
7  Topics / Device Hacking / Re: Bike interface OBD on: May 18, 2014, 10:34:40 pm

 I will try to get you some received data information tomorrow when I have more time.

Glad you are making progress!
8  Topics / Device Hacking / Re: Bike interface OBD on: May 17, 2014, 12:59:49 pm

 I did not make any effort on using the checksum. In my case, I expected 56 bytes returned from the ECU. If I did not get 56 bytes in a reasonable time, I assumed that I lost communication. The ECU will only reply after a request. Therefore, I send a request, wait on 56 bytes, and then make another request.
9  Topics / Device Hacking / Re: Bike interface OBD on: May 16, 2014, 10:05:00 pm

  I read your code and it is a little difficult because you need to put more comments so that I can understand the purpose of each line of your code. Remember, that this project may take you awhile to reach perfection. You may need comments and notes in the code to remind yourself about the functions in the code.
Here are the steps that need to happen. In my case, I used a variable called mode to step through my code.

1. fastinit(); Using pinmode, and HIGH and LOW
2. send message =  0x81,0x12,0xF1,0x81,0x05
3. wait for response 80 F1 12 03 C1 EA 8F C0
4.  send data request  0x80,0x12,0xF1,0x02,0x21,0x08,0xAE
5.  read incoming data "I believe you will receive 56 bytes back
6.  store results
7. repeat steps 4 through 6 over and over as long as you are getting response from the ECU.

I am not sure how to properly stop communication but, I do know that there is a message that can be sent to do it.
10  Community / Products and Services / Re: The Zero is upon us! on: May 15, 2014, 07:10:58 pm

 Thanks for the post!

I found the link to the board.
11  Topics / Device Hacking / Re: Bike interface OBD on: May 15, 2014, 04:55:01 pm

 Post the code you are using and maybe we can find some improvements.

Another tip, I made the baud rate from my Arduino to my computer 115,200 which is the fastest setting the Serial Monitor allows. The reason I did this was to insure that I was not taking up too much time sending data to the computer.
12  Topics / Device Hacking / Re: Bike interface OBD on: May 14, 2014, 08:26:46 pm


I also thought you should know that you do not want to use Software Serial for communicating with the ECU. In my case, I found that it was far easier to use Hardware Serial.

 Also, in my case, I used Serial1 for communication with ECU and Serial0 to repeat the data to my computer during testing.
I would recommend doing the same with your Mega if it is possible.
13  Topics / Device Hacking / Re: Bike interface OBD on: May 14, 2014, 08:17:54 pm
The replys probably are echos, the data is transmitted throug one wire...

You are correct, you will get echo. My answer for this was to read the bytes available until they equal the amount sent. In the first part of the code, I sent this:
byte message[6] = {0x81,0x12,0xF1,0x81,0x05};

To get around the echo problem, I read 5 bytes, if the fifth by equals 0x05, then the next byte is coming from the ECU.

The protocol has a tolerance of +-1ms....  Is there a way to test?

I started with "extra" time between bytes sent and I gradually reduced the delay between bytes and I watched for loss of communication. I used a potentiometer in my sketch to make my timing adjustable on the fly.  
14  Topics / Device Hacking / Re: Bike interface OBD on: May 14, 2014, 05:27:17 am
You know if it is possible to connect the digital out pins directly to the pins of the  ecu like "mode (map switch)" "reset" "fwe" "dealer mode" and of course the programing pins? In case of that it can be used als programing interface too...

 I think that the answer is "yes" because you can connect directly to the 5 volt FTDI cable to the ECU on the "reset" "fwe" pins .  I have only logged with the Arduino, and I have never made any attempts to program using the Arduino. I would exercise caution when connecting to the map switch and dealer mode by using resistors to limit current.
15  Topics / Device Hacking / Re: Bike interface OBD on: May 13, 2014, 08:34:42 pm

  The first thing you will need is the hardware to connect your 5 volt arduino to your 12 volt motorcycle communication line. I have a circuit board that uses a LM393 as a level shifter. I had a bunch of circuit boards made and I was selling an interface that goes from computer USB to the bikes computer.....I have a few boards left over. They work with 07 GSXRs and newer as far as I know. Personally, I have an 08 GSXR and it works well on it. If you want to go the computer route, let me know. Otherwise, I will help you with your Arduino project.

 I have put a lot of work on getting an Atmel 1284 chip to talk to the motorcycle computer and I have had some success but, the project is not completed. I will share some of my hard work with you to get you started.

Here is the initiation part of the code that works well for me. I am providing you with a snippet to get you started. After the initiation part of the code, you are going to need read incoming data. Add you coding ideas, put in effort, and I will help more.

You will need to define your TX and RX pins based on the board you are using. In my case, my board is the Bobuino with a 1284 chip.

byte message[6] = {
int mode = 0;
/////////////////DATA START///////////////
void datastart(){
  mode = 0;                 //reset mode to 0 for first step of logging
  digitalWrite (TX, HIGH);  // makes K-line high 3
  delay(2000);             // wait for K-line to be clear 3
  digitalWrite (TX, LOW);  // makes K-line low  3
  digitalWrite (TX, HIGH); // makes K-line high  3
  delay(25);               //last delay before first message
  Serial1.begin(10400);  // baud rate of the OBD
  //send package 0x81,0x12,0xF1,0x81,0x05
  for (int i = 0; i < 5; i++){
    byte inByte =;
    delay(1);                 //inter byte delay for to match k-line spec. changed from 15ms to 1, tune as needed

Pages: [1] 2 3 ... 90