Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Beaglebones Blue for vtol

As an avid UAV enthusiast, I was on the lookout for the perfect flight controller to power my VTOL (Vertical Takeoff and Landing) drone. After extensive research, I stumbled upon the Beaglebones Blue (BBB), a remarkable Linux-based computer that seemed to be the ideal fit for my project. Its versatility, extensive features, and scripting capabilities instantly caught my attention. In this article, I will delve into the world of BeagleBones Blue and highlight why it’s the ultimate flight controller for VTOL UAVs.

__Introducing BBB

The BeagleBones Blue is an all-in-one Linux-based computer designed by BeagleBoard.org. While it is optimized for robotics, this compact and affordable board is also well-suited for UAV applications. It boasts a wide range of sensors and peripherals necessary for a flight controller, making it an excellent choice for VTOL UAVs. Let’s take a closer look at the features that make the BeagleBones Blue stand out from the crowd.

__Linux-Based Operating System

One of the major advantages of the BBB is its Linux-based operating system. Linux offers a robust and stable platform for running complex flight control algorithms and scripts. It provides a familiar environment for developers, allowing them to leverage their existing knowledge and tools. With Linux, I knew I could customize and fine-tune my UAV’s flight control system to meet my specific requirements.

__Powerful Sensors and Peripherals

The BeagleBones Blue comes equipped with a comprehensive set of sensors and peripherals necessary for flight control. It features a 9-axis IMU (Inertial Measurement Unit), a barometer, a magnetometer, and an accelerometer, enabling precise and accurate flight control. Additionally, it has GPIO (General Purpose Input/Output) pins, PWM (Pulse Width Modulation) outputs, and UART (Universal Asynchronous Receiver-Transmitter) ports, allowing seamless integration with servos, receivers, and other peripherals. This versatility was a key factor in my decision to choose the BeagleBones Blue.

__Scripting Capabilities

One of the standout features of the BeagleBones Blue is its scripting capabilities. As a Linux-based computer, it supports various scripting languages, such as Python and Bash, allowing me to write custom scripts to automate tasks and enhance the functionality of my UAV. This flexibility opened up a world of possibilities for me, enabling me to experiment and push the boundaries of what my VTOL UAV could achieve.

__Setting Up BBB for PX4 with librobotcontrol

To unleash the full potential of the BeagleBones Blue as a flight controller for my VTOL UAV, I needed to set it up to run PX4 with the librobotcontrol robotics package. Here’s a step-by-step guide on how to do it.

__Flashing the OS Image

To begin, I needed to flash the BeagleBones Blue with the appropriate OS image. The official BeagleBoard website provides a repository of OS images specifically designed for the BeagleBones Blue. I downloaded the latest image and followed the instructions to flash it onto an SD card. This process ensured that I had a clean and up-to-date operating system for my flight controller.

__Installing librobotcontrol

Next, I needed to install the librobotcontrol library, which is a prerequisite for running PX4 on the BeagleBones Blue. While the BeagleBoard OS images come with librobotcontrol preinstalled, it’s essential to verify that it works correctly. I ran therc_test_drivers command to check if all the tests passed, indicating that librobotcontrol was functioning properly.

debian@beaglebone:~$ rc_test_drivers

If all the tests pass, it means that librobotcontrol is working as expected. Otherwise, I would need to troubleshoot and ensure that the library is properly installed.

__Building librobotcontrol with PX4 Extensions

If I wanted to build PX4 from source, I needed to build the librobotcontrol library with PX4 extensions. Here are the steps to do it:

  1. Clone the librobotcontrol repository from GitHub:
git clone https://github.com/StrawsonDesign/librobotcontrol.git
  1. Navigate to the librobotcontrol directory:
cd librobotcontrol
  1. Build the library with PX4 extensions:
make EXT_CFLAGS=-DRC_AUTOPILOT_EXT
  1. Install the library:
sudo make install

By following these steps, I ensured that the librobotcontrol library was properly built and ready to be used with PX4.

__Cross Compiler Build for Fast Deployment

To expedite the deployment process and take advantage of faster build times, I opted for a cross-compiler build. This approach allowed me to compile PX4 on a development computer and directly upload the executable binary to the BeagleBones Blue. Here’s how I set up the cross-compiler build:

__Setting Up the ARM Cross Compiler

To begin, I needed to download and install the ARM cross-compiler for the BeagleBones Blue. The Linaro Toolchain Binaries site provided the necessary toolchain for my development host. I installed it into the/opt/bbblue_toolchain/gcc-arm-linux-gnueabihf directory and added it to the PATH in the~/.profile file.

export PATH=$PATH:/opt/bbblue_toolchain/gcc-arm-linux-gnueabihf/binexport CrossCompiler=/opt/bbblue_toolchain/gcc-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

By setting up the ARM cross-compiler, I ensured that I had the necessary tools to compile PX4 for the BeagleBones Blue.

__Cross Compile and Upload

With the cross-compiler set up, I was ready to build PX4 and upload the files to the BeagleBones Blue. I ran the following command to initiate the build and upload process:

make posix_bbblue_cross upload

This command triggered the compilation of PX4 using the cross-compiler and transferred the resulting executable binary to the BeagleBones Blue using rsync. Once the upload was complete, I was ready to test the uploaded files and start utilizing the full capabilities of the BeagleBones Blue as a flight controller for my VTOL UAV.

__Native Builds: An Alternative Approach

While the cross-compiler build offered faster deployment, I also had the option to natively build PX4 directly on the BeagleBones Blue itself. This approach allowed me to develop and test my code directly on the target platform. Here’s how I set up native builds on the BeagleBones Blue:

  1. Install the necessary dependencies:
sudo apt-get updatesudo apt-get install cmake python-empy
  1. Clone the PX4 Firmware repository onto the BeagleBones Blue.

  2. Follow the standard build system installation instructions provided by PX4 to complete the native build process.

By following these steps, I was able to compile PX4 directly on the BeagleBones Blue, eliminating the need for a separate development computer.

__Autostart During Boot for Seamless Operation

To ensure that my VTOL UAV was ready for action as soon as the BBB booted up, I configured it to autostart during boot. There are two methods to achieve this: using/etc/rc.local or setting up a systemd service. Let’s explore both options.

__Using/etc/rc.local

To use the/etc/rc.local method, I edited the/etc/rc.local file and added the following lines at the appropriate location:

/bin/sleep 25cd /home/debian/px4/home/debian/px4/bin/px4 -d /home/debian/px4/px4.config > /home/debian/px4/PX4.log &exit 0

These lines ensured that the PX4 executable was launched with the specified configuration file during boot.

__Using systemd Service

Alternatively, I could set up a systemd service to autostart the PX4 flight controller. I created a new file namedpx4-quad-copter.service in the/lib/systemd/system/ directory and added the following configuration:

[Unit]Description=PX4 Quadcopter ServiceAfter=networking.service network-online.targetStartLimitIntervalSec=0Conflicts=px4-fixed-wing.service[Service]WorkingDirectory=/home/debian/px4User=rootExecStart=/home/debian/px4/bin/px4 -d /home/debian/px4/px4.configRestart=on-failureRestartSec=1[Install]WantedBy=multi-user.target

Enabling and starting the service ensured that the PX4 flight controller automatically started during boot and restarted in case of failure.

__Additional Features and Considerations

Beyond the core features and setup process, the BeagleBones Blue offers several additional features and considerations that make it an excellent choice for VTOL UAVs. Let’s explore some of these features.

__Power Servo Rail

When it comes to powering servos, the BeagleBones Blue has you covered. It automatically applies power to servos when PX4 starts, simplifying the wiring and setup process. This feature ensures that your servos receive the necessary power without any additional configuration.

__Unique Features and Connectivity Options

The BeagleBones Blue comes with some unique features that enhance its capabilities as a flight controller. It offers multiple choices for WiFi interfaces, allowing you to select the best option for your specific requirements. Additionally, it provides various power sources, including the option to use a 2S LiPo battery with variable voltage. These features add a level of flexibility and customization to your UAV setup.

__SBUS Signal Converter for Receiver Compatibility

If you’re using an SBUS receiver, such as the FrSky X8R, with the BeagleBones Blue, you’ll need an SBUS signal converter. The UARTs on the BeagleBones Blue can only work with non-inverted 3.3V level signals, while SBUS is an inverted signal. Fortunately, there are tutorials available that guide you through building an SBUS signal inverter circuit, ensuring compatibility between your receiver and the BeagleBones Blue.

__Typical Connections for a Quadcopter with GPS and SBUS Receiver

For a quadcopter equipped with a GPS module and an SBUS receiver, there are some typical connections to consider:

  1. Connect the ESCs of the motors to the respective servo outputs on the BeagleBones Blue. Ensure that any power output pins on the ESC connectors are removed and not connected to the power output pins of the servo channels on the BeagleBones Blue.

  2. Connect the converted SBUS signal from the receiver to the DSM2 port on the BeagleBones Blue. If you don’t have a DSM2 connector, you can use any available UART port and adjust the corresponding port configuration in the/home/debian/px4/px4.config file.

  3. Connect the signals of the GPS module to the GPS port on the BeagleBones Blue. Note that the signal pins on the GPS port are 3.3V tolerant, so ensure that your GPS module is compatible with this voltage level.

By following these typical connections, you can ensure proper communication and integration between the various components of your quadcopter.

__Conclusion

In conclusion, the BeagleBones Blue is a fantastic choice for a flight controller in VTOL UAVs. Its Linux-based operating system, powerful sensors and peripherals, scripting capabilities, and ease of setup make it the ultimate choice for UAV enthusiasts. Whether you’re a seasoned developer or a hobbyist, the BeagleBones Blue offers the flexibility and functionality you need to create a truly remarkable VTOL UAV. So why not give it a try and let your UAV take flight with the power of BeagleBones Blue? Happy flying!

“I chose the BeagleBones Blue as my flight controller because it is Linux-based, and I wanted to use it on my UAV VTOL. Its scripting capabilities allow me to customize and enhance the functionality of my drone. With the BeagleBones Blue, the sky is the limit!”


For more like this don’t forget to sign up to our newsletter, and never miss a thing.

The post Beaglebones Blue for vtol appeared first on Wat Da Feck.



This post first appeared on Wat Da Feck, please read the originial post: here

Share the post

Beaglebones Blue for vtol

×

Subscribe to Wat Da Feck

Get updates delivered right to your inbox!

Thank you for your subscription

×