A template repository for developing payload firmware for the Quiver UAS, supporting C++ (Raspberry Pi, ESP32, STM32) and Python (Raspberry Pi) with MAVLink and DroneCAN protocols. It integrates with the Quiver's Pixhawk and Ardupilot ecosystem via a 10-pin Molex Mini-Fit Jr. connector.
- Protocols: MAVLink and DroneCAN for robust communication.
- Platforms: C++ for Raspberry Pi, ESP32, STM32; Python for Raspberry Pi.
- Hardware Compatibility: 10-pin Molex Mini-Fit Jr. connector (12V, 2.0A, CAN, Ethernet, analog/digital I/O).
- Example Code: Heartbeats, sensor data, actuator control.
- CAN Support: MCP2515 for Raspberry Pi, native CAN for ESP32/STM32.
- Raspberry Pi: Pi 4 with Raspbian OS, MCP2515 CAN module, MCP3008 ADC (optional).
- Microcontrollers: ESP32 or STM32 with CAN support.
- Connector: 10-pin Molex Mini-Fit Jr. (Part #2077601281, mating #2045231201).
- C++: PlatformIO IDE with Arduino framework.
- Python: Python 3.7+ with
pymavlink,python-can,RPi.GPIO. - Ground Control: Mission Planner 1.3.77 or later.
- Clone the repository:
git clone https://github.com/Arrow-air/quiver-payload-template.git cd quiver-payload-template - Install PlatformIO and dependencies:
pio lib install "mavlink/c_library_v2" "uavcan/libcanard" "wiringpi/wiringpi" "espressif/esp32-can" "STM32duino/CAN"
- Edit
platformio.inito select your target environment (rpi,esp32, orstm32). - Build and upload:
pio run -t upload
- For Raspberry Pi CAN, configure the MCP2515 module:
sudo bash scripts/setup_can.sh
- Connect the payload to the Quiver UAS and verify with Mission Planner.
- Clone the repository (if not already done).
- Install Python dependencies:
pip install -r requirements.txt
- Configure CAN interfaces:
After reboot, run:
sudo bash scripts/setup_can.sh
sudo ip link set can0 up type can bitrate 500000 sudo ip link set can1 up type can bitrate 250000 sudo ifconfig can0 txqueuelen 65536 sudo ifconfig can1 txqueuelen 65536 dmesg | grep spi
- Run the Python script:
python src/main.py
- Verify communication with Mission Planner.
| Platform | Details |
|---|---|
| Raspberry Pi | GPIO pins per quiver_payload.h/quiver_payload.py. MCP2515 CAN module: SPI0, GPIO 23 (CAN_H), 24 (CAN_L). MCP3008 ADC: GPIO 25. |
| ESP32/STM32 | Native CAN pins (e.g., GPIO 5/4 for ESP32). ADC: GPIO 34 (ESP32). |
- Power: Ensure draw does not exceed 2.0A at 12V.
- Connector Pinout: See Quiver Integration Guide for details.
- Use Mission Planner to verify MAVLink/DroneCAN communication (e.g., heartbeats, sensor data).
- Test digital I/O with
MAV_CMD_DO_SET_ACTUATORcommands. - Monitor CAN bus on Raspberry Pi:
candump can0
Contributions are welcome! Please:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
See CONTRIBUTING.md for details.
This project is licensed under the MIT License. See LICENSE for details.
- Email: support@arrow-air.com
- Community: Join the Arrow-air Discord for help and collaboration.
Star this repository to support the project! 🌟
Maintained by Arrow-air