VESC control question

Hi!

I’m hoping the resident experts here can help me with a configuration question. This isn’t for a foil, but y’all deal with very similar issues.

I’m trying to create a simple control system for a diver propulsion vehicle. Bluetooth obviously doesn’t work under water, so this needs to be controlled by a hard wired configuration.

I want two buttons - one for a low/medium throttle setting and one for fast.

Can anyone give me an “Idiot’s Guide” to how I should wire a VESC (4.x) to make this happen?

Much appreciate any help y’all can offer.

-Ben

I guess the easiest would be to make a voltage divider like:

  • 0v (GND, no switch pressed but with >10kOhm Pull-Down) is motor stop
  • 1.5V (x kOhm to 3V and x kOhm to GND (take what ever resistor you have on hand, just should be 2x the same and in kOhm range) goes to Switch 1
  • 3V (from 3V rail) goes to Switch 2

Then you take all 3 wires (Switch 1, 2 and GND-Pulldown) and attach them to ADC1 of the VESC.
In the VESC tool you take ADC in the APP menu and map the power level/RPM you’d like to have at each setting.

Ok cool.

So having now found what may be a suitable Mom-Off-Mom toggle that I can seal, would the following be the right way to construct this? (I’m a visual person :slight_smile:

Oh, and if I wanted to use a pot so I can tune the magnitude of the low throttle setting, would I use that in place of the 5K resistors? ie:

Term 1 to GND
Term 3 to 3V
Term 2 to the switch

1 Like

Looks fine.
Usually you use for pulldown ~10x the resistance than for the rest, but since the VESC let you configure everything it doesnt matter if your mid voltage is 1.5V or 1.45V.

That would be the hardware approach to do that, but since I only like potis in breadboards, I would not do that (you need to glue it anyway for longtime solution, otherwise it will turn by itself by vibrations).
So you can just adjust the powerlevels in the vesc software via USB or e.g. by connecting a HM-10 BLE module you can do it in fieldtests as well.

Ok. So I’ve got the wiring part working. Thanks a bunch, Giga!

What I’m now wrestling with is the programming using VESC_Tool. I’ve selected “Current” as the ADC type, but I get the same RPM, seemingly regardless of the parameters I set.

I’m wondering if that’s because I have no load on the thing and so it’s hitting the RPM limit at any current, but I dunno. Is there a primer on the ADC control mapping out there that’s relevant to what I’m trying to do here? There are a whole lot of parameters here and the hunt-and-peck approach isn’t that appealing :slight_smile:

Correct. With current control without any load you end up with full speed. Try dutycycle instead to test your setup. You may use current control if you want a limited power and dutycycle to have a limited velocity.

Current « control input »: full rpm off load from start to 100% throttle , never tried it on efoil , eskate seems to be ok …
ppm classic ( duty) input : rpm = throttle