HOTT Telemetry integration

JBX
Posts: 3
Joined: Wed Feb 29, 2012 12:45 pm

HOTT Telemetry integration

Post by JBX »

Hello,

has anyone thougth about the integration of HOTT Telemetry in MWC Code?

Some Protocol information can be found here:
http://www.rc-network.de/forum/showthre ... C3%BCsselt
http://www.thyzoon.fr/Aeromod/LipoHott/LipoHott1.php

Some informations are present on the MWC Software like:
-Voltage
-Hight (BM085)
The current could be meassured with a ACS758 or INA168 + Shunt Resistor

Hott supports also a Text based protocol, so the configuration of PID Settings and so forth cold be made over text menue.

Jochen

User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: HOTT Telemetry integration

Post by Hamburger »

Sure, can. Be done. Telemetry foundations are already present in mwii. Question is will you do it.

fred_fr
Posts: 3
Joined: Mon Aug 29, 2011 6:49 pm

Re: HOTT Telemetry integration

Post by fred_fr »

hi,

we plan to do this type of telemetry

See some bigining at : http://mwc-fr.wikispaces.com/telemetrie ( in french.

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

I'm having a working HoTT implementation in my own 1.9 version of the MultiWii Software. It is currently able to send you the LiPo voltage and relative height from ground.
It uses the same Arduino that is used for FlightControl to generate telemetry data on serial out. The only problem is, that the cycle time explodes slightly. Reason is, that the HoTT protocol requires an idle time of 2ms between every byte transmitted. So having 54bytes per telemetry frame gives you a waiting time of 108ms. This can be decreased to 43ms by using 0.8ms as idle time (lower won't work). My implementation uses Arduinos Serial.print function, it's slow, it blocks everything due to the usage of delayMicroseconds() between each byte transmitted, but my 50cm Copter still flies, even on a windy day, maybe it was a good idea to refresh telemetry with 1Hz. I tried to avoid blocking using Timer interrupts, but all Timers are taken (Timer0 uses Arduino, Timer1 and Timer2 are used for PWM generation, as far as I know). I tried to use the interrupt based approach from serial.pde, bottom line was, Telemetry yes but QuadCopter didn't respond to anything.
Attachments
IMG_1290.jpg

fred_fr
Posts: 3
Joined: Mon Aug 29, 2011 6:49 pm

Re: HOTT Telemetry integration

Post by fred_fr »

hi

I had the same problem with my first implelentation.

My second test is to use a second telemetry promin, this card is interconnected to the main board with I2C for data transfer.

User avatar
chriszero
Posts: 3
Joined: Sun Mar 18, 2012 12:33 pm
Location: Heilbronn, Baden-Wurttemberg, DE

Re: HOTT Telemetry integration

Post by chriszero »

Hi,

I'm using a second pro mini for the HOTT telemetry, just by using the same serial com as the multiWii_conf.
I have a full text menu, so I can configure all settings the same way as die conf software.

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

Great !

can you share the code with us ?

User avatar
chriszero
Posts: 3
Joined: Sun Mar 18, 2012 12:33 pm
Location: Heilbronn, Baden-Wurttemberg, DE

Re: HOTT Telemetry integration

Post by chriszero »

Hi,

As soon I have refactored the code, I will make a git repository to share the code.
At the moment it's not more than a draft. Stay tuned :D

Chris

JBX
Posts: 3
Joined: Wed Feb 29, 2012 12:45 pm

Re: HOTT Telemetry integration

Post by JBX »

Hi,

on one copter I have a Flyduino MEga Board (Atmega2560) with free serial port which could be used for Hott, but I think the timing issue which Oli describes also happens on a board with additional free serial port, right?

I thing about the following thing:

We don´t have enough serial ports for some options like GPS, Telemetrie (HOTT, JETI, FRSKY..) and maybe some IO´s are missing for things like LED lightning (I for Example use a NXP I2C PCF IO- Expander for my LED stripes. Now I´ve seen the "Arduino Micro" with ATXMEGA A4 Controller. The Datasheet for the XMEGA A4 says 5 UARTS (I don´t know if the 32a4 has all 5)!!! So it could be solution the make only one "CO-Processor" board which is conneted to the main-controller via I2C which handels GPS, HOTT, IO´s for lighting and so on and the main-cpu more free from timing critical thinks!?

Jochen

JBX
Posts: 3
Joined: Wed Feb 29, 2012 12:45 pm

Re: HOTT Telemetry integration

Post by JBX »

Sorry,

it mixed something up!

The "Arduino Pro micro" uses the Atmega32u4 with 1 USB and 1 UART. The ATxmega32a4 board which I found on ebay doesn´t support Arduino.

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Timing issues also applies to the Mega2560 boards, because you still have to wait between each byte that is being transmitted. The advantage of the Mega2560 board is that you don't have to share your serial interface that is used for parameter programming. HOTT telemetry uses only one wire to transmit and receive data, ever wanted to know what happens up in the air when EEPROM flash command is triggered due to the fact that RX register was not turned off and everything that was transmitted as telemetry data has been interpreted as new PID values, kind of funny behavior until the quad crashes. 2nd advantage more free hardware timers that can be used to trigger transmit of new telemetry byte after x milliseconds, to avoid the blocking problem.

I got my Mega2560 board last week and currently porting the 1.9 code to 2.0 and trying to implement the non blocking version with hardware timer interrupts.

User avatar
chriszero
Posts: 3
Joined: Sun Mar 18, 2012 12:33 pm
Location: Heilbronn, Baden-Wurttemberg, DE

Re: HOTT Telemetry integration

Post by chriszero »

The response Bytes have to send with a delay of not more than 2ms, but also not much less than 2ms! There is also a delay between request and response of 5ms.

In Textmode a message have always 173byte, in binary mode 45byte.
It's a serial one wire at 19200 baud. Just connect RX and TX and turn of the RX register at transmit and vice versa.
The Logic level of the serial pin of the HOTT receiver is 3.3V, so we need at least one llc 5V<>3.3V

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

@chriszero Yes and No, what I determined is, that the HOTT receiver is very generous regarding the delays. The range gets from 650us up to 4ms between each byte. Furthermore do I not use a LLC, just a diode between RX and TX, that's all (maybe I should consider using one).

Although I'm spending 35000us in the annex() routine to submit the telemetry data, the QuadCopter still flies. Every once in a while I noticed a twitch of the copter. Until today I thought, thats due to spending so much time in annex() routine, and time between 2 sensor read outs is to long and position moved "dramatically" which means for the copter it has to operate against this movement. But today I saw, that my SumPPM signal goes crazy when having telemetry enabled. My gut feeling tells me that it is more often happening since switching from 1.9 to 2.0, but it could also be due to switching from ProMini to Mega platform.

Does someone know, why SumPPM correlates with a long running annex() routine? Even though I'm using a Mega2560 for a Quad, I want to use Serial SumPPM, only one cable, 6ch transmitter can be used for control and telemetry and still AUX1 and AUX2 channels are free for, e.g. switches. There has to be a solution to use HOTTv4 with at least a Mega2560 or even ProMini without having a second ProMini on I2C.

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Current development of HoTTv4 in MW2.0 can be found here: http://github.com/obayer/MultiWii-HoTT

User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: HOTT Telemetry integration

Post by Hamburger »

Hi Oli,
I just had a quick look at your github tree.
Not sure if this was intended, but your licence does not look to be compliant with the original licence of MultiWii, which is GPL. Simply put, any and all derivative work of MultiWii must again be put (and published) under GPL. Your License.txt seems to a) not mention GPL and b) not comply with the GPL implications.
(you seem to grant more rights than you have. You cannot grant free use of the MultiWii code. Also, you could not split the derivative work in parts and put those under different licenses, like GPL for original MultiWii parts and yours for your Hott extension. If you take GPL and modify, it is GPL for everything. Exceptions exist for libraries, but this does not matter in your case.)

Sorry to bother you with this, but MultiWii is already facing theft of IP from some chinese pirates who knowingly violate GPL (viewtopic.php?f=8&t=1142). I would not like to see the MultiWii code spread in an inappropriate way which could be used as an excuse by other pirates to sidestep the GPL licencing of MultiWii.

Hope you do not mind too much. Hamburger

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Hi Hamburger,

I'm going to change it immediately to GPLv3, it was absolutely my mistake for being not accurately enough.

Thank for pointing it out.
oli

User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: HOTT Telemetry integration

Post by Hamburger »

Thanks for understanding.

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Next dev step will include PID reporting and changing
Attachments
IMG_1325.jpg

User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: HOTT Telemetry integration

Post by Hamburger »

Now that looks good. Does the menu code run on the arduino?
We should try and consolidate the different menu implementations.
I understand licence is not a problem here. :)

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Yes it does run on the FC arduino. Currently running on a Mega2560, I hope it bloats the code not to much so it can run on a ProMini too.

KeesvR
Posts: 194
Joined: Fri May 27, 2011 6:51 pm
Location: The Netherlands

Re: HOTT Telemetry integration

Post by KeesvR »

This should be nice for the Turnigy 9X.

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: HOTT Telemetry integration

Post by ApoC »

Hey

Is it possible, to get out this "lag" by using a second arduino? (Im using the Mega) Or would it be there, because the Mega have to read the Data from the second Arduino?

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

I'm not following this road on using a second arduino. As far as I know fred_fr is investigating this. What I can tell you so far is, that the "lag" which happens every 2 seconds when telemetry data are updated doesn't influence QuadCopter stability (from what I can tell, see http://www.youtube.com/watch?v=8MEnRZlQ ... detailpage). The twichtes I described a couple of post above were a result of a badly crimped PPM Sum Signal cable.

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: HOTT Telemetry integration

Post by ApoC »

I have to test it.

If i can use it, without a second Arduino, it seems better, yeah. ;)

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Finished implementation of PID value adjustments via Graupner HoTTv4.
http://www.youtube.com/watch?v=rItCvYUPo_o

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

works it with Graupner MC-32 and V4 Software version ?

does i understand it right that i should connect RX and TX together at the Telemetry port via a Logic leve converter =?
Or is any other thinks need between RX and TX ? like a Diode ?

Thanks !

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

I don't own a MC-32, but the website says:"Integrated Graupner HoTT 2.4 GHz transmission system", so it should be capable of handling HoTTv4 data telegrams.

And yes, RX/TX together, because HoTT uses one wire to transmit and receive data (the extension handles this and shuts down RX when data are sent and TX when data are received, that's also the reason why MultiWiiConf won't work when using the HoTT extension on boards with just one UART). I recommend a LLC (even if I don't use one) to convert MCU 5V to HoTT 3,3V and vice versa, it will work without a LLC, diode, resistor or what so ever, but it could destroy your GR-12/16/XX Receiver. Any further questions, recommendations, ideas for extensions, let me know.

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: HOTT Telemetry integration

Post by ApoC »

One Big Question: Can u explain it better?

Ive a Mega, a GR-16 fresh on V4, a Smartbox V4 (in english, dont know why) and connected the Telemetrieport over a sparkfun LLC to bridged RX/TX 3 on my Mega.
I dont know, how to connect the LLC right, because we brided RX / TX Lines.

So i dont have the Pic u showed us.

In wich Menue i should see something, or what can i do to test, where the error is? (maybe behind the monitor....)
I see no menue as u show, have i update the smartbox too?

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

OK, I'll try to describe it better (don't hesitate to ask again, if it won't work. I will also update the github page in a couple of days).

First thing, I don't have any idea how to connect a LLC because I don't use one. I just recommend to use one, so I don't want that someones Copter goes down due to a bricked receiver. I'm sorry, that I cannot provide you with more information. If you just wanna test it, you could connect RXTX directly to the telemetry port on your receiver.

1. On a ATmega2560 board, I assume you are using Paul's Flydumega, the telemetry wire is connected to TX3RX3 (see image).
2. Due to RX3TX3 are connected together there is only one wire that goes away from the board into the receivers telemetry port. On the GR-16 that's the port labeled T on the side of the receiver where both antennas pop out (see e.g. my GR-12)
3. If you are using a GR-12 you have to enable the Telemetry Port on CH05 (see Graupner's latest DE Manual on Page 149). The GR-16 has a separated telemetry port and I think you don't have to do anything to enable it.
4. Activate the Electric Air Module on the MX-16 (see Graupner's latest DE Manual on Page 154) because the MCU emulates a Electric Air Module (more will be supported in future releases).
5. If everything works as expected you should now be able to see Telemetry data (Long press on the SET button at the MX-16 to get directly into the telemetry data display part)
6. If you see telemetry data, e.g. LiPo voltage that means the telemetry extension works, you are now able to access via the telemetry menu the MWii PID settings. These settings are a little bit hidden (see Graupner's latest DE Manual on Page 154) and navigate to the last "page" (see the video from a couple of post above).

As far as I know, you don't have to udpate your SmartBox.

I hope this helps.
Attachments
Graupner GR-12 Telemetry wire connected
Graupner GR-12 Telemetry wire connected
Telemetry data cable on ATMega2560 TX3RX3
Telemetry data cable on ATMega2560 TX3RX3

ApoC
Posts: 31
Joined: Fri Feb 10, 2012 2:16 pm

Re: HOTT Telemetry integration

Post by ApoC »

Thats what i did, but its a bit confusing me, because ive the Smartbox. I dont know in what Menue i have to go. I have not an Electrical Air Menue, only Electronic called. So i have to check this.

But atm its not working.

nenno
Posts: 14
Joined: Mon Jan 31, 2011 4:59 pm

Re: HOTT Telemetry integration

Post by nenno »

Hi there...

I've build the "Lipo Metre" form here http://thyzoon.fr/Aeromod/LipoHott/LipoHott2.php.
The LipoMetre uses 5v Logic level to the HOTT receiver.

How can I realitze the easiest way the 5v <> 3,3v conversion?

Thanks. Nenno...

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

Any Plans about Voice Output ?
somethink like that : http://vimeo.com/41351841

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Any Plans about Voice Output ?
somethink like that : http://vimeo.com/41351841


Voice Output is made by the transmitter, e.g. MX-12, and not by the receiver. If you have a working telemetry, just enable voice output on your MX-{12,16,20} and select the values you wanna hear and put the voice output on a trigger. E.g. I have voice output triggered with SW1 on my MX-12. Even if you do not have a separate HoTT modul, your receiver, GR-{12,16,24} transmits current temperature, input voltage, and signal quality via HoTT which can be displayed and read out by voice output.

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

but in the Video wich i have post from mikrokopter , you can hear : Start Engine , calibrate Gyro ....
i think thats not the standart voice output from the Transmitter

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

Ok, now I see what you mean. Should be possible, because the Mikrokopter voice files are officially available from Graupner and I think it should be possible to get such a behavior as shown in the video. Not planned yet to implement it, there is a little time left next week were I could take a look into it.

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

this will be very cool !
thanks !

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

Hi Oli ,

wich sensor datas from Multiwii did you allready show at the Telemetry Display ?
how mutch does the cycle climb with your Graupner Hott code ?

thnanks !

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

As described on the GitHub Page - currently transmitted data are: LiPo voltage, relative height over ground, and flight time since copter has been armed.
Cycle time increases up to 35ms each time telemetry data are getting updated, that why the data are updated with 0.5Hz.

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

oli wrote:Ok, now I see what you mean. Should be possible, because the Mikrokopter voice files are officially available from Graupner and I think it should be possible to get such a behavior as shown in the video. Not planned yet to implement it, there is a little time left next week were I could take a look into it.


@LuFa: I took a look into the Voice output and now I know how it works to trigger voice commands, like: Max. temp., Alt. reached, Next waypoint. Still not my top priority thing todo at the moment, because I'm working on GPS integration right now. But whenever there's I situation where I voice output is appropriate I will try to integrate it.

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

ok thanks :)

at the moment i fly with your current code , and i can say it works very good !

can you tell my how i can set the volt trigger to 4s ?

I'm working on GPS integration right now


GPS integration for Hott Telemetry ? :)

oli
Posts: 21
Joined: Thu Jan 05, 2012 11:19 am

Re: HOTT Telemetry integration

Post by oli »

I assume that you have a correct dimensioned volt divider for 4S which brings 0-16,8V to 0-5V, if so in config.h change "#define HOTTV4_VBATLEVEL_3S VBATLEVEL2_3S" to something like "#define HOTTV4_VBATLEVEL_3S 129" if you want to be notified when current voltage gets below 12,9V. Don't use current revision from master, instead build 1.0 (https://github.com/obayer/MultiWii-HoTT ... i-hott-1.0), current revision has a hardcoded 3S trigger for overvoltage. I'm both gonna change this, and the HOTTV4_VBATLEVEL_3S name, because it is misleading.

And yes, currently I'm working to emulate the HoTT GPS Module, to transmit current copter position, as well as direction, and distance from home.

LuFa
Posts: 160
Joined: Fri Jan 27, 2012 7:56 pm

Re: HOTT Telemetry integration

Post by LuFa »

ok thanks :)

will test it ...

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: HOTT Telemetry integration

Post by flyrobot »

Hi

Anyone has tried flying using 2.1?

Thanks,

John

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: HOTT Telemetry integration

Post by flyrobot »

Hi,

I have tried the code with 2.1 and it works but litle bit lag. Now i tried with latest r1177 it doesn't work. It seems their is some change on multiwii r1177, such as no more ACC, it become ANGLE and HORIZON.

John

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: HOTT Telemetry integration

Post by flyrobot »

Any plan to developed the code compatible with 2.2?

Thnks,
John

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: HOTT Telemetry integration

Post by Sebbi »

Hi there,

is there any cheap way to test HOTT telemetry with hardware? I mean, what would I need to have/buy to test if what I do works? Or is there someone willing to test for me if I come up with updated code (I am currently trying to better integrate FrSky into MultiWii, so why not do both telemetry solutions in one go)?

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: HOTT Telemetry integration

Post by flyrobot »

Hi Sebbi,

Actually, i absent for 3 month (moving house) for this wonderfull hobby. i still keep watching the forum but no have long time to try. But Today i started charge my battery to test 2.2. I will do test and give you feedback. I will make a video if i can. here is the video for MWI 2.1 http://www.youtube.com/watch?v=a2DZAsmd_LE .

Regards,

john

AndrejLV
Posts: 23
Joined: Wed Mar 14, 2012 9:37 pm

Re: HOTT Telemetry integration

Post by AndrejLV »

I can make some tests.
I have mini for interface, and quads with Crius AIO + gps with free aux ports.
Do I need something else?

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: HOTT Telemetry integration

Post by Sebbi »

I guess one needs a RX with HOTT module. Or is there another way to test if the transmission works? E.g. for FrSky there is a simple external monitor you can attach to the module. Enables you to receive telemetry without a fancy RX.

flyrobot
Posts: 73
Joined: Thu Apr 05, 2012 3:59 pm

Re: HOTT Telemetry integration

Post by flyrobot »

Hi Sebbi,

I have both frsky and graupner Hott MX transmitter. Hott more simple, the transmitter display can show the telemetry without any additional module. You can see my youtube above, it works perfect with 2.0 using the code from "oli" see above. I think from his code you just make change on serial code part according to latest MWI serial code.

Thanks,

John

Post Reply