You are here

Native PAS PEDELEC support

42 posts / 0 new
Last post
shaman
Offline
Last seen: 1 month 4 weeks ago
VESC Free
Joined: 2018-12-09 15:59
Posts: 60
Native PAS PEDELEC support

Any chance of adding PAS/PEDELEC capabilities to the VESC Tool/firmware? Maybe could be an option in the setup wizard to do this? Could be useful for the ebikers.

benjamin
Offline
Last seen: 1 day 9 hours ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

This has been in the software todo list for a while, but I haven't implemented it yet. The reason is that this usually is a legal requirement, and another legal requirement (in Sweden at least) is that the motor has a power below 250 W, which makes most VESC hardware kind of overkill.

Out of curiosity, are there places where a PAS sensor is required, but the allowed power is higher? Also, is it desirable for e.g. convenience to have a PAS sensor instead of a throttle? I can put it on higher priority if there are more good reasons to use a PAS sensor.

shaman
Offline
Last seen: 1 month 4 weeks ago
VESC Free
Joined: 2018-12-09 15:59
Posts: 60

It depends on the country or even state at to whether or not power(watts) is the limiting factor. Some places make speed the limiting factor rather than power. The laws are especially different outside the UK or EU. There is a decent summary of laws in various countries and states in the article below.

https://wheelsgo.net/government-standards-for-electric-bicycles-in-vario...

Being able to adjust power/speed profiles along with pedal assist can be good for travelers taking their ebike from State to State or from Country to Country where laws can change. 

storklompen
storklompen's picture
Offline
Last seen: 5 years 3 months ago
Joined: 2019-07-30 12:25
Posts: 2

For Sweden and all other EU countries Electric bikes should be constructed according to EN15194, which for the Motor means "the maximum continuous rated power shall be measured according to EN 60034-1 when the motor reaches its thermal equilibrium as specified by the manufacturer."

EN15194 though doesn't use the word controller specifically, and mostly doesn't seem to know that it exist, more then as part of the motor.

There are 2 thing to consider though:

1 You are still allowed to build your own E-bike without CE-marking, as long as it is safe in traffic, has a safe electrical installation, use PAS for powering the motor, and the motor or electronics has a continuous effect of 250W, and you are not planning on selling it.

2 Most european countries have some extra regulations which equals small motor driven devices to pedestrians as long as they have the speed of a pedestrian (<5km/h)

 

--
Cargo bikes, the bigger, the better.

storklompen
storklompen's picture
Offline
Last seen: 5 years 3 months ago
Joined: 2019-07-30 12:25
Posts: 2

With that said.

I'm planning on making/remaking/adding to the VESC all the components to make my cargobikes as lawfull as possible.

For the moment being:

  1. PAS sensor (cheap cots)
  2. Speed sensor (cheap cots, magnet in wheel)
  3. Display with info (cheap cots, maybe the bafang which is reprogrammable)
  4. Possibility to set power level like other e-bikes have. (3 step, cots)
  5. Brake sensors (power switch off)
  6. thumb throttle only working when PAS active
  7. Software which will use upp 1000 Watt up to 8km/h and 250 Watt when over 20 km/h. (this will make it work according to legal when tested in a roller bank. I'll call it the VAG patch.)
  8. Probably an extra 1000 Watt motor for upp to 5km/h when the primary maxes out in slopes...

 

 

 

--
Cargo bikes, the bigger, the better.

schagg
Offline
Last seen: 1 year 7 months ago
Joined: 2018-03-16 19:38
Posts: 1

For someone wich is just able to use his feets (loosen the arms)......?

derlucas (github bldc app-ev.h ) forked the vesc-tool not bad. the problem is the non-sence of pedal-direction...wich could be very dangerous.

if a hall sensor is used, the duty-cycle gives info about direction.

sadly im not able to figure out how to do...

 

calibratable should be:

min cycles (magnets passing) before start ( safety)

duty < or > 50% (if magnet disk mounted other direction)

stop after x sec no cycle (safety)

pas together with throttle (throttle till x km\h then only max if pas active),\

pas independent (cadence x transmissionfactor x correcture potentiometer)

speed (wheel diameter x signals)

 

pin layout:

the ppm for hall-pas-sensor (15kohm between + and signal as pullup)

the adc1 as throttle (duty cycle or current)

tx speed (if gnd = one pulse)

rx limit erpm to x (while gnd active) (for gearshift)

break leavers could just drop down the adc1

adc2 pushaid?
 

hope to find somone who can help me.

ps: in swiss till 25kmh/500w ......... for s-pedelec 45kmh/1000w

 

Thank you and have a nice time

th0masrtg
Offline
Last seen: 1 year 11 months ago
Joined: 2019-05-22 11:52
Posts: 9

Hi, I am as well looking for a PAS / Torque sensor support for my ebike which uses a thumb throttle on the vesc at the minute. 

In termes of law, it is said that the power limit is 250w but it is rarely respected by the manufacturer (bosh /shimano), the bike is electronically blocked to never exceed the 25km/h but still get torque, then it must be geared by PAS sensor.

I would love to use a such sensor on my 1000w ebike. 

Ecyclist
Ecyclist's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2018-09-18 02:43
Posts: 17

I would love to have PAS / Torque sensor on my e-bike. I built a mountain bike with VESC and 6374 motor and it is perfect for off roading. No problems with state laws as long as I ride boondocks.

Les

vadicus
Offline
Last seen: 1 month 1 week ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

The US and California laws in particular are pretty generous for the amount of power you can have on your ebike and not require registration, insurance, etc: 750watts. The power output, however, is mentioned only in the federal regulations and that's almost unenforceable on this premise because local authorities follow the letter of state, municipal, county laws that are traditionally stricter than the federal ones. However, CA state law uses the speed as the main reference point, so if you don't do silly things like going 40mph on a sidewalk or a bike trail, you should be fine. You would need to have 20mph limit though to be legal on trails. If you go up to 28mph, you would need to be at least 16 years old and wear helmet. Can use the bike anywhere except bike trails. Some local parks, however, specifically prohibit ebikes, skateboards, etc.  That's usually those parks that run at the county level. State parks are more open. The law also explicitly prohibits modifying ebikes for high speed which would not make a lot of sense when you put it together yourself. But if you really want to go fast, pedaling or not, it's not too hard to register it. That would be a licensed vehicle from that point, however, which means no access to places that you would normally have on a non-registered compliant bike.

So, anyhow, a PAS would be good in most parts of the US.  

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

parasole
Offline
Last seen: 3 years 8 months ago
Joined: 2017-11-08 09:50
Posts: 11

@Schagg, I did try derlucas build, however, could not make it work, I don't think it is fully functional... 

JR ebikes
Offline
Last seen: 7 months 3 weeks ago
Joined: 2020-06-04 18:39
Posts: 2

YES ..... please add PAS capability!  DIY builders worldwide would order the Vesc with PAS for ebikes.   

Oli.Hall
Offline
Last seen: 2 years 2 weeks ago
Joined: 2020-06-16 16:08
Posts: 3

Hi Benjamin,

I would also be very interested in an Ebike app with PAS support for the VESC!

You mentioned that the 250W power limit in EU countries might possibly make the VESC excessive but I think the VESC would be perfect for ebike usage if the firmware was to support it natively.

The 250W limit defined in EU directive EN15194 only limits continuous rated motor power. The wording of the directive does not specify a limit for peak power and because of this many factory fitted systems from Bosch, Yamaha and Shimano regularly have peak power outputs of ~800W making the VESC a very desirable option for an Ebike. The directive is far more concerned with the 25kph speed limit and that assistance is only provided when pedalling.

The VESC6 appears to also have enough inputs to support all the regular ebike accessories, throttle, brake, pas, torque sensor and a serial display connection.

Please let me know if you would be interested in developing pas support it as I would be very interested in beta testing it. 

Kind regards.

Oli.

 

radler
Offline
Last seen: 4 years 4 days ago
Joined: 2020-06-20 16:57
Posts: 7

for the time being, we must confine ourselves with an intermediate pathway. One possible route is
PAS -> arduino -> PPM -> vesc, example rc filter and arduino code here https://endless-sphere.com/forums/viewtopic.php?f=2&t=87116

Once we run an additional mcu (arduino) next to the esc, this opens the question which other functionality could move from there. In the end, cheap RC escs become possible to use with other sensors for voltage and current attached to the arduino and many of the vesc niceties moved there. All this was not neccessary to debate over if we only had PAS functionality in the VESC firmware. Maybe ater all VESC is not an ideal choice for ebikes/pedelecs?

dancing with bikes

Oli.Hall
Offline
Last seen: 2 years 2 weeks ago
Joined: 2020-06-16 16:08
Posts: 3

Hi radler,

Regarding the Arduino route, there is actually already a very good solution that goes: PAS -> Arduino <-> Serial <-> VESC

It uses a fork of the well documented ForumsController code running on a Teensy 3.2 which gives similar functionality to the CA but in a much smaller package, see here: https://www.pedelecs.co.uk/forum/threads/gsm-middrive-with-vesc-and-teensy-forumscontroller-conversion.25787/

The Teensy 3.2 is 3.3v logic, but 5v tolerant and it has enough serial capable pins to also connect to various existing ebike displays. This is the route I will probably take as it does not require any external components you can connect all the digital inputs like brake and pas straight in, but a resistor divider is recommended on the throttle input to reduce the throttle voltage to the 0-3.3v range so that the full throttle range can be resolved.

Oli.

radler
Offline
Last seen: 4 years 4 days ago
Joined: 2020-06-20 16:57
Posts: 7

Hey Oli,
yes, I know about the ForumsController and the ReducedForumsController.
It is my aim to reduce necessary interactions (get/set) with the drive train to a minimum. PAS is a legal requirement, display should be superfluous, 5 step power selector should suffice.
So long as VESC does not support PAS and Pedelec, an additional controller of some sorts is necessary. Once you go that route, you can do anything the computer (and interfaces) can do.
radler

dancing with bikes

kid_spl85
Offline
Last seen: 1 year 10 months ago
Joined: 2020-06-12 21:32
Posts: 2

Any update about native pas support for vesc.

Dennis Freiburg
Offline
Last seen: 1 year 5 months ago
Joined: 2018-12-28 17:42
Posts: 8

PAS can be done by custom application

kid_spl85
Offline
Last seen: 1 year 10 months ago
Joined: 2020-06-12 21:32
Posts: 2

any tutorial how to do this?

Dennis Freiburg
Offline
Last seen: 1 year 5 months ago
Joined: 2018-12-28 17:42
Posts: 8

just google VESC custom application. There you can put any code you want. I havent seen a direct tutorial for PAS.

parasole
Offline
Last seen: 3 years 8 months ago
Joined: 2017-11-08 09:50
Posts: 11

Dennis Freiburg, before advising, just try to do yourself... we all know it is possible, however, it requires knowledge on this product, average controller enthusiasts like myslef would not cope with the task...  I ditched out my Vesc despite being satisfied with it as a controller, for bike it is simply unusable, too many hurdles with additional controller and interconnection...

The only implementation effort I have seen was from derlucas, unfortunately, it is not functional and he is not willing to continue nor to help with his creation, waste of time. 

th0masrtg
Offline
Last seen: 1 year 11 months ago
Joined: 2019-05-22 11:52
Posts: 9

If you're a big nooby in programming and you have no interest in it then Google doesn't help to create custom app or tweak the firmware to add this functionality. I love my vesc and want to keep it but I will soon throw it away if I cannot use pedal assist.

I have a second ebike where I would like to put the vesc, but because I want my torque sensor to work, I am using an un adjustable bad controller from aliexpress.. Please Benjamin add the PAS and Torque sensor reading to the vesc 

fredchair
Offline
Last seen: 6 months 1 week ago
Joined: 2020-06-13 00:37
Posts: 2

I am new to the world of programming and esc. I am in a wheelchair and have been researching how to develop a system that would provide assistance for a manual wheelchair. 

I do not want to use a throttle but would want to freewheel till x number of forward revolutions then kick in to provide x amount of torque assistance, using a sensored  motor. The VESC tool seems perfect with the torque curves and other setting limits but I do not know how to use it without a throttle input. 

I would definitely need to create a custom application and I think PAS is kind of what I am looking for. 

It would be really helpful to me if there was a tutorial for creating an app or PAS app to modify. 

fredchair
Offline
Last seen: 6 months 1 week ago
Joined: 2020-06-13 00:37
Posts: 2

I am new to the world of programming and esc. I am in a wheelchair and have been researching how to develop a system that would provide assistance for a manual wheelchair. 

I do not want to use a throttle but would want to freewheel till x number of forward revolutions then kick in to provide x amount of torque assistance, using a sensored  motor. The VESC tool seems perfect with the torque curves and other setting limits but I do not know how to use it without a throttle input. 

I would definitely need to create a custom application and I think PAS is kind of what I am looking for. 

It would be really helpful to me if there was a tutorial for creating an app or PAS app to modify. 

timk_
Offline
Last seen: 3 years 10 months ago
Joined: 2020-12-06 08:09
Posts: 1

I'm interested to see this added as I would like to replace a Bafang BBS controller with a VESC and retain the PAS feature.

TheFallen
Offline
Last seen: 2 months 1 day ago
VESC Original
Joined: 2017-09-11 11:46
Posts: 222

These features seem to be really popular but absolutely no one wants to write them. Odd.

hexakopter
Offline
Last seen: 1 year 7 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Looks like Marcos implemented PAS support now:

https://github.com/vedderb/bldc/pull/243

parasole
Offline
Last seen: 3 years 8 months ago
Joined: 2017-11-08 09:50
Posts: 11

Thanks for letting us know hexacopter, that is a long-awaited feature by e-bike enthusiasts, looking forward to checking it out...

Ecyclist
Ecyclist's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2018-09-18 02:43
Posts: 17

Hi guys,

Can you post tutorial how to set up PAS with VESC?

Maybe YouTube video?

Thanks

Les

Konstantin1983
Offline
Last seen: 1 year 8 months ago
Joined: 2022-04-24 12:14
Posts: 1

Good afternoon.
How to connect a PAS sensor to the controller, where can I find a diagram?

velolac
Offline
Last seen: 2 months 1 week ago
VESC Original
Joined: 2019-11-03 09:57
Posts: 41

Hi,

What I have found is that you need to have a quadrature sensor (2 signals slightly offset), and connect them to the pins: RX, TX, GND, 5V. Be careful not to create a short, as this may ruin your vesc.

PAS mode works, however ADC and PAS seem to not work for me, the ADC input always overwrite the PAS.

Unfortunately even though there is significant interest in using VESC in an ebike this function is still hardly implemented. The new LISP programming option in principle helps to make a custom code easier, however it is still very hard for someone who is not a programmer.

joncom
Offline
Last seen: 6 months 4 days ago
Joined: 2022-05-02 14:44
Posts: 5

Hi

I tried this quadrature 24p PAS but cannot get it to work:

https://ebikes.ca/shop/electric-bicycle-parts/torque-sensors/pas-24p.html

I have the Flipsky 75100(https://flipsky.net/collections/electronic-products/products/flipsky-751...)

and connected the PAS to RX, TX, 5v and GND on the comm port and tried both PAS mode and ADC and PAS but nothing happens when pedaling. I am running the standfard 5.3 firmware.

 

Any hints?

joncom
Offline
Last seen: 6 months 4 days ago
Joined: 2022-05-02 14:44
Posts: 5

I got it to work by changing pas control type to cadence. I had it set to constant torque. After tweeking some parameters like rpm start and stop the bike runs very smooth.
My bike runs a 1000w hubmotor and pas is my only throttle input. I use ADC and PAS where ADC2 is used for regen brakes which works nice

TittyTwister
Offline
Last seen: 2 years 4 months ago
Joined: 2022-07-10 12:31
Posts: 3

Do you have PAS assist levels? How do you switch between them? Do you have a display? I want to use PAS on my 1500W hubmotor.

Ebike 1500W hub motor
Battery 52V 17,5AH Samsung 18650 36E 3500mAH 14S5P 40A BMS

joncom
Offline
Last seen: 6 months 4 days ago
Joined: 2022-05-02 14:44
Posts: 5

In vesc tool you can make profiles and easily switch between them with the app. However PAS levels are not a configurable option in profiles

TreadM
Offline
Last seen: 2 years 3 months ago
Joined: 2022-07-29 21:56
Posts: 2

Hi, I've also been trying to get this to work but as a torque sensor. Are you just running cadence sensor or do u also have throttle? Are u able to hook sensor up to UART? are u changing assist levels when u get back home? Bluetooth module? Is it possible to have pas, throttle and Bluetooth module on a single 75100? Sorry for the 21 qestions, I'm a vesc noob. I didn't even know of its existence till days ago. Thanks in advance for the help

joncom
Offline
Last seen: 6 months 4 days ago
Joined: 2022-05-02 14:44
Posts: 5

I am just running the pas as a cadence sensor(could not get it to work as torque), no throttle as it is illegal in Norway to have throttle on ebikes. The sensor is connected to the comm port on 75100. I have set assist level to 100% and limited the power output to 250W as that is maximum legal power here. I have a bluetooth module connected to the UART port

TreadM
Offline
Last seen: 2 years 3 months ago
Joined: 2022-07-29 21:56
Posts: 2

Ah ok. So you also have a torque sensor as well as this cadence sensor? https://ebikes.ca/shop/electric-bicycle-parts/torque-sensors/pas-24p.html 

When you put it to the torque sensing under pas settings it wouldn't work? and you had to settle for cadence only? how many wires did you connect to the comm port? which pins did you connect on comm port? I also want bluetooth on uart port and throttle on comms but first I just want to get torque sensing working on its own. I was hoping they had it figured out for vesc as it is common enough to have torque sensing on a hub motor, grin technology can support torque sensing on their controllers. I know I'm bombarding you with questions, because I'm a still a vesc noob trying to figure this stuff out. Thanks again for the info jon

joncom
Offline
Last seen: 6 months 4 days ago
Joined: 2022-05-02 14:44
Posts: 5

No I only have the mentoined sensor configured as a cadence sensor. I could not get it to work as a torque sensor. I would say it works pretty decent anyway. especially since my motor only outputs 250W

I cut off the connector on the PAS and used a JST connector to connect the two sensor wires to rx/tx on the 75100 comm port. I use ADC2 as re-gen brake and have ADC1 available if I want a throttle(unlikely)

XIII
Offline
Last seen: 8 months 3 weeks ago
Joined: 2017-09-05 21:16
Posts: 2

Hi , 

Would it be possible for somoene to explain me how I can change the Quadrature hall sensor type to a single hall sensor. 

The reason : A lot of the ready and available hall sensors from china are single hall or quadrature hall. 
Although they are quadrature hall, they only have one signal wire going to the controller. As the cadance sensor itself already filters backpedalling behaviour out from the cadance direction. 
 

I am not sure how to do this... sadly.
But I think this change would be very benificial for people who are building from a cheap chinese bike or are using Aliexpress cadance sensors.

Thanks!

P.S. I already tried combining RX and TX together with the one signal wire from my Cadance sensor. With no succes, this sometimes works on other controllers ( ASI ).
This could be maybe a small "hack" for people with only 1 signal wire? 

If RX and TX are equal , the signal is can be used for PAS input.

Regards,
XIII

Nedko
Offline
Last seen: 11 months 2 weeks ago
Joined: 2019-05-15 21:50
Posts: 2

Hello
I am trying to run Trampa VESC MK6 Firmware 6.2 with pedal assist and throttle together but doesn't work.
In PAS app does work perfectly but after switching to ADC and PAS app doesn't?

I am running the same setting with
U-box100 and does work perfect.

What am I missing here any suggestions will help.

Nedko

Richard Collyer
Offline
Last seen: 6 months 4 days ago
Joined: 2020-07-27 14:46
Posts: 1

FYI friend and any who stumble across this post and like you are somewhat misunderstanding the 250W legal rating. This rating is deliberately intended to be misleading and is actually stated as an "average power output" for the bike. The hard and fast black letter law for all western countries is based on speed limiting.

All of the big brand e-bike models provide peak outputs of around 600W. This is not a secret. Across your average commute or mtb ride with power cut-off at between 25-32Km/h depending on country specific laws this will actually see you using an average of around 250W output.

Sandro luis
Offline
Last seen: 3 days 23 hours ago
VESC Free
Joined: 2023-10-22 16:05
Posts: 13

I was reading this discussion about pas no vesc, guys, I've been using it for some time, it doesn't need any external hardware, just a small lisp script, and then you can use a common 3-wire cadence sensor, on the ppm output, and You can use an accelerator, that is, if you want an accelerator, you can use it or if you just want to pedal.. the only problem is having to use a smartphone to change the profile. adc 2 to soften, reduce the power when using the country, would this be possible?