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)