CanBus Transmission to Haltech Elite ECU

Hello,

I am wanting to send CANBUS commands to the Haltech Elite ECU. There is not much in the way of Haltech’s protocols used but I have found the CAN stream information for an I/O expander box.

is my understanding correct that if i update the .XML file on Realdash to include the CAN information of the intputs I want to send via Realdash then I can use realdash to “send CAN frame” and that will then send that to the ECU?

In essence I want to use realdash to send CAN commands to the ECU to trigger events/features.

I’ve been trying to learn about the CAN protocol but it is quite tricky. I have the following for the I/O expander:

there are 4 channels AVI 1 - 4 that I would like to be able to trigger from realdash.

How would I go writing this information into the correct format for the Realdash CAN .XML and subsequently what would the “Send CAN Frame” look like for AVI1 for example?

Any help would be extremely appreciated.

Thank you.

Not exactly sure how to interpret the ‘Message Position’, but I would assume its sending four 16 bit values. Try to add this to your XML:

<frame id="0x2C0">
	<value name="Haltech IO Extender: AV1" offset="0" length="2" conversion="V*5/4095"></value>
	<value name="Haltech IO Extender: AV2" offset="2" length="2" conversion="V*5/4095"></value>
	<value name="Haltech IO Extender: AV3" offset="4" length="2" conversion="V*5/4095"></value>
	<value name="Haltech IO Extender: AV4" offset="6" length="2" conversion="V*5/4095"></value>
</frame>

This is assuming that values are little endian. Inspect the incoming values in CAN Monitor, if you receive the values but they seem wrong, change the first line to:

<frame id="0x2C0" endiannes="big">

Thanks for the reply! I had written something similar but yours seems much more correct.

How would the send CAN frame look for say AVI?

Apologies if these are dumb questions.

After you have specified your custom values in XML, like “Haltech IO Extender: AV1”. You can use Actions to change the value of that input. When value is changed by RealDash action, the corresponding CAN frame is updated and sent to CAN bus automatically.

Excellent,

Thank you that makes sense. If i get it working I will let you know with an updated XML file for others to use.

1 Like

Hi @mOS_cOww , I see a fellow Haltech user.
Here’s my file with IO Box A implemented and the AVI inputs working in haltech as of Elite 3.10.3 firmware.
I am using 4 sliders in realdash which for now go between raw 0 and 4095 integer value (that’s how the 12-bit ADC values are mapped in haltech for 0 to 5 Volt). Full XML file is also attached with other values properly mapped, feel free to use.

The “dummy” values for DPI inputs should probably be re-mapped to Haltech specific values instead of using up dummy values.

haltech_v2_6_can-io.xml (18.9 KB)

The issue so far is that on my joying headunit with a seed can analyzer I have no problem receiving dash data from haltech, but get IO Box timeouts every now and then for exactly 500ms when transmitting values from realdash to haltech.

@realdashdev I’ve been slowly updating the XML file in my own repo, if I can resolve these timeouts I’m happy to do a pull request and share the updated Haltech XML with the community :slight_smile:

<!-- IO Box A -->

    <frame id="0x2C0" endianess="big" writeInterval="20">
      <value name="Haltech: AVI1" offset="0" length="2"></value> <!-- dummy1 AVI1 -->
      <value name="Haltech: AVI2" offset="2" length="2"></value> <!-- dummy2 AVI2 -->
      <value name="Haltech: AVI3" offset="4" length="2"></value> <!-- dummy3 AVI3 -->
      <value name="Haltech: AVI4" offset="6" length="2"></value> <!-- dummy4 AVI4 -->
    </frame>

    <frame id="0x2C2" endianess="big" size="8" writeInterval="20">
      <value targetId="121" offset="0" startbit="7" bitcount="10" units="%" conversionOut="V*10"></value> <!-- dummy6 DPI1 Duty -->
      <value targetId="122" offset="1" startbit="0" bitcount="17" conversionOut="V*100"></value> <!-- dummy7 DPI1 Period -->
      <value targetId="123" offset="4" startbit="7" bitcount="10" units="%" conversionOut="V*10"></value> <!-- dummy8 DPI2 Duty -->
      <value targetId="124" offset="5" startbit="0" bitcount="17" conversionOut="V*100"></value> <!-- dummy9 DPI2 Period -->
    </frame>

    <frame id="0x2C4" endianess="big" size="8" writeInterval="20">
      <value targetId="125" offset="0" startbit="7" bitcount="10" units="%" conversionOut="V*10"></value> <!-- dummy10 DPI3 Duty -->
      <value targetId="126" offset="1" startbit="0" bitcount="17" conversionOut="V*100"></value> <!-- dummy11 DPI3 Period -->
      <value targetId="127" offset="4" startbit="7" bitcount="10" units="%" conversionOut="V*10"></value> <!-- dummy12 DPI4 Duty -->
      <value targetId="128" offset="5" startbit="0" bitcount="17" conversionOut="V*100"></value> <!-- dummy13 DPI4 Period -->
    </frame>

@nextez using offset / length and startbit / bitcount are mutually exclusive to my understanding, not sure what above would produce

I’ll be honest I haven’t tested DPI functionality yet as I got stuck with the intermittent timeouts in AVIs, so most definitely I messed it up.
Didn’t realize they were mutually exclusive, thank you @mmain , I will re-write to use startbit and bitcount then.
Below is the table of what this was mean to be - using 10 bits for duty cycle and 17 bits for period in milliseconds:

I use offset / length preferentially with logical AND masking when needed, you need to consider endianess when using startbit / bitcount for anything greater than 8 bit values

1 Like

Hey mate,

That’s incredible thank you! you’ve gotten way further than I have, I’ve not had much time to even get started. I have been making a Haltech IC7 style dash that I’d be happy to share once I’m done if you want it.

I’ve just received my CAN analyzer yesterday so keen to have a fiddle. I’ll use your XML and files and see how i go. Thanks again!

I received this from Haltech about their button boxes, not sure if its of any use to anyone but figured I’d post it up just incase.

The write interval for the frames may be too agressive. Sending multiple frames on 20ms intervals may just be too much for the adapter. Try decreasing that to 100ms range if that helps with disconnects.

1 Like

Hey mate,

I’ve run into some basic issues with receiving any info from the haltech. I’m using a seed USB-Analyser too, baudrate 115200 but I cant get it to work in realdash on android or pc. I go to add the usb analyzer, It shows it in the list, baudate set at 115200 but then in the can monitor it just stuck on connection timeout.

Can you please export your connection or share the exact details of the connection with me?

If I use your XML i at least see a bit of info on the can monitor and the send light flashes constantly on the usb-analyzer but with the haltech v2 i get nothing at all.

Hey mate,

I’m having issues connecting the USB-Can analyzer to the haltech ecu in realdash with your Haltech V2 xml.

On the PC
When i go to add the USB Can it shows up in the list, I select it, set the baudrate to 115200( i set this correctly on the windows pc via the Seeed software), load your XML but then under can monitor it just says timeout connecting. I’ve tried to change all the settings in realdash one at a time but no joy. If i unplug the device it says disconnected, re plug it times out connecting in the monitor.

Tried it on an android and had the exact same situation.

Any hints?

Thank you.

Hey man, why did you set the baudrate to 115200? You should reset it back to 2M.
If you’ve already changed it in seeed software I suggest resetting it back using seeed sw, then connecting from realdash at 2M, normal mode, standard can frame length.

I’ll try export from my car next time I’m in, but can’t promise how quickly that’ll be.

1 Like

It wasnt working on 2000000 and I read that it needs to be 115200 somewhere so I changed it but no luck. Set it back to 2000000 no joy. Should be pretty straightforward. I wonder if my knockoff adapter isnt up to scratch. I thought it was an original seeed one but i dont think it actually is.

If you check our instructions for seeedstudio adapter here:

RealDash | Manuals | Supported CAN/LIN Adapters

You see that we are recommending dropping the default baud rate to 1228800. Many devices will start dropping frames on 2M baud serial connection, so you will actually get better performance when setting it to 1228800.

1 Like

Hey mate,

Thanks for the clarification. I did read that and set it to 1228800 but it still wasnt working. I’ll reset it back to that and try continue troubleshooting it.

@realdashdev somehow through all my experiments with RealDash I missed that piece of instructions, thank you! Let me go test that tonight.

@mOS_cOww here’s my connection profile export in xml, you can see and compare the settings under “connections”, at the time of writing this I was still running 2Mbaud, I’ll experiment with 1.2Mbaud next

<connections>
      <connection source="27" type="0" deviceName="USB Serial" deviceGuid="6790,29987" ipAddress="" ipPort="0" baudRate="2000000" connDelay="0" dtr="0" rts="0" ble="0" uint0="1000000" uint1="0" uint2="1" string0="/storage/emulated/0/RealDash/descfiles/haltech_v2_6_can-io.xml"></connection>
   </connections>

haltech-usbcan.xml (6.5 KB)