SPORT telemetry for ProJet Hornet III ECU

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
Post Reply
pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Fri Dec 18, 2015 10:12 pm

Gentlemen,

I've just been told today that turbine jet guys are rather used to spend quite some money on their gear, so that the probability they would be using FrSky radios is rather small. However, I know someone who does, and needs my help to get telemetry data from a ProJet Hornet III ECU into his SPORT receiver (X8R).

As I could not find anything on the protocol used by this ECU, I thought I'd write a few words about what we've found out today afternoon, and probably publish some code once we have something working. The plan is fetch data from the ECU with an arduino pro mini, and then generate SPORT packets so that the data can be displayed in OpenTX (probably with some LUA script).

Looking at the communication between the terminal, ECU & IO extension board, we discovered that they communicate through I2C, not RS-232, as the sticker on the ECU would have let us expect (the plug is labeled "RS-232 Terminal").

Not surprisingly, the ECU plays the master role. The IO board include one PCF8574 using the I2C address 0x3A. The terminal uses two PCF8574. The one addressed with 0x38 is used to interface with the HD44780 based LCD. The other is used for the 4 buttons (up: 0x08; down: 0x04; cancel: 0x02; enter: 0x01).

I must say that I was quite surprised, as I would have expected some communication protocol with a data based API, and not a remote controlled LCD+buttons, but well, this is not going to stop me ;-)

All it takes now it to simulate the terminal and extract the necessary data to be able to translate them into SPORT. I just hope that the firmware is not changing all to often, as I don't really want to have to change the parsing every time the display format changes. Some tests will be needed to determine how fast I can make the ECU travel through the menus to be able to gather the data hidden in sub-menus and not displayed on the main status screen.

As ProJect has a product of its own for telemetry, I believe that there must be another I2C address to which the ECU would send the data directly, but, as I could not test that device, I will probably stick to the "terminal emulation" mode.

Ok, that's all for tonight, stay tuned for more ;-)

User avatar
Kilrah
Posts: 9609
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: SPORT telemetry for ProJet Hornet III ECU

Post by Kilrah » Sat Dec 19, 2015 5:25 am

That's how JetCat stuff works as well. The stock peripherals also uses "passive" I2C port expanders, the obvious advantage being that there is no need to maintain separate programs for each unit and that the accessories will never need a firmware update.

Communication with 3rd-party devices and their telemetry system they also have is however done through an UART for convenience. You should not be touching the I2C as that has high potential for disturbing the ECU's operation.

i3dm
Posts: 9
Joined: Wed Feb 10, 2016 10:53 pm
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by i3dm » Wed Feb 10, 2016 10:55 pm

Hey guys,

im interested in doing something similar.
while Jetcat has a RS232 protocol for interrogations (and i have it :) ), behotec doesnt seem to use RS232, as mentioned.

pafleaf, did you manage to read Behotec I2C Data to Arduino? if so would you be kind enough to shre your code?
im only looking to read the data displayed to the main GSU (LCD) screen, not the sub menus.

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Sat Mar 12, 2016 11:34 pm

Sorry guys for having slept this over... I got involved in other projects in between, and my logic analyser took its time to arrive to Germany ;-)

With the logic analyser hooked on the wires between the ECU and the terminal, I could catch the whole traffic and see things a bit better (especially the timing).

In fact, I could see signal going which are most certainly coming from the UART, and I believe that there is another interface for ProJet's own telemetry device, which is supposed to be based on XBee (according to what I can see in the I2C text traffic; something like "looking for XBee device").

Anyways, neither the gentlemen from ProJet nor IQ-Hammer would be so nice to reply to any requests concerning the UART protocol or disclose that protocol on their own. Now, that said, I'm aware that leaving the I2C-bus blocked could have some destructive potential, but I assume that after properly testing it, we need to accept that little risk to get our end of the bargain.

@kilrah: did you experience any troubles you'd like to share about using I2C with your JetCat ECU? Frankly, I would have wished to get to implement a full disclosed protocol, or to see something at least text based. But reverse engineering a binary protocol while experimenting with a jet turbine which is none of my own is just no fun...

@i3dm: Yes, it's really easy. As i understand, behotec is using exactly the same ProJet ECU I'm working on. Concerning the code, well, it's fairly simple as I just play the role of a display+keypad connected by means of an I2C port expander. In fact, it goes pretty well for now, whereby I could only test against my own code (I have another arduino playing the ECU). If you have just a little more patience, I should be able to publish the whole thing shortly on github.

In the mean time, I need to start figuring out how to pull arbitrary telemetry values with a LUA telemetry script. I understand that it should be fairly simple for the "normal" values (those which have a defined field in opentx), but I'll need to transmit custom values as well to be able to have things like the status strings, for example. So if anyone has a proposal on this one, I'd be thankful for the lead.

User avatar
Kilrah
Posts: 9609
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: SPORT telemetry for ProJet Hornet III ECU

Post by Kilrah » Sun Mar 13, 2016 6:10 am

I didn't have trouble per se, but on their latest design (ECU V10 and matching accessories) the same I2C bus is used for everything from RPM/temp measurement to pump speed control, status display etc, so locking/disturbing the bus with something you connect can just lock up everything, even prevent the ECU from stopping the pump (it however has its own failsafe and will stop on its own if not receiving commands regularly of course).

Your XBee reference would suggest UART is indeed used for telemetry, BUT also that the ECU may be talking to it using the "API" protocol, that you'd have to emulate first, PITA...


i3dm
Posts: 9
Joined: Wed Feb 10, 2016 10:53 pm
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by i3dm » Sun Mar 13, 2016 9:22 am

in the meanwhile, i did manage to figure out the Projet serial 9600 baud protocol and can now read data from it to Arduino.

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Sat May 07, 2016 10:30 am

i3dm wrote:in the meanwhile, i did manage to figure out the Projet serial 9600 baud protocol and can now read data from it to Arduino.
Sounds cool! I'd be interested to see what it looks like. In the meantime, I uploaded my code to github: https://github.com/raphaelcoeffic/sport_ecu.
I had started with Mike's S.PORT software serial implementation, but it seems that it gets quite hard to meet the timing requirements between I2C and software serial, so that I moved to hardware serial (with an inverter connected to rx/tx->S.PORT).

Please let me know on github if you have any question.

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Sat May 07, 2016 11:40 am

By the way, from I can see, the serial protocol I can see on one of the wires is sending with 115200 bauds. The packets look like following:
(please note that I stripped the 0x7E which seems to be the frame marker)

Code: Select all

00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 01 00 00 00 93
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 01 00 00 00 93
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 01 21 01 00 00 0B 23
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 75 00 00 00 1F
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 74 00 00 00 21
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 01 21 01 00 00 0B 23
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 08 84 00 00 C7 07
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 35 08 00 00 01 1E
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 08 77 08 84 00 50
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 75 00 00 00 1F
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 FD 00 00 00 98
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 75 00 00 00 1F
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 75 00 00 00 1F
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 75 00 00 00 1F
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 A5 C9 08 84 00 61
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 01 00 00 00 93
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 74 00 00 08 18
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 FD 00 00 00 98
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 C7 01 00 00 00 93
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 74 00 00 00 21
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 FD 00 00 00 98
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A5 C9 08 84 00 62
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C7 01 00 00 00 00 94
00 25 01 00 00 00 01 4C 00 00 16 00 7C 00 00 B8 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 08 84 00 01 C7 06
[edit] as it seems, these data were from a Hornet II ECU and are not relevant for my project. I've been told however that this is very same format used by the "Wireless telemetry" on the Hornet III when enabled properly. More on that when get to test with the turbine owner.

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Mon May 16, 2016 8:18 am

pafleraf wrote:.../... I've been told however that this is very same format used by the "Wireless telemetry" on the Hornet III when enabled properly. More on that when get to test with the turbine owner.
The complete has been now re-worked to use the "Wireless telemetry" interface. When turned on, it sends a couple of packets which need to be replied with "OK\r", after which the ECU starts sending serial packets at regular time interval (depending on the frequency picked in the config menu; up to 10x per second).

The format of the packets sent by the ecu is as follows:

Code: Select all

  uint8_t frame[40];
  
  uint8_t thro = frame[14];
  uint16_t rpm  = frame[8] | (frame[9] << 8);
  uint16_t egt  = frame[10] | (frame[11] << 8);
  uint8_t vbat = frame[12];
  uint8_t vpmp = frame[13];
  uint16_t fuel = frame[15] | (frame[16] << 8);
  uint16_t status = frame[19];
Please note that the frame buffer used here does not include the frame marker (0x7E). The last byte of the frame is a checksum computed as shown here (byte stuffing mechanism included here as well):

Code: Select all

    if(data == 0x7E) {
      frame_length = 0;
      chk_sum = 0;
      continue;
    }

    if(data == 0x7D) {
      byte_stuffing = true;
      continue;
    }

    if(byte_stuffing) {
      data ^= 0x20;
      byte_stuffing = false;
    }
    
    buffer[frame_length++] = data;
    chk_sum += data;

    if(frame_length == 40) {
      if(chk_sum == 0x24) {
        processEcuFrame(buffer);
      }
      frame_length = 0;
    }
The full code is still located at https://github.com/raphaelcoeffic/sport_ecu . Please note that I moved to the Teensy LC for more debugging convenience (3 hardware serial ports!!!). However, I will try to support the Arduino Pro Mini as well, which has a much better availability on Ebay and all over the place.

[edit]: Fixed byte stuffing / check sum. Support for Arduino Pro Mini has been added & tested.

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Wed May 18, 2016 2:09 pm

I've just added a LUA script to view the data including an additional speed sensor (ASpd, should work with Frsky air speed sensor).

Image

michel49
Posts: 115
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by michel49 » Thu May 19, 2016 1:32 pm

Any chance to work with the Jetmunt Ecu ?

startzero
Posts: 2
Joined: Wed Mar 23, 2016 6:54 am
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by startzero » Thu May 19, 2016 6:15 pm

Hi "pafleraf", please, can you contact me per PN?
BR Volker

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Fri May 20, 2016 7:24 am

michel49 wrote:Any chance to work with the Jetmunt Ecu ?
It looks like it is some sort of re-branded Xicoy, right? So not for now, but I might get my hands on it. Let's see and stay tuned!

pafleraf
Posts: 24
Joined: Mon Dec 07, 2015 9:04 am
Country: Germany

Re: SPORT telemetry for ProJet Hornet III ECU

Post by pafleraf » Fri May 20, 2016 10:23 am

startzero wrote:Hi "pafleraf", please, can you contact me per PN?
BR Volker
done.

-Raphael.

midi77
Posts: 1
Joined: Sun Mar 20, 2016 3:28 pm
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by midi77 » Mon Oct 17, 2016 7:47 am

Hi "pafleraf" I'm also very interestet on on using telemtry data from ECU HornetIII to Taranis. But I'm not a electronic expert. Could you send me som infomations to realaise this?

best regards

Michael

startzero
Posts: 2
Joined: Wed Mar 23, 2016 6:54 am
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by startzero » Mon Nov 07, 2016 11:21 am

Hi @all !
The converter for turbines with HORNET ECU is working also for FrSky S.Port, see the following ... Greetings Volker

i3dm
Posts: 9
Joined: Wed Feb 10, 2016 10:53 pm
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by i3dm » Sat Dec 03, 2016 9:23 pm

michel49 wrote:Any chance to work with the Jetmunt Ecu ?
Sure.

https://www.youtube.com/watch?v=VYEPY9vPe6o

michel49
Posts: 115
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by michel49 » Sun Dec 04, 2016 1:10 pm

Hi i3dm,

good job, how did you that ?

i3dm
Posts: 9
Joined: Wed Feb 10, 2016 10:53 pm
Country: -

Re: SPORT telemetry for ProJet Hornet III ECU

Post by i3dm » Sun Dec 04, 2016 3:48 pm

michel49 wrote:Hi i3dm,

good job, how did you that ?
email me for details:
[email protected]

Post Reply

Return to “General RC Electronic Projects and Discussion”