Sending Custom CAN messages from SDU openinverter board
Sending Custom CAN messages from SDU openinverter board
Can I send custom CAN messages based on SDU value mappings?
For example, I would like to send the CAN messade ID 0x43F over 8 bits starting at Bit 0 with the decimal value of 13976218851319218176 when "Forward" direction is selected.
Can this be done over the web interface or CLI?
For example, I would like to send the CAN messade ID 0x43F over 8 bits starting at Bit 0 with the decimal value of 13976218851319218176 when "Forward" direction is selected.
Can this be done over the web interface or CLI?
-
- Posts: 970
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 166 times
- Been thanked: 220 times
Re: Sending Custom CAN messages from SDU openinverter board
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
Re: Sending Custom CAN messages from SDU openinverter board
So just to be clear, and something that the documentation does not clarify, do I enter the custom value as the gain?P.S.Mangelsdorf wrote: ↑Sat Aug 19, 2023 9:32 pm Yes.
https://openinverter.org/wiki/CAN_communication
-
- Posts: 970
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 166 times
- Been thanked: 220 times
Re: Sending Custom CAN messages from SDU openinverter board
I think so, but I haven't done that myself so I'm not certain. I'd suggest giving it a shot and seeing if it works, it can't hurt anything. It's useful to have a CAN sniffer like SavvyCAN set up to verify the messages being sent.
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
- mane2
- Posts: 236
- Joined: Fri Jan 13, 2023 6:32 am
- Location: Finland
- Has thanked: 36 times
- Been thanked: 32 times
Re: Sending Custom CAN messages from SDU openinverter board
You can send direction as a can message, but not with custom data. Only the number (probably like 0, 1, 2) with gain factor, eg. multiplied by 100. It will also be sent constantly. I didn't see the frequency from wiki, but it's like 50 times per second or so. So not really something you want probably.
- timbradley
- Posts: 17
- Joined: Sat Jan 22, 2022 11:49 pm
- Location: Castle Pines, CO USA
Re: Sending Custom CAN messages from SDU openinverter board
Hello,
Thanks for all the help this forum has provided. The electric Fiero has achieved about 800 miles with the SDU, OI board, charger interface board and Orion BMS. Only a few pesky kinks, one of which is CAN messaging from OI board.
I have Speedhut CAN Gauges and all but the motor temperature are working. Granted, all the working ones are getting their messages from the Orion.
Can anyone offer suggestions on what I may be missing? Based on BMS screenshot, I'm feeling like no CAN traffic is coming from the inverter. Do I need to manually insert a line for this rather than the CAN mapping already done?
Thanks, in advance, for any help here.
Thanks for all the help this forum has provided. The electric Fiero has achieved about 800 miles with the SDU, OI board, charger interface board and Orion BMS. Only a few pesky kinks, one of which is CAN messaging from OI board.
I have Speedhut CAN Gauges and all but the motor temperature are working. Granted, all the working ones are getting their messages from the Orion.
Can anyone offer suggestions on what I may be missing? Based on BMS screenshot, I'm feeling like no CAN traffic is coming from the inverter. Do I need to manually insert a line for this rather than the CAN mapping already done?
Thanks, in advance, for any help here.
1969 Beetle w/ Hyper-9
1988 Pontiac Fiero w/ Tesla SDU(OI), 16 18650, Orion BMS2
1968 VW Transporter 2 w/ Hyper-9
1988 Pontiac Fiero w/ Tesla SDU(OI), 16 18650, Orion BMS2
1968 VW Transporter 2 w/ Hyper-9
- johu
- Site Admin
- Posts: 6371
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 275 times
- Been thanked: 1351 times
- Contact:
Re: Sending Custom CAN messages from SDU openinverter board
May sound silly but have you selected the correct CAN speed?
Are you aware that all numbers are decimal, not hex?
If possible you could monitor the CAN bus to check if your messages are generated
Are you aware that all numbers are decimal, not hex?
If possible you could monitor the CAN bus to check if your messages are generated
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- timbradley
- Posts: 17
- Joined: Sat Jan 22, 2022 11:49 pm
- Location: Castle Pines, CO USA
Re: Sending Custom CAN messages from SDU openinverter board
I have confirmed CAN speed at 500K. Attaching JSON for any other suggestions.
I must access CAN wiring from under car with weather shield removed (yes, design feature we won't repeat) so I haven't gotten there yet (with CAN sniffer, that is).
While looking at JSON, if there are any settings you'd suggest changing to improve the startup jitter, I'm all ears. I've smoked IGBTs on the tuning process a few months back and still having PTSD due to it.
I must access CAN wiring from under car with weather shield removed (yes, design feature we won't repeat) so I haven't gotten there yet (with CAN sniffer, that is).
While looking at JSON, if there are any settings you'd suggest changing to improve the startup jitter, I'm all ears. I've smoked IGBTs on the tuning process a few months back and still having PTSD due to it.
1969 Beetle w/ Hyper-9
1988 Pontiac Fiero w/ Tesla SDU(OI), 16 18650, Orion BMS2
1968 VW Transporter 2 w/ Hyper-9
1988 Pontiac Fiero w/ Tesla SDU(OI), 16 18650, Orion BMS2
1968 VW Transporter 2 w/ Hyper-9
-
- Posts: 970
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 166 times
- Been thanked: 220 times
Re: Sending Custom CAN messages from SDU openinverter board
I've got Speedhut gauges and it took a bit to get things working from my LDU. One thing to note: you need something else on the bus other than just the drive unit and the gauges. I think since their EV CAN gauges are based on their OBD2 gauges, they don't acknowledge the messages (so that they don't freak an OEM car out, they just silently observe), so the drive unit doesn't keep sending. It sounds like you do have the Orion on the bus, so that's likely not the issue.timbradley wrote: ↑Wed Sep 06, 2023 2:11 pm I have Speedhut CAN Gauges and all but the motor temperature are working. Granted, all the working ones are getting their messages from the Orion.
Can anyone offer suggestions on what I may be missing? Based on BMS screenshot, I'm feeling like no CAN traffic is coming from the inverter. Do I need to manually insert a line for this rather than the CAN mapping already done?
To the best of my knowledge, they don't have separate Inverter and Motor temp gauges. The Inverter message looks correct, based on the attached table, but I'm not sure what you're sending the motor temp to.
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
- timbradley
- Posts: 17
- Joined: Sat Jan 22, 2022 11:49 pm
- Location: Castle Pines, CO USA
Re: Sending Custom CAN messages from SDU openinverter board
Thanks for your note. I have deleted all CAN mapping and tried for just the sole inverter temp and get nothing. Both by a direct entry in the table, and as a command. You're right, that is the only gauge I'm running for temperature around the motor.
Time to get it up on the rack and dig into the CAN wires to see if anything is coming out.
If there are any other ideas out there, I'm all ears!
Time to get it up on the rack and dig into the CAN wires to see if anything is coming out.
If there are any other ideas out there, I'm all ears!
1969 Beetle w/ Hyper-9
1988 Pontiac Fiero w/ Tesla SDU(OI), 16 18650, Orion BMS2
1968 VW Transporter 2 w/ Hyper-9
1988 Pontiac Fiero w/ Tesla SDU(OI), 16 18650, Orion BMS2
1968 VW Transporter 2 w/ Hyper-9
-
- Posts: 970
- Joined: Tue Sep 17, 2019 8:33 pm
- Location: Raleigh, NC, USA
- Has thanked: 166 times
- Been thanked: 220 times
Re: Sending Custom CAN messages from SDU openinverter board
Your inverter message looked correct, so the only thing I can think of is; if it's just the gauge and the drive unit on the bus, that causes an issue. But if there are other things on the bus, it should be working.timbradley wrote: ↑Fri Sep 15, 2023 11:18 am Thanks for your note. I have deleted all CAN mapping and tried for just the sole inverter temp and get nothing. Both by a direct entry in the table, and as a command. You're right, that is the only gauge I'm running for temperature around the motor.
Time to get it up on the rack and dig into the CAN wires to see if anything is coming out.
If there are any other ideas out there, I'm all ears!
If at first you don't succeed, buy a bigger hammer.
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024
https://www.youtube.com/@MangelsdorfSpeed
-
- Posts: 502
- Joined: Mon Jul 03, 2023 3:17 pm
- Location: CT, central shoreline, USA
- Has thanked: 167 times
- Been thanked: 148 times
Re: Sending Custom CAN messages from SDU openinverter board
It's easy to be looking in the wrong discipline with things like this. Is the electrical side of things correctly setup? You have termination resistor(s) in place?
-
- Posts: 80
- Joined: Sun Oct 30, 2022 2:21 am
- Has thanked: 4 times
- Been thanked: 9 times
Re: Sending Custom CAN messages from SDU openinverter board
Hi Tim. I am not sure if you are still working this out on the inverter temp gauge issue. I have the ORION 2 BMS and Speed Hut gauges. As a side note, I went to Speed Hut in 2019 to get them to help me make custom can gauges for my EV project and they were super reluctant and I had to pester them to work with me. I then connected them with ZERO EV to develop the EV modified gauges for my project. I am glad that it took off like it did
I am not sure if my settings carry over to your setup, but on the OI firmware, I am not using tmpm at all but only tmphs with 294 32 16 1 as you have done. The ORION and Inverter CANBUS are tied together in the ZERO EV lv junction boxes, but you could connect it all up yourself I assume. Here is a screenshot of my canbus settings in ORION as well but I don't think motor temp is addressed here or needs to be. I have inverter temp/battery temp on one gauge. (disregard the temp reading on the inverter in the photo, as this was when I was dealing with a coolant leak on the inverter reeking havoc on that gauge )
I am not sure if my settings carry over to your setup, but on the OI firmware, I am not using tmpm at all but only tmphs with 294 32 16 1 as you have done. The ORION and Inverter CANBUS are tied together in the ZERO EV lv junction boxes, but you could connect it all up yourself I assume. Here is a screenshot of my canbus settings in ORION as well but I don't think motor temp is addressed here or needs to be. I have inverter temp/battery temp on one gauge. (disregard the temp reading on the inverter in the photo, as this was when I was dealing with a coolant leak on the inverter reeking havoc on that gauge )
-
- Posts: 269
- Joined: Sun Jan 03, 2021 6:12 am
- Has thanked: 69 times
- Been thanked: 24 times
Re: Sending Custom CAN messages from SDU openinverter board
Hello.
Could somebody please give me a hint where am I going wrong here?
In the attached screenshot WebUI reads motor temp = 15.09C and heatsink temp 20.09C, but on the receiving end of the CAN bus, I'm reading motor temp = 12.80C, heatsink temp = 20.21C. Both SDU and my teensy talk at 500k.
This is my code on the receiving end:
Could somebody please give me a hint where am I going wrong here?
In the attached screenshot WebUI reads motor temp = 15.09C and heatsink temp 20.09C, but on the receiving end of the CAN bus, I'm reading motor temp = 12.80C, heatsink temp = 20.21C. Both SDU and my teensy talk at 500k.
This is my code on the receiving end:
Code: Select all
Drive_HtSnkTemp=(uint16_t)((incoming.buf[5] << 8) | (incoming.buf[6])); // scale 1/100
Drive_MotorTemp=(uint16_t)((incoming.buf[7] << 8) | (incoming.buf[8])); // scale 1/100
- johu
- Site Admin
- Posts: 6371
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 275 times
- Been thanked: 1351 times
- Contact:
Re: Sending Custom CAN messages from SDU openinverter board
You're indexes are off by one and you're decoding big endian. Try this
Code: Select all
Drive_HtSnkTemp=(uint16_t)((incoming.buf[5] << 8) | (incoming.buf[4])); // scale 1/100
Drive_MotorTemp=(uint16_t)((incoming.buf[7] << 8) | (incoming.buf[6])); // scale 1/100
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Sending Custom CAN messages from SDU openinverter board
I am having the same issue as @timbradley.
I can not get my MCP2515 to recieve any CAN messages fron the inverter even after mapping them to as TX values.
I have tried to map one value at a time but can not recieve any values. I am using an Arduino with an MCP2515.
Anyone tried reading CAN messages using an MCP2515 that can help?
I can not get my MCP2515 to recieve any CAN messages fron the inverter even after mapping them to as TX values.
I have tried to map one value at a time but can not recieve any values. I am using an Arduino with an MCP2515.
Anyone tried reading CAN messages using an MCP2515 that can help?
- tom91
- Posts: 1943
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 166 times
- Been thanked: 439 times
Re: Sending Custom CAN messages from SDU openinverter board
Do you have a known working setup to confirm you Arduino and mcp2515 are working?tensa wrote: ↑Sat Aug 03, 2024 10:35 am I am having the same issue as @timbradley.
I can not get my MCP2515 to recieve any CAN messages fron the inverter even after mapping them to as TX values.
I have tried to map one value at a time but can not recieve any values. I am using an Arduino with an MCP2515.
Anyone tried reading CAN messages using an MCP2515 that can help?
Check the crystal frequency for the can controller matches the used library.
Re: Sending Custom CAN messages from SDU openinverter board
Yes, I am using the same Arduino and MCP2515 to read the CAN system for the conversion car, so it works. I have tried to match all the CAN parameters, CAN Baudrate etc between the MCP2515 and the inverter and no luck reading anything.
Is there something I am missing?