7-Nano user guide(ArduPilot)
This chapter will describe the key points you need to pay attention to when running ArduPilot firmware on 7-Nano. In addition to this chapter, you may also need to read the following:
Load firmware
7-Nano®The flight controller supports ArduPilot. The following mainly explains how to load ArduPilot firmware.
[!TIP] 7-Nano supports ArduPilot4.5.6 and above firmware.
Load firmware online:
Connect 7-Nano to the computer, open the ground station, click on the initial setting interface "Install firmware (CUAV-7-Nano)" and wait for the burning to complete.
Load firmware locally:
Download the firmware to computer:
Select 'Load custom firmware'>Select the downloaded firmware>Wait for burning to complete
UART map
- SERIAL0 -> USB
- SERIAL1 -> UART7 (TELEM1)
- SERIAL2 -> UART5 (TELEM2)
- SERIAL3 -> USART1 (GPS&SAFETY)
- SERIAL4 -> UART8 (GPS2)
- SERIAL7 -> USART3 (FMU DEBUG)
[!NOTE] TELEM1 and TELEM2 interfaces have flow control (RTS/CTS), other UARTs do not have RTS/CTS pins
RC in
The RCIN interface supports all unidirectional RC protocols (SBUS/PPM/DSM);
DSM/PPM/SBUS
Use Dupont cable to connect to the RCIN interface; no additional parameter settings are required.
For receivers with telemetry bidirectional protocols such as CRSF/ELRS, it needs to be connected to a UART interface.Here is the setup tutorial: For example, if SERIAL2 (UART5/TELEM2) is used for bidirectional RC.
ELRS
Connect the receiver to the TELME2 interface and set the following parameters:
- SERIAL2_PROTOCOL=23;
- SERIAL2_OPTIONS=0;
- RSSI_TYPE=3;
- RC_OPTIONS=8192(Use 420kbaud for ELRS protool);
Restart after writing parameters.
CRSF
- SERIAL2_PROTOCOL=23;
- SERIAL2_OPTIONS=0;
- RSSI_TYPE=3;
FPort
- SERIAL2_PROTOCOL=23;
- SERIAL2_OPTIONS=7;
- RSSI_TYPE=3;
[!TIP] Any UART can be used to connect the RC receiver in ArduPilot and is compatible with all protocols except PPM. For more information, see Radio Control Systems.
PWM outs
7-Nano supports 14 PWM outputs
PWM output grouping:
group 1:M1~M4(TIM5)
group 2:M5~M6(TIM4)
group 3:M7~M8(TIM1)
group 4:M9-M11(TIM8)
group 5:M12(TIM15)
group 6:M13-M14(TIM12)
[!NOTE] PWM outputs in the same group need to use the same output rate and protocol. If any output in the group uses DShot, all channels in the group need to use DShot. M1-M8 supports switching between 3.3V voltage and 5V voltage output. It can be switched through the
BRD_PWM_VOLT_SEL
parameter configuration.
GPIO
All Servo outputs can be used as GPIOs (relays, camera shutters, RPM, etc.). To be used as GPIO you need to set SERVOx_FUNCTION=-1 (X is the pin number).
GPIO MAP:
- PWM1(M1) 50
- PWM2(M2) 51
- PWM3(M3) 52
- PWM4(M4) 53
- PWM5(M5) 54
- PWM6(M6) 55
- PWM7(M7) 56
- PWM8(M8) 57
- PWM9(M9) 58
- PWM10(M10) 59
- PWM11(M11) 60
- PWM12(M12) 61
- PWM13(M13) 62
- PWM14(M14) 63
Take M14 as a relay as an example; set Relay_pin=63.
Analog voltage input
7-Nano has 6 analog input interfaces.
- ADC Pin9 -> battery voltage sensor
- ADC Pin8 -> Battery current sensor
- ADC Pin5 -> VDD 5V sense
- ADC Pin13 -> ADC 3.3V sense
- ADC Pin12 -> ADC 6.6V sense
- ADC Pin10 -> RSSI sense
Battery Monitor
[!NOTE] By default, the power module is plug-and-play and does not require any settings. Do not use the Ground Station Battery Monitor tab to set up the flight controller's power monitor. If you changed it, please put the following parameters in Mission planner->All parameters table:
- BATT_MONITOR=4
- BATT_VOLT_MULT=31
- BATT_V0LT_PIN=9
- BATT_CURR_PIN=8
- BATT_AMP_PERVLT=24
Compass
The 7-Nano has an IST8310 built-in compass, but due to interference the board is usually used with an external I2C compass as part of a GPS/compass combo. An external compass (such as the one on a GPS) should be used in preference to the primary guide; always be sure to prioritize the external compass over the internal compass.
Ethernet Setup
[!TIP] ArduPilot 4.5 and above supports 7-Nano Ethernet.
Open Mission planner>Config>Full parameters list, set NET_ENABLED=1, restart the autopilot and modify the following parameters:
As shown above, set the autopilot IP to 192.168.10.14 and the gateway IP to 192.10.3
Set the computer IP to 192.168.10.15, set a network port to 15001 to access the network device through UDP, and the port protocol is 2.
[!NOTE] Up to four ports can be configured.
Hardware connection
- Use a network cable to connect the autopilot to the computer and power the autopilot and AG router.
- Enter the computer [Change Network Adapter Options]>Ethernet Properties [Internet Protocol Version 4 (TCP/IPV4]]> Manually configure the network (local IP, configured as 192.168.0.1, subnet mask 255.255.255.0)> click OK to apply Configuration
Network Connectivity Test
- Enter the Windows command window
- ping 192.168.10.4
[!TIP] If there is a network delay data reply, the communication is established. If the communication timeout is displayed, the IP may be incorrect or the communication failed.
Development Guide
[!COMMENT] CUAV does not provide technical guidance for secondary development of firmware and software. If you have any related questions, please read the relevant guides carefully or seek assistance from ArduPilot in the ArduPilot discord channel.
ArduPilot Compilation command
./waf configure --board CUAV-7-Nano
./waf copter --upload
The compiled firmware can be found in a subfolder called "CUAV-7-Nano" at https://firmware.ardupilot.org.
The board comes pre-installed with an ArduPilot compatible bootloader, allowing the *.apj firmware files to be loaded using any ArduPilot compatible ground station.