Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BYD Atto 3 setup #164

Open
l2smith2 opened this issue Jul 26, 2024 · 21 comments
Open

BYD Atto 3 setup #164

l2smith2 opened this issue Jul 26, 2024 · 21 comments

Comments

@l2smith2
Copy link

          @l2smith2 Please open a new issue so we don't highjack this one.

you can record the info you're seeing using carscanner. Once you do, share that file and I can help you set it up.

https://www.carscanner.info/records/

Originally posted by @meatpiHQ in #163 (comment)

@l2smith2
Copy link
Author

2024-07-26 20-02-12.csv

I loaded the all sensors page while connected and this is what Car scanner logged.

@meatpiHQ
Copy link
Owner

@l2smith2 thanks. Can you please export the logs

IMG_20240726_205457

@l2smith2
Copy link
Author

log.txt

ah didnt know about that export log function

@meatpiHQ
Copy link
Owner

@l2smith2 Here's what you need to set it up,

Initialisation: ATS0;ATAT1;ATST96;ATSH7E7;ATFCSH7E7;ATFCSD300000;ATFCSM1;

SOC:
Name: is the json key for
PID: 221FFC1
Expression: (B5*256)+B4
Send_to: MQTT topic where the SoC will be published
Period: Cycle time in ms

Some more info:

The BYD PIDs are available this is a very useful post, although they are not using Auto pid request.

The PID request for SoC is 221FFC, notice there is an additional 1 at the end. This means that it is expecting a single frame response. 221FFC without the 1 will also work.

#122

These are the parameters that I think is useful for the Initialisation.
image

@l2smith2
Copy link
Author

wican

Ok so its now publishing soc which initially I thought was just 10% too high but it never seems to change while charging so i'm not sure what value it actually is reading.

I know nothing about OBD2 and PIDs so this is a trial by fire. I'm trying to find the right documents/guides to read but I feel I'm missing something.

Can you run me through how you get the PID for different values and the expression from the tx rx frames? and what those initializations are doing?

Thanks for the help with this.

@meatpiHQ
Copy link
Owner

@l2smith2 something does not look right. Can you please post a screenshot of your Automate page?

@l2smith2
Copy link
Author

wican settings
wican auto

I tried with and without the 1 after 221FFC also autopid and elm327 protocol also mqtt log enable/disabled. Car scanner doesn't work on AutoPID protocol is that normal?

@l2smith2
Copy link
Author

{"bus":"0","type":"tx","ts":5192,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,5,170,170,170,170]}]}

{"bus":"0","type":"rx","ts":44476,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[4,98,0,5,69,170,170,170]}]}

Ok so using car scanner and looking at HV Battery SOC which is 69% currently I get this returned.
I found another page on your wiki with more info on this, I'm still a bit lost on how to convert these returned values into appropriate PID filters or autopid settings.

Looking at the BYD seal desciption he gets

{"bus":"0","type":"rx","ts":37872,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[7,98,31,254,44,26,152,58]}]}
{"bus":"0","type":"rx","ts":38043,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[4,98,0,5,57,170,170,170]}]}

and converts it to

  • CAN ID=2031
  • Name=SoC
  • PID=4
  • Index=0
  • Start Bit=32
  • Bit length=8
  • Expression=V
  • Cycle ms=1000
    to get 57% as the value

@meatpiHQ
Copy link
Owner

@l2smith2 please go back to my original configuration and change the
Initialisation to
ATAT1;ATST96;ATSH7E7;ATFCSH7E7;ATFCSD300000;ATFCSM1

I just removed the ATS0 command.

Car scanner doesn't work on AutoPID protocol is that normal?

Yes that's normal. And keep the mqtt log disabled.

@l2smith2
Copy link
Author

wican soc
wican auto

Ok so that setup is reporting the correct soc % without the decimal, can that be solved by dividing the expression by 100? or should I do that in home assistant.

So how do I now get the other values reporting like cell temps voltages etc.
12v battery voltage is a useful one to have

@meatpiHQ
Copy link
Owner

What is the reported SoC?
Try to change the expression to:
((B5*256)+B4)/100

So how do I now get the other values reporting like cell temps voltages etc.
12v battery voltage is a useful one to have

You need to find the PID, checkout this post #122

12v battery voltage will be supported in the next firmware release.

@l2smith2
Copy link
Author

((B5*256)+B4)/100 reports the correct state of charge now, currently soc = {"SoC":87.4,"raw":"07621FFC2422653A"}

I dont understand how to find the PID from https://github.com/meatpiHQ/wican-fw/discussions/122 Complete Noob

@meatpiHQ
Copy link
Owner

Great!

No worries, let me know which parameters you want and I can try to find it for you later.

@l2smith2
Copy link
Author

If we could figure out these values to start, This is from the BYD seal guy but seems the same.
There's a few other values he didn't list I'll have to work out with car scanner.

lowest voltage cell (3,32V):
TX: {"bus":"0","type":"tx","ts":12342,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,43,170,170,170,170]}]}
RX: {"bus":"0","type":"rx","ts":12348,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[5,98,0,43,252,12,170,170]}]}

highest voltage cell (3,33V):
TX: {"bus":"0","type":"tx","ts":31858,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,45,170,170,170,170]}]}
RX: {"bus":"0","type":"rx","ts":31864,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[5,98,0,45,0,13,170,170]}]}

lowest temperature cell (22 °C)
TX: {"bus":"0","type":"tx","ts":35633,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,47,170,170,170,170]}]}
RX: {"bus":"0","type":"rx","ts":54490,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[4,98,0,47,62,170,170,170]}]}

highest temperature cell (23 °C)
TX: {"bus":"0","type":"tx","ts":45461,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,49,170,170,170,170]}]}
RX: {"bus":"0","type":"rx","ts":18397,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[4,98,0,49,63,170,170,170]}]}

Battery total Voltage (572 V)
TX: {"bus":"0","type":"tx","ts":13789,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,8,170,170,170,170]}]}
RX: {"bus":"0","type":"rx","ts":7048,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[5,98,0,8,60,2,170,170]}]}

Battery Average temperature (22 °C)
TX: {"bus":"0","type":"tx","ts":17603,"frame":[{"id":2023,"dlc":8,"rtr":false,"extd":false,"data":[3,34,0,50,170,170,170,170]}]}
RX: {"bus":"0","type":"rx","ts":8303,"frame":[{"id":2031,"dlc":8,"rtr":false,"extd":false,"data":[4,98,0,50,62,170,170,170]}]}

@l2smith2
Copy link
Author

Any Idea what these values may be?

Also the meatpi seems to be the highest wifi traffic user on my network.
Over 6GB in 24hrs seems a bit outrageous for simple MQTT msgs

@meatpiHQ
Copy link
Owner

@l2smith2 I'll add these to BYD car profile soon.

Does your car broadcast CAN frames all the time? If so please add any fake filter to stop it. I will add a "disable mqtt publish" to stop all these frames.

@l2smith2
Copy link
Author

I think it has been doing that. Never really goes to sleep anymore even with voltage set high

@meatpiHQ
Copy link
Owner

Which firmware version are you on?

@l2smith2
Copy link
Author

3.11 beta I believe

@meatpiHQ
Copy link
Owner

Ok so probably it's keeping the ECU on all the time. I'll fix it and send you a firmware to try.

@l2smith2
Copy link
Author

It doesn't report Rx and TX msgs under separate topics in MQTT explorer either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants