New hardware feedback

Hello everyone,

I want to create a new hardware platform for the Raspberry Pi Zero similar to the PXFMini, with all the required component to run ardupilot. I would really like to obtain a plug-and-fly experience with this hardware, with a relatively low cost system. I currently have two preliminary design on paper and want to get the feedback of the community.

Option 1

The first option is the most straightforward, it uses all off the shelf IC that do not need any programming, and barely any linux devicetree modification. It is a shield barely bigger than the pi zero itself. Here are the specifications. The choice of the IMU/MAG/BARO are not definitive, it’s what I had laying around on breakout:

  • IMU: MPU9250
  • BARO: MS5611
  • MAG: HMC5883
  • UART-EXPANDER: SC16IS752 (For GPS and FrSky S.PORT)
  • RC OUT: PCA9685
  • ADC: ADS1115
  • GPS: CAM-M8Q
  • GPIO: RGB LED, Safety Switch, PPM Input
  • EXPANSION CONNECTOR: I2C, UART & FrSky S.PORT

This solution is rather simple in term of software, and I think cover a lot of the uses case for Ardupilot, at least it did for me, when I was in the drone group at my university. There is thing missing in this setup what comes to mind is CAN and a dedicated power input port. I never really liked the DroneCode standard for theses connector, you basically cannot make them which I really dislike. I am not opposed to adding a dedicated power connector if this is something a lot of people want. The CAN-BUS support is harder for me to integrate, as there is a need for an SPI CAN-Controller and an CAN-Transceiver, which I have used before, but it seems to me to be something not a whole lot of people would use, the only time we used the CAN-Bus was for our GPS. But that might have been my team and we were missing out on something? Anyway that is the first option.

Option 2
The second option is basically the same as the first one except I replace some of the IC namely the PCA9685, ADS1115 and SC16IS752 by an STM32 (I have experience with STM32Cube) or an FPGA (Like a simple ICE40, but I do not have a lot of experience with) to serve as an IO Expander of some sort. The communication would be over SPI. This IO Expander would have an SPI Slave Port, 8x PWM on 2 timers, 2 ADC channel, 2x UART and a CAN Interface. But this solution is more complicated and needs a lot of Firmware development, a lot of linux device tree work as well as a lot of change in Ardupilot. But that would make a more felxible solution. And it might even be cheaper hardware-wise. Here is the complete list of the features for the second soution, once again the IMU/MAG/BARO are not definitive:

On Raspberry pi:

  • IMU: MPU9250
  • BARO: MS5611
  • MAG: HMC5883
  • GPIO: RGB LED, Safety Switch, PPM Input
  • I/O Expander: The custom I/O expander over SPI
  • EXPANSION CONNECTOR: I2C, UART & FrSky S.PORT

On I/O expander:

  • UART1: GPS
  • UART2: FrSky S.Port
  • RC OUT: 8 channel PWM
  • ADC: 2 Channel
  • CAN: SN65HVD230

This solution is according to me more complete and more flexible, as well as being more actual. For me I don’t see really any reason to go for the second option as CAN and more control of the PWM channel is not something I used, but I may once again be in a minority. I really want to know what you think of these two hardware propositions and if I missed anything obvious or simply that you would like to have.

Linux RT
I am aware that you need a patched kernel with Preempt-RT to run ardupilot, on an embedded linux system, I am working on a Yocto langdale image with a Preempt-RT Kernel, that would have a prebuilt ardupilot. I am already able to build ardupilot manually, and add it to my Yocto image and run it. I build arducopter using the PXFMini board. I built the whole flight controller on a breadboard and as far as a know it works. I would really like to automate the build process, I am making a custom layer, meta-ardupilot for Yocto, so that everything can be bundled in a single build.

In the future
On of the reasons to use a raspberry pi is because it is wildly available, maybe not the Pi 4, but a lot of pi are still unused in peoples homes, and I think a shield like this has a lot of potential for any robotics applications, arudupilot or not. There could be a simple python interface that gives you access to all sensors, support for ardupilot, support for ROS2, support for MavROS, etc. These are all off the top of my head. But the project that excites me the most, is to add an FPV system using wifibroadcast from befinitiv which uses a pi camera and a wi-fi dongle in monitor mode to have an 720p analog-like video transmission over a couple kilometer, and with regulation today I really think that an all-in-one solution for FPV and Ardupilot is still lacking, at least for an affordable price. This is the main reason why I want the board to have more than one uart, as to not use the USB Port for telemetry. I want the board to be compatible with the most Pi possible, I am doing my tests on a Pi Zero W and a pi 3B. My real target pi is a Pi Zero 2 W, but they are not available anywhere.

My Motivations
I am currently in university doing a masters degree in computer engineering, and working on a smart navigation system, based on ardupilot with an on board computer. Before that a was in VAMUdeS a drone group that participates in AUVSI and USC. We used a Pixhawk Black/Orange, for all of our drones, and I found that a lot of the time we used the exact same hardware every time namely a pixhawk cube, power module, RFD900, ar7700 receiver, HERE 2-3 GPS and that was it we never changed anything. I wanted to have some of that equipement for my own drone and found 3 things. The first thing is that this equipment is way out of my budget, I would have liked something cheaper. The second thing is that the DroneCode Standard connector are really a pain in the ass to work with. And the third thing is that all this material weights more than 250g which means that I cannot even fly the drone I just built! Theses are the main reasons why I would have liked a simpler Autopilot to start at an affordable price. In my ideal scenario you flash the ardupilot pi image to an SD Card, plug the Shield and raspberry pi together, insert SD Card. Plug in your receiver, and ESC. Add power to your ESC and it’s done. The only remaining thing is to configure your frame and the basic ardupilot configuration. This is what I am aiming for.

Why I need your help
I need your help to build a platform that people will be interested in buying which means it needs an affordable prices (I am aiming at 150$ USD tough I have not completed any hardware yet) and a usefull feature set. I want to know what you would like to see or not see in such hardware? do you think there is not enough? too much features? Is that something you would be interested in buying? I really want your feedback either positive or negative I want to make something the people will want to buy and use. Let me know how you feel about this project.

Thanks you if you made it this far.
Alex

PS. I Have attached an image and a PDF, the image is the STM32CubeMX pins configurator for the proposed STM32 Solution. The PDF is the two options in a kind of chart.

both_options.pdf (407.7 KB)
STM32F303_IOEXPENDER

What are the advamtages of using a rpi and connecting all the sensors compared to using the already available flight controllers with appropriate sensors already installed?
Is it kind of like saying “cars are too expensive why cant i just get an engine and attach some wheels and put some seats on it and a roof and some doors”?

On a Pi Zero, nothing so far as I can tell. The specs are attractive, but you can’t compare that directly to something like an STM32 unless you compile a custom OS for it. By the time you add all the layers of complexity of a fully fledged Linux OS and layer ArduPilot for Linux on top of it, it becomes an anemic, ill suited bit of kit. The built in companion features will likely run slowly/poorly, if at all.

Good question! I was searching for a flight controller and found the PXFMini (Which is now unavailable) I found the form factor clever and the feature OK for my use case. It was simply ArduPilot on a Raspberry Pi it could have been anything. But I still needed to add at least a GPS and a magnetometer, to have autonomous flight.

I went the Raspberry Pi way for two main reasons. The first one is outside of ardupilot, I think it makes a great all-in-one cape for all it’s sensor and PWM output. The second one is for future feature addition, for now I would like to have Ardupilot running only (At least on a pi zero) then add feature such as a video feed, ROS2 or other probably not on a Pi Zero, maybe a Pi Zero 2 or other Pi derivative. This is the main reasons of why I wanted to use a Raspberry Pi instead of a STM32.

I taught about making a complete Ardupilot-as-cape for Raspberry Pi. That would make a complete Flight controller, with the possibility to communicate with Ardupilot. Do you think that would be a better solution? You can add a Raspberry Pi if you want, or use the cape without it. That would make for a compact solution without all the linux work, what do you think about that?

Thank you for your input, it’s really appreciated

I agree with you, what I would like in an ideal world is a fast linux computer that could run ardupilot and some other software. And I really think the Raspberry Pi Zero W is ill suited for this. My plan is to be incremental, starting with a pi zero and running ardupilot only, then try to add features if possible. My real target is a Pi Zero 2W but I cannot get one, since the PXFMini is able to run Ardupilot, I was hoping that a more powerfull quad-core Pi Zero 2 would be able to run at least ardupilot with some other software. Do you have any experience with other linux boards, or some things I could leverage from? I Will try to check the usage of the board with the raspberry pi running Ardupilot on a Pi zero and an Pi 3 that i currently have, that will give me an idea of what I have to work with.

I used Yocto to build my Custom Linux OS, it is working fine the setup is not yet complete but as a proof of concept it works allright, I built the core-image-minimal, with the I2C, SPI and UART enable, with the device tree for the UART Expander. Then I add ardupilot manually. It starts and evertything seems fine, I have yet to actually use the device, in a vehicle. I will try to do some benchmarking with this OS as well. I have not tried this, but I can make some CPU realtime, and pin a task to it, i think that is something worth looking into.

Do you think a Pi Zero running Ardupilot will work? And let’s say a more powerfull Pi (3, 4, Zero 2W) do you think it would be able to run some other software?

Thank you for your input, it’s really appreciated!

When I said Pi Zero, I meant any flavor of it. I also think a 3B will likely prove inadequate if you intend to run additional companion software. I have been woefully unimpressed with the BeagleBone Blue, and this is just an attempt to reinvent that wheel.

For the same $150 pricetag, I could get a proven H7 based autopilot plus a Pi Zero as a dedicated companion with far fewer headaches.

On the other hand, if I wanted an underpowered, all-in-one Linux solution, I could spend a mere $40 on a BeagleBone Blue.

I haven’t tried to use the beaglebone blue, the specs seems really similar to a Raspberry Pi Zero, which indeed would make it underpowered. I was thinking of using a Raspberry Pi as it was more accessible but a STM32 H7 with the same form factor as pi zero would work without needing to run Ardupilot on a Linux device.

The thing I liked about my solution was that it was all in one you only needed to add the receiver, and ESCs with the possibility to add a RFD900 for example instead of using wifi for telemetry. Are you aware of such a flight controller that is pretty much complete? The closest I saw was the Navio2.

Now I’m confused. Every autopilot with which I’m familiar simply requires a receiver and ESCs, with GPS and telemetry optional, as desired…

I really don’t understand the draw to your proposed solution.

To be blunt, a Pi hat is a rinky-dink, half-assed solution to a problem that doesn’t exist.

I can see the confusion, in my head it’s clear but in writing it definitely is not… I will try to makes things clearer, tell me if it helps!

What I want and it is a stretch is a drone Flight Controller like a DJI flight controller, I would only need to add a battery to the ESC, the BEC would power the ESC and that’s it an autonomous fronted ready to fly. I also would have like to have a video stream live that’s where the raspberry pi in my original idea came from. I like my drone to be clean and small and I could never achieve that using the pixhawk cube, there is wire everywhere like a lot. There is one for the gps, one for the RFD900, the power module, another one for the companion computer, the buzzer safety switch, receiver. And I think a lot of these could be integrated into the flight controller itself to make for a clean and light flight controller. To give you an idea of what I am used to in term of drone that is the page of the group of drone I was in, there is some picture of the hexacopter I worked on VAMUdeS - Véhicule Aérien Miniature de l’Université de Sherbrooke it is in French but you just need to look at the pictures you will see what I means by a mess of wire!

I really feel like a lot of parts that are external now gps, buzzer, status LED, safety switch could easily be integrated into a flight controller PCB which would reduce weight, and complexity for new users and would make for lighter builds where drone weight is restricted like in Canada where I live it’s 250g maximum without a licence.

Is what I am trying to achieve clearer? I want you to be blunt, my experience is not the same as everyone else if there is need or want for what I’m trying to build then great otherwise I will modify it or not do it at all!

Many of Matek’s autopilots include a minimal BEC that has multiple regulators for various peripherals. Skip the LEDs and buzzers in favor of passthrough telemetry for status indications. Add a small, digital FPV VTX and camera, and you’re in business without the overhead of a Linux computer at all.

If you’re dead set on a companion, add some variant of a Pi Zero to the mix and leverage its full power for peripheral tasks rather than relying upon it for flight critical processing as well. At ~10g, it isn’t much of a burden.

1 Like

I am really not dead set on a pi, or any companion I wanted to use the Pi to be able to add features down the road, I think you are right to use a STM32 with all the needed hardware for autonomous flight is more reliable without Linux over head and related issues.

As for the FPV VTX I am really new to that world and don’t know a lot, I will look into available module for HD VTX if any, I am not sure if I would be able to “make” it myself without a module, I am a computer engineer that can make some PCB, but mostly I write firmware.

I really appreciate that you took time to read and answered my post!

Thank you

The Kakute H7 Mini can be had with a small 4-in-1 ESC that is somewhat purpose built to accept a VTX as well. It’s light and fairly full featured. Worth a look for your application.

Keep in mind a lot of those components require some separation to work properly without interference. Where companies have made single-board custom flight controllers with all those things combined they probably spent 9873764587126398734.73 man-hours designing and testing the board.
Particularly the GPS and compass need separation from everything else, and will be almost useless onboard. In probably 90 percent of cases or more we disable the onboard compass, or at least move it down the list and prefer the external compass in the GPS case.

Also you can cut down on some items. Like use a receiver and transmitter combo that does the RC control and telemetry in one. There’s more than one option depending on what level of telemetry you need. See yaapu telemtry that runs on a compatible transmitter - that is enough in a lot of cases.
If you need long range you can use an RFD900 TXMOD combo for RC and telemtry (+ wifi to laptop) but that does punch a hole through the budget.

I have to agree with you here, the thing that worries me the most is the magnetometer, which as you said is mostly unused in favor of external ones. And I am no PCB design expert, I can make a working board bu not necessarily a perfect one. Do you think, or in your experience that adding a second or even a third magnetometer would aid to make them usefull?

For a drone competition I was in charge of creating a small and light UGV that could bring a small 8-OZ water bottle. For this task I designed my own Controller namely an STM32L432 with BNO055 IMU, BME280 BARO and a CAM-M8Q GPS. I was able with this setup to do waypoint navigation using my own Firmware. The IMU did it’s own sensor fusion and it seemed to work pretty great after it’s calibration, considering it was practically above a DC motor. And I had no issue with the GPS whatsoever. Anyway that was my experience with custom autopilot hardware and software.

Have you looked into creating a custom carrier board for the Cube series - similar to the Kore Carrier Board and other variants? Definitely a bit heavier compared to a more compact board - but could minimize the amount of wiring you have to deal with. Some examples can be found here: CubePilot | Autopilot-on-Module | Blue Manufactured in USA | Blue Assembled in USA | Pixhawk Original Team

I was on the Virginia Tech team that competes in SUAS - and we have been using the Kore Carrier Board for the past couple years and really prefer it over the stock carrier board.

2 Likes

This is one option we explored in our team but ultimately decided not to take this solution, mainly because we had an hexacopter.

As for what I want to do I think it would be a great solution. I liked the original cube carrier board since you could add an Intel Edison, which was killed by Intel soon after the release of the Pixhawk Cube Black, so I never could try that feature. I think a small carrier board with all missing components id possible, the only thing I don’t like about this solution is The Cube itself, I find it hard to use as a hobbyist. The inter-board connector is hard to solder by hand and fragile. And the price for the Cube is steep. I do have to admit that it is really well engineered the redundency and damping going on inside works really well. But I think for hobbyist it’s nice to have but not needed. When there is options for flight controllers for FPV drone at a quarter of the price (at least in canada, last time we ordered a cube we paid 400$ CAD for it and 250$ CAD for duty and shipping!!!). Even the Cube Purple is above 200$ CAD. I really have a hard time justifying the price tag at least to buy it for myself.

The Kore board works for hexacopters as well - but I understand that its shape/layout is more designed towards Quadcopters and X8s. I believe we competed in SUAS around the same time - so I remember when y’all switched over from the plane to a hexacopter.

Cube is pretty expensive - back before supply chain shortage it was only around $200 USD (still steep but a lot better than it is now). I understand how some could see it as “overkill” for a hobbyist project. It is, however, an easy way to access a large amount of the userbase and removes the need for an autopilot creation on your end. As a bonus - the carrier board design allows for a system that can continue to be updated with future Cube versions without any work on your end. We have swapped between the Cube Black and Orange on the Kore Carrier Board without any issues. Regardless - I will digress from that route as an option.

I think what you might be looking for is something similar to the ArduBee board - but I don’t know if it ever reached production.

mRobotics has a nice offering as well. Although it still requires a separate GPS and telemetry module.

This is like the system I would like to make it has everything needed for an autonomus flight, sadly it did not go into production, I will try to see what went wrong. What I had in mind is more simple and for hobbyist like myself and not toward big company.

I think the swarm sensors and other features might have scared people off. I barely can afford having a drone, let alone a swarm of them!

Do you know the OBAL system? It implements quite some of the functionality you want already (except additional UARTs), and proove already that it is actually working on a pi zero hard- and sofwarewise:

1 Like