Hi Guys,

I designed this protocol since few months ago but it lost in hole of internet.
I hope it helps someone.

Everyone using video transmitters on UAV/FPV planes and audio channels empty or only transmitting propeller sound, this is why i designed this telemetry protocol on audio ;)



Advantages of Audio Telemetry Protocol (ATP)

  • You don't need any extra hardware except your Autopilot/OSD's processor for transmitting datas
  • You can receive all data without any hardware with your PC/laptop
  • Audio channel less noisy than video
  • %90 of video Tx/RX modules supports ATP's 2000-1300hz audible waves without any problem

How ATP Works?

ATP uses AFSK method to sending telemetry data over VideoTX’s audio
channel. The carrier is 2100Hz and a byte starts with one 1300hz wave(start bit), ATP sends
data bits after the start bit. and it sends minimum 10 carrier wave(zero) before a new start bit.
You can read my detailed information from this link (sorry for my English): http://www.flytron.com/pdf/audio_modem.pdf

Code Example for Atmel Users


Calibrating a PWM generator for 2100Hz carrier wave (for Atmega328)
TCCR1B   =   0x00;   //stop timerTCNT1H   =   0;TCNT1L   =   0;
ICR1 = ((Xtalfrequency/8) / 2100); //2100hz carrier generator value 878 for 14.7Mhz
OCR1B = ((Xtalfrequency/8) / 2100)/2; // ICR1 / 2 for %50 PWM waves
TCCR1A = 0x22;
TCCR1B = 0x1A; //start timer
This code generates static 2100hz square waves, put a 100nf capacitor on outside of processor and connect it on Audio in of TX, now you have a sinus on RX side ;)


You can send the bytes any time in your main code flow because AFSK protocol following waves not time sensitive protocol.
modem[] is an byte array that filled with data to send.
modem_byte is an integer for selecting byte of modem[] array
modem_bit is an char for counting sinus waves of AFSK

This code sends start bit at start and 8 bit of byte,
you should wait for 5ms for next byte for balancing sinus waves on audio stream, then you can send another byte also.
modem_bit = 0;while (modem_bit<18) //wait for all bit waves        {

if ((modem_bit%2==0) && ((PINB & (1 << 2))) ) // wait for 1 on PWM output.
{
if (modem_bit==0) // start bit
{
TCNT1H = 1; // this values creates small delay for increasing the wave width
TCNT1L = 180; // and AFSK decoder can detect this big waves to 1, other small(2100hz) waves 0
}

if (modem_bit>1)
{
if (modem[modem_byte] & (1<<((modem_bit-2)/2))) // if bit of bte is 1, change the wave width for 1 on AFSK
{
TCNT1H = 1; // this values creates small delay for increasing the wave width
TCNT1L = 180; // and AFSK decoder can detect this big waves to 1, other small(2100hz) waves 0
}
}

modem_bit++;
}

if ((modem_bit%2==1) && (!(PINB & (1 << 2)))) // wait for 0 on PWM output
{
modem_bit++;
}
}



ATP Modem Software

I wrote a modem software for reading AFSK waves without any hardware (maybe a serial 100k resistor on microphone in)
File name is: SOSD_Modem.exe

audio_telemetry_modem.png


This is only software modem on the planet (or i didn't see another) :)
It is decoding AFSK codes from microphone input like an oscilloscope and giving output values from TCP for 3th party softwares. You can design your loggers, goggle earth interfaces or more with this plug.

It is using 20byte data pack for transmitting and software can separate them
First 16 byte is data bytes last 3 byte is line end and CRC
Pack of Bytes
[0-3] Latitude (4 byte = 32 bit long integer of coordinates)
[4-7] Longitude (4 byte = 32 bit long integer of coordinates)
[8-9] Altitude (2 byte = 16 bit long integer of altitude)
[10] Heading Angle (multiply it with 1.4 for finding angle value)
[11] Battery 1 voltage (divide 10 for value, 111 mean 11.1Volt)
[12] Battery 1 voltage (divide 10 for value, 74 mean 7.4Volt)
[13] Current Sensor 1 (multiply with 0.4 for value, 101 mean 40.4Ah
[14] Current Sensor 2 (multiply with 0.4 for value, 101 mean 40.4Ah
[15] RSSI (It is percentage of maximum value, 35 mean %35)
[16] Speed (km/h)
[17] Line End 1 (value 10)
[18] Line End 2 (value 13)
[19] CRC ( 8 bit totals of first 19 btye)

If you uses my original data pack Software Modem giving this type output from port 1976 (my birth year)
$TELE,lat,lon,alti,heading,voltag1,voltage2,curren t1,current2,rssi, speed, #13 #10

Or you can use your own data pack and you can decode them yourself from modem's RAW data output.
$RAWS,byte0,byte1,byte2,byte3,byte4.........,byte16, #13 #10
then you can decode your data bytes(first 16 byte)

This software only part of ATP i didn't share the codes because i want to share the protocol with all autopilot/OSD producers and i want to use their 3th party tools too.If I share the code, they can change only AFSK frequency and visuals for non compatible products.

New Features

I added direct KML file based live view for Google Earth on the new version of modem software.
You can click on plane_tracker.kml file and Google Earth connects your Modem Software to tracking the plane :)
It is already primitive because we have some connection problem on Google Earth since few months :(


Story Of ATP

If you want to read all discussions follow this link: http://www.rcgroups.com/forums/showthread.php?t=1157558

Thanks for reading
Melih

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • This would translate to a reduction in latency? It sounds like you're saying the difficulty will be at the hardware side for encoding?
  • To Modulate is different from a Demodulator. A modem has both a modulator and demodulator.

    The transducer in water will make the same sound however with less delay of the air gas atmosphere to ones ears.

  • Semantically this is an "accoustic modem" but is there any reason it couldn't be modified to work at ultrasonic frequencies? It would be extremely cool to be able to wirelessly communicate with an autonomous underwater vehicle.
  • I enjoyed the UHF FM AFSK part with Packet radio T.A.P.R. in my past,

    Never expected a conversation like this in the future.

  • Ok i get this idea. SO newbies to FPV i guess they have to shut the f@ck up and listen to others (in the same time start reading to learn everything from scratch!!) and until then they can't bug specialists with questions because specialists speak only with specialists in this community. Oh ok i see now.

    Sorry for bugging you guyes!!!Before starting shooting people in here try to realize that there are people that read  those threads and they are not necessarily developers or programmers. I guess i was they only one ignorant who darred to ask a newbie stupid question. Sorry!!! wont happen again

     

    Oh and Melih i don't have a "big psychologic problems with money :)))" otherwise i wouldn't spend time and money to start with FPV dude!! I was attracted by your idea because i like to experiment and seemed to me a bit strange that nobody else wanted to try it or have tried it. It is easy to go and spend another 200euro for a ready made GS but that's what makes the difference. In your case this is FPV enthusiast and in the second case is just FPV operator putting everything ready made together.

  • Moderator

    @Thanos,  I think you are WAY off the mark on this.

    This site is NOT a service.

    We should be thankful for the contributions of everyone who contributes to the open-source community. 

  • Wow. I've heard open source publishing came with baggage but I thought it was normally delivered by email.

    This thread pretty much gift wraps the content. If that's not good enough, some computer science classes might be a worthwhile investment. They would provide independence from updates. ;)

    Packet radio, dtmf decoders, etc. There's plenty of info on how to start from scratch but why reinvent the wheel when Melih has given such an awesome foundation?
  • @Thaos,

    Dude, I guess you have very big psychologic problems with money :)))

    This was an opensource protocol for developers and i shared the protocol documents, codes and other details. 
    I was hoping to attract the attention of developers, but didnt. I'm using it with SimpleOSD and it is only platform that using this protocol. What can i do more? can I visit other hardware developer's houses with a gun? and push them for few line code?

     Anyway, i shared the code and it done for me. if you want to do anything, just do it and share with others. that's all.

     

     

  • Awesome service you provide to the community. You guys really deliver the goods. Thanks for the steady stream of awesome content!
  • @Melih
    Don't You have a Mac OS X version of this modem software?
This reply was deleted.