VOXL-ESC (output) + VOXL IO (output)
-
Hello everyone.
Is it possible to use the ESC that comes by default in the SENTINEL and at the same time the IO Board to connect a deploy servo?
When I put ESC=VOXL_ESC in the voxl-px4.conf the motors work but not the IO Board.
When I put ESC=VOXL2_IO_PWM_ESC the motors do not work but there is a connection with the IO Board (at least the connection).
Is there no way to have the drone motors act through J18 on the VOXL 2 and the servos output through J19 on the IO Board?If it is not possible I see that the VOXL 4 in 1 ESC has a connector (J3) with PWM input and output. Is it possible to use it?
If it is not possible either, having the SENTINEL HARDWARE, how is it possible to install a servo or any deployment device to be commanded from MAVSDK?
First of all, I apologize for how active I have been in the forum, and I appreciate the answers you have given me, but it is a bit urgent for me and I am facing some adversities.
Thank you so much. -
@valvarez This is not a configuration we have ever tried. It may work but you will need to make some changes. First of all you need to start both the ESC driver and the IO board driver and each needs to have their PX4 parameters set appropriately. In order to start both drivers you will need to modify
/usr/bin/voxl-px4-start
to start the drivers you need on the correct ports. -
@valvarez , i believe i have previously tried VOXL_ESC + VOXL2 IO drivers running at the same time and it worked. You just have two output interfaces that you can configure and test via GCS.
As Eric mentioned, you just need to make sure you configure the two drivers to start together and to connect to the correct ports (and baud rates).
Regarding outputting PWM from VOXL_ESC, there is a way to make it work. We do not have the PWM ports on the ESC exposed as normal PWM outputs in PX4, but you can use a special tool / command on voxl2, which will send message to the ESC (via PX4) and control the PWM port:
https://gitlab.com/voxl-public/voxl-sdk/services/voxl-io-server/-/blob/master/tools/voxl-send-esc-pwm-cmd.c (which is also part of our SDK) .
voxl2:/$ voxl-send-esc-pwm-cmd -h Tool to send command a VOXL ESC to make it output a PWM signal If timeout is disabled (default) then the esc will keep sending the same pwm command even after this program exits. If enabled, the signal will stop after 0.5s. Oneshot mode will automatically exit this program after one message is sent to the esc, otherwise it will keep going untill you hit ctrl-C ESC_PIN_M0129_AUX0 2 ESC_PIN_M0129_AUX1 258 ESC_PIN_M0129_AUX2 514 ESC_PIN_M0129_AUX3 770 ESC_PIN_M0129_AUX_REG_EN 6 ESC_PIN_M0129_AUX_REG_ADJ 22 ESC_PIN_M0138_VTX_REG 80 ESC_PIN_M0138_RGB_OUT 24 ESC_PIN_M0138_AUX0 2 ESC_PIN_M0138_AUX1 770 ESC_PIN_M0138_AUX_REG_EN 12 ESC_PIN_M0138_AUX_REG_ADJ 11 D0008_V5_LIGHT_BAR_PIN 2 D0008_V5_PAYLOAD_PIN_0 770 D0008_V5_PAYLOAD_PIN_1 24 -h, --help print this help message -o, --one-shot only send one command then quit, not to be confused with short duration 125us oneshot mode -p, --pin {pin} output pin -t, --timeout enable 0.5s timeout, otherwise pwm will continue indefinitely -w, --width {val} pulse width microseconds (default 1500) typical use: voxl-send-esc-pwm-cmd -p 2 -t -w 1500
You will need to provide the pin number. See the usage helps, which provides the pin mapping (look at pins for M0129 ESC, but pwm pins are the same on M0117, M0134 ESCs as well). For a simple test, you can use pin=2 (meaning this will control Pin A2 on ESC ID 0
), which should control the PWM0 output on your ESC. The 4 PWM outputs on the ESC are each connected to A2 port of the corresponding microcontroller, responsible for each ESC ID. The pin mapping is also documented here : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-io-server/-/blob/master/lib/modal_io.h?ref_type=heads#L66
Alex