On 9/3/2012 6:17 AM, Peter wrote: > Joe, decide on power or torque limiting (these are 2 different things), t= hen > implement it. It is a closed loop so you just do Pwmcontrol =3D (limiting= )? > Demand: Demand - LimitingSignal; Cycle by cycle current limiting is anoth= er > thing, and is actually a good idea, but that requires that you see the > individual current pulses. It may be, that individual pulse current limit= ing is > all you really want, and that is best done in hardware alone imho. > Yeah, I'm going to have to tinker with this a bit to get a feel for it. =20 I had to look up the difference between torque and power. I'm going to=20 have to choose torque, since no work will be done if the motor stalls. =20 I guess I can implement the above logic using a scaling factor k for=20 LimitingSignal. I can start with k large enough to effectively shut=20 PWM off when limiting. If that works, I can try decreasing k and=20 observe the effect. I finally added the wiring for this (and speed and pedal torque input)=20 now it's time to see if it works. I wish I had put more effort into understanding some physics and=20 whatever math is needed for motor control applications way back when. Joe W --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .