Fechter's current based throttle

Still testing.
I think I want to try a redesigned version in hopes of getting rid of the little glitch when you power up.

Other than that, it's pretty cool. If I give about 1/2 throttle, I goes up to 20 amps and stays rock solid until (or if) I build up enough speed for the amps to drop. Twist the throttle more, you get more amps.

The range of adjustment for the maximum current is not correct right now, so the redesigned one should have a more adjustable range.
 
Thanks for all the great info and pics Fechter. You say this will only work with a hall throttle. Would it be difficult to adapt it for a resistor throttle? If it's possible I'm keen to have a go at building one after reading your experiences.
 
It can certainly be made to work with a resistor throttle, but would require using rail-to-rail amps, which are easy to find these days.

One thing I'm not sure about is if the Alltrax has some kind of safety feature that detects the throttle resistance and shuts off if it is out of range. This could be handled with a resistor across the output.

I still want to try the "updated" circuit, which I haven't posted yet.

One of the design objectives is to make the design adaptable to almost any controller. Curtis two wire throttle setups will take a completely different design.
 
One thing I'm not sure about is if the Alltrax has some kind of safety feature that detects the throttle resistance and shuts off if it is out of range
The Alltrax has a switchable "high pedal disable" setting that ignores any throttle input when the controller is first switched on. Not sure if that's what you mean though, as I guess this is not an "out of range" condition.

The current/torque-based throttle is definitely number one on my wishlist now (after infinite-capacity batteries that is). It would make my bike a lot more user friendly and, as you point out, make it much easier to control amp draw.
 
Now that I think about it, using a resistor throttle makes things easier, since I don't have to guess what the wiper voltage is going to be at zero throttle.

I'll try to draw up a schematic for it.
 
I went for another test ride yesterday. I replaced a couple of resistors to get the adjustment range corrected. The knob now goes from about 65 amps down to 20 amps. With the limit set at 20, I can just nail the throttle and the acceleration is nice and steady up to top speed, wind and hills permitting. It really slows down on a steep hill, but the current stays steady.

I was about 2 miles from home when I got a flat tire. Unfortunately, I didn't have any flat repair capability, so I waked the scooter home.

I can report that at walking speed, it was not difficult to keep the throttle controlled (there's no way I'm pushing this thing for 2 miles without some assist).

I found a straight pin stuck in the tire. I guess it shredded the tube on the way home, since it won't even inflate with a pump. I need to get one of those flat repair thingies :oops:
 
Below is a variation on the design that should be fairly universal.

The current limit adjustment pot is intended to be a user control with an easily accessable knob. The range should be about 30% to 100% of whatever the maximum cal is set for.

The max current calibration sets the limit with the knob at maximum.

The zero adjustment is set so the output starts when the throttle is just slightly opened.

The zero adjustment should be done with the wheel off the ground or with the motor disconnected.

*note* this is untested, but should work.
 

Attachments

  • Current Mode Controller 4.jpg
    Current Mode Controller 4.jpg
    21.9 KB · Views: 3,713
Here's the stupid pin that cut my last test short. :evil:
 

Attachments

  • Pin in tire.jpg
    Pin in tire.jpg
    40.4 KB · Views: 3,484
Here's the controller unit in the test position. In actual use, it would probably be better to mount the pot up on the handlebars and bury the box down in the body.

I found an old-school knob for the control. I had a really old "chicken head" knob, but I decided that it might change settings when hitting bumps. The potentiometer is about as big as the rest of the circuit put together.
 

Attachments

  • Current Mode Throttle installed.jpg
    Current Mode Throttle installed.jpg
    46.4 KB · Views: 3,664
wow this is just what i was looking for, im going to try to build it and see how it works, i didnt just want to just copy it ive been trying to learn how it works. ive never even heard of an op-amp before i saw this. i know a good deal about electricity and the basic circuit components so i read up on them and have a pretty good understanding now, i dont fully understand the circuit but is the basic idea that the op-amp is wired in a sort of negative feedback loop indirectly? is the shunt voltage subtracted from the +input voltage while the op amp tries to keep the +input voltage equal to the inverting input voltage by varying the controller duty cycle thereby raising or lowering the shunt voltage? so say the inverting input voltage is 50mv and the throttle output after being divided is 75mv will the op-amp alter the throttle so that the shunt voltage is 25mv keeping the +input at 50mv?(i think im wrong about the "subtraction" of the shunt voltage from the throttle voltage but it does have an effect of lowering the +input voltage right?) also is the particular model of the op-amp important i dont want to have to order any parts id like to just go to radioshack to buy the stuff, i think they will have this part(http://www.radioshack.com/product/... the only rail to rail one they have i think. im not really sure about the 2 different current limiter pots too, what exactly does each one do? im also guessing that teh input that says "from throttle wiper" doesnt have to be from a pot throttle's wiper, the hall output signal from my existing throttle would work right?
 
Right, I think you got most of it. I didn't check out the amp in the link yet, but the specs aren't too critical. The throttle input is scaled, then fed to one input. The op amp then does whatever it can to keep the other input at the same voltage. Under closed loop conditons, the voltage is always the same on both inputs (within a few mv).

I had quite a bit of trouble getting all the adjustable pots "dialed in" so it works properly. It's not really the best design, but it does work. Something that uses the Allegro current sensor would be much easier to setup, since it has a known current response, unlike a random piece of wire. It also sidesteps problems with the inputs going out of range (op amps don't like it when the input voltages are too close to zero or too high.

The circuit above is also fairly temperature sensitive and tends to go out of adjustment on hot or cold days.

But.... it does work. I installed the bypass switch so if there was any problem I could just go back to normal.

The Allegro sensor is around $5, so it's not too bad, but you would need to order it. The stupid handling and shipping will be more than the part (I always buy other stuff I need at the same time).

I think I have the improved design around somewhere, but I think it's still on paper. I need to draw it up on the computer so I can post it.

What kind of current range were you thinking of?
 
Ok men, it's very cool but over my head. Can you please just tell me when I can buy one?!!?
 
well i wouldnt even care about the adjustable current limit just as long as the throttle can do 0 to whatever my controllers amp limit is, im not sure if it even has one, my ammeter only goes yo 50A but when i accelerate its pegged to max an i know its more than 50A because as i accelerate it stays pegged it doesnt start going down till im going about 10 mph, this is the contoller i have maybe you know http://www.tncscooters.com/LB37.php
 
The current based throttle means that you can vary the current limit depending on your throttle setting. This has the effect of changing the SHAPE of the powerband for your engine. There's also the fact that since the controller measures the battery side current and not the motor side that you get this current multiplication going on where the motor sees much more current than the battery side reads. So what you are likely experiencing is the flat current limit holding steady from low rpms to high rpms and then once you approach the no load speed it falls away.

The current based throttle is going to do some very "weird" (but good) things to the powerband. In effect a partial throttle is best compared to making a gasoline motor run more LEAN. In most cases running the motor lean will increase the range because you are in effect lowering the current limit while maintaining a high voltage ability.

The "combined throttle" is the only idea not yet presented which means that you would vary both the current limit and the voltage at the same time. (it's a kind of compromise solution that might be interesting to consider as well)

:arrow: As you can see the range potential for the current based throttle is amazing. (it's a great idea)

The first chart is throttle(%) verses current(amps) as it's performed by the duty cycle of the PWM controller. It's interesting that all you really need to do is slightly tweek the controller and you get these different behaviors. The second chart is the range you get.
 
dirty_d said:
well i wouldnt even care about the adjustable current limit just as long as the throttle can do 0 to whatever my controllers amp limit is, im not sure if it even has one, my ammeter only goes yo 50A but when i accelerate its pegged to max an i know its more than 50A because as i accelerate it stays pegged it doesnt start going down till im going about 10 mph, this is the contoller i have maybe you know http://www.tncscooters.com/LB37.php

That case could simplify things a little. I'm not sure, but I think that particular controller has NO current limiter, so the maximum current is determined by the motor resistance and the battery voltage.

Unfortunately, I'm not planning to go into business anytime soon. The new CycleAnalyst has a similar feature, but it's a straight limiter with no throttle interaction. This would still be an improvement over essentially no limiter. BTW, the straight limiter circuit is much easier to build and adjust. I think the CA could provide this function with a few new lines of code. All the hardware is there.

After a fair amount of ride testing with this circuit, I can say I like the response. A motor current version would be very similar, but would feel 'gutless' in the low end by comparison. Increasing the throttle more would overcome this, so you'd get used to it either way.

When I get a chance, I'll try to draw up an improved circuit.
 
fechter said:
A motor current version would be very similar, but would feel 'gutless' in the low end by comparison. Increasing the throttle more would overcome this, so you'd get used to it either way.

Well, that is the basic idea for motor current limiting... make those low rpms as "gutless" as possible so the rider has to say "god dammit" and downshift so that the motor can return to higher and more efficient rpms. A non-geared bike would never want motor current limiting because there is no procedure (downshifting) to adjust the rpms. A hub motor or fixed gear bike simply doesn't want such a thing.

Increasing the throttle in a motor current limited bike doesn't do anything at the low rpms and it remains gutless. (it should anyway) The only way to restore peak power is to get to peak rpms. So increasing the throttle only helps with a current based throttle setup like you have.

I still think that since motor current limiting restricts low rpm torque and eliminates the heat that comes from that you can compensate with a more risky peak power setting. So while the bottom end will be "gutless" the top end will be extra powerful. 8)
 
safe, what do you mean by battery side current and motor side current? shouldnt they both be the same? and what do you mean by current multiplication? another thing i was wondering, is current being drawn from the battery in pulses of the PWM freq or are there capacitors to make it a constant drain, and on the motor end?
 
dirty_d said:
safe, what do you mean by battery side current and motor side current? shouldnt they both be the same? and what do you mean by current multiplication? another thing i was wondering, is current being drawn from the battery in pulses of the PWM freq or are there capacitors to make it a constant drain, and on the motor end?

Fechter (and others) had brought me through the very slow and very painful realization that there is indeed a difference between the battery current and the motor current. It doesn't make too much sense unless you think in terms of conservation of energy. If there are 100 volts available in your battery and you draw 100 amps from out of the battery (as measured at the controller) then on the battery side you have 100 * 100 = 10,000 Watts escaping the battery. (okay, maybe on a motorcycle, but the numbers are easier) Now on the motor side the PWM controller is making sure that ONLY 100 amps leave the battery since we are saying that it's a 100 amp limit controller. So maybe in order to make this "valid" the controller is actually only allowing 50% of the pulse width possible through to the motor based on what rpm the motor is at. That means that on the motor side it's only seeing 50 volts. But in our conservation of energy mindset we need to come up with 10,000 Watts to make everything balance. In order to make it balance you need to see 200 amps on the motor side.

:?: Why does this happen?

At the microscopic level I'd imagine that it has something to do with the accelleration that you get on each pulse. The more "empty" the pipeline (the wire leading to the motor) the faster the electricity wants to move. If it sees a traffic jam of other electrons (which is actually the status quo) it reverts to more normal behavior. Another weird one is "Inductance" which is a measurement of how easily the pipeline (the wire and the motor) fills up.

PWM is radically different than a resistor. A resistor is like water sitting inside a dam and the only way to get out is if you overflow the dam. PWM is like being able to pump water directly out from the bottom at high pressure.

:arrow: Fechter... was that a fairly good analogy for PWM verses a resistor?
 
even if the battery is 100v if the duty cycle is at 50% then the effective voltage would really only be 50v(100v for some period of time and 0v for the same period of time) same for current even though 100A(really not even 100A because an amp is defined as 1 coulomb per second, and since the PWM period is much less than a second it really is 50A at 50% duty cycle, though in the on period it actually is flowing at the same rate as 100A if you used smaller units of time) may be flowing in the on period its 0A in the off period averaging to 50A, if the controller senses that too much current is flowing all it has to do is reduce the duty cycle lowering the effective voltage in turn lowering the effective current, i see no reason why the contoller would need to lower the voltage and raise the amperage in order to do that it would need to convert DC to AC and use a transformer or use some sort of chargepump to charge capacitors in series and discharge in parrallel. as far as i know the main power circut is from the battery through the power FETs through the motor and back to the battery, so the current should be exactly the same at every point in the circuit. i dunno maybe im wrong and there are some finer details that change something.

i think a better way of differentiating PWM from a resistor would be like that a resistor would be like having a water pump and installing a narrow output pipe with the pump on 100% power all the time with the pipe lowering the rate of flow 50% while wasting power to do this and PWM like a pump with an unrestricted outlet turning on for a second and off for a second averaging to 50% of normal flow.
 
i went to radioshack and bought a 5v regulator, 10k pot, 100k pot, LM324 quad-amp(no singles), a bunch of 1k, 4.7k, 10k, 100k resitors, 2 .1uF caps and 2 .01uF caps hopefully that will be enough for a no current limit current throttle.
 
dirty_d said:
...i see no reason why the contoller would need to lower the voltage and raise the amperage in order to do that... so the current should be exactly the same at every point in the circuit. i dunno maybe im wrong and there are some finer details that change something.

:arrow: Well, current multiplication is just the way it is...

Here's a way to convince yourself pretty easily. If in a "perfect world" the battery side current and the motor side current were always the same then you would expect that as long as the current was being limited to a constant value that the heat generation would also be a constant value. (excluding the region beyond the power peak that tapers off into the noload area where the heat is actually less) However, in the "real world" on a long hillclimb the motor labors along at a certain rpm... if that rpm is high (the bike can carry the load near it's peak power area) then there is little heating taking place. If on the other hand the rpms go low then the heat builds up rapidly. The measured torque actually goes up as the rpms go down, this is because you get that "extra" torque due to current multiplication. Hub motors and other fixed machines rely heavily on this effect in order to have what is almost like a second gear, the extra torque is that large.

But back to that "perfect world" where the current limiting is the same everywhere and you would see a totally different reality. You would get the same heat no matter if you were at low rpms or at high rpms because heat is a simple relationship:

Heat = Amps * Amps * Resistance (that's Amps squared)

...but we don't see this "perfect world" and instead get lot's and lot's of heat at low rpms.

So the heating of the motor when on a hill is in a sense the "lab proof" of current multiplication. Otherwise the motor could never overheat... (which is definitely not reality)
 
the motor draws more amps at low rpm because the back-emf voltage is very low so the effective voltage to the motor is higher(effective voltage = supply voltage(battery voltage * duty cycle) - backemf) causing more amps to flow(torque).

so if you are at a dead stall and you give full throttle at that moment the effective motor voltage is the battery voltage drawing as many amps as motor resistance permit, at full speed the backemf is considerably higher on my 1020 1200W at full speed with the motor at around 3500rpm the backemf is about 42V so the effective voltage to the motor is about 48V(bat) - 42V = 6V, 6V / .3ohms(motor resistance) = 20A at full speed on flatish ground.

heat = R * I^2(i looked at yours wrong at first, you edited that didnt you? lol)
 
The current multiplication occurs at less than 100% duty cycle. The windings in the motor act as an inductor and the controller topology behaves like a buck switching power supply.

I have made actual measurements on this, which indicate the motor current (rms) can be as much as 4X the battery current, peaking somewhere around 25% duty cycle.
 
So, Do we have automatic regen on a clyte? Please speak English (as opposed to engineerese) So do we charge the batteries while coasting downhill?

Thanks,
Al
 
fechter said:
I have made actual measurements on this, which indicate the motor current (rms) can be as much as 4X the battery current, peaking somewhere around 25% duty cycle.

Fechter is the expert on this stuff and he was the one that eventually got me to realize that what seems crazy is the way things really work... as the motor rpms go lower it is capable of drawing more amps and current multiplication is the process of the controller allowing this to happen. The bad thing is that the actual power peak is in the middle (it's a parabola) but the low rpms that give less power (but ironically more torque) also generate more heat.

If 25% duty cycle, low rpms, produces 4X the heat, then it also produces:

Heat = R * I ^ 2

Heat @ 100% Duty Cycle = R * (1) ^ 2 = 1

Heat @ 25% Duty Cycle = R * (4) ^ 2 = 16

So the difference in heat from "ideal" to "worst" is a factor of about 16x.
 
Back
Top