# 1. Cyphal/DroneCAN PWM node

The node is designed for light unmanned aerial vehicles (UAVs) and other vehicles to control servos and ESCs.

The node supports 2 interfaces. See the relevant sections for details:

# 1.1. Variations

At the moment we have 3 types of such PWM nodes, so-called Mini v2 node and Micro node. They are shown below.

Mini v2 Micro

1. Micro node is the smallest CAN-PWM converter designed to control 1 - 2 ESC or servo with an external power supply.

Micro node can power the servo, but this is not recommended as, due to the lack of its own DC-DC, all the load will go to the device that powers the micro node. If you need to power a servo, it is recommended to look at mini node v2.

2. Mini v2 node is the CAN-PWM converter designed to control 1-4 ESC or servo. As the node has a built-in DC-DC, a servo can be powered through it. The board also supports receiving feedback from the ESC flame.

The overall differences between the boards are follows:

Criterion Mini v2 Micro
1 dc-dc availability yes no
2 input voltage 2S-6S 4.8-5.6 V
3 input current sensor no no
4 number of output pwm 4 2
5 Vin voltage sensor yes -
6 Number of big CAN 2 0
7 Number of small CAN 2 2
8 Size, LxWxH, mm 42x35x12 20x10x5
9 Weight, g 5 3

# 1.2. Main function

This node receives a setpoint, which can be represented as:

The output for each desired setpoint is a PWM signal with a frequency of 50-400 Hz and a duration of 900 to 2000 us. Typically, 900 us is the minimum position of the servo or stopped motor on the ESC and 2000 us is the maximum. However, this range may be different depending on your actuator and the desired control angle of your servo. You may also wish to invert the output for your servo and set a default position for your servo other than just a min or max, for example a mid position.

Such a mapping can be configured using 4 parameters: channel, min, max, and def which exist for each PWM-channel. They are described in 6. Parameters section.

The node can process up to 2-4 setpoints simultaneously.

# 1.3. Auxiliary functions

1.3.1 Circuit status

The PWM-node, like all of our nodes, measures and publishes 5V, Vin voltages and device temperature.

  • For DroneCAN implementation details please visit the DroneCAN page,
  • For Cyphal implementation details please visit the Cyphal page.

1.3.2 Esc flame feedback

If you use Tmotor esc flame (opens new window) it might be possible to get feedback from it via UART port.

  • for DroneCAN implementation details please check Esc Status,
  • Cyphal implementation is not ready yet.

This feature has been tested on FLAME 80A 12S V2.0 (opens new window).

1.3.3 Log messages

The node can send you a text message when something happens.

At this moment the node can publish messages in 2 ways:

  1. 5 seconds after initialization. Here we can have one of the following messages:
  • If everything is ok, the log level is DEBUG and the message is sys inited
  • If the node has power problems, the log level will be ERROR,
  • If the hardware and software diagnostics fail during initialization, you will get a CRITICAL level message. This shouldn't happen normally, but if does, don't use it in production. In this case, the node will repeat the message every 15 seconds.
  1. When TTL timeout occurs. This message has log level WARNING.

For details of the DroneCAN implementation, see Log Messages.

The Cyphal implementation is not ready yet.

1.3.4 Time to live

Each received setpoint has its own time-to-live timestamp.

If the timeout specified in the parameter is exceeded, the setpoint is set to the default value.

Normally the value of this parameter should be at least in 2 times more than the setpoint publishing rate.

The default value for nodes that don't support configuration via parameters is 0.5 seconds.

1.3.5 Watchdog

The node performs the diagnostic throughout the work time. If the node freezes, it will automatically restarts in 0.6 seconds.

1.3.6 Flight time recorder

The flight time recorder feature allows you to record total time when the node is armed. It can be useful for applications where hardware resources are essential. For some devices, such as internal combustion engines, it's recommended to update in a relatively short period of time, let's say 300-400 hours.

The recorded flight time is stored in flash memory. The limitation of working with flash memory is as follows:

  • it takes time to erase and write data to the memory,
  • the flash memory erase resource is limited. The parameter update does not take place until 0.5 seconds after the node has entered the standby state.

As the PX4 doesn't support ArmingStatus (opens new window) yet, the arm/disarm state is estimated by RawCommand. If all values of these commands are zero or negative, it is estimated as disarm. If any of the command values are positive, it is estimated as arming.

1.3.7 Led indication

This board has an internal LED that can help you to understand possible problems. Please refer to the LED Meaning page for more details.

# 1.4. Software update

The node doesn't yet support software upload via CAN yet. But the next generation of the device will be. We will be using a Kocherga bootloader (opens new window) in the future. At the moment the only way to upload the software is to use a programmer. See the programmer usage section (opens new window) for details.