Help! BLE connection dropping under load!

Please help me diagnostic an issue.
I had been using the Ackmaniac app and monitor for a while, but thought I’d move on with the times and start using VESC Tool mobile. So I bought my BLE NRF51822 modules (https://www.aliexpress.com/item/32842118543.html?spm=a2g0s.9042311.0.0.27424c4dAzkbkF) programmed them, and installed one in my controller box.

The mobile VESC app connected successfully, I could do the firmware update, the setup, tweaking, and all. Everything in the app was working fine on the bench.
Then I took it for a ride to get the RT data telemetry, and as soon as I was doing a strong acceleration, I lost the connection with the error dialog as below

I could keep the connection active forever if riding super mellow, but any stronger load would systematically kill the BLE. Of course the rest was working fine, the controller didn’t shit itself or anything, just the BLE dropping out. And it would always reconnect fine afterwards when clicking on the Reconnect option.
I’d suspect the thread dealing with the BLE traffic wasn’t getting enough processing time once the controller’s load gets past a certain point, but I can’t be certain, and most of all, I can’t fix it!

Few infos:
VESC 4.12 Maytech.
Firmware 3.62
ADC and UART on “Current No Reverse Brake Button” mode.
The load on the VESC is very reasonable, and well within specs. 5065 motor max 40A on large 10S8P battery. So it’s not a problem of sag or overcurrent, etc… and VESC is performing perfectly fine. Just a BLE problem.
Any idea / suggestion?

Try moving around the BLE module. Maybe electromagnetic emission from strong acceleration kills the connection

3 Likes

Could be some ripple on your 5v rail i have a esp32 plugged into my vesc I had to add some caps to smooth out the ripple.

Where is your Bluetooth module in your enclosure? You should be able to extend the wires pretty easily to get it away from certain components.

My old hm10 has about 6inch if wire so I draped it down by the battery, no interference at all

Your screen reads BATTERY 8.30V.
Also check the system for any Ground loops affecting the 3.3V rail. Most modules run on 3.3V =VCC

2 Likes

Thanks,
I believe the Battery reading is just an artefact of computing the voltage with invalid packets before realizing the connection is lost.
Both the bluetooth module and the throttle are hooked on the 3.3V and GND pins off the JST7. 5V is not involved.
Same wiring I had before with the older bluetooth modules / Ackmaniac’s.

I’ll try to move things around inside the box, and see if it’s an interference issue.