VESC: Can I make PAS work better than ADC with only torque?

Joined
Nov 13, 2020
Messages
64
Location
Rensselaer, Indiana
I'm reviving a kid bike I started years ago. I finally got a decent (48V 9.6Ah) battery mounted and swapped out a faulty BB connector/coil. It works! It's back to where it was. Now I need to tweak the software.

I've always controlled it using only the T9 torque sensor feeding ADC1 in ADC mode. That runs Current configuation with braking. I set the start voltage and the center voltage to be equal so that when there's no pedal torque it starts braking. It's safe but annoying. I disabled braking today and it was so much more fun to ride on the road. I want to do better.

I've stayed away from PAS mode because it wasn't even developed when I was last working on this, and because I want mostly torque-based control. I want basically what I have right now (push the pedal and get instant assist) with the addition that if there's no cadence signal for some period, braking commences. (I also want to add brake lever signals.)

I haven't found current information about VESC PAS mode but there are lots of posts about it. It seems like it might limit me. Is it what I want? I welcome insight and pointers.

--kyler

363894234_258141666995110_7292797888680620612_n.jpg
 
I tried "ADC + PAS" mode and could not quite make out the configuration. I have a feeling that most people are after a much different control mechanism than I am.

I expect I need to make a custom app. I'd like to do things like "Don't add power until 1.8V on ADC1 if the cadence sensor has been quiet. Otherwise, begin at 1.65V." I'm hopeful that I'll be able to modify the ADC app.
 
EDIT: I misunderstood what you were looking for, so the below doesn't apply. I'm leaving it here anyway for anyone that might be looking to do what I thought you were after. :oops:

If VESC (custom or not) doesn't directly support torque-PAS only (no cadence), you could use the latest versions of the Cycle Analyst from Grin; the firmware now supports this mode.

I have been putting off testing it on my SB Cruiser setup; everytime I set aside time to do it (and undo it if necessary), something has always come up.... but it *should* work fine.


The caveat of torque-only is that if the sensor drifts much in output voltage in a way that encroaches above minimum throttle input voltage, it could start driving the system even without user input.

Also, depending on the TS's actual operation / design, it may respond to just standing on a pedal or some other non-riding input and cause the bike to move undesirably.

For my usage, I would probably have a safety sensor that must be engaged for the TS to do anything. Either something on the grip that requires my hand in place, or something under my seat requiring *me* in place, or a manual non-latching switch I must hold while riding. One reason this could be needed when I get on the trike, I may have to put a foot on a pedal and push myself back / up onto the seat, and with TS-only control, that could trigger motor operation I don't want.

So, consider your usage, and all scenarios in which pedals may be touched, or pushed on, and be sure that there aren't any ways in which you could inadvertently trigger motor operation. If there are (probably will be), I'd setup a safety "deadman" switch that must be constantly manually engaged in order for the TS to work. (if it is latchable then it can be forgotten and left engaged, allowing a situation with undesired operation).
 
364389636_307073758454910_659857928139362776_n.jpg
I chickened out (for now) on making my own app. I switched to a Flipsky 75100, which seems to have a lot less noise on the ADC. I mounted it to the downtube. I then dialed in the motor/battery/ADC settings. Filtered input, 0.0 ramp up, and 1.5 seconds ramp down really smooths the ride. I limited current to +20A/-15A. I set the motor temperature cutoff to the highest value because I don't have a temp. sensor and it was floating all over, occasionally limiting output. The 140mm crank arms are from unicycle.com.

It is *so* much fun! Seriously, I keep taking it for "test rides" even though it's working great. I'm wishing I had a bike like this in my frame size. I have some 26" fat tires to convert but 20" feels like a much better place to be for the low torque of a direct-drive motor. I'm mulling over the possibility of overhauling my Lectra XP...
 
The little bike projects end up being the most fun.

I couldn't quite follow, did you end up with some kind of pedal sensor on there afterall?

Did you have to mod the 75100? I have seen some recommendations for beefing up a few solders and applying heatsink paste between the mosfet heat spreader and the case.
 
The pedal torque sensor is a 100mm T9. I didn't modify the 75100 except to solder the motor wires straight from the Higo connector (and the end caps).
 
There's no throttle. There's only a switch on the battery. It's as simple as I could make it. (I think about waking my new T17 builds with backward pedaling.)
 
Cool. Thanks for the info.

I end up with lots of misc ebike parts and small projects. I've been thinking about one of these 75100s just to have a cheap standard platform to get things tested and running. I used to use cheap "infineon" ebike controllers but the configuration software doesn't work anymore and I guess there is not enough interest out there to save it.

The vesc platform seems to be the most versatile so I guess its about time I jump in. The auto hall/phase detection will be nice.
 
I have been flailing, buying lots of controllers in an attempt to find a better solution than the Flipsky 75100. But I keep coming back to it. I feel like the obvious answer is to build my own controller but I haven't been able to get over the thought that there isn't anything better out there already.
 
I think there are lots of better options just not at a non serious price. I think this flipsky seems perfect for those cheap projects you dont really need in your life like free scooters or razor minibikes for the kids.

Im hoping to use this 75100 for a cyclone mid drive I am setting up for a friend. He is waffling on whether to get an ebike or not. I had a spare bike and got an old cyclone kit for $100. The cyclone controller is like 6"x6"x2". It doesnt fit anywhere on the bike. If he likes the bike I'll sell it to him for a few hundred bucks if not I'll use the kit somewhere else. I'm just hesitant to buy an expensive controller for this completely unnecessary endeavor.

For serious stuff I am a big fan of the Nucular controllers.

This one looks fun if you are already used to the vesc platform

Or maybe this monster:
 
I have a bunch of Trampa MkVs and I appreciate their quality. The STR-500 looks great for some projects, but not for little ones. I ordered a couple of Go-FOC M100s last month. I'll tear one down and see if the PCB is usable in a battery base.

Nucular looks like good hardware but doesn't appear to be programmable.

I got a few Vanda Electronics boards last week. I'm hopeful that they're not junk.
 
The Nucular 6fet I have is very configurable. I don't know how programmable you need but it definitely has a lot of advanced options. You can configure throttle ramps and variable regen. It does auto motor detection but you can manually tune PID settings from there. It handles halls or encoders. It has soft start clutch modes for eliminating backlash on pedal assist setups. It is really advanced compared to the options from a few years ago. The waiting list is a bummer and they aren't cheap.

It was my first taste of FOC and true current based throttle. What an amazing difference from what I was used to.
 
Wait...other controllers don't have "current based throttles"? Hmmm...I took out my Lectra XP yesterday to look for a dog in the woods. It's the stock controller and I've disabled the damn PAS so it's throttle-only. It still seems unresponsive. What is the control method generally used for throttles? It sucks.

The Nucular stock settings are likely enough for much of what I do but I'd likely need to add a microcontroller for some functions (like "coaster brake"). The price is high enough that I'm more inclined to make my own that has everything I need. I appreciate the pointer, though.
 
Wait...other controllers don't have "current based throttles"?
Anything that's FOC (field oriented control) almost certainly does, but if it isn't, it's rare to have a torque(current)-modulating throttle, most have speed(voltage)-modulating throttles. There are a few "torque simulation" types that modulate *battery* current instead of motor voltage, but they aren't modulating the motor current, so it's not actual torque-control.

Just about anything with PAS / assist levels is the latter type, and worse, the assist levels are usually just speed settings, so that if you pedal *at all*, it engages the motor at that full speed of that level. The "torque simulation" ones use the PAS to engage the motor at that full *battery current* of that level, so you get no modulation, no control over the amount of motor power via the pedals.

A torque sensing PAS can allow some modulation of the motor speed or system power, etc., depending on how it's set up, but few systems have these and fewer use them well.

Even a cadence-sensing PAS *can* be used well to modulate motor speed or system power or even motor torque, but there's only two systems I know for sure that can do that. The Cycle Analyst v3.x can do this by reading all your sensors and creating a throttle signal to modulate whatever kind of controller you have. The PHaserunner v6 (and possibly earlier ones) can directly accept the PAS and you can set it up to vary motor torque just like the throttle can for it.

VESC *can* have that option, but I don't know which versions do or how well it works.


BTW: having a torque sensor for the PAS is not the same as torque-modulating throttle, either, it just means it detects the force on the pedals and not just their rotation speed (or that they are rotating), and the system is usually still just using that to control the speed of the motor, not the torque(current) of it.
 
BTW, if you're going to use the Flipsky 75100 a lot, you need to be aware that there are fakes out there. I've gotten two through Amazon that had large bolts glued to the interior instead of PCBs. At least apply power and see if the LED lights before you shelve one.
 
Sounds like the fake 18650/etc cells (filled with sand or flour)... :(

Which shops on Amazon did yours come from, so they can be avoided?
 
I'm thinking about changing from KT Controllers to a FlipSky Dual VESC and was doing some research on PAS. Isn't it easier to use an ESP32/Arduino to modulate a throttle signal from the PAS sensor based on cadence?

Something like:
0 - 40 rpm -> 1.3v throttle
40 - 60 rpm -> 1.9v throttle
And so on...

You can then wire the generated signal with the original throttle using some diodes.

I know nothing about VESC so maybe you can do this type of programming inside it as I've been seeing apps being mentioned.
 
Back
Top