Merge pull request #11834 from ctzsnooze/GPS_Refactor_plus_120hz
[betaflight.git] / docs / Sonar.md
blob5885c850f95a0a18954418403eb99eb1c4bb787a
1 # Sonar
3 A sonar sensor can be used to measure altitude for use with BARO and SONAR altitude
4 hold modes.
6 The sonar sensor is used instead of the pressure sensor (barometer) at low altitudes (less than about 3.5 meters above the ground).
7 The sonar sensor is only used when the aircraft inclination angle (attitude) is small (less than 22.5 degrees).
9 ## Hardware
11 Currently the main supported sensor is the HCSR04 sensor.
12 The Parallax 28015 single-wire sonar can also be used by connecting 1k resistors to the Trigger and Echo pins, and the other end of the resistors shorted together and to the Sonar module.
14 ```
15           1k
16 TRIGGER--/\/\--\
17                 \_______ 28015 SONAR
18           1k    /
19 ECHO-----/\/\--/
20 ```
23 ## Connections
25 ### Naze/Flip32+
27 | Mode                            | Trigger       | Echo          | Inline 1k resistors |
28 | ------------------------------- | ------------- | ------------- | ------------------- |
29 | Parallel PWM/ADC current sensor | PB8 / Motor 5 | PB9 / Motor 6 | NO (5v tolerant)    |
30 | PPM/Serial RX                   | PB0 / RC7     | PB1 / RC8     | YES (3.3v input)    |
32 #### Constraints
34 Current meter cannot be used in conjunction with Parallel PWM and Sonar.
36 ### CC3D
38 | Trigger       | Echo          | Inline 1k resistors |
39 | ------------- | ------------- | ------------------- |
40 | PB5 / RC4     | PB0 / RC5     | YES (3.3v input)    |
42 #### Constraints
44 Sonar cannot be used in conjuction with SoftSerial or Parallel PWM.
46 ### SPRacingF3
48 | Trigger       | Echo          | Inline 1k resistors |
49 | ------------- | ------------- | ------------------- |
50 | PB0 / RC7     | PB1 / RC8     | YES (3.3v input)    |
52 #### Constraints
54 Sonar cannot be used in conjuction with SoftSerial2 or Parallel PWM.