Hyundai Kona / Ionic EV

I expect the same as the Kona, so -

  • Name: Batt_Power
  • Description: Battery Power
  • Mode: 220
  • Code: 101
  • Header: 7E4
  • Bytes: 64
  • Formula: (twos_comp(bytes_to_int(message.data[13:14])*256+bytes_to_int(message.data[14:15]),16)/10.0)*((bytes_to_int(message.data[15:16])*256+bytes_to_int(message.data[16:17]))/10.0)/1000.0
  • Unit: Kw
  • Min: -90
  • Max: 90

Thanx @plord! You are THE wizard man :mage:

I’m sure it will work. The other Kona commands worked

But I think it should be a * before the first 256 and perhaps a + sign between the two “parenthesis groups”?!

I get a response and that is a good start :slight_smile: But I don’t think the formula is correct when it gives a result of -0.815?!

obd.query Batt_Power mode=220 pid=101 header=7E4 bytes=64 formula=‘twos_comp(bytes_to_int(message.data[13:14])*256+bytes_to_int(message.data[14:15]),16)/10.0+((bytes_to_int(message.data[15:16])*256+bytes_to_int(message.data[16:17]))/10.0)/1000.0’ unit=kW baudrate=500000 protocol=6 verify=false force=true

value: -0.8156999999999999
_stamp: ‘2019-03-29T22:17:44.085506’
_type: batt_power
unit: kW

Yea, the forum mangled the formula a bit - I added the forum quotes

Negative shows the battery is charging ( positive you are driving ).

BTW, I’m currently trying to separate out driving power and charging power … hopefully more a little later.

1 Like

I’ve not push this to the community, yet, but if you want to try it, -

Charging power only -

((~(bytes_to_int(message.data[53:54]))&4)/4)*-((twos_comp(bytes_to_int(message.data[13:14])*256+bytes_to_int(message.data[14:15]),16)/10.0)*((bytes_to_int(message.data[15:16])*256+bytes_to_int(message.data[16:17]))/10.0)/1000.0)

Driving power only -

((bytes_to_int(message.data[53:54])&4)/4)*((twos_comp(bytes_to_int(message.data[13:14])*256+bytes_to_int(message.data[14:15]),16)/10.0)*((bytes_to_int(message.data[15:16])*256+bytes_to_int(message.data[16:17]))/10.0)/1000.0)

3 Likes

I’ve just taken a drive then a charge. I see the raw battery power is -

28

So up to around 15:18 or so I was driving, after that a trickle charge at around 1kW before up to 7kW ( I’ve got a zappi charger and it seems to work that way ).

The “Charging power only” formula gives -

36

So driving is removed and the power is positive.

The “Driving power only” formula gives -

28

So charging isn’t shown.

I’ll make these public for the Kona

5 Likes

Cool! This is looking good.

I’m just wondering how you figured out the equations?
I would love to understand it. :smiley:

Sandi

1 Like

I update my , please guys , sign your mod on library … we not understand nothing ! :wink:

Hi
I am not good at programing so i am try to use the Hyundai Kona PID that is in the community to my Ioniq electric :slightly_smiling_face:
Now i am try to se the charge power and i get some data . But it is in wrong value ( se pictures)
Because it is so many good people here i hope to get some help :pray::pray:
charge%20dasch charge%20library

Try Batt_Power from library. I just added a few items to the library, they work fine for me.

Did i forget / miss something (entirely possible, i’m so sleep deprived lately i’m as good as senile), or shouldn’t the main battery SOC PID be a usable indicator of car being on/off?

When the car is off, and not charging, the BMC is offline, and isn’t reporting the SOC. So as long as the car is charging or turned on, the PID will respond, and if using that, autopi will stay on.

1 Like

Even in this state your assumption is correct :smiley: hehe
The thing is however, that the AutoPi team needs to change the core functionality of how to make AutoPi stay on. Currently they rely on engine rpm. If they manage to change it to custom, then we can literally use any PID for this :slight_smile:

At least that’s how I understand the situation. I may be wrong though, just woke up and kind of looking with one eye writing this :sweat_smile:

I not understand this … 3 month to do this ? now we ve rpm on ev cars as Kona, need only add if to check pid of charge status , if has data wake

Just want to add in on the discussion. We do read all your message and have not forgot about this. We are working on this as a top priority at the moment.

We hope to be able to release this in the next release.

Thank you for your patience.

best
Peter

4 Likes

Thanks I’m thinking new soon user of Kona EV

That won’t work, that RPM PID doesn’t work when the car is on, it only works when the car is in D/R gear, at least that’s the way it seemed to work on mine. It appears to go away as soon as you shift to P or N.

I’ll double check though.

Well technically it does work. If you don’t get back a reply, that’s not even 0 rpm, it’s NaN/null/error or whatever.

In reality, as long as we get something back from the car (even if it’s 0 rpm), we can assume it’s ON. When we stop getting replies, The AutoPi can go back to bed :slight_smile:

That’s the thing, last time i tried this (using Torque), i was getting no reply for that PID (RPM1 or RPM2) unless in D or R. Might’ve botched something though, will retry that.

Interesting. I see rpm as 0 when car is on (by using Torque too)

Gonna recheck that, then… I also had one of the two RPM PIDs not work at all at one point.