hobbit
Well-Known Member
I'm not sure whether to post this here or in the "12V battery" thread... I was actually
reading some of the "flat battery" threads over at speakev. Anyway, I went to revisit
the Jeju PID for "aux battery current" which didn't seem to work for me as given.
The file has "Aux Current,Aux Batt CURR,2102,(SIGNED(W)*256+V)/1000,-100,100,A,7E2"
or the like. It's mostly right for the Kona, at least the ID and PID and bytes are okay,
but the math is apparently wrong. Looking at the raw 16-bit value from W and V seems
to center around 32768, with deviations above when the car is in ON and below when
it comes to RUN state. I hooked up the ol' current-clamp so I could correlate values
to the reality of what's going through the wires.
Semi-long story short, it seems that this works well: (32768-((W*256)+V))/100
showing discharge as positive, same as with the traction pack. Adapt as needed
to your own PID definitions. Note that it's just current in/out of the 12V battery
itself, and doesn't represent running 12V loads of the car once the DC/DC comes
on. It stayed fairly negative on a drive this evening but slowly worked its way
back toward 0, holding at about -2 amps by the time I got home. That's not
enough to run headlights, butt-burner, gauges, etc ... but that's what the DC/DC
was floating it at, still around 14.9 volts. I guess it wasn't long enough to reach
that state where it drops to 13.6V during driving.
The original equation must have been assuming milliamps centered around 0
or something. This doesn't seem to work that way. It makes sense, as most
current sensors power from 5V and swing output either side of 2.5. The question
now is, where *is* the 12V current sensor, or is it a derived value from other
hardware?? I dont see any hint of one in the schematics.
_H*
reading some of the "flat battery" threads over at speakev. Anyway, I went to revisit
the Jeju PID for "aux battery current" which didn't seem to work for me as given.
The file has "Aux Current,Aux Batt CURR,2102,(SIGNED(W)*256+V)/1000,-100,100,A,7E2"
or the like. It's mostly right for the Kona, at least the ID and PID and bytes are okay,
but the math is apparently wrong. Looking at the raw 16-bit value from W and V seems
to center around 32768, with deviations above when the car is in ON and below when
it comes to RUN state. I hooked up the ol' current-clamp so I could correlate values
to the reality of what's going through the wires.
Semi-long story short, it seems that this works well: (32768-((W*256)+V))/100
showing discharge as positive, same as with the traction pack. Adapt as needed
to your own PID definitions. Note that it's just current in/out of the 12V battery
itself, and doesn't represent running 12V loads of the car once the DC/DC comes
on. It stayed fairly negative on a drive this evening but slowly worked its way
back toward 0, holding at about -2 amps by the time I got home. That's not
enough to run headlights, butt-burner, gauges, etc ... but that's what the DC/DC
was floating it at, still around 14.9 volts. I guess it wasn't long enough to reach
that state where it drops to 13.6V during driving.
The original equation must have been assuming milliamps centered around 0
or something. This doesn't seem to work that way. It makes sense, as most
current sensors power from 5V and swing output either side of 2.5. The question
now is, where *is* the 12V current sensor, or is it a derived value from other
hardware?? I dont see any hint of one in the schematics.
_H*