RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Innovate Serial protocol
Author Message
Reply with quote
Post Innovate Serial protocol 
So our Lemons team already had 4 of these Innovate Gauges daisy chained together. Looking to leverage this and input it into our Racecapture mk3

Trying to just get an initial connection/look at the output data as it comes from the serial stream.

http://www.innovatemotorsports.com/support/downloads/Seriallog-2.pdf


8 data bits
1 stop bit
no parity
19.2 kBaud.


Code:

--initialize Aux serial port to 19200, 8, N, 1
initSer(4,19200, 8, 0, 1)

function onTick()
 --read a line from the aux serial port with a 100ms timeout
 value = readSer(4, 200)
 if value ~= nil then
  println('read value: ' ..value)
 end
end


It is returning a blank read value over and over which seems to at least point to the connection taking place. Is there something easy I am missing here?

Currently I am just hooked up to one of these gauges on the out port. Once I get that one configured I will be adding the other 2 and the LC-2 wideband.

View user's profile Send private message
Reply with quote
Post  
It's hard to say without seeing the protocol directly, and we don't have experience with that protocol.

What I would recommend is using a basic script like you have, and then connecting it to your computer using a USB to serial adapter. Then, if you open a terminal program, like HyperTerminal or RealTerminal (both windows apps) - and then press a Key, like "A" - you should receive an "A" in the Lua script.

Once you can prove you can receive data correctly, then you can implement the innovate serial protocol.

Good luck!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Just a word of caution here. I did the same thing with my Zeitronix ZT-2 and I found that even setting the tick rate at 30 it wasn't fast enough to keep up. Everything looked good with the car idling but revving and letting off the gas showed a noticeable lag in the data being output to the RaceCapture app vs the Zeitronix app and LCD. You might have better luck or I was doing something wrong, but that's what I saw.

View user's profile Send private message
Reply with quote
Post  
It really does depend on how the script is written. For example, if on every tick only one character is processed, it would be slower than having the script block until every character representing a message is received on the port - then that message can be parsed for values and virtual channels set.

Post the script as you make progress, we'll put an eye on it!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Looking at the pdf it looks like you might be running into the same thing as I did at first. The readSer function assumes that each packet ends with a carriage return, which I don't see called out in the documentation. For my application the header is marked by the first three characters, which are always 0,1,2 and that sequence is guaranteed not to occur in each packet. The while loop is looking for those characters. I'd suggest just using readCSer to see if that gets you something meaningful.

Code:
if initSer(4, 9600, 8, 0, 1) == true then
  println('initialized')
else
  println('failed to initialize')
end
setTickRate(30)

function onTick()
   headerFound = false
   while headerFound == false
   do
      first = readCSer(4, 10)
      if first == 0 then
         second = readCSer(4, 10)
         if second == 1 then
            third = readCSer(4, 10)
            if third == 2 then
               afr = readCSer(4, 10)
               egtLow = readCSer(4, 10)
               egtHigh = readCSer(4, 10)
               rpmLow = readCSer(4, 10)
               rpmHigh = readCSer(4, 10)
               mapLow = readCSer(4, 10)
               mapHigh = readCSer(4, 10)
               tps = readCSer(4, 10)
               user1 = readCSer(4, 10)
               config1 = readCSer(4, 10)
               config2 = readCSer(4, 10)
               --user2Low = readCSer(4, 10)
               --user2High = readCSer(4, 10)
               --user2Config = readCSer(4, 10)
               afrValue = afr / 10
               egtValue = egtLow + egtHigh * 256
               rpmValue = ((1000000 / (rpmLow + (rpmHigh * 256) ) ) * 4.59 ) / 4 -- 4 = number of cylinders
               mapValue = (mapLow + mapHigh * 256) / 10
               user1Value = ((5 / 256) * user1) * 37.5 - 18.7  -- values = 0 to 255, which correspond to 0Volts to 5Volts
               println(first ..', ' ..second ..', ' ..third ..', AFR: ' ..afrValue ..', EGT: ' ..egtValue ..', RPM: ' ..rpmValue ..', MAP: ' ..mapValue ..', TPS: ' ..tps ..', Fuel Pressure: ' ..user1Value ..', Config1: ' ..config1 ..', config2: ' ..config2)
               headerFound = true
            end
         end
      end
   end
end


View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum