Query regarding connecting bigger ESCs
-
Hello team,
-
While going through the guide, I read that currently voxl2 supports only Voxl UART ESC, but what if I already have my ESCs connected and don't want to replace them. Is there any way by which I can connect other bigger ESCs instead of Voxl ESC to Voxl2 ?
-
also ,what motors can be used with the voxl ESC?
-
Currently , 4 motors can be connected with voxl ESC , are you planning to release any product in the future that supports 8?
Thank you.
-
-
Hi @Swaroop-B-Deshpande ,
#1: we are planning on offering a PX4IO like board called VOXL2 IO --> https://docs.modalai.com/voxl2-io/
This is roughly a month away from beta likely, but would provide the ability to drive PWM based ESCs.
You could use a USB to CAN converter and driver CAN based ESCs perhaps, although I don't have recommendations yet.
#2: info here https://docs.modalai.com/modal-esc-datasheet/
#3: VOXL2IO board supports 8CH
-
Hello Swaroop,
The ModalAi ESC can support most common motors. The ESC is rated for 2-4S battery voltage. The current rating is 15-20A continuous (per motor), depending on air cooling. What motors / propellers are you considering using with ModalAi ESC? We have some tools and calibration procedure for adjusting ESC parameters for new motors : https://gitlab.com/voxl-public/flight-core-px4/voxl-esc/-/blob/master/tools/calibration.md
Regarding support of 8 motors, the ModailAi ESC has hardware support for using two 4-in-1 ESCs on a single UART connection (8 ESC channels with IDs 0-7). However, our PX4 ESC driver does not currently support more than 4 motors.
Alex
-
@Alex-Kushleyev Hi Alex,
Juset as a follow up, you say the board supports 2 4-in-1 ESCs on the same UART port. How would you then distinguish between sending commands to ESC 1 vs ESC 2, both connected to the same port?
E.g., I figure it would amount to some version of adding indexes 4-7 to
cmd.len = qc_esc_create_rpm_packet4_fb(_esc_chans[0].rate_req, _esc_chans[1].rate_req, _esc_chans[2].rate_req, _esc_chans[3].rate_req, _esc_chans[0].led, _esc_chans[1].led, _esc_chans[2].led, _esc_chans[3].led, _fb_idx, cmd.buf, sizeof(cmd.buf), _extended_rpm);
but I am not quite sure how ESC1 knows it is 0->3 and ESC2 knows it is 4->7.
-
@Morten-Nissov , as i mentioned before, it is not officially supported right now, but we can explore this potential feature.
The way two 4-in-1 ESCs would communicate, you would connect the UART RX and TX to both of them. However, before doing that, we need to tell one of the ESCs that it should be behaving as IDs 4-7 as opposed to IDs 0-3. When we originally designed this feature, there was a special connection (by default DNI'ed on the ESC PCB), where if you placed a 0-ohm resistor, it would tell all the MCUs on the ESC to behave with "shifted" IDs. However, this feature this has not been tested / used in a long time (due to lack of demand) and the software tools are not set up to support it right now (tools light firmware update, etc :
voxl-esc
).Let me go back and check which ESC boards could potentially support this feature (via the hardware jumper). Then i would need to evaluate how difficult would it be to update the tools for 8 IDs before I could tell you if / when we can support it.
Can you please clarify which ESC board(s) you are considering using for the dual ESC configuration?
Alex
-
@Alex-Kushleyev Understood.
We were thinking of the mini ESSC: https://www.modalai.com/products/voxl-esc-mini?variant=47206467371312. But that's not necessarily a hard requirement, is it written which ones have this jumper? Sorry if I missed it.
We're not opposed to doing some of this ourselves either, if it's not a feature you were planning on or wanted to add. Before seeing this message we were brainstorming re-purposing the GNSS UART for this instead, and other such more "hacky" solutions.
Morten
-
@Morten-Nissov , sorry i was out of office for a few days.
Let me double check the mini ESC, i believe we probably removed that option for the jumper in order to save the space. But there could be other ways to do this.
You are right that it could be possible to use two separate UARTs to achieve this. Then you would not need any change in the ESC itself, but there would be changes on the PX4 side. The easiest option would be to create a clone of the
voxl-esc
driver and have it use a different port and have the functions mapped to motors 5-8 instead of 1-4. I don't see why this would not work, it's not really too hacky, other than duplicating thevoxl-esc
driver, which is a lot easier than changing the single driver to work with 8 channels. You could just create a new module such asvoxl-esc2
or something like thatand may need to modify the code a bit to allow to map motors 5-8 (i think currently you can only map motors 1-4).
This is definitely worth a try if you want to give it a shot. Rough outline of the steps:
- create a copy of the
voxl-esc
driver in px4 and rename it (lets sayvoxl-esc2
) - add the new driver to the build for voxl2 platform
- verify that the new driver can be used instead of the existing driver to achieve the current functionality of
voxl-esc
but using the gps uart port - verify that you can run two drivers at the same time (
voxl-esc
andvoxl-esc2
), you can have them send the same commands at first - modify
voxl-esc2
to map motors 5-8 instead of 1-4 and test controlling all 8 motors independently (you can use actuator test in QGC) - publishing ESC status could be weird because i think all of the ESC status is in one message, but you can disable that or if you only populate the esc status of the appropriate ESCs, that could work (
voxl-esc
to populate esc status 1-4 andvoxl-esc2
would popoulate esc status of 5-8).
Just to summarize, we are not officially supporting this yet (i will need to do more thinking how to do this the easiest way that is in line with our future plans), but i think i provided a summary that should let you do this one your own without any changes in the ESC firmware. If you decided to go for it and run into an issue, i can try to help.
Alex
- create a copy of the
-
@Alex-Kushleyev Sorry for not responding, and thanks for getting back to me.
I was curios if this jumper functionality was available on the mini? I'm guessing no?
Otherwise we'll proceed with your recommendations, it doesn't seem so challenging to implement these changes.
Edit: Just a quick question for a bug we found early on. I've made a copy of the driver and am trying to build it, but I am running into the following error message:
Duplicate parameter definition: VOXL_ESC_FUNC1+
I have removed entries from the params.c to make sure things are not doubly defined, but this one is not even defined there:// The following are auto generated params from control allocator pattern, put here for reference // Default ESC1 to motor2 //PARAM_DEFINE_INT32(VOXL_ESC_FUNC1, 102); //PARAM_DEFINE_INT32(VOXL_ESC_FUNC2, 103); //PARAM_DEFINE_INT32(VOXL_ESC_FUNC3, 101); //PARAM_DEFINE_INT32(VOXL_ESC_FUNC4, 104);
I've looked for other references to
VOXL_ESC_FUNC1
but I am not finding the right place, would you have any idea why this is now getting doubly defined. -
@Morten-Nissov , i believe that module.yaml specifies the param prefix, which is used to generate the params inherited from the control allocator:
https://github.com/modalai/px4-firmware/blob/voxl-dev/src/drivers/actuators/voxl_esc/module.yaml
You would need to change the param prefix for your new module (in yaml and also double check the code to make sure it is using the correct params).
Also, the mini ESC does not have the jumper to modify the IDs, sorry!
Alex
-
@Alex-Kushleyev Do you think it is possible to reuse params between drivers? E.g. those which shouldn't be different between the too like baud, rpm min, rpm max, etc?
I was tempted to implement the extra serial read in the voxl_esc driver for this reason, to avoid doubly defining parameters which should be the same, but this is probably more complicated overall.Also, the mini ESC does not have the jumper to modify the IDs, sorry!
Ah unlucky, but thanks for checking.
-
Yes, that is probably a good idea. so in the clone
voxl-esc
driver, you could just use the params and not define them inmodule.yaml
and if you need to be able to change directions, you can define just the params like VOXL_ESC_SDIR5 ... SDIR8, etc