- Posts: 4
Control drones with Smartphone
- tjkim93
-
Topic Author
- Offline
Less
More
09 Apr 2015 09:55 - 10 Apr 2015 01:41 #30926
by tjkim93
Control drones with Smartphone was created by tjkim93
Hi,
I ported deviation protocols to Arduino mini for controlling drones with Android Smartphone.
Interface between Arduino and Smartphone is bluetooth.
I named the module as UniConTX and the schematic and codes are open.
Click here for more details
Here is a screen shot for controller UI
UniConTX Firmware can be updated through bluetooth from smartphone.
All models from deviation are not supported due to arduino mini memory limitation.
Only below models are supported. (Actually every model is not tested yet...)
If you want specific models, you need not install all modules. just install the module what you want.
You can get Android application (BTCon4Drone) at play.google.com/store/apps/details?id=com.pinggusoft.btcon
I ported deviation protocols to Arduino mini for controlling drones with Android Smartphone.
Interface between Arduino and Smartphone is bluetooth.
I named the module as UniConTX and the schematic and codes are open.
Click here for more details
Here is a screen shot for controller UI
UniConTX Firmware can be updated through bluetooth from smartphone.
All models from deviation are not supported due to arduino mini memory limitation.
Only below models are supported. (Actually every model is not tested yet...)
If you want specific models, you need not install all modules. just install the module what you want.
| Manufacturer | Model | Type | Module |
| Ares | Ethos QX75 | Quad | NRF24L01 |
| Attop | YD717 | Quad | NRF24L01 |
| Attop | YD928 | Quad | NRF24L01 |
| Aviator | YK016 | Quad | NRF24L01 |
| Cheerson | CX-10 | Quad | NRF24L01 |
| Cheerson | CX-11 | Quad | NRF24L01 |
| Cheerson | CX-205/SH6057 | Quad | NRF24L01 |
| Cheerson | CX-30 | Quad | NRF24L01 |
| Flytecs | X-Drone Nano | Quad | NRF24L01 |
| Hisky | FF120 | Quad | NRF24L01 |
| Hisky | HMX120 | Quad | NRF24L01 |
| HobbyKing | Q-Bot Micro | Quad | NRF24L01 |
| Huan | QI 881 | Quad | NRF24L01 |
| Hubsan | X4 | Quad | A7105 |
| Hubsan | H107C | Quad | A7105 |
| Hubsan | H107L | Quad | A7105 |
| Hubsan | H107D | Quad | A7105 |
| Hubsan | H111 | Quad | A7105 |
| Huaxiang Toys | Sky Walker 8983 | Quad | NRF24L01 |
| JD | JXD 385 | Quad | NRF24L01 |
| JD | JXD 388 | Quad | NRF24L01 |
| JD | JXD 389 | Quad | NRF24L01 |
| JD | JXD 390 | Quad | NRF24L01 |
| JD | JXD 391 | Quad | NRF24L01 |
| JD | JXD 392 | Quad | NRF24L01 |
| JD | JXD 393 | Quad | NRF24L01 |
| JIAYUAN | S-2 | Quad | NRF24L01 |
| JJR/C | 1000A | Quad | NRF24L01 |
| JJR/C | F180 | Quad | NRF24L01 |
| JJR/C | F182 | Quad | NRF24L01 |
| JJR/C | H8C | Quad | NRF24L01 |
| Landbow | X-Dart Next | Quad | NRF24L01 |
| Ni Hui | U207 | Quad | NRF24L01 |
| Nincoair | Quadrone | Quad | NRF24L01 |
| Sanlianhuan | SH 6043 Ladybug | Quad | NRF24L01 |
| Sanlianhuan | SH 6044 | Quad | NRF24L01 |
| Sanlianhuan | SH 6046 Puffer | Quad | NRF24L01 |
| Sanlianhuan | SH 6048 F22 | Quad | NRF24L01 |
| Sky Walker | HM-1306 | Quad | NRF24L01 |
| Skybotz | Mini UFO | Quad | NRF24L01 |
| Skyline | YD717 | Quad | NRF24L01 |
| Syma | X1 | Quad | A7105 |
| Syma | X2 | Quad | NRF24L01 |
| Syma | X3 | Quad | NRF24L01 |
| Syma | X4 | Quad | NRF24L01 |
| Syma | X5C | Quad | NRF24L01 |
| Syma | X5C-1 | Quad | NRF24L01 |
| Syma | X6 | Quad | NRF24L01 |
| Syma | X7 | Quad | NRF24L01 |
| Syma | X8C | Quad | NRF24L01 |
| Syma | X11 | Quad | NRF24L01 |
| Syma | X12 | Quad | NRF24L01 |
| Toybase | L6036 | Quad | NRF24L01 |
| Toybase | L6038 | Quad | NRF24L01 |
| Walkera | QR Ladybird | Quad | CYRF6936 |
| Walkera | QR InfraX | Quad | CYRF6936 |
| Walkera | QR X350 | Quad | CYRF6936 |
| WL TOYS | v929 | Quad | A7105 |
| WL TOYS | v939 | Quad | A7105 |
| WL TOYS | v949 | Quad | A7105 |
| WL TOYS | v959 | Quad | A7105 |
| WL TOYS | v202 | Quad | NRF24L01 |
| WL TOYS | v212 | Quad | NRF24L01 |
| WL TOYS | v222 | Quad | NRF24L01 |
| WL TOYS | v252 | Quad | NRF24L01 |
| WL TOYS | v252 Pro | Quad | NRF24L01 |
| WL TOYS | v262 | Quad | NRF24L01 |
| WL TOYS | v272 | Quad | NRF24L01 |
| WL TOYS | v323 | Hex | NRF24L01 |
| WL TOYS | v333 | Quad | NRF24L01 |
| WL TOYS | v343 | Quad | NRF24L01 |
| WL TOYS | v353 | Quad | NRF24L01 |
| WL TOYS | v393 | Quad | NRF24L01 |
| WL TOYS | v626 | Quad | NRF24L01 |
| WL TOYS | v636 | Quad | NRF24L01 |
| WL TOYS | v646 | Quad | A7105 |
| WL TOYS | v666 | Quad | NRF24L01 |
| WL TOYS | v676 | Quad | A7105 |
| XINXUN | X28 | Quad | NRF24L01 |
| XINXUN | X30 | Quad | NRF24L01 |
| XINXUN | X33 | Quad | NRF24L01 |
| XINXUN | X39 | Quad | NRF24L01 |
| XINXUN | X40 | Quad | NRF24L01 |
| YI ZHAN | X4 | Quad | NRF24L01 |
| YI ZHAN | X6 | Quad | NRF24L01 |
You can get Android application (BTCon4Drone) at play.google.com/store/apps/details?id=com.pinggusoft.btcon
Last edit: 10 Apr 2015 01:41 by tjkim93. Reason: tableized
- PhracturedBlue
-
- Offline
Less
More
- Posts: 4403
09 Apr 2015 13:06 #30931
by PhracturedBlue
Replied by PhracturedBlue on topic Control drones with Smartphone
This is impressive work, The code you have here isn't that much different than what the UniversalTx does in PPM mode, and honestly I never imagined being able to fit it into 32K of flash (or maybe it doesn't fit, and you need to choose the protocols). Several folks have ported deviation's protocol to Arduino, and no one has ever discussed how they planned to do it here beforehand. I see no reason why the protocol stack needs to be rewritten to work with Arduino. Wouldn't it be better for everyone to figure out what things are incompatible and fix those, and then have a shim that lets you use deviation's protocol code as-is? By porting all the files, you've either signed yourself up to constantly maintain it and merge in fixes we do, or to let the code stagnate and not get the fixes we do. It is nothing personal, just something I keep seeing over and over, and it seems like wasted work when each person reinvents the wheel for arduino.
What did you write the android app in? I've been working on a similar app in Cordova (see this thread: www.deviationtx.com/forum/7-development/...n-for-mobile-devices ). Is your app open-source? This also seems like a duplicated effort, and you are obviously much farther along than I am.
What did you write the android app in? I've been working on a similar app in Cordova (see this thread: www.deviationtx.com/forum/7-development/...n-for-mobile-devices ). Is your app open-source? This also seems like a duplicated effort, and you are obviously much farther along than I am.
- tjkim93
-
Topic Author
- Offline
Less
More
- Posts: 4
10 Apr 2015 02:29 #30968
by tjkim93
Replied by tjkim93 on topic Control drones with Smartphone
Actually I tried to port protocol codes as-is, but I couldn't do because of resource (flash and ram) limitations on Arduino mini as you know.
My plan was...
1.Focusing multicopter protocols because my application was designed for it originally and memory size on Arduino mini.
only 7 protocols were ported - Devo, Flysky, Hisky, Hubsan, SymaX, V2x2, YD717
2.Reducing RAM usage so I decided to use C++ for instancing a protocol when it is used.
3.no changes in logic and flow except some initialization codes and controller channel handling as you see the codes ( github.com/PingguSoft/UniConTX ),
Initialization codes are changed because of reducing the code size, constants are moved to codes area for reducing flash and ram usage.
controller channel handling is changed because of compatibility of my Android application.
my Android application, BTCon4Drone was designed for MultiWii protocols originally and I decided to add the feature for supporting deviation protocols.
4.Telemetry related codes are not ported yet because of there are few models supporting the feature but it might be supported someday.
I don't think this kind of work is wasting because the goal is different..
Codes might be modified and redesigned for each goal unless codes have concrete structures for porting.
Anyway I will keep trying to update my codes whenever there are changes in your repository but I am not sure..
I really thank you for sharing your work and ideas..
My plan was...
1.Focusing multicopter protocols because my application was designed for it originally and memory size on Arduino mini.
only 7 protocols were ported - Devo, Flysky, Hisky, Hubsan, SymaX, V2x2, YD717
2.Reducing RAM usage so I decided to use C++ for instancing a protocol when it is used.
3.no changes in logic and flow except some initialization codes and controller channel handling as you see the codes ( github.com/PingguSoft/UniConTX ),
Initialization codes are changed because of reducing the code size, constants are moved to codes area for reducing flash and ram usage.
controller channel handling is changed because of compatibility of my Android application.
my Android application, BTCon4Drone was designed for MultiWii protocols originally and I decided to add the feature for supporting deviation protocols.
4.Telemetry related codes are not ported yet because of there are few models supporting the feature but it might be supported someday.
I don't think this kind of work is wasting because the goal is different..
Codes might be modified and redesigned for each goal unless codes have concrete structures for porting.
Anyway I will keep trying to update my codes whenever there are changes in your repository but I am not sure..
I really thank you for sharing your work and ideas..
- PhracturedBlue
-
- Offline
Less
More
- Posts: 4403
10 Apr 2015 02:46 #30969
by PhracturedBlue
Replied by PhracturedBlue on topic Control drones with Smartphone
Don't get me wrong, I am glad for anyone working with the code. But if the code can be compressed for Arduino, those compressions can likely be used on ARM too. I have difficulty believing C++ will use less resources than properly designed C code. the protocol code itself really should be able to be made portable enough to work on just about any architecture. Certainly the SPI and timing code are unlikely to be portable, but the API could be fixed such that the effort was low.
- tjkim93
-
Topic Author
- Offline
Less
More
- Posts: 4
10 Apr 2015 02:46 #30970
by tjkim93
Replied by tjkim93 on topic Control drones with Smartphone
I missed something about the application.
I am using eclipse with ADT for developing the application.
And the source is not open.. the app was designed for MultiWii protocols originally and deviation protocols are ported to UniConTX.
I opened the UniConTX codes and the communication between them is bluetooth serial.
I adopted MultiWii packet structure and some commands are added for controlling UniConTX from smartphone side.
The app sends protocol information when it starts and AETRF channel values every 20ms.
I'll share a video clip controlling Syma X5C with my app soon.
I am using eclipse with ADT for developing the application.
And the source is not open.. the app was designed for MultiWii protocols originally and deviation protocols are ported to UniConTX.
I opened the UniConTX codes and the communication between them is bluetooth serial.
I adopted MultiWii packet structure and some commands are added for controlling UniConTX from smartphone side.
The app sends protocol information when it starts and AETRF channel values every 20ms.
I'll share a video clip controlling Syma X5C with my app soon.
- Richard96816
-
- Offline
Less
More
- Posts: 208
12 Jul 2015 01:37 #35349
by Richard96816
Replied by Richard96816 on topic Control drones with Smartphone
Add a couple of sticks and you'll definitely have something cool.
Nice work!
Nice work!
- VanDerPloeg
-
- Offline
Less
More
- Posts: 2
28 Dec 2015 09:50 #41195
by VanDerPloeg
Replied by VanDerPloeg on topic Control drones with Smartphone
tjkim93,
Great work! Im looking to control my Cheerson CX-10 with Arduino, but I don't have an android phone to use your program with. I have been trying to figure out the bluetooth serial protocol you use so I can control it from a serial terminal, and have been able so far to get the version and set the RF protocol. But I still can't get it to work, because I don't know the "controller ID" which I need to supply when I start RF. How can I find it? Also, when I set the RF module and protocol (Im using nRF24L01), what are the "options"?
Thanks a lot!
VanDerPloeg
Great work! Im looking to control my Cheerson CX-10 with Arduino, but I don't have an android phone to use your program with. I have been trying to figure out the bluetooth serial protocol you use so I can control it from a serial terminal, and have been able so far to get the version and set the RF protocol. But I still can't get it to work, because I don't know the "controller ID" which I need to supply when I start RF. How can I find it? Also, when I set the RF module and protocol (Im using nRF24L01), what are the "options"?
Thanks a lot!
VanDerPloeg
- mwm
-
- Offline
28 Dec 2015 17:18 #41200
by mwm
Just saw this, so I thought I'd point out that this might be a copyright violation. If you are distributing a binary that was built with a deviation source file, then it's a work derived from that source, and you can only legally give someone the binary as described by the license.
If you aren't building such an app, or aren't giving it to anyone else, or are distributing properly already, then this isn't an issue, and I'm sorry for the confusion.
On the other hand, I've been thinking that it might be a good idea to spin off the protocols from deviation into a separate project, to make them easier to use for things like this and the multi-protocol module.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Replied by mwm on topic Control drones with Smartphone
tjkim93 wrote: And the source is not open.. the app was designed for MultiWii protocols originally and deviation protocols are ported to UniConTX.
Just saw this, so I thought I'd point out that this might be a copyright violation. If you are distributing a binary that was built with a deviation source file, then it's a work derived from that source, and you can only legally give someone the binary as described by the license.
If you aren't building such an app, or aren't giving it to anyone else, or are distributing properly already, then this isn't an issue, and I'm sorry for the confusion.
On the other hand, I've been thinking that it might be a good idea to spin off the protocols from deviation into a separate project, to make them easier to use for things like this and the multi-protocol module.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
- VanDerPloeg
-
- Offline
Less
More
- Posts: 2
29 Dec 2015 01:32 #41225
by VanDerPloeg
Replied by VanDerPloeg on topic Control drones with Smartphone
Good point, but I was looking to only modify the Arduino code (which is under GNU) to work headless. Wasn't planning on distributing it anyways. Could be wrong, thanks for the heads up.
Getting the deviation protocols into another project would be great, I've been wanting to do some autonomous control with arduino
Getting the deviation protocols into another project would be great, I've been wanting to do some autonomous control with arduino
- FDR
-
- Offline
29 Dec 2015 09:56 #41242
by FDR
Replied by FDR on topic Control drones with Smartphone
Honestly I don't see the reason of separating the protocols just because of the license.
That would have GNU license as well, so anyone could use any part of it as far as he or she would publish his or her code under the same GNU license...
...or probably I might misunderstood the problem here.
That would have GNU license as well, so anyone could use any part of it as far as he or she would publish his or her code under the same GNU license...
...or probably I might misunderstood the problem here.
- mwm
-
- Offline
31 Dec 2015 00:22 #41267
by mwm
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Replied by mwm on topic Control drones with Smartphone
Sorry, it isn't because of the license. It's to create a single repository that everyone working on protocols at this level can use. Other projects (there's deviation, and the multi-protocol module, and possibly this one) would then suck in that project and build it.
This would require cleaning up and documenting the API, which is a good thing. Doing that would also have licensing implications, though possibly not good ones. It would make it easier for other projects to use the protocols. But the real win would be that protocols contributed to it via one project would be added to others by updating that repository.
This would require cleaning up and documenting the API, which is a good thing. Doing that would also have licensing implications, though possibly not good ones. It would make it easier for other projects to use the protocols. But the real win would be that protocols contributed to it via one project would be added to others by updating that repository.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
- pcb45
-
- Offline
Less
More
- Posts: 1
31 Dec 2015 06:03 #41274
by pcb45
Replied by pcb45 on topic Control drones with Smartphone
Hi tjkim93,
I have the same question VanDerPloeg has. Any chance you could briefly explain the serial protocol? Making progress but a quick explanation would really help use the library interactively for testing etc.
Thanks!
I have the same question VanDerPloeg has. Any chance you could briefly explain the serial protocol? Making progress but a quick explanation would really help use the library interactively for testing etc.
Thanks!
VanDerPloeg wrote: tjkim93,
Great work! Im looking to control my Cheerson CX-10 with Arduino, but I don't have an android phone to use your program with. I have been trying to figure out the bluetooth serial protocol you use so I can control it from a serial terminal, and have been able so far to get the version and set the RF protocol. But I still can't get it to work, because I don't know the "controller ID" which I need to supply when I start RF. How can I find it? Also, when I set the RF module and protocol (Im using nRF24L01), what are the "options"?
Thanks a lot!
VanDerPloeg
- FDR
-
- Offline
31 Dec 2015 08:21 #41278
by FDR
Replied by FDR on topic Control drones with Smartphone
Ah I see!
That's reasonable...
That's reasonable...
Time to create page: 0.145 seconds
-
Home
-
Forum
-
General
-
General Discussions
- Control drones with Smartphone