Throttle interface for sensitive high power setups

I'm interested in one. Want to see how well it works with Lyen sensorless, 22s2p lipo setup.
 
So I just built the first of the prototype boards. Everything is working as expected. Here is a picture of it. You can ignore all the wires except for the throttle input/output wires. I'm using the second throttle output to power the board for testing and the other 2 wires allow me to do in circuit flashing because I have a boot loader on the PIC.

The final version will be a bit smaller than this, I had extra board space so I utilized it for a tiny prototyping area if needed. The button is only on here for flashing right now, but I might add another function for it or eliminate it.
throttleinterface.jpg
 
wow very cool indeed! I have a highly modified 18fet infineon on route
thanks to Thud ;) running it on 72v lipo and a magura (pot) throttle, does this device work on both hall and pot style throttles Mr Zombieman? love to give it a shot of it works with the magura throttles anyways, my bike will be running before end of month, can give it a good testing then!

KiM
 
AussieJester said:
wow very cool indeed! I have a highly modified 18fet infineon on route
thanks to Thud ;) running it on 72v lipo and a magura (pot) throttle, does this device work on both hall and pot style throttles Mr Zombieman? love to give it a shot of it works with the magura throttles anyways, my bike will be running before end of month, can give it a good testing then!

KiM

Yes, it will work on either type. It only cares about the voltage being input. It works from 0-5V in and scales that over an adjustable range of 0-4.4V out. If needed it will scale a 0-5V input all the way down to 0 to 0.5V, but I only have 256 steps of resolution because I'm using a digital pot instead of a ADC. It gives me around 0.0195V steps which is plenty of resolution. The normal hall throttles have about 80 degrees of rotation (with good throttle that has no beginning and end dead spots. I have one that loses about 10 degrees of range because the voltage doesn't change at the very beginning or end in the twist.

I should probably buy a Magura. Never used one before but hear they are pretty nice. With this I can ride with a full grip because every little bump doesn't effect the throttle like it does when these controllers are stock on a high powered setup.
 
Alright, the last critical feature I've been looking to add into the controller was just solved. Throttle failure detection.

The one concern I had with this device is that it will bypass the built in throttle blow out detection that can be enable in the Xie Chang controllers. I believe it's call "bar protect". What this does is it looks to see if the throttle voltage is over a certain point. If it is it shuts down the controller. With my interface in between the controller and the throttle this feature would only function from the interface to the controller. Since that distance is only a few inches it's not exactly useful.

So what I've done is implement my own version of it in the interface basically copying what the Xie Chang controllers do. I added 1 diode and a few lines of code and it now works. So now the interface has the following failure detection. If the input voltage is less than 0.313V, it will output 0V and then halt. If the throttle input voltage exceeds 4.0V it will output 0v and then halt. In order to reset the interface you need to remove power from it. I like having this as a one shot setup to prevent potentially dangerous throttle issues. My biggest concern was losing the ground signal to the hall throttle because it would automatically go to high voltage and the interfaces output is scaled preventing the controller from detecting this and shutting down.

The working input range for the interface is now 0.314V to 4.000V. The output voltage is still adjustable from 0-4.4V.

I just measured the total interface current draw at 18mA with the throttle connected so it should not cause any issues for the on board 5V regulator I'm drawing the power from. Tested it on EB2xx boards and EB3xx boards and so far so good.
 
Sounds like this might be a must have for higher power setups.

Now, just get the thing wrapped up and in the hands of enthusiasts. Too many of these things never really get finished.
 
ZOMGVTEK said:
Sounds like this might be a must have for higher power setups.

Now, just get the thing wrapped up and in the hands of enthusiasts. Too many of these things never really get finished.

I agree, but they say a picture is worth a 1000 words.

8 Beta units built and almost ready to ship.
throttleinterfaces.jpg

I'm not going to get away form the 1000 words though, I still need to write some basic instructions for people, but it's pretty easy to adjust. Only a small screwdriver is needed.
 
Just got back from a test ride on my 20" wheels Cromotor running 95V, 60A with the throttle interface. I'm getting closer to my desired goal, but I need to rework my code for smoother response at high power. I'm noticing some big differences between my 26" 9C 2808 motor at 4KW and this bike at just 5KW. My settings completely changed as I had expected. Low throttle resolution is beautiful, I can flip the bike to high power and crawl at a snails pace while walking next to it. What I need to work out is some of the sensitivity in the mid range with the bike set in high power. It's many times better than the stock throttle, but not as good as it could be. I have some ideas I'm going to try out. I am not going to release these until I have it behaving like I want. I don't think I will be able to ship this week now unless I get everything ironed out quickly. My weekend is booked with work so that's a no go. Good news is I'm really close.

This interface is a bit trickier to get working than one would think. It's so easy to draw it out on paper, but what you think works well in you're head or on paper just doesn't work out the same way in the real world.
 
Back from a quick test ride after a code change. Found out I had some user error in my settings... oops. Corrected the mid range issue, much nicer. Now I need to polish how it drives when going off and then back onto the throttl and I have a pretty good idea on how to make that happen. Just need to write the subroutine and check. Let me tell you, ramp rates suck for throttle control without some other routines to give them a nice massage. This would be a lot easier if I just referenced a hall sensor, but I'm trying to avoid that sor the sake of simplicity (even though I have code for it). The other method is using and accelerometer, but that adds quite a bit of cost and I'm trying to keep these cheap for what they are.
 
I'm still banging away at the code here trying to make this behave exactly the way I want, but it's a tricky beast. I'm about to fall back to my original simple version.

Simple version will just soften the throttle starts from a stop and then run a short time average on the throttle. Works good for starting off a high powered bike. If I can't get my complex setup working by next weekend, I'm going to revert back to this as it's very useful to help prevent launching your off your bike from a dead stop by moving the throttle 1mm to far.

My fast bicycle is a great test platform because it's a beast to control even at 6KW because of the Cromotor being in a 21" diameter tire.
 
I finally think I got the breakthrough I've been needing. Just got back from a 10min ride with my bike pushing 6kW at 100V into a 20" wheel with a Cromotor and I was able to ride it on high power only (100% switch setting) and even get back off an on the throttle in the middle of a corner at less than 10mph without upsetting the bike! I haven't even tweaked this version on the bike yet and it's really close, just eyeballed it on my scope.

If all goes well I will be able to release the first beta this week. I really want to incorporate hall sensor code to make it speed sensitive, but I think that will wait for now (I don't like feature creep) based on how well my bike rode on this just using some basic prediction with timers. I have the throttle set to a 5 second decay so if you get completely off the throttle and back onto it within 5 seconds and your TPS position is really close to the previous one you held it comes in really smooth. After 5 seconds it resets to normal (if you stopped or slowed way down) to allow for very easy starts. The quicker you twist the throttle, the quicker the throttle ramps up. Example: If you twist from 0 to 100% throttle over 10 seconds from a stop you will have nice smooth predictable acceleration, but if you twist form 0 to 100% throttle in 0.3 seconds from a stop the bike will put you on your ass due to an uncontrolled wheelie. This is of course adjustable. I just need to make sure I get enough range in it for users. I will be trying it out on my less powerful 9C 2802 26" 4kw as well.

I've also got my hands on a 3 axis accelerometer now if I decide I want to make the interface really trick.
 
About the use of a hall sensor or a accelerometer, i would go for the hall sensor.

With the hall sensor you know V(speed) so you can calculate a(acceleration) with a(t)=dV/dt.

with the accelerometer you know a so you can calculate V by the integral of a. So v(t)=v0+a*(t-t0) (with v0 as the speed from the previous calculation, and t-t0 as the time passed from the last calculation)
the "problem" with this is, any error in "a" will accumulate until you reset the interface. and also if you do a wheelie, the acceleration will not be on the right axis. so this will create a large error in calculating speed. with the hall sensor you do not have this problem.
 
Finally I have the adjustment range and code I'm happy with. This will go final next week and I can finally ship 7 test units. I am keeping 2 for myself for development. Don't send me any money or anything yet, I want to verify everything before I ship.

So this is how the unit functions.

Potentiometer Settings

MinV:
Sets the minimum output voltage. It is set on the bike with the powered wheel off the ground. It is adjusted with the bike in high power mode if you have a 3 speed switch until the rear wheel just barely turns, then you back it off the setting to make the voltage low enough to prevent the wheel from moving at all.

MaxV:
Sets the scaling factor for the throttle input. It is adjusted on the bike with powered wheel off the ground after you adjust the MinV setting. Before setting this you should check your maximum unloaded wheel speed for best results. Once you know what that is, you pin the throttle wide open and adjust the voltage to give you maximum wheel speed and then turn it just slightly higher to account for any variations.

The two settings Delay and Buffer are interlinked to each other and effect the throttle response curve to allow you to tune your throttle to your bikes unique characteristics. This is not a one size fits all, being able to tune these setting is important to taylor the curve to your own bike and riding style. A Cromotor in a 20" tire being fed 6-15kW rides nothing like a 9C 2808 in a 26" wheel fed 4kW, but both can be compensated for with this through trial and error tuning. Yes, you will need to do trial and error adjustments to get it just right for your setup, but all you need is a small flat head screwdriver.

Delay:
Well, the label is kind of incorrect for this one because I changed things, it is the throttle acceleration setting. This sets how fast the throttle will adjust based on how quickly you turn the throttle to it's next position. Very slowly twisting the throttle = very slow throttle ramp rate (will allow you to walk next to a 10KW bike with 20" tires and manipulate the throttle). Quickly twisting the throttle = fast throttle ramp rate.

Buffer
This setting adjust the amount of throttle filtering through averaging. It is settable from 1 to 32. At the setting of 1 there is no averaging occurring on the throttle and it is 1:1. At the setting of 32 the throttle is averaged over 32 samples. This allows you to choose a setting that matches your bike, riding style and terrain. At higher setting it will filter out throttle jitter created by riding on rough terrain to help you maintain speed even with the throttle position changing rapidly. The setting you choose will vary greatly on your motor/wheel setup. My 9C 2808 in a 26" tire at 4KW does not need a lot of filtering compared to my Cromotor in a 20" tire which requires filter setting around 16 to eliminate any throttle surges in normal riding. When setup properly you can wiggle the throttle and your speed will not change unless you actually hold the new position. The super sensitivity of the throttle at low speed is what prompted me to start this project in the first place. I was not happy with the super power wheelie feature which occurred daily when I rode my bike to work when the throttle was only moved a tiny bit.

Anyone who has experimented with throttle ramp rates has learned that they create a lag. This is why I provide both of these parameters. It allows you to eliminate lag and with proper settings and by relearning throttle control movements, you can go completely off power for a few seconds to coast, then bring the throttle quickly back very close to it's original position and continue along without that surge/jerk you normally get from a stock controller.

I have one last feature I'm deciding on how to implement (I currently have it hard coded for testing). It is a full power bypass. That is if you command 100% throttle you will instantly get 100% throttle eliminating the above filtering/acceleration settings. I'm debating on if I should make this a switchable on/off with a jumper so it may be disabled. The bypass position would automatically be calculated and set when adjusting the MaxV setting and saved to memory. It would only change if the MaxV setting was altered again.

I will continue to improve on this project in the future. Most of what I described here might be a little tricky to follow so I will try to make a video using my Scope tonight to show how the throttle curves can be adjusted and what they look like at various settings.
 
Great work Zombies! Can't wait to try it. Since I ride at partial throttle 99% of the time, each of your features will help me a lot.

It's probably be brought up, but does delay affect only ramp up and not ramp down?

Can you explain the thing called delay again, and how adjustments affect it? If we set it pretty sensitive, do we still get some benefit of slow throttle turn = longer ramp up? I've run both slow current ramp up and immediate at high power, and in most conditions I prefer some slowness to ramp up. I've learned to be pretty deliberate with the throttle. The times I like immediate better is when I'm moving pretty good and nail the throttle twisting it quickly for a pass or to leave moto's or cars eating my ions. This seems perfect for me.

The buffering will be perfect for bumpy roads. That one may ultimately need an on-the-fly switch between two settings to increase the averaging when it's needed.

John
 
Code is now officially at Beta version. I will start shipping interfaces next week to those who want to test. Price will be $28 instead of $25 due to parcel post shipping charges costing over $2.00 + a padded envelope. Just trying to break even on these. This is a small run (so high parts cost, mainly in the PCB at $10 each due to ordering such a small quantity) and I will only produce these if the responses from the testers is positive.

A production version will be a bit smaller than pictured as well due to me being able to do a custom PCB size vs what I was limited to in this prototype where I did 3 boards on a single board and then cut them. I will leave the connector choice up to you. I will send you the board, you will have to solder on the wires. If you want I can solder on the 3/input/output wires for you, just let me know by email.

On a side note I had some guy stop me while I was out testing and adjusting the settings and let him take a spin. Gave it to him on low power (40%) so he could get a feel for the throttle and starting off and about 15 seconds later flipped it to medium power (66%) and let him ride it. He loved it and thought it was really powerful and fast. After about a minute of riding he asked if that was full power and I let him ride it at full power as I saw he had no issues with throttle control. Came back with a giant ebike grin.
 
Here is a video of the throttle controller in action with explanations of the setup. It's a bit boring as it's just scope video and me talking, but I explain how it functions and how it's setup. Please give it an hour or two after this post before it's available, it's currently uploading.

[youtube]uLEyISYfyZw[/youtube]
 
zombiess said:
Code is now officially at Beta version. I will start shipping interfaces next week to those who want to test. Price will be $28 instead of $25 due to parcel post shipping charges costing over $2.00 + a padded envelope. Just trying to break even on these. This is a small run (so high parts cost, mainly in the PCB at $10 each due to ordering such a small quantity) and I will only produce these if the responses from the testers is positive.

A production version will be a bit smaller than pictured as well due to me being able to do a custom PCB size vs what I was limited to in this prototype where I did 3 boards on a single board and then cut them. I will leave the connector choice up to you. I will send you the board, you will have to solder on the wires. If you want I can solder on the 3/input/output wires for you, just let me know by email.

On a side note I had some guy stop me while I was out testing and adjusting the settings and let him take a spin. Gave it to him on low power (40%) so he could get a feel for the throttle and starting off and about 15 seconds later flipped it to medium power (66%) and let him ride it. He loved it and thought it was really powerful and fast. After about a minute of riding he asked if that was full power and I let him ride it at full power as I saw he had no issues with throttle control. Came back with a giant ebike grin.

Sounds like you have the unit a happening still very interested in one if available..

KiM
 
So I watched about 11 minutes of the video. Looking at your scope and what your are doing, is basically what I can do with my RC remote control. Pretty cool stuff for a sensorless setup. I'm hoping it will do wonders with my sensorless Lyen controllers.
 
snellemin said:
So I watched about 11 minutes of the video. Looking at your scope and what your are doing, is basically what I can do with my RC remote control. Pretty cool stuff for a sensorless setup. I'm hoping it will do wonders with my sensorless Lyen controllers.

You have an advanced RC radio that allows you to set filters and ramp rates with a variable attack rates? I haven't done RC in a long time. Sensorless is one of the reasons I wanted to keep from using a speed reference.
 
Pleasure doing business with you sir ;) paypal invoice received and paid, might take a day or two for money to transfer from bank account to PayPal ;)

I'm very much looking forward to having a play with the interface, it will be coupled up with a bike running 72v Lipo a highly modified 18fet controller with a big ass rewound Turnigy Ca 120 motor coupled with a Thudster 2 speed, this interface should be the last piece in the puzzle to get a highly controllable and reliable e-bike! thanks again matey

KiM
 
Back
Top