RachelNGS
Posts: 5
Joined: Thu Mar 29, 2018 7:58 am
Location: Kent

Long-Range RPI communication with mobile device

Thu Mar 29, 2018 8:06 am

I've been working on a project building a drone using a Pixhawk PX4 as a flight controller, and a rpi. I would like to be able to send from a mobile device to the pixhawk via the rpi new flightpath instructions. My issue is how to communicate between a mobile device e.g. an android smartphone and the raspberry pi without being connected to a wi-fi network, and without setting up a hotspot. The distance needs to be a decent length since I will not be with the drone the whole time (obviously!). I would preferably like to use radio comms. but not sure how to do this.

Any help would be much appreciated.

countxerox
Posts: 17
Joined: Fri Sep 08, 2017 4:06 pm

Re: Long-Range RPI communication with mobile device

Fri Mar 30, 2018 6:37 pm

Hi, your phone has WiFi, cellular and bluetooth but you want a decent range between the drone and your phone - so you can send new waypoints midflight? Have you looked at MAVLink? For decent range you would need to get your pi a modem.

alnaseh
Posts: 69
Joined: Thu Jun 23, 2016 5:12 am

Re: Long-Range RPI communication with mobile device

Sat Apr 07, 2018 10:41 am

RachelNGS wrote:
Thu Mar 29, 2018 8:06 am
I've been working on a project building a drone using a Pixhawk PX4 as a flight controller, and a rpi. I would like to be able to send from a mobile device to the pixhawk via the rpi new flightpath instructions. My issue is how to communicate between a mobile device e.g. an android smartphone and the raspberry pi without being connected to a wi-fi network, and without setting up a hotspot. The distance needs to be a decent length since I will not be with the drone the whole time (obviously!). I would preferably like to use radio comms. but not sure how to do this.

Any help would be much appreciated.
One option is to use sdr. It needs alot of time and work. You can see examples by searching: limesdr raspberry

hippy
Posts: 7828
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Long-Range RPI communication with mobile device

Sat Apr 07, 2018 12:41 pm

RachelNGS wrote:
Thu Mar 29, 2018 8:06 am
My issue is how to communicate between a mobile device e.g. an android smartphone and the raspberry pi without being connected to a wi-fi network, and without setting up a hotspot. The distance needs to be a decent length since I will not be with the drone the whole time (obviously!).
It seems the only real option you would have is Bluetooth which has limited range. It is not clear if your Pi is on the drone or a ground station. Having a ground station you connect to via Bluetooth with a means of RF between the ground station and the drone would seem to be the way to go.

Taking a look at how commercial systems do it may give some indications as to how best to do that. It may be worth asking on forums for drones how it would best be done, then come back here for help with implementing that.

davef
Posts: 64
Joined: Wed Feb 20, 2013 8:39 pm
Location: Christchurch, NZ

Re: Long-Range RPI communication with mobile device

Sat Apr 07, 2018 7:31 pm

You need to give some idea of the latency (time to respond to commands) that you would like in your system.

RachelNGS
Posts: 5
Joined: Thu Mar 29, 2018 7:58 am
Location: Kent

Re: Long-Range RPI communication with mobile device

Tue Apr 10, 2018 12:53 pm

davef wrote:
Sat Apr 07, 2018 7:31 pm
You need to give some idea of the latency (time to respond to commands) that you would like in your system.
Latency would have to be quite quick. The idea would be for a mobile device e.g. my smartphone would send the RPi a file of directions which the pixhawk PX4 would receive and follow.

davef
Posts: 64
Joined: Wed Feb 20, 2013 8:39 pm
Location: Christchurch, NZ

Re: Long-Range RPI communication with mobile device

Thu Apr 12, 2018 7:49 am

Quite quick might not be fast enough. 10 seconds, 1 sec. 0.1 seconds. Maybe a cellular connection, maybe a Cloud service like Hologram, etc.

RachelNGS
Posts: 5
Joined: Thu Mar 29, 2018 7:58 am
Location: Kent

Re: Long-Range RPI communication with mobile device

Thu Apr 12, 2018 10:20 am

davef wrote:
Thu Apr 12, 2018 7:49 am
Quite quick might not be fast enough. 10 seconds, 1 sec. 0.1 seconds. Maybe a cellular connection, maybe a Cloud service like Hologram, etc.
Most likely we would need a response time of approx. 1 sec, but 0.1 sec would be preferable.

davef
Posts: 64
Joined: Wed Feb 20, 2013 8:39 pm
Location: Christchurch, NZ

Re: Long-Range RPI communication with mobile device

Sat Apr 14, 2018 11:02 am

Don't think a cloud service is going to be anywhere that quick. I would have a closer look at how fast a cellular modem setup would respond.

How much data is involved in each update and how often could the updates happen?

User avatar
Gavinmc42
Posts: 4529
Joined: Wed Aug 28, 2013 3:31 am

Re: Long-Range RPI communication with mobile device

Sat Apr 14, 2018 11:54 am

LoRa
https://www.adafruit.com/product/3178
Not high speed data but long range for low power, good enough for sending waypoints?
Anything else is probably going to need a license.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

RachelNGS
Posts: 5
Joined: Thu Mar 29, 2018 7:58 am
Location: Kent

Re: Long-Range RPI communication with mobile device

Sun Apr 15, 2018 7:08 am

davef wrote:
Sat Apr 14, 2018 11:02 am
Don't think a cloud service is going to be anywhere that quick. I would have a closer look at how fast a cellular modem setup would respond.

How much data is involved in each update and how often could the updates happen?
Less that 1MB per file approx 800kb. The updates would probably be once during a flight time of around an hour or so.

PiGraham
Posts: 3962
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Long-Range RPI communication with mobile device

Sun Apr 15, 2018 7:13 am

Take a look at LORA.

davef
Posts: 64
Joined: Wed Feb 20, 2013 8:39 pm
Location: Christchurch, NZ

Re: Long-Range RPI communication with mobile device

Sun Apr 15, 2018 10:41 am

Think there is a bit of an issue here. Sending 1MB of data and trying to get a response within 0.1 to 1 second, I think is a tall order. Even 1Mb. By response, I mean time taken to start sending the waypoint information until you want the drone to change course.
Less that 1MB per file approx 800kb.
Should that be 1Mb or 800kB

LORA at 50kbps (50kbps/8 = 6kBytes per second) is going to take 1000kB/6kB = 166 seconds to send.

Do you really need to send this much information?

PiGraham
Posts: 3962
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Long-Range RPI communication with mobile device

Sun Apr 15, 2018 2:27 pm

davef wrote:
Sun Apr 15, 2018 10:41 am
Think there is a bit of an issue here. Sending 1MB of data and trying to get a response within 0.1 to 1 second, I think is a tall order. Even 1Mb. By response, I mean time taken to start sending the waypoint information until you want the drone to change course.
Less that 1MB per file approx 800kb.
Should that be 1Mb or 800kB

LORA at 50kbps (50kbps/8 = 6kBytes per second) is going to take 1000kB/6kB = 166 seconds to send.

Do you really need to send this much information?
Agreed, the saize of data and time constrainst are not compatible.
RachelNGS wrote:
Thu Mar 29, 2018 8:06 am
I would like to be able to send from a mobile device to the pixhawk via the rpi new flightpath instructions.

What are the "flightpath instructions"? I imagine a few waypoints or bearing and distance vectors would be enough. Any path interpolation or smoothing could be done on-board. Maybe 50 bytes would do, which could be sent in <10ms.

1MB suggests some very dense data like a 2D pixel map or something.

RachelNGS
Posts: 5
Joined: Thu Mar 29, 2018 7:58 am
Location: Kent

Re: Long-Range RPI communication with mobile device

Sun Apr 15, 2018 3:07 pm

PiGraham wrote:
Sun Apr 15, 2018 2:27 pm
davef wrote:
Sun Apr 15, 2018 10:41 am
Think there is a bit of an issue here. Sending 1MB of data and trying to get a response within 0.1 to 1 second, I think is a tall order. Even 1Mb. By response, I mean time taken to start sending the waypoint information until you want the drone to change course.
Less that 1MB per file approx 800kb.
Should that be 1Mb or 800kB

LORA at 50kbps (50kbps/8 = 6kBytes per second) is going to take 1000kB/6kB = 166 seconds to send.

Do you really need to send this much information?
Agreed, the saize of data and time constrainst are not compatible.
RachelNGS wrote:
Thu Mar 29, 2018 8:06 am
I would like to be able to send from a mobile device to the pixhawk via the rpi new flightpath instructions.

What are the "flightpath instructions"? I imagine a few waypoints or bearing and distance vectors would be enough. Any path interpolation or smoothing could be done on-board. Maybe 50 bytes would do, which could be sent in <10ms.

1MB suggests some very dense data like a 2D pixel map or something.
My mistake. Looking at the wrong file for the data size. It should be around 80 bytes. Sorry :) Thanks for all the responses. This has been most helpful.

davef
Posts: 64
Joined: Wed Feb 20, 2013 8:39 pm
Location: Christchurch, NZ

Re: Long-Range RPI communication with mobile device

Sun Apr 15, 2018 10:34 pm

I will second LORA.

I am starting a project based on this work:
http://cpham.perso.univ-pau.fr/LORA/RPIgateway.html

Excellent work and very comprehensive.

Good luck!

User avatar
Gavinmc42
Posts: 4529
Joined: Wed Aug 28, 2013 3:31 am

Re: Long-Range RPI communication with mobile device

Mon Apr 16, 2018 4:37 am

Nice low cost LoRa solution , thanks for Link.

I have been testing Adafruit Feather M0 LoRa boards for sensors and need a gateway.
The SX1301 baseband concentrator is a bit of an overkill for just a few sensors, it is more for LoRaWAN use.
Outside of the Cities here we don't need that, 433MHz for farming/country use might work better with the longer range?

The chips themselves go down to 150MHz.
That would give even longer range but would mean RF module hacking and an allowed frequency band.
That band depends on which Country of use.
Looking at the wrong file for the data size. It should be around 80 bytes
I would have questioned 1MB for way point update as a bit much too, 80 bytes is much better ;)

Wonder if anyone is using LoRa on micro satellites?
Dave Ackerman can get 600KM+ range with his balloons.

If you had one drone circling overhead at 400ft could it be used as repeater?
Solar powered glider? Sun powered tethered hot air balloon?
Windy days use a kite?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Automation, sensing and robotics”