Using Raspberry Pi as Flight Controller Board


Recommended Posts

Hello everyone! I'm Muhammad Waqas, student of Mechatronics Engineering from Islamabad, Pakistan. We're doing a project on UAVs and we need to make a flight controller board.

So my question is pretty simple, can Raspberry Pi be used as a Flight Controller? How complex it is to code a flight controller? And is there an easy method to develop a flight controller of our own?

 

Link to post
Share on other sites
1 hour ago, Muhammad Waqas said:

So my question is pretty simple, can Raspberry Pi be used as a Flight Controller?

The answer is yes but you will need to add sensors like the PXFMini from Erie Robotics 

http://erlerobotics.com/blog/product/pxfmini/

1 hour ago, Muhammad Waqas said:

How complex it is to code a flight controller?

Its complex but fortunately there is an open source software called Ardupilot. 

http://ardupilot.org

Originally it ran on the Arduino hardware hence the name but now  requires more powerful processors. It will run on the Pi + PXFMini.

Personally I use a Pixhawk flight controller on my Hex build running Arducopter. Its a clone of the original 3DR hardware.

1 hour ago, Muhammad Waqas said:

And is there an easy method to develop a flight controller of our own?

Why reinvent the wheel ?. Since Ardupilot is open source you can make changes if you have some specific requirements.

http://ardupilot.org/dev/

This is another open source flight controller software.

http://px4.io

and this site should also help as it covers both versions.

https://diydrones.com

Edited by Spitfire76
Link to post
Share on other sites
  • 1 month later...

Thanks for the quick reply Spitfire76! :)

Couple of things I forgot to ask. If I don't use the PXFMini, can I still use ardupilot's open source software? The reason I am asking this is because I have bought the BerryGPS-IMU from Ozzmaker. So now I have all the data from IMU and GPS.

And now I'm stuck with trying to get RC Reciever's output to RPi Zero W. I know it should be possible because the reciever I am using outputs PWM signals.

Is my approach to this project right? Or should I start-over?

Link to post
Share on other sites
13 hours ago, Muhammad Waqas said:

Couple of things I forgot to ask. If I don't use the PXFMini, can I still use ardupilot's open source software? The reason I am asking this is because I have bought the BerryGPS-IMU from Ozzmaker. So now I have all the data from IMU and GPS.

You might want to post this question on the ardupilot and diydrones forums but I doubt it will run with the current code without modification. I did a quick search of those forums for "BerryGPS-IMU" but nothing showed up.

 

13 hours ago, Muhammad Waqas said:

And now I'm stuck with trying to get RC Reciever's output to RPi Zero W. I know it should be possible because the reciever I am using outputs PWM signals.

 

If you are using PWM then the Pi would need to handle multiple inputs, throttle, pitch, yaw, roll etc. Usually its best to use PPM or sBUS if that's supported on your receiver as it only requires 1 connection.

13 hours ago, Muhammad Waqas said:

Is my approach to this project right? Or should I start-over?

It depends on what you are trying to achieve and the time frame that you have.

Edited by Spitfire76
Link to post
Share on other sites
  • 2 years later...

Hello , I'm an engineering student and I have to design a drone controller using raspberry pi .. so do you have any useful research or links to follow up to built mu controller  

Link to post
Share on other sites
5 hours ago, Sana said:

Hello , I'm an engineering student and I have to design a drone controller using raspberry pi .. so do you have any useful research or links to follow up to built mu controller  

Hello @Sana and welcome to the forum.

To use a Pi as a FC you need of course to add sensors (gyro, accelerometer, etc) that are typically built into a FC like the Pixhawk but it looks like there is still a solution from 

https://emlid.com/navio/

Like most I personally prefer to use a Pi as a "companion computer" connected to a FC like the Pixhawk. 

Maybe you could provide some more details about your project and what you need to demonstrate to your professors. 

Link to post
Share on other sites
1 hour ago, Muritadha said:

Okay

I want to learn how to make my own FC with raspberry pi from scratch 

Ok, I understand but that's quite a task. For a start you need to add sensors to the Pi. The basic sensors would be a gyro and accelerometer but then you might want to add a barometer or range finder for altitude and compass and GPS for direction and positioning. As I previously posted there is a "HAT" for the PI than makes it easier to add these sensors. 

https://emlid.com/navio/

Even though you need to develop the software from scratch you may want to leverage from existing open source software like 

https://ardupilot.org

The software, which will run on the Navio boards, can also be run without the hardware in a simulation environment which could be a good way to start.

https://ardupilot.org/dev/

Link to post
Share on other sites
  • 3 months later...

Hello @Spitfire76,  I am planning to build a 2 UAVs and GCS using Pi for analysis of flooded areas and to provide food & packages. How can I increase the communication range between both the UAVs, because, Wifi wont provide much of a communication distance, should i go with LoRa?

Apart from that, How can i handle communication between GCS and UAV,  I read somewhere that using a 900 MHz band high directional antenna will provide a greater communication range?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.