You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/uk/can/index.md
+43-7Lines changed: 43 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,13 @@
1
-
# CAN
1
+
# CAN (DroneCAN & Cyphal)
2
2
3
-
[Мережа контролера (CAN)](https://en.wikipedia.org/wiki/CAN_bus) – це надійна дротова мережа, яка дозволяє компонентам дрона, таким як контролер польоту, ESC, датчики та інші периферійні пристрої, спілкуватися один з одним.
4
-
Так як він розроблений, щоб бути демократичним та використовує диференційну сигналізацію, він є дуже надійним навіть на довгих кабельних ділянках (на великих транспортних засобах) і уникне виникнення однієї точки відмови.
3
+
[Controller Area Network (CAN)](https://en.wikipedia.org/wiki/CAN_bus) is a robust wired network that allows drone components such as flight controller, ESCs, sensors, and other peripherals, to communicate with each other.
4
+
5
+
It is particularly recommended on larger vehicles.
6
+
7
+
## Загальний огляд
8
+
9
+
CAN it is designed to be democratic and uses differential signaling.
10
+
For this reason it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
5
11
CAN також дозволяє отримання зворотного зв'язку від периферійних пристроїв та зручне оновлення прошивки через шину.
6
12
7
13
PX4 підтримує два програмні протоколи для взаємодії з пристроями CAN:
@@ -18,29 +24,36 @@ PX4 підтримує два програмні протоколи для вз
18
24
Відмінності між цими двома протоколами описані в [Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814).
19
25
:::
20
26
21
-
:::warning
22
27
У PX4 немає підтримки інших програмних протоколів CAN для безпілотних літальних апаратів, таких як KDECAN (на момент написання).
23
-
:::
24
28
25
29
## Підключення
26
30
27
31
Проводка для мереж CAN однакова як для DroneCAN, так і для Cyphal/CAN (фактично, для всіх мереж CAN).
28
32
29
-
Пристрої з'єднані у ланцюжку в будь-якому порядку.
33
+
Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port).
34
+
35
+
:::warning
36
+
Don't connect each CAN peripheral to a separate CAN port!
37
+
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy).
38
+
:::
39
+
30
40
На обох кінцях ланцюга між двома лініями передачі даних слід під’єднати термінальний резистор 120 Ом.
31
41
Польотні контролери та деякі модулі GNSS мають вбудовані резистори завершення для зручності, тому їх слід розміщувати на протилежних кінцях ланцюга.
32
42
В іншому випадку, ви можете використовувати резистор завершення, наприклад, [цей від Zubax Robotics](https://shop.zubax.com/products/uavcan-micro-termination-plug?variant=6007985111069), або припаяти його самостійно, якщо у вас є доступ до затискача JST-GH.
33
43
34
44
Наступна діаграма показує приклад шини CAN, що з'єднує автопілот з 4 контролерами ESC CAN та GNSS.
45
+
It includes a redundant bus connected to `CAN 2`.
35
46
36
47

37
48
38
49
На схемі не показано електропроводку.
39
50
Для підтвердження, чи компоненти потребують окремого живлення, чи можуть бути живлені від самої шини CAN, звертайтеся до інструкцій виробника.
40
51
52
+
:::info
41
53
For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax.com/public/cyphal/CyphalCAN-device-interconnection?pageId=2195476) (kb.zubax.com).
42
54
Хоча стаття написана з урахуванням протоколу Cyphal, вона однаково стосується апаратного забезпечення DroneCAN і будь-яких інших налаштувань CAN.
43
55
Для більш складних сценаріїв зверніться до розділу [Про топологію та термінацію шини CAN](https://forum.opencyphal.org/t/on-can-bus-topology-and-termination/1685).
56
+
:::
44
57
45
58
### З’єднання
46
59
@@ -54,7 +67,30 @@ For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax
54
67
55
68
DroneCAN та Cyphal/CAN підтримують використання другого (резервного) інтерфейсу CAN.
56
69
Це абсолютно необов'язково, але збільшує надійність підключення.
57
-
Всі контролери польоту Pixhawk мають 2 інтерфейси CAN; якщо ваші пристрої також підтримують 2 інтерфейси CAN, рекомендується підключити обидва для збільшення безпеки.
70
+
71
+
Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
72
+
73
+
### Flight Controllers with Multiple CAN Ports
74
+
75
+
[Flight Controllers](../flight_controller/index.md) may have up to three independent CAN ports, such as `CAN1`, `CAN2`, `CAN3` (neither DroneCAN or Cyphal support more than three).
76
+
Note that you can't have both DroneCAN and Cyphal running on PX4 at the same time.
77
+
78
+
:::tip
79
+
You only _need_ one CAN port to support an arbitrary number of CAN devices using a particular CAN protocol.
80
+
Don't connect each CAN peripheral to a separate CAN port!
81
+
:::
82
+
83
+
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy).
84
+
If three are three ports, you might use the remaining network for devices that support another CAN protocol.
85
+
86
+
The documentation for your flight controller should indicate which ports are supported/enabled.
87
+
At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console):
88
+
89
+
```sh
90
+
uavcan status
91
+
```
92
+
93
+
Note that you can also check the number of supported CAN interfaces for a board by searching for `CONFIG_BOARD_UAVCAN_INTERFACES` in its [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#) configuration file.
4 in 1 Electronic Speed Controller (ESC) that is made in the USA, NDAA compliant, and DIU Blue Framework listed.
4
+
5
+
The ESC comes in variants without connectors that you can solder in place, and a variant that has built-in motor and battery connectors (no soldering required).
6
+
7
+

This topic lists the main [Electronic Speed Controller (ESC)](../peripherals/esc_motors.md) protocols supported by PX4.
4
+
5
+
## DShot
6
+
7
+
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduced latency, in particular racing multicopters, VTOL vehicles, and so on.
8
+
9
+
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
10
+
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can reverse motor spin directions.
11
+
12
+
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
13
+
Selecting a higher rate DShot ESC in the UI results in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
14
+
15
+
Setup:
16
+
17
+
-[ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
18
+
-[DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
19
+
20
+
## DroneCAN
21
+
22
+
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
23
+
The PX4 implementation is currently limited to update rates of 200 Hz.
24
+
25
+
DroneCAN shares many similar benefits to [DShot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
26
+
27
+
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
28
+
29
+
## PWM
30
+
31
+
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
32
+
33
+
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired speed.
34
+
The pulse width typically ranges between 1000 μs for zero power and 2000 μs for full power.
35
+
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50 Hz and 490 Hz (the theoretical maximum being 500 Hz for a very small "off" cycle).
36
+
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
37
+
For PWM servos 50 Hz is usually sufficient, and many don't support higher rates.
38
+
39
+

40
+
41
+
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the pulse widths representing low and high values can vary significantly.
42
+
Unlike [DShot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
53
+
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
54
+
There are a number of variants of the OneShot protocol, which support different rates.
55
+
PX4 only supports OneShot 125.
56
+
57
+
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125 μs to 250 μs for zero to full power).
58
+
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
59
+
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
60
+
The actual supported rate depends on the ESC used.
61
+
62
+
Setup:
63
+
64
+
-[ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
0 commit comments