# DroneCAN UI LEDS node
The node is designed for light unmanned aerial (UAV) and other vehicles.
The node blinks LEDs either by the command received from the autopilot or by the configured behavior. It might be used as aviation navigation lights (opens new window).
For interface related details please refer DroneCAN interface. For hardware related details please refer to hardware page.
# 1.1. Variations
There are different board types.
№ | Feature | v1.0 | v2.0 |
---|---|---|---|
1 | Number of LEDs | 15 | 32 |
2 | Number of CAN connectors | 1 | 2 |
3 | Size, mm | 40x100 | 40x72 |
4 | Status | Deprecated | ok |
# 1.2. Main function description
The node receives LightsCommand (opens new window) and RawCommand (opens new window) and sets the led color corresponded to the DroneCan parameters.
It works in 2 modes:
- If there is no RawCommand (opens new window) or his value is equal or less than zero, the led value will be based on LightsCommand (opens new window) value. Depending on ID configured in node parameters and PX4 parameters, it might be RGB UI led value or some UAVCAN light operation mode. Study PX4 user manual LED meaning section (opens new window) and PX4 DroneCan parameters (opens new window).
- Otherwise, the value of LED will be defined by DroneCan parameter. It might be solid, blinking or pulsing lighting.
See 6. Parameters section for mode details.
# 1.3. Auxiliary functions description
# 1.3.1 Node info
Every firmware store following info that might be received as a response on NodeInfo request. It stores:
- software version,
- hardware version (doen't work yet),
- an unique identifier.
# 1.3.2 Log messages
The node may inform you when something happen using uavcan.protocol.debug.LogMessage (opens new window).
At that moments the node may publishes messages only 5 second after enabling. Here we can have one of following messages:
- If everything is ok, the log level is
DEBUG
and the message issys inited
- If the node have power problems, the log level is
ERROR
, - If the hardware and software diagnostic fails during initialization, you will get a
CRITICAL
level message. This should not happen in normal condition, but if so, don't use it in production. In this case, the node repeats the message each 15 seconds.
A visualization of this message in gui_tool
in case of error shown on a picture below.
Fig. Visualization of log messages in uavcan_gui_tool after initialization with log_level=0
This message might be used in PX4 as logmessage (opens new window) feature.
# 1.3.3 Device temperature
The node has an internal temperature sensor. It sends the temperature of the stm32 controller each 0.5 seconds.
If the temperature goes above 60 °C, the controller will automatically decrease the maximum intensity. If the temperature goes above 80 °C the leds will be disabled for the safety purpose.
Typically, it's not an issue if you use only one color of the leds (red, blue or green) even with the highest intensity. But the overheat may appear if you use white color because it forces RGB leds to use all 3 internal leds.
# 1.3.4. Led indication
This board has an internal led that may allows you to understand possible problems. It blinks from 1 to 10 times within 4 seconds. By counting the number of blinks you can define the code of current status.
Number of blinks | Uavcan health | Description |
---|---|---|
1 | OK | Everything is ok. |
2 | OK | There is no RawCommand at least for the last 0.5 seconds, the PWM state is reset to default state. |
3 | WARNING | This node can't see any other nodes in the DroneCan network, check your cables. |
4 | ERROR | There is a problem with circuit voltage, look at the circuit status message to get details. It may happen when you power it from SWD, otherwise, be careful with the power supply. |
5 | CRITICAL | There is a problem with the periphery initialization level. Probably you load the wrong firmware. |
# 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.