All GPIO & function small size PX4 for UAV research for HKUST UAV-Group
Dimension of NxtPX4: 27mmx32mmx8mm
Hardware quick review
UART | TTY | SerialName | Suggest Funcion |
---|---|---|---|
USART1 | /dev/ttyS0 | SERIAL_GPS1 | AUX |
USART2 | /dev/ttyS1 | SERIAL_GPS2 | AUX |
USART3 | |||
UART4 | /dev/ttyS3 | SERIAL_TEL2 | Connect with offboard computer |
UART5 | /dev/ttyS4 | SERIAL_RC | Receiver |
UART7 | /dev/ttyS5 | SERIAL_TEL3 | AUX |
please check firmware dir
- clone repo.
- run init repo script:
./init_all_repo.sh
it will take some time to clone all submodules into loccal - Enter directory NxtPX4-Hardware:
cd ./NxtPX4-Hardware
you should notice that you are not on main branch, So Checkout to main branch using:git checkout -b main
- cd back to NXTPX4 dir
- Enter directory PX4-Autopilot:
cd ./PX4-Autopilot
you should notice that you are not on main branch or develop branch. So checkout main branch to local and then checkout to develop branch to compile frameware for NxtPX4.git checkout -b main
and thengit checkout -b develop origin/develop
- configure done !
We found a silkscreen printing error on the USART 1 and 2 of the V1.2.3 PCB. The labels for Tx and Rx are incorrect. Please follow the silk screen in the modified version V1.2.3.1(picture below)
The only difference between v1.2.3 and v.1.2.3.1 is the silkscreen of USART1 and USART2
(connection for v1.2.3)
Basic connection with receiver & ESC & computer
If your receiver uses Sbus please connect the pads in red circle
Note!!!
For PX4 1.14.x firmware please use branch develop_v1.14.x. I am manually merging with the latest main branch from PX4.
- go to PX4-Autoplilot directory
- using
make hkust_nxt_bootloader
to compile bootloader. For develop_v1.14.x usemake hkust_nxt-v1_bootloader
- Press boot button on board and then connect it with computer, flash bootloader with Betaflight configurator or STM32programmer
- using
make hkust_nxt
to compile firmware, and flash.px4
through QGC. . For develop_v1.14.x usemake hkust_nxt-v1
Usage: ./docker_build.sh <branch_name> <frameware_name>
- compile firmware
./docker_build.sh develop_v1.14.x hkust_nxt-v1
- compile bootloader
./docker_build.sh develop_v1.14.x hkust_nxt-v1_bootloader
Set power_source Power Module, then calibrate voltage and current analog data
Set RC_PORT_CONFIG with Radio controller
Set MAV_0_CONFIG with TELEM 2
create file in your tf-card /etc/extras.txt
mavlink stream -d /dev/ttyS3 -s ATTITUDE -r 200
mavlink stream -d /dev/ttyS3 -s HIGHRES_IMU -r 1000
then using the following settings
IMU_GYRO_RATEMAX: 2000Hz
IMU_INTEG_RATE: 400Hz
MAV_0_MODE: External vision
Set Uart4 to 921600
MAV_0_RATE 92160B/s
after these settings you will have approximate 500Hz /imu/data_raw /imu/data
if you want to have presice 500Hz imu/data_raw and 200Hz imu/data
SYS_MC_EST_GROUP: Q attitude estimator
- Kicad 7.0 required
- Create new branch for your own features
- Only general hardware features can be merged into main branch
in v1.0.1 design, the original idea is to make ESC connector order weird, to make user notice the PINOUT sequence, however in practice, Rx pin is too close to Vbat pin, which leads to MCU damage at the moment power on or off if the cable is not titely installed. Noticing that, in v1.1.0 design, we change the ESC pinout order.
The pre-build firware and bootloader are in ./firmware
dir, donwload and flash in corresponding with your hardware version
- Frameware compile: make hkust_nxt
- bootloader compile: make hkust_nxt_bootloader
Build a specific version of PX4 firmware using docker container.
Usage: ./docker_build.sh <branch_name> <frameware_name>
Example: ./docker_build.sh develop_v1.14.x hkust_nxt-v1
./docker_build.sh develop_v1.14.x hkust_nxt-v1_bootloader
- Create new branch named as feature-xxx(feature info) from develop branch to start your own feature development
- After test your own feature, mereged into develop branch and push a pull request (only general features will be accepted)
update repo using script: ./update_all_repo.sh
-
Develop branch back to normal HIGHRES_IMU - ~~remove MPU6500 ~~
-
replace 0420 Inductor with 05xx inductor - refine pinout (v2.0 hardware)
- ESC RPM report cannot run with MAVRos /mavros/imu/data
- Dual BMI 088