Deviation + Bluetooth + Android

More
04 May 2013 12:09 #9529 by kenkenlau
Deviation + Bluetooth + Android was created by kenkenlau
Here is what I have made.

vimeo.com/65450306

Sorry for the a bit out focus since I can only see the very small sceen when taking the video.

more Details and source code coming

Please Log in or Create an account to join the conversation.

More
04 May 2013 12:09 - 04 May 2013 14:20 #9530 by kenkenlau
Replied by kenkenlau on topic Deviation + Bluetooth + Android
Background:
I feel that the Deviation is a bit more heli-favoured.I play both Fixed wing and heli, and I really think the telemetry (especially finding lost plane in the forest via GPS) is quite important for fixed wings.

For Spektrum TM1000, the iphone user have STi (but I am android fans). So I started to think of the Bluetooth connection with android.

Aim:
I hope finally the apps can:
- see all telemetry data
- take log, save in phone SD
- edit the model, mixer, curve, icon, and send it back to TX

Hardware:
1. A bluetooth module with UART. I got mine from my Guru-Z Boron car. It is not expensive on ebay and online store (should be less than $5)
--Config the module to 115200 8N1 and set the name+PIN.
--connect it to the Trainer port as photo attached. (I choose to connect it by soldering and disconnect the trainer, the trainer port have some wiring in it which may cause problem)

2. an Android phone or PAD which support bluetooth 2.0

Sofware:
1. Deviation
--need to compile with TYPE=dev to enable printf
--I added 2 printf lines only in telemetry.c to send out UART LatLong. you may place it in other place as you like.
case TELEM_GPS_LONG:
            h = value / 1000 / 60 / 60;
            m = (value - h * 1000 * 60 * 60) / 1000 / 60;
            s = (value - h * 1000 * 60 * 60 - m * 1000 * 60) / 1000;
            ss = value % 1000;
            sprintf(str, "%03d %02d %02d.%03d", h, m, s, ss);
            printf("%03d %02d %02d.%03dG", h, m, s, ss);
            break;
        case TELEM_GPS_LAT:
            h = value / 1000 / 60 / 60;
            m = (value - h * 1000 * 60 * 60) / 1000 / 60;
            s = (value - h * 1000 * 60 * 60 - m * 1000 * 60) / 1000;
            ss = value % 1000;
            sprintf(str, "%03d %02d %02d.%03d", h, m, s, ss);
            printf("%03d %02d %02d.%03d,", h, m, s, ss);
            break;

2. Apps
Sorry I am neither a C++ guy nor a java guy. So the app is developed in AI.
appinventor.mit.edu/
Source code is attached. no need to unzip, just upload the zip file and you will see the project.

Protocol
There is not a protocol at all, but i setup the TX to sent "(Lat),(Long)G"
ie "G" is used as an character for parsing.

Know issue:
1. Range of Bluetooth -- I find that the BT module have 5-10m range when it is used in other application. But when it is put inside the TX, the range become around 1m for connection, less than 2m to transmit data. This may due the both of them use 2.4G and have some interference. (and the BT module is in very small power)
2. Green Arrow is not shown in Google Maps APPS in some device. If so, choose a browser to open it. Then you can see you current location and the plane location.

More to go?
Don't know if anyone find this interesting. give me some comment ;)
Attachments:
Last edit: 04 May 2013 14:20 by kenkenlau.

Please Log in or Create an account to join the conversation.

More
04 May 2013 12:54 #9532 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation + Bluetooth + Android
Pretty cool. There will be quite a bit more work needed to have a bi-di protocol with bluetooth, but it is a good proof-of-concept. To be fair, storing the GPS info on the Tx is on my to-do list, but I can see how you could do more with it on a smartphone. I'm not exactly sure why you'd want to edit the curves on the smartphone rather than on the Tx, but implementing the ability to transfer the model files back and forth should not be hard.

Please Log in or Create an account to join the conversation.

More
04 May 2013 13:01 - 04 May 2013 13:01 #9533 by kenkenlau
Replied by kenkenlau on topic Deviation + Bluetooth + Android
I m thinking of that the DeviationTX project rely on Walkera hardward a lot, especially the screen and button.

If the whole TX module (STM + CYRF + Bluetooth) can be DIYed, even some old TX can install DeviationTX and config via smartphone. This will let every one enjoy DeviationTX at very low cost.
Last edit: 04 May 2013 13:01 by kenkenlau.

Please Log in or Create an account to join the conversation.

More
04 May 2013 13:45 #9535 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation + Bluetooth + Android
We have discussed it before. while it would be possible to do what you say, the main problem is that there is a lot of work still necessary to hook up a suitable processor to all of the inputs. Porting to something like a Turnigy9x is probably possible in this manner, but losing all of the protocol options would detract from Deviation's capabilities.
Which gets you back to something like a WK2801 or Devo7 (both Walkera hardware). For the Devo7 this may be a reasonable solution, but on the WK2801 you would need to replace the CPU which makes the task harder.

Please Log in or Create an account to join the conversation.

More
04 May 2013 13:49 - 04 May 2013 13:50 #9536 by PhracturedBlue
Replied by PhracturedBlue on topic Deviation + Bluetooth + Android
If you make a module with the STM32 + CYRF + Bluetooth, then you still need to hook up all the inputs which is generally quite a lot of work. If you go there, why not include a module with a screen already available (this as our plan to retro fit the Devo7 originally.

One thing I had not considered before was to build a module that uses PPM to get the input from the transmitter. If you do that, you culd use virtually any radio as a Deviation Radio. Even my ancient 72MHz Airtronics 6CH. That would be something to behold :)
Last edit: 04 May 2013 13:50 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
04 May 2013 14:06 #9540 by kenkenlau
Replied by kenkenlau on topic Deviation + Bluetooth + Android
I see.....What I am thinking to hook up is just 4 VRs and maybe 2 switches of some of my old E-Sky TX :woohoo:

And besides this, I actually want to remake my Devo8S PCB



So that I can install 1 or 2 module + BT on board.
Also, I really will need a jogdial button. (I was migrating from JR9303 -> DX8 -> devo)
Also also, I wish to make the unused pin of STM MCU available with a solder point!
Also also also, if, you are planning to support SD card, I wish to add that too. but it will need a 144pin version of STM.....

Base on the above, I have strong motivation to build a new PCB
Attachments:

Please Log in or Create an account to join the conversation.

More
04 May 2013 20:27 - 04 May 2013 20:36 #9562 by BitOne
Replied by BitOne on topic Deviation + Bluetooth + Android
Hi guys,

It's maybe a dumb idea, but why not using a wired connection between the TX and the Android device ? I know wireless is usually more comfortable, but would it be possible to simply connect the TX trainer port on the mic port of the Android phone ?

I guess the PPM signal resolution is lower than the one used on the audio sampling of these device (44.1 KHz). If this is possible, it seems less invasive than modding the TX with a special module (a "simple" audio cable could to the trick). It would just be a question of PPM software codec.

Sending data back from the Android device to the TX could be done the same way, this time from the headset output of the device.

Maybe it's not possible to do it at all. Android is not a hard realtime OS and we could miss some packet from the TX (while with Bluetooth it's handled by a specific chip that must have some buffering, I suppose so).
Last edit: 04 May 2013 20:36 by BitOne. Reason: Typo fixes

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
04 May 2013 20:50 #9564 by rbe2012
Replied by rbe2012 on topic Deviation + Bluetooth + Android
kenkenlau, you make me wanting a bluetooth module to try by myself.
But it will take some time to get one...

Please Log in or Create an account to join the conversation.

More
01 Aug 2013 13:31 #12693 by Iadesdragon
Replied by Iadesdragon on topic Deviation + Bluetooth + Android
@kenkenlau

would you be willing to share your board outline?

I´m trying to hijack the 8S as well bu there`s a little bit more on my mind that adding a vew pins and bluetooth :-).

I also am looking for more info on the Display PCB....

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum