Unable to configure LTE modem
-
@h3robotics , I believe you are correct that there is an error in the diagram. We will fix the diagram asap and work with you to make things right. Please give us a chance to evaluate what actually happens if the boards are connected in the way our diagram shows. Basically, it seems like the 3.3V from VOXL2 would be shorted to the GND on the ESC, but it needs further analysis.
-
@h3robotics , are you able to confirm ESC functionality without VOXL2 by connecting it to a power supply and usb-to-serial adapter (GND, RX, TX) to a Linux workstation? You can use
voxl-esc
tools to scan and test spin the ESC: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/tree/master/voxl-esc-tools?ref_type=heads#scanning-for-escsAlso, as you connect the ESC to a power supply (lets say 12V), please note the current draw, which should be around 20-30mA for an idling ESC (motors not spinning) without any load connected to its power regulator outputs. Also, you can verify the blue LED behavior as described here:
https://docs.modalai.com/voxl-escs/faq/#q-what-is-the-behavior-of-the-four-blue-on-board-leds
Furthermore, please use a volt meter to confirm that the voxl power output from the ESC is at 5.0V. This regulator feeds VOXL2 but is also used for the ESC itself (as the first stage of power regulation).
Alex
-
@Alex-Kushleyev just to confirm that I need to use a USB-to-UART (TTLv3.3) cable and connect it to the UART port J1 of the ESC?
Thank you for working through this with me. Really appreciate the support! -
@Alex-Kushleyev here are the results:
- I connected the ESC to a power supply (12V) and USB-UART(3.3v) cable. I was able to successfully scan and spin the ESC. See screenshots below:
I did not have any motors connected to the ESC but I did the spin test. I did see the current on my power supply jump from 38mA to ~55mA and all four LEDs were blinking blue.
-
When idle (ESC not spinning), the power supply was showing a current between 36mA - 38mA.
-
On bootup, the ESC blue LEDs rapidly flash for 1 s and then 2-3 blue blinks and then no blinking. When I spin the ESCs, the blue LEDs start blinking maybe once every second.
-
Using a voltmeter, I can see 5V on the power output.
Let me know the next steps
- I connected the ESC to a power supply (12V) and USB-UART(3.3v) cable. I was able to successfully scan and spin the ESC. See screenshots below:
-
@h3robotics , Thanks for running the test. Yes, 3.3V TTL signal is correct, since ESC uses 3.3V signal levels.
It looks like the ESC test is good so far (as much as we can see without spinning)
Next I would suggest the following:
- unplug the LTE add-on board from VOXL2
- plug in power from the mini ESC into VOXL2
- plug in correct UART cable between VOXL2 and mini ESC
- test the ESC from VOXL2:
adb shell systemctl stop voxl-px4 cd /usr/share/modalai/voxl-esc-tools ./voxl-esc-scan.py ./voxl-esc-spin.py --id 255 --power 0
(the last command will not spin the motors but will print out the voltage and current).
Also while VOXL2 is running, please double check the 5V (going to VOXL2) is still 5V.
Alex
-
@Alex-Kushleyev I followed the steps. The ESC was detected in the scan:
and the run command executed as:
My power supply is at 7.4V since I intend to power the drone with 2S pack. In idle, the power supply shows ~132mA and during the spin test the power supply showed 135mA - 148mA.
- Also the power output is 5V at the ESC when VOXL2 is connected.
-
@h3robotics , OK great, so far it seems like everything is working properly. The M0129 current sensing is accurate to within few hundred mA (because the range is very large, up to 100A+), so it is OK that it is not quite matching up with the 135mA actual current draw.
Is there any indication that VOXL2 is not working properly so far?
One more thing to check.. since there was a possibility of a short of 3.3V coming from VOXL2 to GND, let's check that. You can test it at VOXL2 pin 1 on J18 or also pin1 on J10 (https://docs.modalai.com/voxl2-connectors/#j18-uart-esc). You could plug in a JST GH connector into either port (maybe J10 is easier, since J18 is populated by the ESC connection) and carefully check voltage present between pin1 and GND.
I can see that 3.3V is fed into the LTE Modem board, so if 3.3V is not present, this would be an issue.
Alex
-
@Alex-Kushleyev it seems like after the wiring fix for the ESC, everything started to work properly.
- I measured the voltage b/w GND and pin 1 of J18 and it was around 3.3V.
- I also was able to configure the LTE modem without any issue.
- The ONLY problem I have now is that I don't see any battery voltage (or info) in voxl portal UI or QGround Control. I have the VOXL2 and Mini 4-in-1 ESC connected. I am under the impression that the ESC publishes battery info via the UART connection to the VOXL2 and the voxl-px4 service uses that to publish battery info? Am I correct? Am I missing something in the PX4 parameters or VOXL configuration?
Thank you for all your help!
-
@h3robotics What is the setting of the VOXL_ESC_PUB_BST PX4 parameter? If you issue
px4-listener battery_status
from the command line what do you get? -
@Eric-Katzfey VOXL_ESC_PUB_BST = Enabled and px4-listener battery_status gives "never published".
-
@h3robotics , did you set VOXL_ESC_PUB_BST to 1? it should be a 0 or 1, not "Enabled". please double check.
-
@Alex-Kushleyev No, it was default. I am using the latest QGround Control. Here are some images of the parameters.
All voxl related parameters:
VOXL_ESC_PUB_BST:
I also double checked using manual entry:
Let me know if that helps.
-
@h3robotics , I see, thanks for clarifying.
Is the ESC detected by PX4? What you can do is stop the px4 service using
systemctl stop voxl-px4
and then run the px4 in a terminal :voxl-px4 -d
, this will start px4 with an interactive px4 shell. You can also see debug prints from different modules that are starting up. Look for the voxl_esc module, it should say whether it was able to detect the ESC and, if so, then it will print some information about the ESC, such as its type, firmware version, etc.If the ESC is not detected, then you may have ESC parameters set up for incorrect baud rate (your PX4 params expect 2mbit, but perhaps your ESC is using lower bit rate, so you can update your ESC params to 2mbit). It is possible that your ESC is using 250K baud rate which is what it may ship with, so you can try 250K in PX4 to test that. If your ESC is set up for the lower bit rate, i would suggest updating that to at least 921600, or 1mbit or 2mbit in order to reduce delay and support the throughput for the ESC commands and telemetry.
Alex
-
@Alex-Kushleyev That was it! I first tried with a lower baud rate of 250K on PX4 and I started getting the battery info. Then as you recommended, I uploaded new parameters to the ESC. I used:
python3 voxl-esc-upload-params.py --params-file ../voxl-esc-params/D0014_starling_1504_3000kv_ms_props/D0014_starling_1504_3000kv_ms_props.xml
because I will be using it on a drone of similar size and performance. Then with 2M baud rate in PX4, I was able to make it work!
Thank you.