BBBmini is an autopilot / flightcontroller Cape for the BeagleBone Green. BBBmini + BeagleBone Green can be used as a state of the art Linux autopilot / flightcontroller for Copter, Planes or Rovers. BBBmini can be used with ArduPilot(open source unmanned aerial vehicle flight stack. BBBmini is a DIY project using widely available IMU and barometer breakout sensor boards, there is no SMD soldering necessary. The design is made that everybody can build a BBBmini by himself. In flight internet connection is done via WiFi link.
What does BBBmini offer:
The BBBmini project development includes:
See the BBBmini flying
Why BeagleBone Green
Once I had the idea to develop an flightcontroller, I have examined on the market available computer for their suitability. The following criteria should be met by the computer being used.
First, the computer should be very well supported by the community. As a result, a Raspberry Pi or BeagleBone could be used. In addition, the flightcontroller should be set up with as little as possible external components.
The decision was made for the BeagleBone. With the Programmable Real-Time Units of the BeagleBone, it is possible to create the BBBmini with only a few sensor breakout boards. In addition the BeagleBone offers many interfaces such as UART, SPI, I2C, CAN, USB and ADC. All these interfaces are used by the BBBmini.
BeagleBone Green parts used for BBBmini
Step 1: Solder resistor R4 and R5.
For 3.3V RC input signal use R4 = 0Ω (bridge) and R5 = open (see picture)
For 5V RC input signal use R4 = 1kΩ and R5 = 2kΩ
Step 2:
Solder resistor
R1 = 120Ω
R2 = 1kΩ
R3 = 2kΩ
R6 = 20kΩ 0.1%
R7 = 10kΩ 0.1%
R8 = 20kΩ 0.1%
R9 = 10kΩ 0.1%
to the bottom layer.
Step 3:
Solder CAN transceiver on the top layer
Step 4:
Solder male pin-header on top layer
P1, P2, P3, P4, P7, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21
Step 5:
Solder C1 and C2
Step 6:
Solder female pin-header P5 and P6 on top layer
Step 7:
Solder male pin-header P8 and P9 to bottom layer
Step 8:
Solder male pin-header to bottom layer of GY-9250 and GY-63
Step 9:
Mount spacer to BBBmini
Step 10:
Mount GY-9250 and GY-63
Finish! BBBmini is ready to use for Copter, Planes or Rover.
BBBmini + BBG
Step 1:
Download Debian image to host computer
Step 2:
Decompress image
Step 3:
Copy image to microSDcard (>= 2GB)
/dev/sdX point to your microSD, be careful here!!! Use lsblk
to figure out, which is your mircroSD. The process can take 15-30 minutes depending on the speed of your microSD card.
Step 4:
sync
and remove microSD
Install Debian to your BeagleBone eMMC
Step 1:
Plug prepared microSD into BeagleBone
Step 2:
While holding down the boot button, apply power to the board. If there is a newer Debian installed, holding down the boot button is not necessary.
Step 3:
Wait some minutes until Debian is installed (all four LEDs turned on).
Step 4:
Remove power.
Step 5:
Apply power again.
Step 6:
Connect to the BeagleBone (password = temppwd
)
Step 7:
Update Software
Step 8:
Install software
Step 9:
Update scripts
Step 10:
Install RT-Kernel
Step 11:
Add BBBMINI DTB
Step 12:
Adjusting the BeagleBone clock
Step 13:
Reboot system
Step 14:
Login again
Step 15:
Clone overlays
Step 16:
Change dir
Step 17:
Update DTC
Step 18:
Build and install overlays
Step 19:
Add ADC DTBO
Step 20:
Reboot system
Step 21:
Login again after reboot
Step 22:
Clone ArduPilot sourcecode
Step 23:
Change dir
Step 24:
Init submodule
Step 25:
Clone submodule
Step 26:
Change dir
Step 27:
Build Rangefinder firmware
Step 28:
Install Rangefinder firmware
Your BeagleBone is now ready to use.
Build ArduPilot software
BBBmini uses ArduPilot as flight stack. I contribute patches to the ArduPilot that BBBmini is supported by ArduPilotsoftware.
Step 1:
Step 2:
Step 3:
Step 4: (take about 1h20)
Step 5:
Cross compile ArduPilot (faster)
To compile ArduPilot for BeagleBone on an Ubuntu computer the following packages are required:
Get the source code and build ArduPilot:
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Step 6:
Step 7:
Step 8:
For safety reasons dismount all propellers when testing BBBmini.
Step 1: Check connection to sensors
1. Connect BeagleBone Green via Ethernet to Network
2. Supply power to the BBBmini
3. Connect to BeagleBone Green from host computer with ssh
4. Start arducopter
Parameter description:
-B /dev/ttyO5
GPS connected to serial port 5
-C /dev/ttyO4
telemetry radio connected to serial port 4
5. Check if startup is successful
The output should look like this. HMC5843: Could not detect version
does not matter, because there is not a HMC5843 connected. The non ASCII symbols are MAVLink messages, that is alright.
Step 2: Add arducopter to automatic start at boot time
1. Edit rc.local
2. Add automatic arducopter startup
Parameter description:
-B /dev/ttyO5
GPS connected to serial port 5
-C /dev/ttyO4
telemetry radio connected to serial port 4
Save and exit: Strg + o and Strg + x
Step 1: Assemble frame
Step 2: Connect motors and ESC
Step 3: Connect power distribution
Step 4: Connect RC receiver
Step 5: Connect display
Connect your SSD1306 OLED display to P15 or I2C GROVE port
P15 or GROVE +3.3V to display VCC
P15 or GROVE GND to display GND
P15 or GROVE SDA to display SDA
P15 or GROVE SCL to display SCL
Step 6: Connect GPS
Connect your GPS to P10.
P10 +3.3V to GPS VCC
P10 GND to GPS GND
P10 RX to GPS TX
P10 TX to GPS RX
Step 7: Connect telemetry
Connect your telemetry radio to P7.
P7 +5V to telemetry radio VCC
P7 GND to telemetry radio GND
P7 RX to telemetry radio TX
P7 TX to telemetry radio RX
Step 8: Connect HC-SR04
Connect your HC-SR04 ultrasonic rangefinder
P19 +5V to HC-SR04 VCC
P19 GND to HC-SR04 GND
P19 TRIG to HC-SR04 TRIG
P19 ECHO to ECHO TRIG
Plug USB telemetry radio into your host PC. I recommend to use APM Plannerground control station for beginners. Advanced user can use MAVProxy ground control station.
Step 1:
Start APM Planner
Step 2:
Change serial port to USB telemetry radio serial port
Set baudrate to 57600
Press connect button, wait for connection established
Wait some seconds to load parameters from BBBmini
Step 3:
Move BBBmini and check that Primary Flight Display is moving too
Step 4:
Switch to INITIAL SETUP
Step 5:
Switch to COMPASS
Hit button Live Calibration
Move BBBmini in all axis until calibration is completed
Step 6:
Switch to Accel Calibration
Hit button Calibrate
and follow instructions
Step 7:
Switch to Radio Calibration
Hit button Calibration
and follow intructions
Step 8:
Switch to Flight Modes
Setup that you are able to switch between Stabilize
,Loiter
andRTL
First Flight / Drive
Be sure all test are successful. Read and follow the safety instructions.
Because I did a lot of contributions to the ArduPilot project, BBBmini is full supported by ArduPilot software. Check ArduPilot website for instruction how to setup and use an ArduPilot autopilot. The ArduPilot website will provide you with all necessary information about how to build and fly (drive) vehicles with your BBBmini.
Links:
If you have questions about you BBBmini you can join the BBBmini user group on diydrones.com or ask for support at the gitter BBBmini support chat.
Links:
You can connect a second GY-9250 IMU to the BBBmini.
Using USB WiFi with Linux can be complicated because of missing support of the WiFi chip by the Linux Kernel. It is very important to select a well supported WiFi USB stick. One of these are Ralink RT5572 based WiFi USB sticks. They can transmit at 2,4GHz or 5GHz. It is not necessary to compile a driver, it is supported by the Linux Kernel out of the box. With the Debian we use for the BBBmini you only have to install the firmware and some tools for the RT5572 chip with:
Here is a list with RT5572 based WiFi USB sticks.
You have to configure your location because the restrictions of the frequency usage depends of the country where you use the WiFi stick. For me it is DE for Germany. Replace DE
to your country code.
Edit your WiFi configuration:
Save and exit with Strg + O and Strg + X
You can use WiFi to control your BeagleBone Green Linux, telemetry link or / and Live video transmission.
What additional components you need for live video transmission:
I use this H264 camera with success with my BeagleBone Green (Link).
Install required software:
Start video transmission:
Change192.168.178.25
to our host computer IP address.
Performance:
With ArduPilot running and video streaming the BeagleBone Green has a CPU load of about 25%.
Receive video transmission on Linux host computer:
Safety
Always follow this safety instructions.
This recipe is originally written by Mirko Denecke. Thanks for sharing!