Honda Insight Forum banner

OBDIIC&C Gauge Volume 2

125K views 545 replies 51 participants last post by  mudder  
#1 · (Edited)
I've started this thread as the old one was huge and it was time for a new start.

Attached as my present for the community this Christmas is new firmware for the OBDIIC&C gauge and the associated pdf user manual.
There is a lot of new stuff and many changes in the way it operates so please RTM "Read the manual" before posting questions.

Highlights include:

Ability to read ABS,SRS,EPS dtc's.
Ah/Wh timing problem fixed.
New smarter menu system.
New alternating 16 parameter display option with adjustable page time..
User selectable amp hack %.
user selectable voltage hack %.
User selectable 12v voltage compensation %.
Skip startup splash/obd and/or readiness screens options.
Now reads upto 9 OBDII codes on startup. (Prev 3)
Ipu fan test mode.
Backup and restore all parameters and configuration options.
Automatic battery fan status re-included. Remembers fan setting for use at next startup.
Remembers backlight setting.
Better IMAC&C P&P integration.
Loads of bux fixes and program enhancements. Reports welcome.

The gauge also now refreshes slightly faster at 4.66hz compared to 4hz prev.
Not all of it is tested in depth, simply no time. Over to you for that.
I still have about 14k out of 64k memory space left in the pic for the remaining DTC databases once I get round to it.

Anyway wishing you all a great christmas and happy new year.

Peter


PS as requested.

Link to the parts spreadsheet.. https://docs.google.com/spreadsheet...spreadsheets/d/1UoVmGtfMLnfP1Y3XItyYllM-9JlMSTHepPaEBIGz19o/edit?hl=en_US#gid=0

Latest schematic attached with some minor changes. (Note this has four CAN connections which can be ignored,)
It uses the same pcb as the original and will function fine with the current software in either this or the old schematic configuration.
 

Attachments

#2 ·
OBDIIC&C Schematic & Parts List

So I don't have to look through 284 pages, and in an effort on help future buyers, can you please post an up-to-date schematic and an up-to-date Mouser (I assume this supplier since you've used it before) BOM component list for this unit. I assume it would include the display. I'll be ordering a board in the new year. Thanks. Merry Christmas
 
#3 · (Edited)
The manual I posted contains clickable links to the google docs parts spreadsheet & bom..
The spreadsheet then contains links to the schematic. ;)
But I have added them to my first post as well..
 
#4 ·
Excel Help

I need to analyse/sort some data but am rubbish with excel.
Attached is a data file with bodged macro.

I want to edit the macro or create a new one to split the large column of data in sheet 1 so that whenever $20 followed by $05 occurs it copies it and the subsequent data to a row in sheet 2 as below.

20 05 ab 23 45 de f6 blah blah
20 05 xx xx xx xx xx etc etc
20 05 cd 43 xx xx xx xx xx

Anyone help?
 

Attachments

#7 ·
#8 ·
Give this a try. This is my first ever attempt at VBA... :)

It does require that the first two rows contain 0x20 and 0x05, and it will stop upon hitting the first empty cell.

Upon running, the output appears correct based on spot checking. 54 strings starting with 0x20 & 0x05 were extracted. 898 rows contain data in sheet 1 and 898 cells contain data in sheet 2 using COUNTA(range) function to check.

I was racking my brain until I started thinking in terms of the 0x20 and 0x05 sequence as indicating a "carriage return" to start a new line. I tried several variations on just 0x20, and it went nowhere many times as the single instances of 0x20 NOT followed by a 0x05 would throw a wrench into it.

Basically just transpose everything until the 0x20 + 0x05 sequence is encountered and then reset target column to 1 and go to the next row.

Sub transpose()
Dim sourceRow, targetRow, targetColumn As Integer

' find first empty row in target sheet
targetRow = 1
While (Sheets(2).Cells(targetRow, 1) <> "")
targetRow = targetRow + 1
Wend

sourceRow = 1
targetColumn = 1
targetRow = 0
Do
'if the current cell is "0x20" then check to see if the next row is "0x05"
If (Sheets(1).Cells(sourceRow, 1) = "0x20") Then
If (Sheets(1).Cells(sourceRow + 1, 1) = "0x05") Then
'if it is, then start a new line by incrementing th erow and resetting column to 1
targetRow = targetRow + 1
targetColumn = 1
End If
End If
'transpose the cells in increment sourcerow and target column
Sheets(2).Cells(targetRow, targetColumn) = Sheets(1).Cells(sourceRow, 1)
sourceRow = sourceRow + 1
targetColumn = targetColumn + 1

Loop Until (Sheets(1).Cells(sourceRow, 1) = "") 'stop when input cell is empty

End Sub
 

Attachments

#11 ·
Thanks for all your work on this, Peter...

Reading through the manual I came across this, page 5 bottom right, not sure exactly what it means:

"Note: Ah/Wh counting takes place only when the display is active in the main eight parameter display screen mode. Counting is not supported in the extended 16 parameter alternating display mode. Also the ‘Bam’ parameter must be active on the main parameter screen for counting to function."

Does it mean that, if one chooses the 16 parameter mode, amp-hour counting doesn't work at all?

Or, does it mean that amp-hours are counted only when the first 0-7 parameter screen is active, assuming Bam is one of the parameters, i.e. when the screen flips to parameters 8-15 it's not counting amp-hours - even if you have Bam as a parameter in both screens?

Or something else?
 
#12 ·
Eq1.. I hadn't considered having 'Bam' on both screens so it may work like that, try it..

If the second screen is active and 'Bam' is not one of the parameters it will not take a current reading during that time and will under read ah/wh by 50%.
 
#13 ·
I'll try it, sure, but I probably wouldn't be able to tell if it were working or not - I'd have no real way of verifying the measurement, the calculation... If it were really a strict 50% deficit having Bam on screen 1 only, it'd be easy enough to just double whatever count is displayed at the end of trips (as I use it). But if the counter only counts when the screen is active with Bam as one of the parameters, on one screen or both screens, then it seems like the time during which the screens are alternating, current isn't being counted and the counts for trips could become inaccurate to some ill-defined extent...

If I start a heavy assist event, for example, and screen 1 is ON, and I have it set to 16 parameters, and Bam is a parameter for screen 1 but not 2, the only time current is being counted is when screen 1 is ON. Correct? If so, it seems like I could miss some undefined amount of current - depending on how long I've set the alternating screen delay time, for instance, and when the assist event stops and starts... And then, if I have Bam as a parameter in both screens 1 and 2 and counting works during both screens, it still sounds like I could miss counts during the intervals when screens are switching...

I use amp-hour counts religiously. It's very useful for tracking the true state of charge, getting a read on pack condition/optimization, self discharge, etc...
 
#14 · (Edited)
The screen split time is exactly 50% in the alternating mode.
So as you say just double it.
Over longer periods missed current etc will even out..
 
#18 ·
Sam12345 the User manual link is working for me and others. Must be your end or an IC problem.

Re the amps in - amps out.

That's possible for the next release, i'll add it as a special parameter.
 
#22 ·
I'm using Chrome on a PC. When I click on the PDF links+ it puts a little box on the bottom left of my screen with the file name. Clicking on this box opens the document.

Sam
 
#24 · (Edited)
More Tinkering

Ima Efficiency Calculation.

We have running Watt Hr In and Out counters active in the software. They can store upto 65535 WH each.

So from this data as it accumulates during daily/weekly monthly runs how can we calculate an in/out % efficiency?

The maths has to be doable in 16bit integer only.. Range 0-65535. No decimal points.

e.g.

WhIn 30000 - WhOut 15000 = 15000
100 / 30000 = 0.003333
0.003333 x 15000 = 50% :)

But we can't have decimals.. :(

There is a special division command and 32 bit mode in picbasic pro that may help.

3.1.10 DIV32
PBPW’s multiply (*) function operates as a 16-bit x 16-bit multiply yielding a 32-bit
nternal result. However, since PBPW only supports a maximum variable size of 16
bits, access to the result had to happen in 2 steps: c = b * a returns the lower 16
bits of the multiply while d = b ** a returns the upper 16 bits. There was no way to
access the 32-bit result as a unit.
n many cases it is desirable to be able to divide the entire 32-bit result of the
multiply by a 16-bit number for averaging or scaling. A special operator has been
provided for this purpose: DIV32. DIV32 is actually limited to dividing a 31-bit
unsigned integer (max 2147483647) by a 15-bit unsigned integer (max 32767).
This should suffice in most circumstances.
As PBPW only allows a maximum variable size of 16 bits, DIV32 assumes that a
multiply was just performed and that the internal compiler variables still contain the
32-bit result of the multiply. No other operation may occur between the multiply and
he DIV32, else the internal variables may be altered, destroying the 32-bit
multiplication result.

Example

a VAR WORD
b VAR WORD
c VAR WORD
dummy VAR WORD
b = 500
c = 1000

dummy = b * c ' Could also use ** or */
a = DIV32 100

This program assigns b the value 500 and c the value 1000. When multiplied
together, the result would be 500000. This number exceeds the 16-bit word size of
a variable (65535). So the dummy variable contains only the lower 16 bits of the
result. In any case, it is not used by the DIV32 function. DIV32 uses variables
internal to the compiler as the operands.
In this example, DIV32 divides the 32-bit result of the multiplication b * c by 100 and
stores the result of this division, 5000, in the word-sized variable a.
DIV32 is not supported by PBPL as that version of the compiler always uses a 32-
bit x 32-bit divide.
Ideas and examples welcome...
 
#25 · (Edited)
No ideas? A new version is ready apart from the below issue..

Think I have it sussed now... Now testing a new version in the car..
 
#26 ·
Multiply the watt hour out number by 100 and devide the resultant by the watt hours in
For your example in decimal

(150000x100)/300000=50

In hex

(249F0 x 64)/493E0=32

This gives you your efficiency in a whole number

Here is a good hex calculator to check if it works


http://www.calculator.net/hex-calcu...net/hex-calculator.html?number1=E4e1c0&c2op=/&number2=493e0&calctype=op&x=0&y=0

Another example

Watt in 432
Watt out 327
In decimal

(327×100)/432=75.6 so if you truncate 75

In hex

(147×64)/1B0=4B with a remainder of 12C drop the remainder and you get 75

I guess you could multiply by 1000 instead of 100 if you want better resolution (1 decimal place)