Page 1 of 2

Izze Racing Brake Temperature Sensors

Posted: Wed May 17, 2017 9:45 pm
by gizmodo
I ordered four of these today (http://www.izzeracing.com/products/brak ... nsors.html). Does anyone else have these working with their RCP? If so, how did the integration with the RCP go?

Posted: Mon May 22, 2017 10:30 pm
by brentp
We have customers using these already, and one of our dealers (RaceElectronic) provided CAN mapping information for the sensors.
https://wiki.autosportlabs.com/Izze_Rac ... re_Sensors

Keep us posted with how it works!

Posted: Tue May 23, 2017 4:35 pm
by gizmodo
Cool, thanks!

One other thing. What would be the best way to connect the four sensors to the RJ45 plug? The simplest would be to solder them, but I'd like something a bit cleaner.

Posted: Tue May 23, 2017 4:51 pm
by brentp
Not having seen how the sensor's wire terminations look, it might be a case where you take an RJ45 network cable and snip one end off, and splice the wires together.

Keep us posted on the progress!

Posted: Wed May 24, 2017 9:07 pm
by gizmodo
It is just four wires coming off each sensor. Since I have four I'll just tie them together and connect them to a short piece of wire. The sensors need 5 volts, but require 30 mA so I'm guessing I can't use the 5 volt from the RCP, correct?

Posted: Wed May 24, 2017 9:29 pm
by brentp
Your MK2 can supply up to 1A from the vRef. plenty of power for the sensors.

Posted: Tue Jun 06, 2017 9:01 pm
by gizmodo
I had a chance to get these working today. There is one problem though. My sensors are setup for 16 channels each. I had to trim the script in the link above quite a bit because I was getting an out of memory error from lua. Even with trimming I was only able to get the front two sensors working. I can setup the sensors to use 8 channels but then I won't be able to do anything else with lua. Is there something I am missing here? I'd hate to think I can't use the ShiftX and Zeitronix scripts I have too. Here is the script I have working.

Code: Select all

--This example is configured for IzzeRacing CAN-bus TireTemp-Sensors
--by www.race-electronic.com
setTickRate(30)

BDF1Id = addChannel("BDF1", 10, 0, -20, 950, 'degC')
BDF2Id = addChannel("BDF2", 10, 0, -20, 950, 'degC')
BDF3Id = addChannel("BDF3", 10, 0, -20, 950, 'degC')
BDF4Id = addChannel("BDF4", 10, 0, -20, 950, 'degC')
BDF5Id = addChannel("BDF5", 10, 0, -20, 950, 'degC')
BDF6Id = addChannel("BDF6", 10, 0, -20, 950, 'degC')
BDF7Id = addChannel("BDF7", 10, 0, -20, 950, 'degC')
BDF8Id = addChannel("BDF8", 10, 0, -20, 950, 'degC')
BDF9Id = addChannel("BDF9", 10, 0, -20, 950, 'degC')
BDF10Id = addChannel("BDF10", 10, 0, -20, 950, 'degC')
BDF11Id = addChannel("BDF11", 10, 0, -20, 950, 'degC')
BDF12Id = addChannel("BDF12", 10, 0, -20, 950, 'degC')
BDF13Id = addChannel("BDF13", 10, 0, -20, 950, 'degC')
BDF14Id = addChannel("BDF14", 10, 0, -20, 950, 'degC')
BDF15Id = addChannel("BDF15", 10, 0, -20, 950, 'degC')
BDF16Id = addChannel("BDF16", 10, 0, -20, 950, 'degC')

BPF1Id = addChannel("BPF1", 10, 0, -20, 950, 'degC')
BPF2Id = addChannel("BPF2", 10, 0, -20, 950, 'degC')
BPF3Id = addChannel("BPF3", 10, 0, -20, 950, 'degC')
BPF4Id = addChannel("BPF4", 10, 0, -20, 950, 'degC')
BPF5Id = addChannel("BPF5", 10, 0, -20, 950, 'degC')
BPF6Id = addChannel("BPF6", 10, 0, -20, 950, 'degC')
BPF7Id = addChannel("BPF7", 10, 0, -20, 950, 'degC')
BPF8Id = addChannel("BPF8", 10, 0, -20, 950, 'degC')
BPF9Id = addChannel("BPF9", 10, 0, -20, 950, 'degC')
BPF10Id = addChannel("BPF10", 10, 0, -20, 950, 'degC')
BPF11Id = addChannel("BPF11", 10, 0, -20, 950, 'degC')
BPF12Id = addChannel("BPF12", 10, 0, -20, 950, 'degC')
BPF13Id = addChannel("BPF13", 10, 0, -20, 950, 'degC')
BPF14Id = addChannel("BPF14", 10, 0, -20, 950, 'degC')
BPF15Id = addChannel("BPF15", 10, 0, -20, 950, 'degC')
BPF16Id = addChannel("BPF16", 10, 0, -20, 950, 'degC')

CAN_map = {
[1220] = function(data) map_chan(BDF1Id, data, 0, 2, 0.1, -100)
                        map_chan(BDF2Id, data, 2, 2, 0.1, -100)
                        map_chan(BDF3Id, data, 4, 2, 0.1, -100)
                        map_chan(BDF4Id, data, 6, 2, 0.1, -100) end,
[1221] = function(data) map_chan(BDF5Id, data, 0, 2, 0.1, -100)
                        map_chan(BDF6Id, data, 2, 2, 0.1, -100)
                        map_chan(BDF7Id, data, 4, 2, 0.1, -100)
                        map_chan(BDF8Id, data, 6, 2, 0.1, -100) end,
[1222] = function(data) map_chan(BDF9Id, data, 0, 2, 0.1, -100)
                        map_chan(BDF10Id, data, 2, 2, 0.1, -100)
                        map_chan(BDF11Id, data, 4, 2, 0.1, -100)
                        map_chan(BDF12Id, data, 6, 2, 0.1, -100) end,
[1223] = function(data) map_chan(BDF13Id, data, 0, 2, 0.1, -100)
                        map_chan(BDF14Id, data, 2, 2, 0.1, -100)
                        map_chan(BDF15Id, data, 4, 2, 0.1, -100)
                        map_chan(BDF16Id, data, 6, 2, 0.1, -100) end,
[1225] = function(data) map_chan(BPF1Id, data, 0, 2, 0.1, -100)
                        map_chan(BPF2Id, data, 2, 2, 0.1, -100)
                        map_chan(BPF3Id, data, 4, 2, 0.1, -100)
                        map_chan(BPF4Id, data, 6, 2, 0.1, -100) end,
[1226] = function(data) map_chan(BPF5Id, data, 0, 2, 0.1, -100)
                        map_chan(BPF6Id, data, 2, 2, 0.1, -100)
                        map_chan(BPF7Id, data, 4, 2, 0.1, -100)
                        map_chan(BPF8Id, data, 6, 2, 0.1, -100) end,
[1227] = function(data) map_chan(BPF9Id, data, 0, 2, 0.1, -100)
                        map_chan(BPF10Id, data, 2, 2, 0.1, -100)
                        map_chan(BPF11Id, data, 4, 2, 0.1, -100)
                        map_chan(BPF12Id, data, 6, 2, 0.1, -100) end,
[1228] = function(data) map_chan(BPF13Id, data, 0, 2, 0.1, -100)
                        map_chan(BPF14Id, data, 2, 2, 0.1, -100)
                        map_chan(BPF15Id, data, 4, 2, 0.1, -100)
                        map_chan(BPF16Id, data, 6, 2, 0.1, -100) end,
}

function onTick()
    processCAN(0)
end

function processCAN(chan)
    repeat
        local id, e, data = rxCAN(chan)
        if id ~= nil then
            local map = CAN_map[id]
            if map ~= nil then
                map(data)         
            end
        end
    until id == nil
end

function map_chan_be(cid, data, offset, len, mult, add, filter)
    offset = offset + 1
    local value = 0
    while len > 0 do
        value = (value * 256) + data[offset]
        offset = offset + 1
        len = len - 1
    end
 local cv = (value * mult) + add
 if filter ~= nil then cv = filter(cv) end
    setChannel(cid, cv)
end

map_chan = map_chan_be
initCAN(0, 1000000)

Posted: Tue Jun 06, 2017 10:13 pm
by brentp
Great you got it to work!

But, first suggestion, I would just ditch the script and use the built-in CAN mapping capabilities available in the latest 2.11.0 firmware.

https://wiki.autosportlabs.com/CAN_Bus_Integration

Seriously, it should work much better for you and save your Lua script for other custom integrations.

Posted: Tue Jun 06, 2017 10:32 pm
by gizmodo
I was wondering about that. I'll give that a shot tonight or tomorrow. As always, thanks for the help!

Posted: Wed Jun 07, 2017 5:54 pm
by gizmodo
I've had no luck getting this to work with the CAN Mapping. Regardless of what I put in for values I get a reading of 0. If I add the lua script back in I can see those values changing, so I must be missing something on the mapping setup. According to the documentation the transfer function is x/10-100.0 where x is the 16 bit channel. It also says Termination: None. Would this matter? I don't think so since it works in lua.

Here is the CAN section from my configuration:

Code: Select all

    
    "canCfg": {
      "baud": [
        1000000,
        500000
      ],
      "en": 1
    },
"canChanCfg": {
      "chans": [
        {
          "add": -100.0,
          "bigEndian": true,
          "bm": false,
          "bus": 0,
          "div": 10.0,
          "filtId": 0,
          "id": 1220,
          "idMask": 0,
          "len": 2,
          "max": 950,
          "min": -20,
          "mult": 1.0,
          "nm": "DFBrake1",
          "offset": 0,
          "prec": 0,
          "sr": 10,
          "type": 0,
          "ut": "C"
        },
        {
          "add": -100.0,
          "bigEndian": true,
          "bm": false,
          "bus": 0,
          "div": 10.0,
          "filtId": 0,
          "id": 1225,
          "idMask": 0,
          "len": 2,
          "max": 950,
          "min": -20,
          "mult": 1.0,
          "nm": "PFBrake1",
          "offset": 0,
          "prec": 0,
          "sr": 10,
          "type": 0,
          "ut": "DegC"
        }
      ],
      "en": 1
    },

Posted: Fri Jun 09, 2017 4:00 am
by gizmodo
I made a bit more progress on this. After power cycling the RCP and restarting RaceCapture (I'm using the Windows version, 1.9) I was able to get readings using the setting above. However, when I tried to add more channels, either by editing the settings file and rewriting or adding channels through mapping I would only get value on the first two (in order of creation) CAN channels. For my event I went back to Lua scripting and only used 8 channels from each sensor and that seemed to work okay.

Posted: Fri Jun 09, 2017 4:07 am
by brentp
You should be able to use the UI for certain. However, we've received reports that the CAN mapping required a power cycle - which I haven't been able to reproduce yet.

If you can, try adding a few channels and power cycle after writing to RCP and see if that wakes it up.

If it still doesn't work, send me your config and I'll try to simulate the data on my end with a 2nd RCP (I don't have the same sensors as you)

Posted: Sat Jun 10, 2017 12:19 am
by gizmodo
I now have 32 CAN channels mapped. A simple power cycle of the RCP after adding the channels did the trick!

Posted: Sat Jun 10, 2017 12:28 am
by brentp
Great! Now we just need to catch it in the act and fix that bug :)

Posted: Sat Jun 10, 2017 1:13 am
by gizmodo
I seem to be able to reproduce it every time, so if there's a debug setting or something I can turn on let me know.