SPORT telemetry for ProJet Hornet III ECU
SPORT telemetry for ProJet Hornet III ECU
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
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
Re: SPORT telemetry for ProJet Hornet III ECU
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.
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.
Re: SPORT telemetry for ProJet Hornet III ECU
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.
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.
Re: SPORT telemetry for ProJet Hornet III ECU
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.
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.
Re: SPORT telemetry for ProJet Hornet III ECU
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...
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...
Re: SPORT telemetry for ProJet Hornet III ECU
in the meanwhile, i did manage to figure out the Projet serial 9600 baud protocol and can now read data from it to Arduino.
Re: SPORT telemetry for ProJet Hornet III ECU
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.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.
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.
Re: SPORT telemetry for ProJet Hornet III ECU
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)
[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.
(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
Re: SPORT telemetry for ProJet Hornet III ECU
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).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 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];
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;
}
[edit]: Fixed byte stuffing / check sum. Support for Arduino Pro Mini has been added & tested.
Re: SPORT telemetry for ProJet Hornet III ECU
I've just added a LUA script to view the data including an additional speed sensor (ASpd, should work with Frsky air speed sensor).
Re: SPORT telemetry for ProJet Hornet III ECU
Any chance to work with the Jetmunt Ecu ?
Re: SPORT telemetry for ProJet Hornet III ECU
Hi "pafleraf", please, can you contact me per PN?
BR Volker
BR Volker
Re: SPORT telemetry for ProJet Hornet III 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!michel49 wrote:Any chance to work with the Jetmunt Ecu ?
Re: SPORT telemetry for ProJet Hornet III ECU
done.startzero wrote:Hi "pafleraf", please, can you contact me per PN?
BR Volker
-Raphael.
Re: SPORT telemetry for ProJet Hornet III ECU
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
best regards
Michael
Re: SPORT telemetry for ProJet Hornet III ECU
Hi @all !
The converter for turbines with HORNET ECU is working also for FrSky S.Port, see the following ... Greetings Volker
The converter for turbines with HORNET ECU is working also for FrSky S.Port, see the following ... Greetings Volker
Re: SPORT telemetry for ProJet Hornet III ECU
Sure.michel49 wrote:Any chance to work with the Jetmunt Ecu ?
https://www.youtube.com/watch?v=VYEPY9vPe6o
Re: SPORT telemetry for ProJet Hornet III ECU
Hi i3dm,
good job, how did you that ?
good job, how did you that ?