View Single Post
Old 01-14-2009, 02:50 PM   #198 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
I don't know anyone with a cnc mill. That would be so awesome, though! Well, Ben Nelson said a friend of his had a modified thing that can etch stuff. I might end up mailing it over there, but I was planning on getting a basic mill next month. I'd have to turn the hand cranks, but at least everything would be straight.

Originally, I wasn't doing current sensing, because I thought I cooked my hall effect current sensor when I tried to solder it. However, when I caused 5 mosfets to fail (all at the same time!), I thought I should try it and see if it still works. It did! It can monitor current up to about 50 amps. It has been working great.

Your thinking on throttle controlling current instead of PWM duty (a truly awesome and original idea that I wouldn't have thought of!) was what Ian of zeva.com.au decided to do too just recently, because his low rpm current was really high, causing jerky starts. He would get full torque at like 10% of throttle. He has a burnout mark in his garage because of it.

He changed it so throttle would determine current. He threw in one extra detail, though. He has it set up so that at 10% throttle, you either get 10% PWM duty, or 10% of MAX_CURRENT, whichever happens first.

For example, let's say you are barely moving. Very low RPM. Maybe you only need 3% PWM duty to get 10% of MAX_CURRENT, but the throttle is at 10%. So, he sets the PWM duty to 3% (which limits current to 10%).

Let's say it's very high RPM now. The throttle is at 10% again. Let's say the current is only at 3% of MAX_CURRENT. Then he sets the PWM duty to 10%. He says his results with that setup make for very smooth acceleration. It feels just like a "petrol car" (crazy australian).

I changed my code so that throttle controls current and PWM duty as described above.

You bring up a very interesting topic! PID control (or PI control), and tuning to get the right constants so the unit step response is just how you want it! I've been reading up on that lately, because the experts on the EVTech list suggested the same as you. I have some questions as to why it would be better than what I'm doing:
__________________
kits and boards
  Reply With Quote