Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Jul 1, 2024
1 parent eb037a2 commit c1cba0d
Showing 1 changed file with 38 additions and 15 deletions.
53 changes: 38 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,62 @@

# Mini v2 Cyphal/DroneCAN application template

This repo introduces a simple ready-to-use Cyphal/DroneCAN application template for [RL Mini v2](https://docs.raccoonlab.co/guide/can_pwm/can_pwm_mini_v2.html) node.
This repo introduces a simple ready-to-use Cyphal/DroneCAN application template for [RL Mini v2](https://docs.raccoonlab.co/guide/can_pwm/can_pwm_mini_v2.html) and [RL Mini v3](https://docs.raccoonlab.co/guide/can_pwm/mini_v3.html) nodes.

Please, refer Wiki for details:
- [Cyphal template application](https://github.com/RaccoonlabDev/mini_v2_node/wiki/Cyphal-application),
- [DroneCAN template application](https://github.com/RaccoonlabDev/mini_v2_node/wiki/DroneCAN-application).

### 1. Key features

- Minimal recommended Cyphal features are supported out of the box (bootloader and DNA are coming next),
- Minimal recommended Cyphal features are supported out of the box,
- You can run the software in SITL mode (don't need to have any hardware),
- Cyphal firmware binary is only 35.2 KB.

### 2. Brief hardware info
Not suported yet / Roadmap:
- Both Cyphal/CAN and DroneCAN protocols in a single firmware
- Bootloader
- Dynamics Node Allocation (DNA)

| Top view | Bottom view | Pinout | STM32CubeMX |
| --- | ------ |-|-|
| <img src="https://docs.raccoonlab.co/assets/img/view_top.6b0ef99e.png" alt="drawing" width="200"> | <img src="https://docs.raccoonlab.co/assets/img/view_bottom.ee41f6d5.png" alt="drawing" width="200"> | <img src="https://docs.raccoonlab.co/assets/img/pinout.c14a3021.png" alt="drawing" width="200"> | <img src="https://raw.githubusercontent.com/RaccoonLabHardware/mini_v2_stm32cubemx_project/main/Assets/stm32cubemx.png" alt="drawing" width="200"> |
### 2. Supported boards

### 3. Brief Cyphal capabilities
The software supports RL v2 nodes (stm32f103, 128 KBytes flash) and v3 nodes (stm32g0b1, 512 KBytes flash).

By default the application is as simple as possible. It just blinks the RGB LED, subscribes to the setpoint topic to control a single PWM (PWM1) and publishes a feedback with the latest applied setpoint. It doesn't have any safety features like TTL, but you are free to extend it as you want.
| Name | View | Pinout | STM32CubeMX |
| ---- | ---- | ------ | ----------- |
| Mini v2 | <img src="https://docs.raccoonlab.co/assets/img/view_top.6b0ef99e.png" alt="drawing" width="150"> | <img src="https://docs.raccoonlab.co/assets/img/pinout.c14a3021.png" alt="drawing" width="150"> | <img src="https://raw.githubusercontent.com/RaccoonLabHardware/mini_v2_stm32cubemx_project/main/Assets/stm32cubemx.png" alt="drawing" width="200"> |
| Mini v3 | <img src="https://docs.raccoonlab.co/assets/img/t-view-bottom.7eadba26.png" alt="drawing" width="150"> | <img src="https://docs.raccoonlab.co/assets/img/pinout.e7b1d6b7.png" alt="drawing" width="150"> | <img src="https://github.com/RaccoonLabHardware/v3-software-template/blob/main/Assets/stm32cubemx.png" alt="drawing" width="200"> |

The default capabilities of the node are shown on the picture below:
### 3. Brief Cyphal/DroneCAN capabilities

<img src="https://raw.githubusercontent.com/wiki/RaccoonlabDev/mini_v2_node/assets/yukon.png" alt="drawing">
You can build the software either for Cyphal/CAN or DroneCAN. By default both applications are as simple as possible. They:
- subscribe on setpoint topics and control PWM1-4 channels,
- measure 5v and Vin voltage, temperature, current (if supported) and publish as circuit status and actuator feedback,
- blink the RGB LED to indicate the current state.

### 4. Brief DroneCAN capabilities
In the table below you can see interfaces of the applications.

The application subscribes on a message configured in `pwm.cmd_type`. It supports: [esc.RawCommand](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#rawcommand), [actuator.ArrayCommand](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#arraycommand), [hardpoint.Command](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#command-1). It controls the PWM and sends back [esc.Status](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#status-2), [actuator.Status](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#status), [hardpoint.Status](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#status-3) as feedback. It also sends [power.CircuitStatus](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#circuitstatus) with the circuit state (5v voltage, vin voltage, current) and [device.Temperature](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#temperature) with stm32 internal measured temperature.
| Cyphal/CAN | DroneCAN |
| ---------- | -------- |
| Subscribe on: </br> - setpoint ([reg.udral.service.actuator.common.sp.Vector31](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/reg/udral/service/actuator/common/sp/Vector31.0.1.dsdl)) </br> </br> </br> Publish: </br> - feedback ([reg.udral.service.actuator.common.Feedback](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/reg/udral/service/actuator/common/Feedback.0.1.dsdl)) </br> - crct.5v ([uavcan.si.unit.voltage.Scalar](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/uavcan/si/unit/voltage/Scalar.1.0.dsdl)) </br> - crct.vin ([uavcan.si.unit.voltage.Scalar](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/uavcan/si/unit/voltage/Scalar.1.0.dsdl)) </br> - crct.temp ([uavcan.si.unit.temperature.Scalar](https://github.com/OpenCyphal/public_regulated_data_types/blob/master/uavcan/si/unit/temperature/Scalar.1.0.dsdl)) </br> . | Subscribe on: </br> - [uavcan.equipment.esc.RawCommand](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#rawcommand) </br> - [uavcan.equipment.actuator.ArrayCommand](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#arraycommand) </br> - [uavcan.equipment.hardpoint.Command](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#command-1) </br> Publish: </br > - [uavcan.equipment.esc.Status](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#status-2) </br > - [uavcan.equipment.actuator.Status](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#status) </br > - [uavcan.equipment.hardpoint.Status](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#status-3) </br > - [uavcan.equipment.power.CircuitStatus](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#circuitstatus) </br> - [uavcan.equipment.device.Temperature](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#temperature) |
| <img src="https://raw.githubusercontent.com/wiki/RaccoonlabDev/mini_v2_node/assets/yukon.png" alt="drawing" width=450> | <img src="https://raw.githubusercontent.com/wiki/RaccoonlabDev/mini_v2_node/assets/dronecan_interface.png" alt="drawing" width=152> <img src="https://raw.githubusercontent.com/wiki/RaccoonlabDev/mini_v2_node/assets/dronecan_params.png" alt="drawing" width=147> |

|||
|-|-|
| <img src="https://raw.githubusercontent.com/wiki/RaccoonlabDev/mini_v2_node/assets/dronecan_interface.png" alt="drawing" width=305> | <img src="https://raw.githubusercontent.com/wiki/RaccoonlabDev/mini_v2_node/assets/dronecan_params.png" alt="drawing" width=295> |
### 4. Use cases

1. Control 1-4 motors without feedback or servos with current feedback (if hardware supports)

<img src="https://docs.raccoonlab.co/assets/img/mini_v2_with_servo.4761fdf2.png" alt="drawing" width="400">

2. Control 1-2 motors with UART/ADC feedback

<img src="https://docs.raccoonlab.co/assets/img/mini_v2_with_esc_flame.0ffb552f.png" alt="drawing" width="400">

3. Cyphal/DroneCAN adapter for I2C/UART sensor

<img src="https://docs.raccoonlab.co/assets/img/lw20_i2c.82bad2a4.png" alt="drawing" width="400">

4. Control a servo with current (if hardware supports) and angular position feedback with [AS5600 I2C sensor](https://docs.raccoonlab.co/guide/as5600/)
5. Control a PWM cargo gripper

### 5. Q&A

Expand Down

0 comments on commit c1cba0d

Please sign in to comment.