Honda Insight Forum banner
1 - 20 of 44 Posts

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #1 · (Edited)
Lots of people now have an OBDIIC&C and I also have a plentiful stock of built and cased units..

To use it with the newer CANBUS cars HCH2 Civic, G2 Insight, CRZ etc would require either a complete redesign and new model or at the moment a little hacking..

I'll make a video of all this and post pics etc but in a nutshell...

In order to make the current OBDIIC&C CANbus compatible we need to do the following.

1) Swap the PIC processor to an 18F2680 running new firmware which has CAN support.
2) Add a MCP2551 CANBUS transceiver chip, 5v micro switchover relay and bc337 transistor on a little daughter board.
3) Incorporate that board into the existing OBDIIC&C circuit.
4) Change the main OBDIIC&C cable to a 6 wire type (we need an extra pin connection)
Total cost probably <$15

Luckily the 18F2680 CAN pins are on port B pins RB2 & RB3, they are currently used to drive the LCD, but we can disconnect those and change the LCD from an 8bit to 4bit parallel configuration. That frees up 4 I/O pins and crucially the CANbus pins RB2 & RB3..

So the first part of the hack is disconnect the pins RB0-RB3 from the LCD. It's probably easiest to do this with thin sharp side cutters to cut the pins and then desolder them from the board. Don't damage the OBDIIC&C pcb tracks we need to connect the new daughter board to these points.

Our daughter board will have eight wires attached to it.

1) +5v power obtained from OBDIIC&C connector J4 Pin 1
2) Relay on/off signal connected to OBDIIC&C LCD connector pin RB1
3) CanBus TX connected to OBDIIC&C PCB LCD connector RB2
4) CanBus RX connected to OBDIIC&C PCB LCD connector RB3
5) CanHCar Tx connected to OBDIIC&C connector OBDII plug Pin 6 (The new wire)
6) CanLCar Tx connected to OBDIIC&C connector OBDII plug Pin 14
7) HLine from OBDIIC&C connector J1 Pin 3
8] GND power obtained from OBDIIC&C connector J4 Pin 4

In the new Honda Canbus cars the old HLine and new CANL connection share a common OBDII pin so we have to provide a relay to swap the OBDIIC&C between pre-can HLIne mode (Insight G1) and CANBus mode (HCH2 etc). By adding a relay we still have the backwards compatibility with the Insight G1.. :)

For now attached is the OBDII socket pinout and alpha OBDIIC&C modified schematic..
 

Attachments

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #2 · (Edited)
CAN Transmit OK..

This is the hacked OBDIIC&C using my posted schematic sending out a cyclic message on the CANBUS...

Now need to set up the receiver code and include an extended identifier as used by the HCH2..

Learning a lot....

{Edit} Now sending correct extended identifier.. :) Nearly made my head explode...
 

Attachments

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #3 ·
Receive code also working.

The hacked OBDIIC&C is now receiving and filtering CAN bus messages from my test node..

Filters and masks is tough.... I still haven't grasped all of it..

Tomorrow I hope to write the code to get the voltage tap data from the HCH2 and display it on the OBDIIC&C.
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #4 · (Edited)
Here you go...


OBDIIC&C interrogating the Honda Civic HCH2 BCM CANBUS for the IMA pack voltage tap data..

The 11 voltage taps are shown and a refresh counter byte 0-255.
Currently gauge is refreshing every 100ms. I think thats fast enough.

Logging the data in the usual way into excel would be straightforward.
Tap 1 is top left. The refresh counter (testing only) is bottom right.

I'm currently making a batch of OBDIIC&C gauges with the capability of adding the canbus functionality. You can also modify existing gauges if careful. I'll will also make ready built gauges available with the mod fitted. (cost as yet undecided).

I'll shortly add another schematic omitting the changeover relay but adding a jumper instead.
That way you just use a simple jumper to select either G1 (HLine mode) or (Canbus car mode) HCH2 onwards..

Obviously a lot of work now needs to be done on the software.... :)

I will concentrate on the IMA side initially so that means the MCM & BCM.
A list of ideas of what parameters people might like first would be useful.
Which ones are most important.

Don't say all of them!!!

I would be grateful for a couple of early adopters with HCH2's and an OBDIIC&C (with canbus mod) to test pre-release software on their cars. The chosen ones will qualify for free OBDIIC&C software for life.. e-mail me (not PM) if seriously interested... I don't have the time to test everything and need the community to help out where possible..

I would also like any people on here with an Insight G2 or even CRZ in fact any CANBUS Honda IMA car to plug in and give the new setup a test.

Hmm this is what we need.... Cheap as chips from China..

10Pcs Can Communicate Mcp2551 Bus Interface Module Protocol Controller High K

These are tiny and should simply fit on spare space on the OBDIIC&C pcb with a bit of double sided trim tape..
This makes the OBDIIC&C hardware upgrade cost minimal.. Just need one of these neat pcb's and a new 18F2680 PIC..
5 minutes with the soldering iron.. :)

New (no relay version) schematic added.. Basically imagine one of those little boards I linked to is the bit inside the blue box..
 

Attachments

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #6 ·
More HCH2 data

Ok so far I have gleaned.

Tap voltages.
Total pack voltage.
Soc %
Usable Capacity % (Tells you how crap your battery is)

I have data on the three temp sensors but haven't worked out the relation between the data and the temperature. It may be using a lookup table :(

Ditto for Battery current have data but not worked out the calculation yet..

I have the soc set low/medium/high data and the IPU fan control data.
So coming on slowly.
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #8 · (Edited)
Do you want to be a tester? :) It might work already..
IIRC you have an OBDIIC&C..

I might also be looking for a CRZ owner/tester
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #9 ·
Other forums.

Do any on here know of other good active forums for the other IMA Canbus cars..

HCH2? Accord? G2 Insight? CRZ? I'm trying to drum up testers for the different models.

One size gadget might fit all.... :)
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #10 ·
Holiday

I'm away for three weeks starting this wednesday.

Research won't be stopping as I'm trying to grab as much data as I can to analyse on my laptop whilst away.. I tend to wake early with projects going round in my head, so get up and work for a few hours before by partner emerges from hibernation. I'll be in contact as normal assuming wifi is available in our airbnb accommodation.

I've also got my modified Canbus OBDIIC&C with me and my Cando gadget to test code..

Natalya did you see my reply below?
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #11 ·
HCH2 IMACAN Data Gathering

Working inside the IPU data gathering.

Found a nice easily accessible connector behind the rear seats outside the IPU for road testing/gadget integration etc with the car assembled...


The connector gives easy access to the IMACAN lines, 12v power, gnd etc..

The object in the next day or so is to isolate the IMA CAN MCM messages from the BCM and AIRCON driver messages, then they can be filtered out leaving the actual ECM <> MCM control signal packets for analysis...
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #12 · (Edited)
CRC Check Calculation

Ok I think I have the IMA control data isolated. ;)

There is a strange rotating CRC check going on in the 8 byte CANBUS packets.
I don't mean the normal CAN protocol data crc check I mean an independent one.

The crc seems to be being calculated based on the first 7 bytes of the packet with the result in byte 8.

However with static packet data this byte 8, decrements by $0F each packet for 4 packets then repeats..

If the data in the packet changes a new starting byte is calculated and then it decrements again if the packet data remains static.

If the data changes with each packet then the crc (if that's what it is) also changes..

The attached excel spreadsheet (zip file) shows four samples of hex data. The bottom section has more changeable data so might give a clue as to what is going on with byte 8.

Ideas welcomed..

Once we have the CRC worked out we can start throwing IMA control data at the canbus..... :)

PS Reviewing some old research and Honda CRZ IMACAN captures, the data looks very similar to the HCH2 IMACAN.

Edit. Note there may be an odd row of data missing in these early captures. I'll get some more tomorrow when I add some ID filtering..
 

Attachments

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #13 ·
Here is some more data with no missing packets..

Come on you geniuses have a look at this..
 

Attachments

· Registered
Joined
·
171 Posts
Man, the code is annoying. If you look at it in binary, it looks like you have two separate nibbles, where regardless of what the frame content is, the first nibble just repeats in a cycle of 0B, 1B, 2B, 3B. What I can't figure out is the meaning of the 2nd nibble. When you look at the empty data frames, the formula for the 2nd nibble is just (17 - (value of the last non-CRC byte + 1st nibble value)) mod 16.

So from your 2nd spreadsheet, take the 1st packet. The last byte is 2, and the 1st nibble is 0. So the formula is: (17 - (2 + 0)) mod 16. This works out to 15, precisely what you see in the 2nd nibble. This works for all the empty frames.

When we start looking at populated frames, things start getting harder to analyze. We still have that persistent 1st nibble pattern of 0B, 1B, 2B, 3B repeating, and the 2nd nibble value being subtracted by the 1st nibbles amount when the data is static, but I can't find a consistent formula that correctly explains the 2nd nibble value.
 

· Registered
Honda Insight ZE2 2010, RHD, Silver
Joined
·
228 Posts
Thanks for your efforts so far.. My head is also hurting looking at it..
I found this link: https://translate.google.com/transl...motor.ru/board/index.php?showtopic=114012&hl=
I can't decipher. In the new CRC ODB2 is more than the amount of data.
Added later
prj.perquin.com
At this, checksum = sum header + sum data.
This sample function code on Visual Basic 6 https://www.archaicbinary.net/code/calculate-the-obd-crc-packet-vb6.html
This: http://www.alfa145.co.uk/obd/14230-2s.pdf Keyword Protocol 2000 based on ISO 14230-2
Code:
f the message is
<1> <2> <3> ... <N> , <CS>
where <i> (1 £ i £ N) is the numeric value of the ith byte of the message, then:
<CS> = <CS>N
where <CS>i (i = 2 to N) is defined as
<CS>i = { <CS> i-1 + <i> } Modulo 256 and <CS>1 = <1>
It remains to determine where the header and data into the test table.
 

· Registered
Joined
·
171 Posts
Just randomly remembered this thread. Hey Peter, does each row contain the whole CAN packet? My understanding is that under the CAN protocol, addresses are typically supposed to be either 11 or 29 bits, with Honda usually using 29-bit addresses. The reason I bring it up is that you've got your message divided up into bytes in the spreadsheet, when the actual content of the packet probably isn't divided by byte.
 

· Administrator
Joined
·
14,387 Posts
Discussion Starter · #19 · (Edited)
Back to the CRC check

There is some very interesting stuff being done with the leaf inverter CRC.
It likely our 8th byte is a rotating security byte/crc.

Can the geniuses have a look at this and comment..

The four pages of this thread give some leads that may be applicable to the HCH2 and later Honda CAN cars. It explains the rotating bytes perhaps..

Anybody mess with the CAN Commanded Torque Message ID 0x1D4? - My Nissan Leaf Forum

CRC Reverse Engineering

I did it in excel with the following line copied in one column (C) and the data in another column (labeled data).
Cell C11: =IF(C10>127,bitxor(bitand(C10*2,255)+data,poly),bitand(C10*2,255)+data)

I uploaded the spreadsheet here if anyone want to look at it. You have to enable macros for the bitwise functions to work. Change the number in cell H2 to point to the different examples on the examples tab.
Can anyone apply this to the data I posted earlier?

The below is a spreadsheet with some examples

Leaf data on rows 1-6 (Works correctly)
Hch2 data on rows 10-17 (Wrong answer)

We should be getting in B3 the same as at the end of the data C2 or P2.
You can select the example data row by putting the number in H2

It doesn't appear to be correct but we are likely on the right lines.

https://docs.google.com/spreadsheets/d/1KLiO4GScORUnheC7DWu0N80ZRsZVJ7T5o9EJuILJezc/edit?usp=sharing

Polynomials et al. Miight as well be Chinese to me :(
 
1 - 20 of 44 Posts
Top