PAS sensor for Sabvoton

Dariusz

100 mW
Joined
Oct 26, 2017
Messages
38
I will try to make it short. Idea is for making possible use my ebike legally. Requirement are 250w and PAS(not throttle). I can adjust in phone app 250w. Only problem that Sabvoton don't communicate with PAS without Cycle Analyst.
When PAS is moving sensor is sending spikes of voltage. I am trying to make some circuit that recognize signal from PAS and give some constant voltage between 1 and 5v. I have been trying use PIR sensor like this one:

https://www.ebay.com/itm/HC-SR501-IR-Pyroelectric-Infrared-PIR-Motion-Sensor-Detector-Module-DC-5V-20V/253045605416?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

I have removed pyroelectric sensor and use only circuit. When applying voltage spikes from PAS to this pin where black cable go circuit output constant 3.35v. Perfect. The only 2 problems are that whatever way i move pedals bike run which was expected and acceptable. Other problem is that it take few seconds to start and few seconds to stop. Maybe it have something to do with potentiometers. I will keep trying soon.

I share this information i hope if someone can get it further. Will be nice if someone know arduino. I am also thinking to use "555 timer" triggerd by PAS.
View attachment 1
 
Problem with 555 timer is it can be triggered only by voltage below 1/3 of supply voltage and PAS is giving higher spikes. Maybe can be done by NPN transistor that will switch ground. Not sure if it will work because PAS have standby voltage 0.4v or 0.7 (don't quite remember correct).
 
For anybody looking for that send to thread for someone who made it already with arduino nano

https://endless-sphere.com/forums/viewtopic.php?t=87116
 
Idea is for making possible use my ebike legally. Requirement are 250w and PAS(not throttle).
I have same plan, and use hidden remote to control the 3 speed and cut the throttle.

I got Sabvoton to make a PAS connection when I ordered the controller, but I am experiencing that it is more like a switch than a throttle. It starts to pull pretty hard up to 40kmt, no matter the 3 speed settings. Start/stop lag that makes it a bit scary.
Working with Sabvoton/Qs to find a solution, maybe it can help here too.
 
Electricglider said:
It starts to pull pretty hard

Probably because high phase current adjusted. Throttle voltage should build up slowly. I will update you when i am done with arduino board. I am currently working on it.
I am also planing to make hidden switch like you or use arduino bluetooth board and control remotely from phone app.
 
I found that all I wanted could be done in Cycle Analyst, and it cost the same as sending my controller back to CH. Search is over.
 
When program is uploded to arduino and nothing is connected or D2 connected to ground, it still output itself 3v on pin D11. I check it while its connected by usb to laptop and on bike.
 
Hi, i have a program to modify the curve of the throttle but you can't do it only with Arduino because the output is pwm and the controller detects it and stops. You have to add to arduino a DAC for work with pure analog output, now im working in do it a screen controlled by arduino to comunicate with sabvoton, already im going to add the secret funtion to limit at 250w amd 25kmh. If you want the arduino program i can send it
 
Is something like this needed for the "voltage PAS sensors" that people use for Cycle Analyst if you want to use them directly on the Sabvoton?
Since some suggest they practically replace a throttle...

I want a very clean build wihout any visible displays or switches. but i need the PAS option to stay "legal".
Looking for the cheapest, (simple) way to make it happen with my 7280.
The CA3 seems crazy expensive to me.
 
flexodood said:
Is something like this needed for the "voltage PAS sensors" that people use for Cycle Analyst if you want to use them directly on the Sabvoton?
Since some suggest they practically replace a throttle...
The stuff I've seen so far (mostly torque-PAS sensors) doesn't produce a throttle-compatible signal. It requires a separate device to interpret that for controllers that do not have an input specifically for such PAS units *and* that can be calibrated for the specific sensor's output range and offset. (because each of those sensors operates differently).

There are some controllers that can do it, but they're typically integrated into an OEM unit that has the sensors and motor integrated as well, so not useful for your purposes.

There are some controllers that have opensource firmware replacements that can handle analog PAS inputs, like the KT and whatnot by Casainho, Stancecoke, etc. here on ES and Github.
 
ok. thanks.

but i don't even expect anything from it. i'd even prefer a simple on/off... but it has to be seen as a throttle/constant voltage.

there has to be some simple solution?

any ideas?


Edit: wouldnt that even be possible with something that can do "crank turning - switch closes" ...but how?
 
Simple is relative to your DIY abilities, and the specifics of exactly what you need to happen.

For instance, if you just need the PAS to disable the throttle when not pedalling, you could make a 555 timer circuit that is reset by the PAS pulses so that while pulses happen, the 555 keeps a small transistor wired across the ebrake circuit (if not using regen) open. When no pulses are received, the 555 turns the transistor on and shorts the ebrake to ground, disabling the controller.

If youre using regen you don't want that as it would brake you everytime you stop pedalling. So instead you could put the 555-controlled transistor as a pass transistor on the 5v line of the throttle, so it cuts power to the throttle when not pedalling.

This is simple, but you'd have to design the circuit (lots of 555 timer chip sites out there on how to do this), and build it. Probably less than a dozen parts, mostly resistors and capacitors, plus the little 8pin chip and a little threepin transistor.


There's also the methods provided in this thread and the linked one; they're probalby not plug-and-play either, and yo'ud have to work out whatever doesn't do what you want and alter them....


Even things like the Cycle Analyst v3 aren't plug and play--once you wire it up you still have to go thru all the many settings and set it up to do what you want, which can take a while and some iterations of settings workthrus as you refine behavior.
 
flexodood said:
but it has to be seen as a throttle/constant voltage.

BTW--if the above means that the PAS must generate a throttle voltage, or a constant voltage that runs the throttle, that's much more complex.

If the PAS must do the latter, it could be dangerous unless you have a screen on your controller to set it to very low power levels so that the constant voltage doesn't send you speeding off down the road.


So...what you need to make depends on *exactly* what behavior you require from it.
 
thanks again.

What i need is just a possibility to ride WITHOUT using the throttle. I'd just limit the lowest speed to a power output of about 250w for a legal speed of 25-28kph and toggle between PAS/throttle with a hidden swich and for good measure maybe a Jumper i can pull quickly....

I have to be able to run it as a pure pedelec.

IE. It doesnt have to work well as a pedelec. it just has to function as one when needed.

or - maybe more elegant - a sort of switch with a resistor that results in a throttle voltage to give me an apropriate power output when i activate the "pedelec mode" and hit the pedals...?
 
"speed limit mode"
has three options
"extern resistance"
"intern set"
"no limit"

i'm hoping one of these modes set to a low percentage in conjunction with an apropriate constant throttle signal might result in something decent?

PS
actually i assumed those referred to the 3-speed switch... but one of those is a cruise mode. and the other two are maybe slightly differen power or max speed i dont even know. :(


I don't need "Plug and play" i'll happily solder and test things ot for weeks ;)
But i don't wanna spend 150bucks on equipment i'd want to hide away...

Just to show how it looks currently. very minimalistic. next i'll make clean bagmounts, hide the cables and hide the motor behind a fiberglass "wheeltrim(?)" (black plates...)

FahbY0e.jpg
 
If i do it like Dariusz;
can you tell me how i'd limit the power accordingly, and i suspect i'll need a voltage PAS sensor in addition to the PIR module? or is this a standard hall based one?
 
amberwolf said:
The stuff I've seen so far (mostly torque-PAS sensors) doesn't produce a throttle-compatible signal.

I was talking about these:
https://www.aliexpress.com/item/33015277605.html

https://www.aliexpress.com/item/1839779691.html

https://www.aliexpress.com/item/4000497217209.html
 
flexodood said:
I was talking about these:
https://www.aliexpress.com/item/33015277605.html

https://www.aliexpress.com/item/1839779691.html

https://www.aliexpress.com/item/4000497217209.html
None of them explain how they work or specify their output levels vs RPM, or waveform. They say "voltage type", but at least one of them also says it measures torque, which is not possible for the pictured design, so as usual with these sites, you can't really trust any of the information that's posted to mean much of anything, especially the technical terms.

Appearances don't always mean anything, either, but they look exactly like common pulse-type PAS sensors I have here and have seen posted by others.

So the most likely thing is that they simply output a pulse whenever the magnets pass the sensor in the correct direction, and no pulse when passing the other way.

If they output a constant voltage instead, you would have to test the specific one you're going to use to see what voltage it outputs at what RPM of magnet passage (cadence), and design your conversion electronics accordingly to give you the throttle amount that you want for that cadence.
 
flexodood said:
What i need is just a possibility to ride WITHOUT using the throttle. I'd just limit the lowest speed to a power output of about 250w for a legal speed of 25-28kph and toggle between PAS/throttle with a hidden swich and for good measure maybe a Jumper i can pull quickly....

I have to be able to run it as a pure pedelec.

IE. It doesnt have to work well as a pedelec. it just has to function as one when needed.
The 555 circuit I described (that you'd have to work out the details of) would do that. Since you can't have a throttle (?) then you could just wire the transistor to connect the throttle input signal of the controller to a voltage divider that presets it to a specific amount of throttle that gives you the speed (or current, if your controller uses current/torque-based throttle instead) that you need, to stay within those limits generally.

If you wanted something a bit fancier, you could add a rotary or rocker or toggle switch with multiple poles that switches to different "bottom" resistors in that divider, providing different amounts of throttle for different "PAS levels".

This kind of circuit is pretty simple, generally, but may get complicated enough if you don't know electronics already that it'd be easier (and much smaller) to do with an MCU and coding something out of existing libraries. (if you know any coding at all).

If you actually have to limit to a specific power level and/or speed that *cannot* be exceeded, you'd also have to make additional circuits that measure power and/or speed, and shut the system off past those limits. When riding at the limits the system would stutter on and off unless you also added ramping functions...this gets pretty complicated pretty quickly in hardware, but should be easy in software with an MCU.



or - maybe more elegant - a sort of switch with a resistor that results in a throttle voltage to give me an apropriate power output when i activate the "pedelec mode" and hit the pedals...?

Sure, you could do that in discrete components, too, but unless you're already good with circuit design, my guess is it'd be easier to make with an MCU like arduino, atttiny, pic, etc., since there's already libraries of code out there. (I don't know coding, but lots of people make it look easy to do).
 
flexodood said:
If i do it like Dariusz;
can you tell me how i'd limit the power accordingly, and i suspect i'll need a voltage PAS sensor in addition to the PIR module? or is this a standard hall based one?
If you need to limit power, then as noted in another post, you'd have to build a circuit that could also measure power, and give it a way to shutdown the system if exceeded. This means a shunt in the battery negative wire, and measuring the tiny voltage across that to determine the current. Then some kind of voltage divider to measure battery voltage at the same instant, and then calculating (op-amps in hardware) the two together to determine power (watts), and then either a simple cutoff to turn the throttle input off whenever your designed limit point is exceeded, or more op-amps/etc to smoothly lower throttle input to keep power within the limit.


I don't know exactly how Dariusz's unit works, so I can't help much with that one. :( But since his description says "When applying voltage spikes from PAS to this pin" that implies it's a regular pulse-type cadence PAS.

You could try to get hold of him and convince him to post details of exactly what he did (if there is anything more than what he posted), and how his circuit works beyond what he already said, if he's still around.
 
flexodood said:
"speed limit mode"
has three options
"extern resistance"
"intern set"
"no limit"

i'm hoping one of these modes set to a low percentage in conjunction with an apropriate constant throttle signal might result in something decent?

PS
actually i assumed those referred to the 3-speed switch... but one of those is a cruise mode. and the other two are maybe slightly differen power or max speed i dont even know. :(

What I would guess they mean is this:
"extern resistance" looks at a specific wire in the cable bundle coming out of the controller (or pad on the board inside) for a resistance to ground that sets the max speed. For this you must know which wire or pad that is, *and* what the resistance range allowed on that pin is. If you know the first but not the second you could put a 50kohm potentiometer on the wire to ground (middle pin to wire, one end pin to ground, other end pin not connected to anything), and experiment to see what the speed limit results are.

"intern set" just checks another user-settable field in the setup program for the limit.

"no limit" doesn't limit speed at all.

But you'd have to check the manual, if any, for details on how those actually work for your specific controller, or contact the manufacturer / etc.; I poked around ES and didn't see info on them for the Sabvoton in general, but it could be there under other names, or there in offsite images I can't see.



I don't need "Plug and play" i'll happily solder and test things ot for weeks ;)
But i don't wanna spend 150bucks on equipment i'd want to hide away...
Understandable. :) The electronics knowledge needed to design and build just a simple cadence-pulse-PAS-to-on/off-throttle-enable circuit is pretty simple, probably a few days to figure out from existing stuff out there about 555 timer chips and the like, and tutorials on places like http://allaboutcircuits.com to learn the very basics of electronics like resistors, capacitors, and transistors-as-switches.

A cadence-pulse-PAS-to-throttle-voltage circuit is notably more, but still not extensive (transistors as amplifiers, or op-amps).

Adding other sensors (power, speed) and limiting proportionally to those is even more. A bit less if you don't need proportional limiting, just shutting off when you hit the limit. (op-amps as integrators, differentials, comparators, etc)



Just to show how it looks currently. very minimalistic. next i'll make clean bagmounts, hide the cables and hide the motor behind a fiberglass "wheeltrim(?)" (black plates...)
I didn't see a pic, but when quoting your post it looks like the pic is on imgur, which I typically can't see stuff from for whatever reason. If you attach the pic directly to your post using the Attachments tab, and Upload button, then anyone that can see the post can see the pic.

Regarding hiding the motor....they need airflow to keep them cool, so if right now in the regular airflow the motor ever feels a little warmer than ambient air temperatures, it may get hot when that airflow is blocked. If so, you'd need to design the hides to allow the airflow past the motor. Same thing for the controller--if it's in a bag or something now, I'd recommend moving it out and putting it where air can flow past it, or internal components (especially capacitors and FETs) can get hot enough to age them prematurely and potentially fail.
 
I'm a bit overwhelmed right now. I have very rudimentary knowledge of electronics and none of programming

I will try Darius's Method for now.
He says "I can adjust in phone app 250w." - everything accessible by bluetooth is also accessible through the PC-software... so that should be doable. And i dont think/hope real speed limiting will be essential.
"it take few seconds to start and few seconds to stop" Sounds terrible but right now i'd be happy to have a chance at surviving being stopped...
I'll try to wrap my head around some of your suggestions.

The controller stays very cool. Even inside the bag. And Yeah, I'll try to allow for enough airflow-gaps when hiding the motor and test thoroughly...

The image was too large to attach. I compressed it.

Thank you very much!
 

Attachments

  • FahbY0e2.jpg
    FahbY0e2.jpg
    184.1 KB · Views: 1,719
flexodood said:
I'm a bit overwhelmed right now. I have very rudimentary knowledge of electronics and none of programming
Yeah, it's a lot to take in when starting from scratch. :([/quote]

I'm not a circuit engineer, just basic electronics knowledge, and can figure out how to make some basic circuits, mostly combining existing stuff that does something like I want and modifying them to do what I actually want.

I will try Darius's Method for now.
He says "I can adjust in phone app 250w." - everything accessible by bluetooth is also accessible through the PC-software... so that should be doable. And i dont think/hope real speed limiting will be essential.
"it take few seconds to start and few seconds to stop" Sounds terrible but right now i'd be happy to have a chance at surviving being stopped...
I assume that most of that is stuff in the Sabvoton...so I don't have any info on that part, but there are threads about programming or settting up various versions of those that might have useful info.


I'll try to wrap my head around some of your suggestions.
If you have specific questions, post them up and I'll try to explain in detail. :)



The image was too large to attach. I compressed it.

Looks easy enough to make vented or scoop type covers around the back wheel area...but if you just add a rear rack with large regular bicycle cargo panniers (Topeak makes good ones, but there are cheaper versions), they would hide the motor without blocking all the airflow, *and* give you places to carry your stuff and your ebike battery / controller / etc. ;)
 
amberwolf said:
For instance, if you just need the PAS to disable the throttle when not pedalling, you could make a 555 timer circuit that is reset by the PAS pulses so that while pulses happen, the 555 keeps a small transistor wired across the ebrake circuit (if not using regen) open. When no pulses are received, the 555 turns the transistor on and shorts the ebrake to ground, disabling the controller.

If youre using regen you don't want that as it would brake you everytime you stop pedalling. So instead you could put the 555-controlled transistor as a pass transistor on the 5v line of the throttle, so it cuts power to the throttle when not pedalling.

amberwolf said:
flexodood said:
What i need is just a possibility to ride WITHOUT using the throttle. I'd just limit the lowest speed to a power output of about 250w for a legal speed of 25-28kph and toggle between PAS/throttle with a hidden swich and for good measure maybe a Jumper i can pull quickly....

I have to be able to run it as a pure pedelec.

IE. It doesnt have to work well as a pedelec. it just has to function as one when needed.
The 555 circuit I described (that you'd have to work out the details of) would do that. Since you can't have a throttle (?) then you could just wire the transistor to connect the throttle input signal of the controller to a voltage divider that presets it to a specific amount of throttle that gives you the speed (or current, if your controller uses current/torque-based throttle instead) that you need, to stay within those limits generally.

Although i don't understand much of what you describe it sounds a bit contradictory to me?

I'd love to see some detailed descripton of that "555 cirquit".
 
Back
Top