Make CANBus Standard

Create a thread for each item that needs working on by the community
Post Reply
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada
Been thanked: 1 time

Make CANBus Standard

Post by dima »

This page needs help > https://openinverter.org/wiki/CAN_table_CAN_STD

This will help with "universal" dashboard or any other interface relying on CANBus messages.

Make up a standard :)

Maybe grouping things logically by functions ...I don't know if "AUX 12volt" belongs together with same CANId as temperature :?:
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Make CANBus Standard

Post by joromy »

dima wrote: Tue Mar 10, 2020 12:40 am Maybe grouping things logically by functions ...I don't know if "AUX 12volt" belongs together with same CANId as temperature :?:
Not so important, for now.
Get the numbers down, I can rearrange, if it gets to messy.

It's also a priority issue, I still think the inverter only can send 10 messages....but it should be enough.
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
johu
Site Admin
Posts: 6310
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 249 times
Been thanked: 1307 times
Contact:

Re: Make CANBus Standard

Post by johu »

I wonder if we should poll the more obscure values via CAN SDO instead of mapping everything somewhere?
https://openinverter.org/wiki/CAN_commu ... rs_via_SDO
The way it works: send a request message for the value you want and receive the reply.

If we agree on this I could change the firmware to address values via their unique ID instead of the parameter index. That way it stays constant throughout firmware versions.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Make CANBus Standard

Post by joromy »

johu wrote: Tue Mar 10, 2020 2:32 pm I wonder if we should poll the more obscure values via CAN SDO instead of mapping everything somewhere?
I would prefer that the different modules send messages by it self.
And have a option to choose what messages to send, by a tick box.
It's easier for dumb displays and other modules to just receive, and less traffic.

You could have the same CAN bus setup (in web interface) with default CAN id and bits filled in.
Then if anyone want to change, they can, like all other parameters.

Edit:
I can put in all values for the inverter in the wiki CAN table, and we can edit at will?
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada
Been thanked: 1 time

Re: Make CANBus Standard

Post by dima »

johu wrote: Tue Mar 10, 2020 2:32 pm I wonder if we should poll the more obscure values via CAN SDO instead of mapping everything somewhere?
https://openinverter.org/wiki/CAN_commu ... rs_via_SDO
The way it works: send a request message for the value you want and receive the reply.

If we agree on this I could change the firmware to address values via their unique ID instead of the parameter index. That way it stays constant throughout firmware versions.
I am liking this SDO concept. It makes sense to standardize CAN readings without reinventing new standard. We can keep the flexibility to set your own IDs.

But as of now, does the inverter capable of sending CANOpen SDO frame?
I am guessing there would be an extra command to switch between Standard CAN and CANOpen SDO?

maybe something like:

Code: Select all

can sdo
User avatar
johu
Site Admin
Posts: 6310
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 249 times
Been thanked: 1307 times
Contact:

Re: Make CANBus Standard

Post by johu »

dima wrote: Tue Mar 10, 2020 3:51 pm But as of now, does the inverter capable of sending CANOpen SDO frame?
I am guessing there would be an extra command to switch between Standard CAN and CANOpen SDO?
Yes it is. So COB Id 0x601 is reserved for SDO request and 0x581 for SDO reply. More precisely, 0x600 and 0x580 are base addresses and 0x1 is the inverter node id. Actually every device on the network needs it's own node id, just like IP address. So that would have to become a parameter.

So try it, send

Code: Select all

0x601 # 0x22 0x00 0x20 0x00 0 0 0 0
and you'll get the value of "boost" scaled with x32

Code: Select all

0x601 # 0x22 0x00 0x20 0x01 0 0 0 0 -> fweak
Likewise you can use

Code: Select all

0x601 # 0x40 0x00 0x20 0x01 0x80 0x0C 0 0
To set fweak to 100Hz

There are more useful concepts in CANopen but most people don't understand them and rather roll their own.

EDIT: there is also an undocumented feature:
Send

Code: Select all

0x601 # 0x40 0xAA 0x31 0x01 0x08 0x10 1 0
And fweak will be send on COB id 0x1AA, start at bit 8, stretch 16 bits, scale by 1
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 6310
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 249 times
Been thanked: 1307 times
Contact:

Re: Make CANBus Standard

Post by johu »

Just updated the documentation.
So like said, the only catch here is that the value index in Byte 4 changes between firmware versions and the currently used uids span 16 bits.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada
Been thanked: 1 time

Re: Make CANBus Standard

Post by dima »

Wow this is a discovery for me. It existed all this time :D

No need to do anything, send CAN and get a reply. Just works.

Excellent!

EDIT: Well not 100%, obviously getting "udc" will not work ...because it is out of parameter index.
dowster
Posts: 2
Joined: Sat Apr 04, 2020 6:57 pm

Re: Make CANBus Standard

Post by dowster »

The wiki page of can messages, do we need to poll for these values or are they sent on an interval? I'm not sure I'm reading this thread correctly. I'm interested in having a "default" configuration for my instrument cluster project based on this standard. I don't have any EV build started so I'm working on a configurable driver board what you can slap into any car and have some configurable lamp, pulse, and PWM outputs to drive older, non-canbus, instrument clusters. I'd like to be able to setup a test bench using the messages listed on the wiki page.
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Make CANBus Standard

Post by joromy »

dowster wrote: Tue May 05, 2020 6:24 pm I'm working on a configurable driver board what you can slap into any car and have some configurable lamp, pulse, and PWM outputs to drive older, non-canbus, instrument clusters.
Something like this?
viewtopic.php?f=16&t=433

I send you a board for free, and we can do the programming together, I'm not very good at programming (See the github link)
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: Make CANBus Standard

Post by sfk »

I'm also developing a custom gauge cluster and thought it would make sense to use CAN as the prime backbone.

Basically I will have an Arduino wired into the factory loom (this is a pre-CAN / pre-OBD2 car) converting these signals, some PWM to CAN to send to a Raspberry PI system to drive the HDMI video for the screen.

I think it would make sense to use CAN as a transport protocol between the gateway and the gauge cluster since there are other industry standard benefits from doing so. I could process the signals directly with the Rasbperry PI but would like to develop a more robust approach that could be applied to other vehicles with or without CAN.

The key difference here is that I'm not tied to driving the original gauge cluster with analogue inputs. Actually my gauge cluster runs on a very early serial coms competitor to CAN... PALMnet. I don't don't want to waste years of my life reverse engineering that dead standard so going with total TFT LCD replacement.

@joromy your breakout/gateway board suddenly looks very interesting.
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Make CANBus Standard

Post by joromy »

sfk wrote: Thu May 07, 2020 6:25 am @joromy your breakout/gateway board suddenly looks very interesting.
I started to like the Teensy boards, when I got the SimpBMS.
It has CAN bus, the Teensy 4 has 3 CAN buses.

This is going a little off topic, maybe make another tread.......
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: Make CANBus Standard

Post by sfk »

joromy wrote: Thu May 07, 2020 8:13 am This is going a little off topic, maybe make another tread.......
Perhaps return to my Custom Gauge thread?
viewtopic.php?f=9&t=631
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
Post Reply